[BW-dev-discussion] Is it important to adopt a new framework before proceeding?

Peter Lind peter.e.lind at gmail.com
Mon Aug 23 13:00:57 CEST 2010


On 23 August 2010 12:36, Andreas Hennings <lemon.head.bw at googlemail.com> wrote:
> 2010/8/23 Peter Lind <peter.e.lind at gmail.com>:
>> (I'm sending this to the larger group, as not everyone is on the dev
>> list I think - I hope that's fine)
>>
>> Good point about about Symfony and waiting - it would probably depend
>> upon when the project is kicked off.
>>
>> As for a DI container, it shouldn't be too hard to create something
>> for the other frameworks as well that serve the same purpose (if they
>> don't already have it).
>
> Yup, but if the DI container is not part of the framework in the first
> place, then we can expect that most of the downloadable code will be
> based on singleton, global registry and friends. On the other hand, if
> the DI container is a central part of the framework, we can hope that
> other components and the entire bootstrap code are built around that,
> and that the use of these components with the DI container is well
> documented. For instance, the page that explains the EventDispatcher
> does explicitly mention that the example code does work with a DI
> container.

Most of this doesn't matter much, I'd say - whether the framework
internally uses a DI container is not a concern, and a DI container
won't be of much use in instantiating models inside a controller, for
instance (you'll be supplying custom construct variables to the model,
if anything - the container won't be able to figure those out for
you).

> Maybe CodeIgniter and Cake and Zend have their own DI containers
> (shipped with the framework or 3rd party), so the question would be
> how much the rest of the framework is designed to work with a DI
> container, or if we would have to rip apart the entire bootstrap code.

Well, as noted, I think a DI container is limited to upper levels of
code. You shouldn't ever need to refactor or change framework code -
that's a clear sign your framework is not working (as was obviously
the case with BW code). It would be much more relevant to look at how
easy it is to create object factories, in my mind.

> Another question is documentation, 3rd party extensions and how active
> the community is (for troubleshooting forums etc). I am used to the
> very active Drupal community, and was quite disappointed by symfony in
> this regard - but maybe Drupal or Wordpress are just playing in a
> different league than the PHP frameworks we are talking about.
>

Documentation is a good point. As for 3rd party extensions, it's not a
different league, it's a different game altogether - you do vastly
different things with Drupal/wordpress than with Zend/Symfony. The
question of community is more general though - far as I know, there's
an active ZF community happy to help people/projects - I'm pretty sure
the same goes for some of the other frameworks too.

Regards
Peter

-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
BeWelcome/Couchsurfing: Fake51
Twitter: http://twitter.com/kafe15
</hype>



More information about the bw-dev-discussion mailing list