I think you're making a lot of sense here. Fabien, Michael, any thoughts? -- Yehuda
On Sat, Oct 11, 2008 at 7:38 PM, Jon Hancock <[EMAIL PROTECTED]> wrote: > > The new module Merb::Session is supposed to provide a nice clean place > to put session methods unique to your app. At least that was my > impression. > Beware! I have been migrating old code into this new structure and > have been bitten several times already by the many methods in the the > Session hierarchy. > > CookieSession < SessionContainer < Mash < Hash > > There are a ton of methods being inherited here!!! Proposing that > "joe user" use the Merb::Session module to just add his app specific > methods is going to lead to a world of hurt for some. > > I think the framework mechanics of handling session objects needs to > be cleanly separated from the app data and adjunct behaviors someone > wants to put in a session. Just my 2 cents, but its going to be > common for an app programmer to think its just fine and meaningful to > his code to add methods like update() and initialize(). I had a > method update() and had to go all the way up the chain to Mash to find > the conflict. What a mess!!! And don't get me started on how ruby > still lacks good tools for browsing code. So its key to not write > such framework code when such browsing tools don't exist. > > Before merb added this stuff, I just rolled my own. I had a Sessions > controller that didn't inherit any baggage and I added a few hooks > into my Application controller to make calls to this Sessions > controller. Nice and clean. > > This new Merb::Session module either needs a little further > refactoring from the Session that uses it, or needs tons more > documentation ;). > > As to using module mixins, I think merb needs to have (at least in dev > mode) error messages for anytime a method gets clobbered or even when > there is name collision from an inherited method. Otherwise, you > demand the app programmer to learn all the internals of the framework > to ensure they don't shoot themselves in the foot. > > thanks for accepting my rant here. Some of this is a rant, but I > think there is a real lesson to learn. ;) > Jon > > > > -- Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
