NYCPHP Meetup

[nycphp-talk] Frameworks - Which best fits my development style?

Ajai Khattri ajai at bitblit.net
Wed Aug 22 15:08:46 EDT 2007


On Wed, 22 Aug 2007, Ben Sgro \(ProjectSkyLine\) wrote:

> I know there has been a ton of discussion about frameworks.
> 
> So far, I've looked into:
> 1) Cake
> 2) Zend
> 3) Joomla
> 4) Symfony
> 5) Drupal
> 
> I've looked at tutorials, books and online how-tos'. Let me explain my development environment.
> 
> I use smarty templates for all my HTML.  My php is 5w/OOP. I have many libraries from everything
> from database access, sitemap creation, html (textboxes, drop downs), simple ajax, error logging,
> session handling, (all created by myself) and I use PEAR SOMETIMES as to not reinvent the wheel
> for a single project. When I design sites & applications, I have an index.php and pass "actions=WHATEVER" 
> on the URL to change the action of the program. I dont use seperate files for different things EXCEPT for all the libs
> and auxiliary functions. I use SVN for revision control.
> 
> I guess I don't see the compelling reason to switch to a framework. Will it really speed up my development
> time, even if I have all these libs (and still expanding) already created?

Im working on a major site and we're using symfony. I can tell you that 
symfony gives you pretty much everything you need so your own classes will 
not be of much use (and even if you see something it doesn't do, you will 
most likely find a plugin already written that does).

It uses PHP5 so its a total OOP environment with an MVC architecture and 
its own testing library. The command-line tool can generate code and stub 
files (and can even be used for deployment).

One nice thing is that a lot of features can be switched on and off 
through config files which reduces coding. (And most of the config files 
are YAML files that get compiled and cached). I would describe symfony as 
simply elegant.

The documentation, (The Apress book is available online), wiki, forums, 
mailing list, and snippets sites mean there is plenty of docs and sample 
code to look at (this more than anything else made coding with symfony a
really nice experience).

Ive gained enough experience and confidence with symfony that Im also 
converting an existing Joomla site to symfony (Joomla really was overkill 
for that site anyway and symfony is really easy to work with). There is a 
small learning curve but its not the hardest curve Ive ever had to climb 
and the Apress book is a nice read.

> Applications I build are powered by PHP/MYSQL, HTML/CSS. There are forms to fillout, emailing, login, 
> account creation, etc. Some are more complicated than others.

Forms validation is super easy - you setup validation "rules" in a YAML 
file. Add some code to your actions class and you're done. (symfony 
already comes with a bunch of built-in validators but you can also roll 
your own - something we only needed to do in two places IIRC).

I should also mention that symfony has scaffolding and also generators for 
building a complete admin tool for your database models (so implementing a 
backend interface is easy).

> Maybe I could use one framework for making simple websites, and another for applications?

Sure, its possible to do that. For example, Joomla is great for an 
e-commerce site (Ive implemented e-commerce in Mambo, Joomla and symfony), 
since Joomla has a nicely pre-built backend for the customers to use. I 
never liked the documentation available for Joomla (though Joomla just 
published a nice book a month ago which might help).

> Also, I LOVE books, so any that have good paperback book or white paper/tutorials is a BIG plus.

Me too. You're in luck then - here's some references (incl. the official 
book):

Official published book: http://apress.com/book/bookDisplay.html?bID=10222
Book online: http://www.symfony-project.com/book/trunk
Wiki: http://trac.symfony-project.com/trac/wiki
Forums: http://www.symfony-project.com/forum/
Community/Blog: http://www.symfony-project.com/content/support.html
Mailing List / Group: http://groups.google.com/group/symfony-users
Askeet Tutorial: http://www.symfony-project.com/askeet


Ive been buying a LOT more technical books as ebooks this year thanks to 
Apress, Pragmatic Programmer and Friends of Ed (wish O'Reilly offered PDFs 
instead of Safari, oh well can't have everything).



-- 
Aj.




More information about the talk mailing list