Header Ads

#include Web


The web is opening up. All major web sites, and web applications now provide a way for developers to unleash their coding fury. By doing so, they ensure that their web site gets more applets, widgets and features, without requiring them to add any! It’s a win-win situation

For those brave enough to start their own web site, things are getting easier. A plethora of open source web development tools, platforms, frameworks, applications and SDKs are now available to the user. One can start an entire online venture with no cost at all (except on the coffee consumed in multi-night coding marathons). Every aspect of the web development cycle can now be accomplished with some open source tool. Like animals shooed away from the new social civilization that seems to have conquered their jungle of the web, the geek must now search for new avenues of development. Enter the open source web. The developers are back, with a vengeance!

I, Developer

Although open source has greatly changed the landscape of computer applications, this change is mostly visible in the field of web applications. Apache is the most popular web server application, PHP one of the most popular and widely used web application programming languages, and MySQL is one of the most popular data back-ends of the internet — all these three being open source. Once you have a nice juicy server with PHP and a database what do you do with it?

There are now some powerful and amazing open source web platforms available for use, so you don’t even need to do a single line of coding to get it set up.

Well, reinventing the wheel is fun, but after you have thirty pieces of carved circular stones lying in your garage, you begin to realize the futility of it all. With a nice open source framework / platform set up, you can now focus on the best parts; adding features no other web site has, and changing the very way people interact with it. Few web sites will use a framework out-of-the-box, as such there is also great demand for people with the knack to customize popular CMS frameworks such as Joomla and Drupal.

Localhost will see you

Testing and developing your web site on a hosted server is quite cumbersome. If you’re a developer, you need to have a local server system set up to run your web application on your own computer before you unleash them onto the world. Setting up a local server is not only simple, it’s also free!

For open source applications, typically you’d do your development in PHP and run it on an Apache server with the PHP module. Here, the Apache server is responsible for serving the content from your hard disk to the internet, and making it accessible. PHP does the processing bit, crunching numbers, making the web site more than just a collection of linked pages. Apache is then the HTTP web server with PHP being the server-side scripting language.

Most web sites will also require a data back end, to store anything that may need to be retrieved later on. Content management systems (CMSs) store the articles and user registrations; forums store user registrations and forum posts in the database, etc. The open source database server of choice is usually MySQL, where SQL stands for Structured Query Language. Here the data is accessed and modified by using commands written in the SQL syntax, which allows for complex modification of data in the database using simple English-like statements. Setting these three up to work with each other can often be quite a pain for a n00b. To make things simple, there are many packages out there which set up all three for you in a single install, and configure them to work with each other, without requiring you to do any manual configuration. These packages known as AMP or Apache MySQL PHP packages are also free and open source, as are their individual components.

Note that an Apache Server running PHP with a MySQL database is not the only open source option. You will find a wide variety or free open source servers such as ‘lighttpd’ which as its name suggests is a lighter server in use by web sites such as YouTube, mininova.org, sourceforge.net, and even Wikipedia. Many variants of Apache are also available since it is open source.

Instead of PHP one can use Perl, Python, Ruby, even JavaScript. However, PHP remains the most popular choice. Many web applications do exist which use alternatives to PHP. For example, Bricolage a CMS; Movable Type, a blogging platform; and TWiki, a wiki application all use Perl, some CMSs such as Plone and Django use Python. You are by no means limited. Since Perl, Python and Ruby are all open source, you can go as far as to develop your own custom version to suit your needs!

Databases also have a plethora of choices available besides MySQL. PostgreeSQL is another popular alternative, which offers more features at a performance cost. Even besides these two popular ones there are many, many more which are perhaps not as commonly used. MySQL is the most popular open source database you will find, and it is extensively supported by most if not all web applications. Most are only compatible with MySQL and as such will not work on other variants, unless they offer a feature and usage parity. Of course, if you want to go far enough, you’re a developer right? You can always make your own plugin!

Managing content

For almost anything that you want to develop, you are sure to find a framework or application that almost, if not completely, fits your needs. Looking to create a web site for creating and sharing documents, try ‘opengoo’. Want to make a community social web site check out ‘Elgg’. These are some of the more obscure example of web applications, one of the most common uses is content management.

Content Management Systems or CMSs come with support for extensions in the form of plug-ins or modules, any kind of add-ons really. When developing a web site that deals with large amounts of content, it is impossible to simply keep uploading connected HTML documents. You need to use a CMS that can categories and tag the content, and present it to the user in a way that presents a clear way of navigation. The default configuration that these come in is unlikely to be suitable except in the most basic of circumstances. However, most CMSs will come with an easy way to create extensions, themes and the like, and it is quite likely that someone has already created the perfect earrings to put on your Mona Lisa.

What are these CMSs like? Let’s take two popular examples — Joomla and Drupal.

Joomla


This is a very popular CMS, thanks to a huge active community of plug-in developers and theme designers. Joomla allows you to put content in different sections which can be further divided into categories. It has an administration backend where you can configure all settings for core features and installed extensions. Joomla is very extensible, and supports different types of add-ons which serve different purposes.
  1. Plug-ins: these add features to the site which affect how each page is processed. Such as automatically creating links from wikitags, adding new content editors, or searching content. Plugins are a simple way to add functionality.
  2. Modules: these are like widgets which can be displayed in different sections of the page. For example one could install a polling module to add a poll facility to the website, or add a chatting module to allow people to chat with each other on the site.
  3. Components: components are major additions to Joomla. They can sometimes be as complicated as Joomla itself! Adding features such as an image gallery, or a forum, or blogs is something that can be accomplished by the use of components. Major additions to Joomla’s core functionality can be made only via components.
  4. Languages: languages are simple extensions which map different sentences to their equivalents in other languages, allowing your web site to be accessible to more people.
  5. Templates: these allow you to completely change the look of the site. Templates are the pieces of code which finally decide what kind of content should go where, so more than just the looks, they decide how a person interacts with the site.
Drupal

Another popular CMS which competes with Joomla, Drupal differs quite a bit. Architecturally, it is more of a framework for building CMS applications than a CMS itself. However, even out-of-the-box, it is sufficient to create a web site.

Drupal has a layers-based approach — data, modules, blocks, users, and templates, each extendable. It is a collection of interconnected features which can be put together depending on your requirement. It supports the addition of modules, which could do anything from display a simple text editor for entering content, to add a complex podcasting platform.

Drupal is often criticized for its weaker support for visual customization with themes (equivalent to templates in Joomla). A lot of work is being put into Drupal to make it even more powerful in this respect.
  1. Taxonomy: instead of having a rigid section-category system, Drupal allows you to create your own categorization system using taxonomy. You can create custom systems of tagging or categorizing content, and have single pieces of content belong to multiple categories.
  2. Multiple site setups: a single installation of Drupal can be used to manage multiple web sites.
  3. Inbuilt forum and comment support: while Joomla requires add-ons for these functionalities, Drupal comes with them integrated.
Depending on what suits you best, you can chose either one (or one of the many other CMSs available) and build on it with ready-made or custom extensions. However, if your purpose is to simply have a custom blogging system, or a customized forum, you are better off starting there. Most of the popular blogging platforms that you’ll encounter such as Wordpress, or Movable Type are open source, and support their own mechanisms for extensions and themes.

The backend isn’t everything. You may need to develop some content that will be for the users’ computers, such as Flash content, animations and images. You will need to create a front-end that users can interact with easily. A fast responsive web site will be useless if it isn’t sufficiently engaging. Creating a rich interface with JavaScript and AJAX requires no special tools. However, Flash content can be trickier. You will be pleased to know that an open source solution is available from Adobe!

Adobe offers a full, free and open source Flex SDK which it offers as a programming environment for the development of Flash applications. Unlike Flash, it isn’t very intuitive as an animation tool, as it requires everything to be coded. For developing web applications, however, it works.

Creating a unique online experience for your visitor is a tough job indeed, and going for an existing solution makes the job a bit easier. You can continue to customize the web site to your liking and leave updates to the core functionality and security patches to the developers of the platform. If you feel generous of course you are free to join in and help them out.

API-ing around Does it seem like too much of a hassle to start your own venture? Then build upon others’. Many major web sites today support a way for users to extend the functionality of the site on their own. Like a clever buffet system: all the features are laid out for you and all the blame falls on you if you only go for the meat and potatoes. Orkut, Facebook and MySpace all now allow you to develop applications for their sites. Orkut runs the open source OpenSocial platform for developing social internet applications. Facebook and MySpace also offer extensive documentation about their APIs, allowing you not only to build applications on their web site, but also to build applications on your own web site which integrate with information from these sites. One can also build desktop applications using information from these sites to make their applications more socially aware.

After learning the basics of their API, you can start developing applications that will run on Orkut, MySpace or Facebook servers. Depending on how useful or fun your application is, you can become quite a web hero. Considering that some of the popular applications involve throwing toiletries at each other, we think you’ll do fine.

Conclusion

Think you’re done? Really? What about mail? What about FTP access? Do you really want to send newsletters with attached floppies via the Indian postal system?

When you really develop a web site, it is likely going to evolve as you gain more popularity and resources. It is best to keep that in mind, and make the platform as extendable a possible. You may not need many mail facilities right now, but maybe in the future. You may not need an FTP server to distribute files, but you never know.

You will be pleased to know than that there is a plethora of options available in the open source segment for all these needs. In fact, if you have Linux installed, quite a few of these features may already be installed on your system, and the rest will be available on your installation CD. Linux is particularly good for running a server (even while testing) as it is robust and stable and comes with all the server functionality out of the box.

Besides an HTTP server, and a database server, you may additionally need:
  1. An FTP server: for allowing efficient downloads of files.
  2. A POP / IMAP and SMTP server: if you need to provide in-house email facility to users of the web site.
  3. A DNS server: if you want to host the entire server infrastructure on your own terms, you will need your own DNS servers to resolve name requests in your domain.
Some of the greatest and largest web sites have emerged from some of the simplest ideas, whether it’s merely posting what you’re doing right now or making long URLs shorter. Go ahead, hitch your wagon to the stars, who knows your web site may someday become the best for remote encoding of media files for parallel distribution via multiple channels.