Should you use Open Source software for your next project or build your own Web Application?
- 09 February 2014
I have worked on a range of bespoke applications/frameworks and have tried and tested many open source platforms over the years; CMS’s (Content Management Systems) such as WordPress, Prestashop, Magento, Joomla, Drupal and PHP Frameworks like Zend, Code Igniter and various other off the shelf products. Some I have downloaded and just had a little play with whilst others I have explored more thoroughly.
What I have encountered from using OSFS (Open Source Free Software ; for the purpose of this article OSFS only refers to PHP CMS’ and Frameworks) is that each seems to have certain things I like and certain things I don’t, some customisations can be easy whilst other customisations would be easier with your own bespoke solution. This ultimately led me to building my own framework picking some of the features I liked from these frameworks and adding a few extras.
CMS’s such as WordPress and Joomla are essentially a readymade web application that you can customise, whilst a Framework such as Zend and CodeIgniter are essentially a collection of Classes/Libraries that allow you to build your own web application.
WordPress and Joomla (which I think are great pieces of software) allow a non IT specialist to get a blog/website up and running in no time.
You can download themes/plugins and customise your own etc. When you need to add some custom functionality and you can’t seem to find a plugin for or a guide how to do what you’re after. You will need to learn how to create plugins or the inner workings of the piece of software, find someone else to do it for you or find an alternative solution.
So if you require something specific then these CMS’s are probably the wrong choice and a Framework or custom made application would probably be the right choice.
Zend and CodeIgniter allow a web development team (who know how the Framework works) to build their own web application using OOP (object orientated programming) following the MVC (Model View Controller) pattern (There are many other patterns such as MVP, PAC that other Frameworks and applications use). These patterns are employed to help speed up development time by separation of logic and presentation allowing specialists to work on specific areas e.g. front end developers/designers to concentrate on design/interface, Backend developers to work on the business logic and SQL/database guys to concentrate on the data.
They also come with an abundance of other features such as built in DAO (Data Access Objects) to save you having write repetitive queries, form validation and sanitation methods and data caching systems which means you don’t have to spend time writing and implementing these systems yourself.
Now there are many Open Source Frameworks such as Zend, CodeIgniter, Cake etc. and they all require some learning to get up and running, each have their own pitfalls as well. I’m not a huge fan of Zend Framework, I think it’s bloated and a rather cumbersome Framework with a steep learning curve. If you want to a relatively small website but quite specific I would say forget about Zend altogether either choose a more lightweight Framework which you can get up and running faster or build your own application.
If you were working on a large project then using Zend could save development time by not having to build a full featured framework, however you and your team either need to learn it yourself, pay for a course or hire some Zend specialists.
In saying that I would say that if you’re developing a large project or a high load project then I would consider building your own Framework because you can develop it to your specific needs, allowing you to tailor it for performance, specific tasks and load only essential libraries and files that are needed.
I’ve seen conflicting reports about Zend Frameworks performance benchmarks, most saying that it is the slowest Framework, others stating it’s the fastest (but that is after tinkering with it, removing Zend_Application, i.e. more learning required).
Bugs and Security Flaws
If you find the core software or any plugins contain bugs or security flaws you will either have to wait for the developers to release an update/patch or patch it yourself and editing the core of any OSFS leads to problems down the line when updating.
So generally when picking OSFS you want software that is regularly updated and has an existing community of people already using the software. This is a bit of catch 22 scenario though the more popular the software the more publicly aware the bugs will be and the more likely hackers will be reverse engineering the software to find bugs, holes and exploits.
With a good pieces of OSFS as soon as the exploits and bugs are in the wild they will issue an update. This also means that you find a way of getting notified about bugs/security flaws and should keep on top of updating/patching your software.
If you are doing this for your own personal project or you only manage one website then this may not be a problem. If you are setting up a blog for everyone in your workplace or you are regularly setting up a blog for many clients with different hosting platforms, then this could be problematic.
If you will be developing future projects will the OSFS you used for the current project be applicable to them or will you need to use another solution? For instance if you use WordPress with specific plugins for one client, then a WordPress with another set of plugins for the next client, then Magento for the next, and so forth. If there is a security update for WordPress you will need to roll update out to all your clients, which raises several questions:
- Will the plugins work with the updated version?
- Do you keep unsecured version with working plugins?
- Do you update and wait for plugin update or fix yourself?
- How do you keep track of changes across all clients?
These are some of the trials and tribulations of using OSFS where initially for small, individual or similar projects they can provide a quick effective solution but for larger more varied projects you will need a more robust solution.
What is the right solution for you?
In essence you need to ask yourself a few questions to work out what is right for you:
- Do you plan on doing more projects in the future?
- How many?
- If more, will these be similar or varied?
- If varied, how varied?
- Where will project(s) be hosted?
- If hosted on multiple platforms will you have access?
- Will these platforms be able to support your software?
- Who will manage updates?
- Who will be developing the application?
- Solely you or other developers?
- What skills do you/others have?
- Do you have existing systems/applications or completely new?
- Does this need to be built around existing systems?
- Does this need to interact with existing systems?
If the main thing you’re going to be doing is simple blog or simple brochure websites, then a CMS kit like WordPress or Joomla may be the ideal solution. If you’re going to be doing a single website selling a simplistic product (one that has no customisable features/dimension’s etc…) then an open source e-commerce solution may be right for you.
However if you have one client who wants a simple e-commerce website, then another who wants an invoicing system, then another who wants a stock control systems that’s ties into their existing POS system or other highly customisable solution if you keep moving from one OSFS to another then you will more than likely come unstuck .
Another issue which is often overlooked is the client support of OSFS. Let’s say you produce a website using Prestashop for a client (Client A) and the sites goes live and the client is happy as Larry. You carry on as usual only now you’ve decided to use Magento for your next client’s (Client B) website as that has a nice invoicing system which meets the client’s needs. This has taken a bit longer to style but the site goes live.
5 months later everything is going nicely, during this time you have been churning about WordPress websites but then you get a call from Client A saying that he’s had a complaint from a user every time they add multiple different products to the basket it calculates the VAT wrong. Then 5 minutes later you get a call from Client B saying that whenever a customer purchases something they don’t get an email. You now have start debugging and researching issues on two completely different systems that all you don’t know the inner workings off code wise because all you really did was initially design a theme, modify a configuration file and set up the product categories. Now the short term savings of using OSFS has caught up with you as you are spending time figuring out the code behind the products to solve your user problems.
If you have to learn and develop a new product for each website you build then you are just making more work for yourself and the only effective way to support some of these solutions is to become an expert at it and learn it inside out.
There is no point in saving development time using OSFS if it will take up all your time trying to support it. The one great benefit from building your own system or software from scratch is you know how all the pieces fit together so when it comes to customising or fixing bugs it is generally easier.
The common goal here in the long run is to not only minimise development time but to minimise management time. The closer you can get to develop a single reusable solution that you can easily build new functionality and customise in the future the better. In order to get to this single reusable solution though you will have to spend time playing around with some OSFS yourself.