RSS Feed

Way of web development

Posted on

Personal Web Server(?) age

When I was doing web development, that time was mostly static pages, with no CSS, a little JavaScript. The only interaction was CGI form. Then I learnt VBScript for ASP and Microsoft Access and used Personal Web Server.

Designing page layout was like hell, everything was using table. The font style was hard coded. So, the HTML source is too messy.

LAMP age

Then, from Personal Web Server, the web server was upgraded to IIS. Next was XAMPP on Windows, using all open source solutions: Apache, MySQL, and PHP. That was a great solution. Unlike ASP, PHP has more functions, more libraries, supports object oriented, syntax similar to C and C++.

JavaScript was not frequently used (in my case), until the usage of XMLHttpRequest (XHR) and AJAX, dynamic content became more attractive. The usage of CSS makes the HTML source much cleaner. JavaScript frameworks became popular for web application development. Some of the frameworks provide better user interface and animation effects. I used MooTools, jQuery and jQuery UI. In my opinion, jQuery is the best because of the element selection syntax is based on CSS selection. It is a great solution to enhance the built-in JavaScript.

To build the web applications, there are web application frameworks too: Ruby on Rails, django (Python), CakePHP (inspired by Ruby on Rails), etc. I personally prefer CodeIgniter. These frameworks are using MVC architecture, including ASP.NET MVC. Instead of static pages, URI routing is used. The developers need not to repeat the source code for similar pages, but using template engine and URI routing, developers only need to focus on the MVC design. Moreover, the web frameworks have their own APIs, the developers should learn how to use these APIs. So does the database, by using the framework APIs, it is possible to change the database from MySQL to PostgreSQL with a little modification.

With the CSS3 and HTML5, web application development becomes much easier. They become more interactive with JavaScript, more elegant with CSS effects.

Other than the frameworks, content management systems such as Joomla!, Drupal, and WordPress were very popular. They allow users to manage their own websites by focusing on the contents only. The developers are usually working on modules to provide more functions to the system, and the web designers will design the themes.

MEAN age

And now, the new trend is the MEAN stack instead of LAMP: MongoDB, Express.js, AngularJS, and Node.js. This solution is seriously different from LAMP. Node.js is not only a web server, but also a server-side JavaScript runtime environment. Unlike client-side JavaScript, JavaScript language is used at the server-side, and it can use the modules which can be installed by using npm (JavaScript package manager). As a result, both client and server sides are using JavaScript.

On the other hand, Express.js is the MVC web application framework. The URI routing and displaying the contents to the users is handled by Express.js. It can use different kinds of template engine where Jade is the default template engine.

AngularJS is a web application framework, which is different from jQuery or JavaScript modules from npm. AngularJS provides MVC architecture to the client-side, so that the view (HTML and CSS) are separated from the controller and model. The greatest feature is the data binding which will make real-time changes to the view. Using jQuery, we need to use EventListener such as onChange(), onKeyDown(), etc. But AngularJS magically omits this phase (demo).

NoSQL is the new trend because of big data. MongoDB is the document-oriented database, which is classified as NoSQL. Relational database management system (RDBMS) such as MySQL organises the data in the table form. As a result, sometimes the design of the database structure is very rigid and causes further changes of the web application becomes difficult. MongoDB does not require table structure, each collection (just like a table in MySQL) has various objects (just like rows of a table in MySQL). Each object is a JSON-like object, specifically BSON (Binary JSON).

Epilogue

Web development is like an ocean. There are various opportunities using web technology, such as WebGL for 3D computer graphics on the web. There are also alternative web servers: Nginx and Apache Tomcat (for JSP); alternative server scripting languages: Perl, Python, Ruby; stylesheet languages: Sass and LESS. It is also possible to develop new wonderful plugins for the web browsers to perform unusual tasks.

Some command-line applications uses web user interface (Web UI) instead of GUI, eg uTorrent Server (for Linux), httrack, Syncthing, etc. This is because HTML is more common than GUI widget toolkits. GUI widget toolkis such as Windows Forms, Qt, GTK+, etc requires runtime libraries. Web UI requires only a modern web browser.

WebKit is a very interesting thing. It is ported to Qt and GTK+, so that Qt and GTK+ can embed the web view in the native applications. Furthermore, Android has WebView class that uses WebKit too, to embed the web view in the native Android applications.

As the trend of big data and IoT, server-client is everything. Linux can be lightweight and focusing on running servers only, including all the logic, running on a single-board computer like Raspberry Pi or C.H.I.P, without any graphical user interface; Web UI allows administrators to manage the Linux server; the devices can connect to the Linux server and perform their tasks systematically.

About Allen Choong

A cognitive science student, a programmer, a philosopher, a Catholic.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: