Hello Grant and thank you very much for your attention and answer! First, I have not read with precision the SessionHelper's write() method, sorry for my confusion... Then, I better understand the difference between this two Session handlers. It's just a matter of utility!
But when I use a new methodology or new programming technique, I need to understand all its logic and in this case it was illogical for me! In my job we are trying to separate Controllers development and Views design, so I thought using SessionHelper was not in line with this principle, because the intregator/designer must know PHP's sessions and/or Helper's methods/properties to create his views. So I must avoid to be a fundamentalist of MVC ;o) Avairet On 21 nov, 00:31, Grant Cox <[EMAIL PROTECTED]> wrote: > Obviously, component is for controllers, helper is for views. The > reason for the helper is that often view output depends on what is in > the session, and it can get a little tedious set()'ing everything from > the session out for the view, in the app_controller beforeFilter > ("just in case" the view needs it for this request). > > You will notice that the session helper is read only - you cannot > write from the view. So while it may be a little against the grain of > MVC, it is also very handy :) > > On Nov 20, 8:01 pm, avairet <[EMAIL PROTECTED]> wrote: > > > Hi everybody, > > > I'm relatively newbie with Cake 1.2 and I don't understand very well > > the difference between Session Helper and Session Component, which > > have some common methods. > > Is this againsts the 'DRY' (don't repeat yourself) rule? > > Why using "write" and "read" Session method in a view? This is > > normally controller's job, isn't it? > > Can you explain the difference or show me an example of Session usage > > with component and helper? > > Thank's by advance and excuse me for my simple English. > > > BR > > > Avairet --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---