| Symfony, blessing and curse - part 2 |
| Friday, 04 December 2009 17:02 | ||||||
|
Documentation: PHP is a long established language although PHP 5 OOP features are comparatively new or represent enhancements over previous constructs. There is PHP documentation as far as the eye can see. You are sure to fin some documentation that will work for you. But I was not only concerned with documentation of the language but of the framework. I found Symfony documentation to be excellent. There are tutorials, reference books and bibles. The quality is excellent and while I consider the learning curve for any framework relatively steep (it is essentially the same as learning a completely new language, new APIs and interfaces. The Symfony documentation is concise and largely error-free. The Symfony web site offers core books (which will run you a fair amount of money at Amazon) available for free in PDF format. The Symfony team has understood that the adoption rate will be proportional to the ability of new users to grasp its functionality. Code that works magic is useless unless I know how to use it and I managed to get a handle on Symfony, a complex framework, in a relatively short amount of time. Pretty much the same can be said about Rails. Ruby and Rails have been around for a considerable time and well-documented. Much of it is high quality, readily available and the average programmer should not have too hard of a time picking up both language and framework. I read a couple of books on the matter and I felt I reached a good understanding in a short amount of time.CodeIgniter is a smaller framework with more modest objectives. It's web site only offers online reference material, no ability to print of a PDF guide and while this keeps documentation up to date appeared to me as a huge drawback. I have to be able to glance over some material in an armchair first to get an idea in the back of my head of that certain features exist before beginning to code and then looking up reference material as to how exactly deploy the feature. I found adequate material at Amazon although not of the quality the Rails and Symfony have to offer. The amount seems sufficient to get a project off the ground given the fact that CI is by far not as complex as the other frameworks. Grails is somewhere in between - The documentation is definitely more abundant than CodeIgniter and one can draw from already Spring and Hibernate doc if necessary. Unfortunately I found that it has a hard time keeping up with the product developments themselves; even some of the online documentation is outdated. However, most active technologies suffer from the same symptom. Another area (somewhat unrelated but not completely so) is GWT (Google Web Toolkit). This code is being developed at breakneck speed - great if you are a developer looking for features and function, somewhat of a nightmare if you are trying to work yourself into it. So I will not hold it against Grails too much but it is worth mentioning. Finally a word of maturity and quality of the frameworks: I feel I have to give CodeIgniter a definite thumbs down here. CI works with both PHP4 and PHP5 and unfortunately that is its undoing as a framework (but not as a set of support utilities). Looking at its design it quickly becomes clear that the devlopers have firm backgroun in the now outdated PHP4 world and never quite grasped the concept of object-oriented programming. A good example is the initial construction of a 'super object'. The developers seeming misinterpreted objects as static collections of subroutines (which they indeed can interchangeably be under PHP4). Yet in doing so they completely missed the differentiation between class and instance, trapped in what PHP4 never quite grasped, either. It looks a bit - and pardon the term - like a hack. Now I have written a fair deal of hacks in my career and they have often turned out to the useful but picking a hack as framework seems like a bad idea. For that reason I feel that CI is not a recommended way of approaching the subject (If you are looking for an alternative along those lines look into Zend framework which I did not cover in this post). Grails draws from existing and very mature technologies such as Spring and Hibernate. As such it is a safe bet and the designers definitely did not go off half-cocked in a direction of NIH and coded away at something brand-new and potentially fraught with both architectural coding errors. I respect them for not falling into this trap and it definitely made for the best outcome. Groovy is well-thought out, fully functional and reliable. It could have been a good alternative choice for what I was trying to do (were it not for the other issues I mentioned). While Rails is completely written in a new language and therefore could not easily reuse existing components. However, its ActiveRecord is widely regarded as potentially the best ORM implementation around. I haven't yet formed such a radical opinion of it (partly because I have not used it enough) but it seems there is a general consensus that some of what Rails has to offer is the creme de la creme in terms of design as well as performance. Having now written a fair amount of code using Symfony and seen its development over a number of releases I eventually decided on it for usability, maturity and clarity of design (it also did not fall prey to NIH but leveraged existing engines such as Doctrine and/or Propel). I have yet to find a fundamental flaw and indeed: I have been able to implement relatively comple features with very few lines of code in a highly reusable fashion. It is almost like I want to say: It just works. There are a few shortcomings (i.e. features yet to be implemented) but it really doesn't force you to break out of the overall architecture. This, coupled with the fact that I surmise it is the best documented open source project hand down eventually moved me to pick it as my platform of choice. But do not let this stop you from giving Rails and Grails serious consideration, depending upon some of the other factors I mentioned. And finally, if you are just looking for ways to implement a few minor projects without the steep learning curvie of the other frameworks, by all means, CodeIgniter may just be what the doctor ordered.
Powered by !JoomlaComment 3.26
3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved." |
