Is a dynamic menu not advantageous for production apps (e.g., a CMS)? Would changing setSiteMap (if that's what it's called) to take a call by name be a bad idea?
------------------------------------- David Pollak<[email protected]> wrote: On Mon, Mar 1, 2010 at 12:30 PM, Jeppe Nejsum Madsen <[email protected]>wrote: > David Pollak <[email protected]> writes: > > > The Props.get stuff is frozen the first time its accessed. This is a > > philosophical issue for me. The properties should be fixed at start-up > > time. If there are things to vary, build an administrative interface or > > some other thingy (e.g., a separate HTTP listener) that allows you to > > manipulate the mutable configuration. > > And I agree very much in this philosophy....when we're talking > production. > > I'm interested if you feel the same way about this during development? If > so, > stop reading as the rest will just be a rant, if not read on :-) > > I think the static nature of some of Lift's internals is one of the > greatest productivity killers when it comes to rapidly start up with a > new app where you quickly iterate different ideas (or even do many small > changes in an existing app). > > 1) Change the menu structure? Restart server > Yes. This is a problem. > 2) Change the menu text? Restart server (yes I use properties for text > and yes I need an app in different languages, see other thread :-) > This is a problem as well. > 3) Change something in a mapped field? Restart server > This is unavoidable. If the model changes, you have to re-sync to the RDBMS and this requires a restart. In practice, how often do you change your model? > 4) Change a field label? Restart server > With JRebel, the change to a field label should be reflected immediately. > > Using JRebel doesn't really help in these scenarios as the values are > fixed at start-up. > > There are probably others, but these are the ones I can recall. Perhaps > I'm being hit harder than others since 1) We need different languages > and 2) You need to be logged in to see the app. Or perhaps I just don't > develop in an efficient way who knows? > > It would be really nice for some of this to be picked up automatically > when running in development mode. I still remember some time ago when I > did a project in PHP. I don't like the PHP language very much, but you > can't really beat the instant gratification of a code change: Just > reload the page! > The problem is two-fold: (1) Lift is stateful and trying to morph the state based on change to logic is non-trivial and (2) the amount of logic you can get into a line of PHP vs. a line of Scala is 2-3 orders of magnitude different. > > I think some of these issues could be solved easily, some will require > more work and some may be impossible. > > - Reloading properties if the file has changed should be easy. > What do you keep in your properties file? I keep database connection info and service endpoints (e.g., Amazon S3 urls and passwords). Changing this stuff should require an app restart. What do you keep in your properties files that can change at runtime? > > - Rebooting lift on the fly may not be easy, but perhaps some things > could be made reloadable (sitemap?). If you then write a JRebel plugin > (not a hard task) that triggers the reload when a class change is > detected, you will be one step closer to RAD nirvana. > SiteMap is an easy case. If you'd be so kind as to open a ticket and assign it to me, I'll make SiteMap morphable in development mode. What other things need changing? Maybe the LiftRules stuff can be more dynamic at runtime. > > I'm interested to hear if others have the same pain points as me (if > not, I don't see this changing soon :-) and if there are some ideas how > to remedy this (either by changing Lift or changing my development > process :-) > > /Jeppe > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<liftweb%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups "Lift" 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/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups "Lift" 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/liftweb?hl=en.
