We have been lately working with several web applications and social media systems. Every system has a unique business model and value proposition to the customers and the visitors, and thus the functionality we have been implementing vary a lot between the applications. However, when digging one level deeper, similarities start to surface. There are a lot of typical features in web applications, such as registration, signing in and out, viewing your details, and so on. On the admin side, one needs to be able to list, add, modify, and remove items -- whatever they might be -- and to manage users, see log files, etc. If we drill one more level down, there is a need for a common set of library functionalities, such as image manipulation, friend and group management, session handling, and protection against SQL injections and XSS / XSRF attacks. If you are coding all components mentioned above, you are either in framework business or doing something wrong. There is no need to invent the wheel again. Instead, you should be focusing your energy on selecting the correct wheel for your needs. There is a plethora of different web application frameworks in the market. Some of the publishing systems, such as Drupal or Joomla! provide their own application frameworks within the CMS. The selection is not easy, because approaches to the challenges of web application development are different, and sometimes even not directly comparable. When we selected our core set of tools (Drupal, WordPress, eZ Publish, and CodeIgniter), we looked at the following items:
- Easy of extensibility. How easy it is to extend the system using the API provided? Or do you need to take shortcuts and fight against the system when there is a need to make anything fancier?
- Availability of third party components. Can you rely on third parties to solve your problems completely or partially? What is the quality of these components? This resonates directly with the needs listed above.
- Separation of content and presentation. Is there a proper template system with easy enough syntax? Does the system enforce good policies for separation, or do components produce HTML directly?
- Performance. How long is the route to your code through the system? Does the system provide mechanisms to cache data in various levels? Some of the systems are notoriously bad in this area, and constant attention needs to paid to the performance throughout the project -- others are lightning fast.
- Documentation. How well the system is documented? This can be a real killer, as reading code is way slower than reading through good documentation.
- Fit for the purpose. What is the problem that the system tries to solve? Is this your problem, too? Developing applications against the system is a constant uphill battle and not worth the money and the effort spent.
None of our systems are perfect. WordPress has issues with separation of content and presentation, and the performance is not optimal. However, it is an excellent tool for small and medium scale web sites. CodeIgniter is fast, but you need to implement a lot of functionality around it. There is a good number of third party components, though, and active development going on. Within Drupal, there is typically at least one module that solves similar problems you are working on -- sometimes the approach is not valid, or the module is half-baked. After selection of the systems, we have been steadily gaining knowledge of good modules and extensions that can improve the projects at hand by cutting development time and thus prices. Further, we have been implementing a commonly used functionalities, as mentioned in the beginning, into libraries and components that can be used in any project requiring such functionality. We do not believe in coding for possible future needs, so the components grow based on the needs of the project -- and the next projects get more features from the same components. One just needs to keep the solutions generic enough so that they can b reused. We have been able to use the components so that some projects have been able to implement a large set of functionality, such as group management, with only a few hundred lines of own code.