• Happy Coding

Archive for the ‘Building the Web’ Category

Here comes the private cloud

Image representing Amazon Web Services as depi...
Image via CrunchBase

Amazon Virtual Private Cloud (Amazon VPC) is a secure and seamless bridge between a company’s existing IT infrastructure and the AWS cloud. Amazon VPC enables enterprises to connect their existing infrastructure to a set of isolated AWS compute resources via a Virtual Private Network (VPN) connection, and to extend their existing management capabilities such as security services, firewalls, and intrusion detection systems to include their AWS resources. Amazon VPC integrates today with Amazon EC2, and will integrate with other AWS services in the future. As with all Amazon Web Services, there are no long-term contracts, minimum spend or up-front investments required. With Amazon VPC, you pay only for the resources you use.

Reblog this post [with Zemanta]

Invalid command ‘RewriteEngine’

After i made a new Apache installation on Ubuntu in whose httpd.conf file i use the

RewriteEngine on

command, i got the following error, when starting Apache:

Invalid command ‘RewriteEngine’

To fix this problem, i executed

sudo a2enmod rewrite

to enable the Rewrite module.

Getting URL parameters via JavaScript

Just found a nice JavaScript example at netlobo.com — using regular expressions — for getting parameters from the URL:

function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

“pronounced her-OH-koo”

Just stumble on a Ruby on Rails online deployment service: Heroku. Don’t know if its good, but it looks promising.

PHP: Exec a script in the background

To run a background process (here: background.php) using the exec command of PHP use the following:

exec("/usr/bin/php /path/background.php > /dev/null 2>&1 &");

It is necessary to redirect the output of the child process (here: /dev/null). Also if the parent process dies, the child process will run independently.

reCAPTCHA

Early CAPTCHAs such as these, generated by the EZ-Gimpy program, were used on Yahoo. However, technology was developed to read this type of CAPTCHA http://www.cs.sfu.ca/~mori/research/gimpy/ .Image via Wikipedia

Just visited Twitter to see how they implemented their Captcha functionality and then i saw that they use reCAPTCHA. I’ve never heard of this before, but it seems to be really cool and easy to use:

reCAPTCHA helps prevent automated abuse of your site (such as comment spam or bogus registrations) by using a CAPTCHA to ensure that only humans perform certain actions.
[...]
reCAPTCHA is a Web service. [...] For many applications and programming languages such as WordPress and PHP we also have easy-to-install plugins available.

And the best: it’s free!

Javascript Libraries/Frameworks

Some nifty Javascript toolkits are flying around. The list below contains the best of them.

Prototype

Prototype is a JavaScript Framework that aims to ease development of dynamic web applications.

Dojo Toolkit

The Dojo Toolkit is an Open-Source javascript library used for rapid development of robust, scalable, rich web projects and applications … with Drag and Drop, Animations, Ajax, Events and other goodies.

mootools

MooTools is a compact, modular, Object-Oriented JavaScript framework designed for the intermediate to advanced JavaScript developer. It allows you to write powerful, flexible, and cross-browser code with its elegant, well documented, and coherent API.

Ext JS

Ext is a client-side, JavaScript framework for building web applications.

script.aculo.us

script.aculo.us provides you with easy-to-use, cross-browser user interface JavaScript libraries to make your web sites and web applications fly.

Yahoo! User Interface Library

The Yahoo! User Interface (YUI) Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX. The YUI Library also includes several core CSS resources.

jQuery

jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages.

XBox360 interface with Javascript

Just found a nice javascript-interface which is apparently inspired by the game “Blade” on the XBox360 from Microsoft.
See portalzine.de

xbox interface

MIX07

Tomorrow the MIX07 — a Microsoft congress for developers & designers — will take place in Las Vegas. There are some interesting topics as you can see in the sessions-section.
And you can find MP3-interviews at Channel9 with some of the speakers, where they talk a little bit about their presentations and topics.

Mongrel

Mongrel is a fast HTTP library and server for Ruby that is intended for hosting Ruby web applications of any kind using plain HTTP rather than FastCGI or SCGI. It is framework agnostic and already supports Ruby On Rails, Og+Nitro, Camping, and IOWA frameworks.

Ruby-Java Bridges

Call Java-Code from Ruby.

For example with RubyJavaBridge or YAJB.

JRuby

JRuby is an 100% pure-Java implementation of the Ruby programming language.

A nice article regarding Ruby & Java can be found at javaworld.com: Ruby for the Java world.

memcached: an object caching system

memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

Instead of stressing the database everytime, you can store objects with memcached and load them later from the cache.

Now, in your application, wherever you go to do a database query, first check the memcache. If the memcache returns an undefined object, then go to the database, get what you’re looking for, and put it in the memcache…

If you are using for example PHP, there is a special module which can handle accesses to memcached. See php.net/memcache.

JSON für Datenaustausch

JSON kannte ich noch gar nicht. Sollte man sich vielleicht mal anschauen:

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition – December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.

For Web-Developer

Firebug.

Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.

URIs for eternity

It is the the duty of a Webmaster to allocate URIs which you will be able to stand by in 2 years, in 20 years, in 200 years. This needs thought, and organization, and commitment.

see W3C’s “Cool URIs don’t change“.