With advent of modern package systems like gems, Nuget and CDNs it has never been this easy to use open source in software projects. As of this writing there are thousands of JQuery plugins, hundreds of ruby gems, and hundreds of Nuget packages. I have seen developers arguing about their favorite ORM tool. I have not seen enough arguments about which JQuery light box plug-in should be used for the user interface. If you try to take a stock of all dependencies (both commercial/open source) on your code, you might be surprised to see the list.
I surveyed few .Net web applications. A single web application can have following list of components, without counting the major dependencies like Object Relational Mapper
- Charting
- Ajax
- Half a dozen JQuery plugins/other JavaScript alternatives
- Spread sheet
- Dashboard
- Social networking
- Payment gateway
- Reporting
- Other value added services like support, feedback, live help
- External web services
- Scheduling
- JSON
- Mocking
- Unit Testing
Now imagine using a open source component for each one of these dependencies. That is a lot of code to maintain!
All non-trivial abstractions, to some degree, are leaky
At one point or the other your team needs to know internals of every open source library used in your project. Some of these libraries have hard dependencies, with a potential of preventing the future upgrades.
Never under estimate the testing burden. Take the example of a JQuery plugins. Usually these plugins depend on JQuery. When you upgrade JQuery, you are forced to upgrade the dependent plugins. Depending on quality of the plugin, many times you end of spending hours in debugging why a web page is failing to find the correct version of plugin that works. Cross browser testing is also time killer. All this can become very complex when all you trying to do is upgrading JQuery to its latest version, which itself is a trivial task.
You might not see this kind of risk with popular open source libraries. As they operate similar to commercial offerings. But not all of the open source projects are popular.
Some tips to control the proliferation of these dependencies in to your projects
- Always maintain a list of open source dependencies. Make it available to QA team and developers.
- Create a test suite to test all these dependencies. And run the tests with every deployment.
- Always check-in the source code for the open source project in to source control.
- Try to keep these dependencies to minimum. Remember that your team needs to re-learn these dependencies on every upgrade or major functionality rewrite.
- If possible try to stick to a known set of controls from a single vendor.
- While choosing the libraries weigh in your team’s skill set, team’s composition and future direction. If you don’t have dedicated resources to focus on Ajax work of the website, it is better to stick to a commercial solution than using a laundry list of multiple open source offerings.
No comments:
Post a Comment