wiki:FrameworkComparison

MVC / Frontrouting Frameworks

A comparison of frameworks. Ideally we want to use an existing framework and not spend a lot of time writing our own framework. Of course this can only happen gradually, where all our existing code will keep working.

See also BeWelcomeRequirements and TemplateEngines

What we should take into account

  • benefits given by the framework ..
  • ease of integration
  • Synergy with our existing code. This is the most tricky thing according to lemon-head
  • flexibility, customizability, if we want to do things our own way.


Rox (with PT)

The selfwritten rox framwework is currently used for BW.

pros

  • The developers claim that the development is driven by creativity, research and the needs of BW project, rather than experience and long-proven solutions.
  • Andreas loves it.
  • quite powerful implementation of PHP __autoload()
  • quite powerful front routing
  • polymorphic layout (hierarchy of page classes, overriding each others' methods), allowing fine-grained layout reuse
  • almost full Inversion of Control, the applications don't need to know much about the framework. Theoretically, this should make it easier to replace it with another framework.
  • allows for small and tidy classes. maybe even smaller than with other frameworks.
  • OOP bootstrap, global-scope code is minimized.
  • ini files for configuration
  • nice template inclusion mechanic.
  • we don't need to be afraid to interfere with the code
  • backwards compatibility with PT / MyTB / BW

cons

  • we have to maintain it ourselves
  • does not provide any real 'user-valued' features, only raw infrastructure (just like most raw non-CMS frameworks)
  • some things are not in the place where they would finally belong, some things are not fleshed out or immature.
  • partially entangled with PT framework.
  • does not have its own DB engine, uses PT database support instead.
  • many things are nice but rather experimental
  • no support for smarty or other template engines (yet), this would be extra work to get running.
  • 1.5 developers
  • no real documentation available

missing features (that could be added, but that is work):

  • no caching for layout and database
  • no advanced database library (using PT)
  • no advanced template engine.
  • no advanced ajax automation. There is some ajax support, but other frameworks offer a lot more than that.


CakePHP  http://cakephp.org/

check #623

pros

  • Used in 1000s of projects. Any bigger projects?
  • mature and maintained
  • could be that we find a lot of plugins for nice features, which we would otherwise have to code ourselves.
  • better documentation

cons

  • seems to have no autoload.
  • the core things (front routing) can't be much better than what we already have.


Symfony  http://www.symfony-project.org/

  • Used in 1000s of projects.
  • __autoload() implementation looks weird: The frameworks scans all files for the classname, to find out where a class is defined. It will not notice if a classname is actually used in a string or comment.
  • the core things (front routing) can't be much better than what we already have.


Symfony 2  http://symfony-reloaded.org/

  • Symfony2 is not ready for production yet. The final release is planned for March 2011


Zend  http://framework.zend.com/

  • created by the people who created PHP


Ruby On Rails  http://rubyonrails.org/


Django  http://www.djangoproject.com/

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.


Other Tools

Some tools can be added to an existing project to solve only one aspect of the problem.

Smarty Template Engine

Included in many frameworks, but can also be included manually

Propel

Database thingy. Included in some frameworks, but can also be included manually.

Full CMS / Groupware

See also  http://en.wikipedia.org/wiki/Comparison_of_social_networking_software

Drupal  http://drupal.org/

pros

  • Used in 1000s of projects.
  •  Drake is a CakePHP in Drupal module, not too much code, would be possible to write a Rox-in-Drupal module.
  • many features already existing - user management, communication tools, groups, etc. Most of it in better quality than we have now.
  • better documentation than we have it now
  • opens up several cans of coders (is this really what you would like to put into your CV?)
  •  many different ways for caching are readily available, caching improved in V6 and is considered decent
  • Very dynamic - there is a simpletest and functional test mechanism that works in drupal (simpletest module) and will be in core in version 7: this will allow us to build tests to make sure nothing breaks like that

neutral

  • no OOP (we don't care, since we don't have to develop on Drupal itself), and modules can be OOP (think Drake)
  • might be less secure if we are not extremely fast with updating (drupal is wide spread so holes will be used much faster than in our home grown system), it's more secure in the sense that 1000s of developers have tried to find holes that are now all fixed, drush can be configured to do autoupdates
    • migration of the database might be pretty difficult (but could have some advantages) -- but check the node import module

cons

  • (based on limited experience, Philipp)
    • terribly slow and resource consuming (many plugins add a hell lot of overhead)
    • it is very hard to do things not the default way, and I would assume that we would tend to do things differently
    • very dynamic - code might break when updating a profile, difficult to debug as it is not your own code
  • synergy with existing bwrox code: lemon-head imagines this is quite poor with Drupal. Even with a bridge, most of the stuff will have to work either with Drupal, or with our existing code.

questions:

  • is it scalable?
  • since it's actually a CMS: does it work well for social networking as opposed to publishing?
  • use version 5 or 6? 6 is supposed to be better for social networking, but some of the modules have not yet been ported to 6.

Elgg  http://www.elgg.org/

pros

  • "Elgg is an open, flexible social application engine, designed to run at the heart of any socially-aware application. Building on Elgg is easy, and because the engine handles common web application and social functionality for you, you can concentrate on developing your idea."
  • approaching 1.0
  •  built-in support for  Bill of Rights

cons