This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » Symfony 2.0 » Some thoughts about sf 2.0
Some thoughts about sf 2.0 [message #97624] Mon, 19 April 2010 16:10 Go to next message
cblin  is currently offline cblin
Messages: 265
Registered: July 2006
Faithful Member

I'm a faithful user of sf since 2006 and I'm waiting the 2.0 release impatiently.

Here are some thoughts I had during the reading of the 4 tutorials.

I will start by the things I like :
* integrating zend where it makes sense
* routing is great
* templates are more powerful than in 1.0 (I hope that twig, PHamlP and forms will be easily integrated later)
* doctrine and swift are also good
* the debug bar
* the documentation written so far is pleasant to read
* the config checking
* the error messages
* the format param to choose xml/json/html/...

Now, for the things I dislike.

The first thing I thought was the unnatural way to separate directories for the bundle and the config.
I think that bundles are more or less like the modules in sf 1.0 and so controllers, templates, connfig should be together.
I know this is surely possible thx to the config system, but why is this not the default (or why the doc dos not show it) ?

The tutorial shows how to install the sandbox inside the document root of the web server : this is really really really bad !

The next and final dislike is that I cant use sf 2.0 yet Smile

Now for the things I am waiting :

Nowadays, application are very ajaxy (and javascript / css based in general). So resources like js, css and images should also IMHO be stored next to the Bundle (and with the config).
Let's say that I have a CmsBundle and a ForumBundle, the two have a file called main.css in the css directory : they will override each other if I place them in the web directory...

In the same aspect (client side artefacts), I'd like an automatic js / css "combinator and minifier". That is, I place the css and js in the web_resources package of my bundle. Then when I call "js.php/mybundle/a_directory" I get all the js files combined and minified (of course, this combined and minified resource will be cached in prod environment and readable in dev environment)

Another thing is that the DI container and the event dispatcher named in are not in tutorial part 5. I know that the tutorial is for not so advanced use of sf, but the 2 pages are named "architecture"

Other things I hope for :
* i18n
* integration of twig
* integration of PHamlP (i.e php port of Sass and Haml
* a tutorial showing a real webapp (i.e with db / ajax / DI / events / lots of css and js ...)

Now for the thing I'd like to know how it work :
* I saw that I can have params to an action (like indexAction($name)) :
* how is the mapping done from the request to the parameter of the function ?
* If this is done thx to reflection, how do you do with a a php compiler like apc ?
* Is there magical params like $request or $culture or i18n or mailer or ... ?


Re: Some thoughts about sf 2.0 [message #101009 is a reply to message #97624 ] Wed, 16 June 2010 04:59 Go to previous messageGo to next message
socketwiz  is currently offline socketwiz
Messages: 1
Registered: May 2006
Junior Member
I second the integration of twig.
Re: Some thoughts about sf 2.0 [message #101063 is a reply to message #97624 ] Wed, 16 June 2010 17:33 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
I always thought the integration of Twig was a given, but nevertheless I think this confirms it: fony-180-7-13-june-2010

Remember Palestine
Re: Some thoughts about sf 2.0 [message #101662 is a reply to message #97624 ] Sun, 27 June 2010 04:00 Go to previous messageGo to next message
SomeDude  is currently offline SomeDude
Messages: 32
Registered: February 2008
Are you guys serious about Twig?

Adding another "language" to your code is just ridiculous. I felt the same way before about smarty and I feel the same way about this twig...
Re: Some thoughts about sf 2.0 [message #101787 is a reply to message #97624 ] Tue, 29 June 2010 21:29 Go to previous message
Messages: 21
Registered: January 2006
Location: Paris
Junior Member

You're saying "I think that bundles are more or less like the modules in sf 1.0".

I think you're wrong. Bundles are more or less like plugins in sf1.x, removing the "global namespace polution" of php 5.[0-2]. Being a python lover, I couldn't agree more with php directions in 5.3, maybe apart of "\".

The thing I really like in symfony 2 is that despite the php sequels, keeping global stuff around, about nothing is global in sf2. Means real testability, and separation of concerns.

Hey, afterall, maybe php will become a (real) language ?

Romain Dorgueil
PHP Coder and linux enthusiast
Previous Topic:404 Not Found error on index_dev.php
Next Topic:All about PHP annotations...
Goto Forum:

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software