Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Symfony 1.1 Questions
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  17 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Keith  
View profile  
(2 users)  More options Jan 14 2008, 10:23 pm
From: Keith <kmedli...@gmail.com>
Date: Mon, 14 Jan 2008 19:23:51 -0800 (PST)
Local: Mon, Jan 14 2008 10:23 pm
Subject: Symfony 1.1 Questions
I am a little confused about a few things in 1.1 with form handling
still.

* Why is validation (something that in most MVC frameworks is handled
in the model) now handled in the controller?

Doesn't this move the validation farther away from what it actually is
validating?

* Why is form rendering also now in the controller? The view just
contains

echo $form

where the form should render.

Isn't the form part of the view? It seems to me this new system mixes
both logic and presentation in how forms are rendered and validated.

I feel like I'm missing something important in trying to understand
this because these changes seem very inconsistent with what the rest
of the MVC world is doing. At a time when other frameworks are
advocating skinny controllers and fat models, Symfony is taking things
away from the Model that should logically be handled there like
validation.

Similarly, when other frameworks are moving towards having their
generators build code it's largely CSS driven, whereas the code here
is (by default) tables. This again seems like a step back given the
push for standards driven web design.

I can certainly respect the power of the new methods that are
available, but I wonder why they are preferable given the stated roles
of the Model, View, & Controller and what direct benefits this gives
to designers who are separated from application development teams who
must now learn additional Symfony methods instead of being freed to
just be designers.

I'm not trying to tear down what has obviously had a lot of thought
given the dramatic nature of the change. I'm just trying to understand
how it remains consistent with MVC principles.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabien POTENCIER  
View profile  
(1 user)  More options Jan 15 2008, 9:24 am
From: Fabien POTENCIER <fabien.potenc...@symfony-project.com>
Date: Tue, 15 Jan 2008 15:24:28 +0100
Local: Tues, Jan 15 2008 9:24 am
Subject: Re: [symfony-users] Symfony 1.1 Questions
Hi Keith,

Very interesting questions. As I really think the new form framework is
the only one (that I know) that fully embraces the MVC pattern, I've
just wrote an answer on my blog that try to explain the philosophy
behind the design:

http://www.aide-de-camp.org/article/3/en/symfony-1-1-form-framework-a...

Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
http://www.sensiolabs.com/
http://www.symfony-project.com/
Sensio Labs
Tél: +33 1 40 99 80 80


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Keith  
View profile  
 More options Jan 15 2008, 10:58 am
From: Keith <kmedli...@gmail.com>
Date: Tue, 15 Jan 2008 07:58:01 -0800 (PST)
Local: Tues, Jan 15 2008 10:58 am
Subject: Re: Symfony 1.1 Questions
Hi Fabien,

Thank you for clarifying the new form handling in a great blog post.
The view definitely has more power than I originally thought and I
better understand the new way form widgets are handled on the actual
view rather than just echo $form.

My only remaining question is: how is data validation handled on the
model?  Can the validator_schema be instantiated in the model?  I see
from the helpful thatsquality.com tutorial series that they can be
instantiated within the configure() method, but that lives in the
controller.  From an organizational standpoint, I'd like to keep
everything directly dealing with the model in the model, but am too
unfamiliar with the new system at this point to see how to make that
happen.

I like how everything is decoupled from the framework so that it is re-
usable because it'll really help 3rd party vendors with their plugin
development by opening up the ways in which other kinds of data (XML
as you alluded to) can be handled by Symfony.

- Keith

On Jan 15, 9:24 am, Fabien POTENCIER <fabien.potenc...@symfony-


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
weaverryan  
View profile  
 More options Jan 15 2008, 6:53 pm
From: weaverryan <weaverr...@gmail.com>
Date: Tue, 15 Jan 2008 15:53:31 -0800 (PST)
Local: Tues, Jan 15 2008 6:53 pm
Subject: Re: Symfony 1.1 Questions
Keith-

Great questions. I'm the other author of the blog at thatsquality.com,
and even I've been sort of kicking
myself lately for not covering more than just the echo $form in the
template. My intent was to really show
how simply this stuff can be, but I've been regretting it more and
more as of late!

Per your latest question, I'm may be a little confused. The configure
method is not in the controller, it's
in your form class, which is really part of the model. Validation is
coupled with the model through each
model-specific, form class in a few ways:

1) Symfony sets you up with basic validation via the type of your
field when it auto-generates your form class
2) Further configuring of your validation is done in the form class
(Fabien, am I right to essentially be calling
this part of the model?), where validation is handled per each
specific model field.

So, as I see it, no validation should be in your controller, but
rather in the new auto-generated form classes -
where a form class is generated for each table in your schema.

My opinion is based almost entirely from studying the source code, so
Fabien, I'd love to have you clear up
any mis-statements I may have just made.

- Ryan

On Jan 15, 10:58 am, Keith <kmedli...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Keith  
View profile  
 More options Jan 15 2008, 10:47 pm
From: Keith <kmedli...@gmail.com>
Date: Tue, 15 Jan 2008 19:47:59 -0800 (PST)
Local: Tues, Jan 15 2008 10:47 pm
Subject: Re: Symfony 1.1 Questions
Ahhhhh okay!

Now the structure makes more sense to me.  Your series is excellent
Ryan and was greatly appreciated by everything I think!

It's such a departure from what I'm used to seeing in Ruby on Rails,
Symfony 1.0, and cakePHP that I wasn't seeing the whole picture I
guess.  Very interesting take on the configure as a part of the form.
That mimics, in many ways, the way the old procedural stuff used to
work where you'd set up a configuration area prior to building
anything out in the code.

Thanks for the explanations.  As more information comes out and the
documentation gets all shored up I expect things will become that much
more clear.  This is a great start though.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rihad  
View profile  
(1 user)  More options Jan 16 2008, 2:24 am
From: rihad <ri...@mail.ru>
Date: Tue, 15 Jan 2008 23:24:12 -0800 (PST)
Local: Wed, Jan 16 2008 2:24 am
Subject: Re: Symfony 1.1 Questions
Such usage is very bug prone in case one mistypes 'post':
  if ($request->isMethod('post'))
It's better to use ->isPostMethod() or ->isMethod(sfRequest::POST) and
let the compiler catch bugs early.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
CaffeineInc  
View profile  
 More options Jan 16 2008, 4:43 am
From: CaffeineInc <simon....@gmail.com>
Date: Wed, 16 Jan 2008 01:43:10 -0800 (PST)
Local: Wed, Jan 16 2008 4:43 am
Subject: Re: Symfony 1.1 Questions
Thanks Ryan for your series on forms, it was a great help since there
is no other documentation for the 1.1 form stuff :)

Everything made sense, as its similar to another MVC pattern I've
used, but one thing I couldn't do was get the form schema decorator
outputting properly.
I had a look through all the render calls as well and couldn't find it
being referenced, so I'm not sure if I should open a issue or not..

Does anyone else suffer from this problem?

Luckily I can just use the compat_10 :on in settings to get around the
forms for now, but I see them as quite powerful, and would like to
include them once it gets stable :)

Cheers,
Simon

On Jan 16, 12:53 am, weaverryan <weaverr...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian P. Christian  
View profile  
(1 user)  More options Jan 16 2008, 7:49 am
From: "Ian P. Christian" <poo...@pookey.co.uk>
Date: Wed, 16 Jan 2008 12:49:48 +0000
Local: Wed, Jan 16 2008 7:49 am
Subject: Re: [symfony-users] Re: Symfony 1.1 Questions

rihad wrote:
> Such usage is very bug prone in case one mistypes 'post':
>   if ($request->isMethod('post'))
> It's better to use ->isPostMethod() or ->isMethod(sfRequest::POST) and

I agree with you entirely that it's better to use methods that result in
compile/runtime errors... however....

The problem with having 'sfRequest::POST' is that technically, it
shouldn't be there IMO.

the POST constant should apply to sfWebRequest, and not sfRequest.

isPostMethod() however is fine - but doing so, I guess technically
speaking you should ensure it's of type sfWebRequest before calling that.

However, actions in symfony are almost always passed a request of type
sfWebRequest - so really, it doesn't matter a great deal...  However I
see a case where at some point, a CLI request could be made to actions,
and constants like GET and POST wouldn't apply.

--

Ian P. Christian ~ http://pookey.co.uk


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Thank you Symfony Team" by Andrew von Hoesslin
Andrew von Hoesslin  
View profile  
 More options Jan 16 2008, 9:38 am
From: "Andrew von Hoesslin" <and...@playukinternet.com>
Date: Wed, 16 Jan 2008 16:38:18 +0200
Local: Wed, Jan 16 2008 9:38 am
Subject: Thank you Symfony Team
To the Symfony Team

I would like to say thank you for the brilliant work you have done with
regards to the Symfony Framework.

I started using Symfony about one and a half years ago and have nothing but
the utmost excitement for the future of the product!

The documentation for getting started is outstanding and I was soon delving
into the core of the Symfony system and doing exactly want I needed to do
with ease and superior speed.

The system we have built is for a UK lottery company and has millions of
records per customer which we used Propel and PostgreSQL to manage.

I installed eaccelerator and to all those whom are concerned about speed and
performance – don’t be!!!!

The site has 180 tables, a full affiliate, campaign, mass mailing, customer
support system, and banner campaigns.

Have a look and feel free to give me your comments.

http://www.playukinternet.com

Our site is running very fast and I have nothing but respect for the Symfony
Team.

I have even rename our South African Company to “Symfony Solutions”;
representing what we do best!

Thank you
Andrew
Symfony Solutions

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.2/1223 - Release Date: 1/13/2008
8:23 PM


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabian Lange  
View profile  
 More options Jan 16 2008, 9:58 am
From: "Fabian Lange" <Fabian.La...@web.de>
Date: Wed, 16 Jan 2008 15:58:58 +0100
Local: Wed, Jan 16 2008 9:58 am
Subject: RE: [symfony-users] Thank you Symfony Team
Consider removing your development frontend :-)

I would also advise to check if it is worth upgrading for you to switch to
propel 1.3 ich can see that your db queries are the ones that take most of
processing time (on frontpage 50ms out of 180ms)

Ah and remove the frontend_dev :)

.: Fabian


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew von Hoesslin  
View profile  
 More options Jan 16 2008, 10:00 am
From: "Andrew von Hoesslin" <and...@playukinternet.com>
Date: Wed, 16 Jan 2008 17:00:37 +0200
Local: Wed, Jan 16 2008 10:00 am
Subject: RE: [symfony-users] Re: Thank you Symfony Team
I will do.

Have a great day


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew von Hoesslin  
View profile  
 More options Jan 16 2008, 10:07 am
From: "Andrew von Hoesslin" <and...@playukinternet.com>
Date: Wed, 16 Jan 2008 17:07:02 +0200
Local: Wed, Jan 16 2008 10:07 am
Subject: RE: [symfony-users] Re: Thank you Symfony Team
I have not cached anything yet either! I will be doing that next week.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Symfony 1.1 Questions / IoC / Dependency Injection" by Lee Bolding
Lee Bolding  
View profile  
 More options Jan 17 2008, 10:50 am
From: "Lee Bolding" <l...@leesbian.net>
Date: Thu, 17 Jan 2008 15:50:34 -0000
Local: Thurs, Jan 17 2008 10:50 am
Subject: Symfony 1.1 Questions / IoC / Dependency Injection
I have my own question regarding Symfony 1.1

Does it use any kind of IoC or Dependency Injection framework? I'm thinking
along the lines of Spring here.

I'm using type-hinting quite heavily now to improve the robustness and
flexibility of my interfaces, but at the moment it's a little clunky. I'd
like to be able to replace all my instances of sfGuardUser with a generic
'user' which could be either sfGuardUser or my own user class - doing this
at the moment isn't much fun (and all those
$anObject->setSomeObjectId(String $id) methods I'd like to change to
$anObject->setSomeObject(SomeObject $object))

Is anybody currently using any kind of IOC framework with Symfony?

Lee Bolding

w: http://www.leesbian.net


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tristan Rivoallan  
View profile  
 More options Jan 17 2008, 10:56 am
From: "Tristan Rivoallan" <tris...@rivoallan.net>
Date: Thu, 17 Jan 2008 16:56:50 +0100
Local: Thurs, Jan 17 2008 10:56 am
Subject: Re: [symfony-users] Symfony 1.1 Questions / IoC / Dependency Injection
On Jan 17, 2008 4:50 PM, Lee Bolding <l...@leesbian.net> wrote:

> I have my own question regarding Symfony 1.1

> Does it use any kind of IoC or Dependency Injection framework? I'm thinking
> along the lines of Spring here.

there was a previous attempt :
http://groups.google.com/group/symfony-devs/browse_thread/thread/4eca...

i don't know how it's going.

++
tristan


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lee Bolding  
View profile  
 More options Jan 17 2008, 11:23 am
From: "Lee Bolding" <l...@leesbian.net>
Date: Thu, 17 Jan 2008 16:23:22 -0000
Local: Thurs, Jan 17 2008 11:23 am
Subject: RE: [symfony-users] Re: Symfony 1.1 Questions / IoC / Dependency Injection
Cool. Thanks.

Will have a look at that tonight, looks promising from a quick read :)

I tried to find info on Garden before, and it looks like the project has not
only been closed, but that the code is gone too - I can only find references
to it in other articles, no code. This makes me hesitant to use it - it was
obviously abandoned for a reason, and an abandoned project is a project that
isn't supported. :-/

I also found mentions of Navigator, Solar and Seasar(S2)... all of which I
need to investigate. It didn't strike me that any of these had what anybody
would call a widescale adoption.

Is anybody out there using DI/IOC with Symfony? In a live project?

Lee Bolding

w: http://www.leesbian.net


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Thank you Symfony Team" by Jérôme TEXIER
Jérôme TEXIER  
View profile  
(1 user)  More options Jan 17 2008, 2:13 pm
From: "Jérôme TEXIER" <jerome.tex...@gmail.com>
Date: Thu, 17 Jan 2008 11:13:29 -0800 (PST)
Local: Thurs, Jan 17 2008 2:13 pm
Subject: Re: Thank you Symfony Team
You also should remove development environment for application
backend... :)
Maybe you also could rename backend.php or use a rewrite rule to avoid
access to your admin side just by typing http://www.playukinternet.com/backend.php
BTW, is there a pratical reason why you didn't use sfGuardPlugin to
support all your security stuff ?

Jérôme

On 16 jan, 15:58, "Fabian Lange" <Fabian.La...@web.de> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Symfony 1.1 Questions / IoC / Dependency Injection" by Lee Bolding
Lee Bolding  
View profile  
 More options Jan 19 2008, 12:11 pm
From: "Lee Bolding" <l...@leesbian.net>
Date: Sat, 19 Jan 2008 17:11:34 -0000
Local: Sat, Jan 19 2008 12:11 pm
Subject: RE: [symfony-users] Re: Symfony 1.1 Questions / IoC / Dependency Injection
I've just read that entire thread, and have to agree with everything that
Jan Markmann says :)

I guess the next thing I need to do is contact Matthias to find out if he
ever made the changes to the way the factories.yml works.

As for my own research, right now, the most promising PHP IoC container
looks like S2Container (Seasar)
http://www.seasar.org/en/php5/DIContainer.html

Lee Bolding

w: http://www.leesbian.net


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google