On Tue, Mar 2, 2010 at 12:48 AM, Jeppe Nejsum Madsen <je...@ingolfs.dk>wrote:

> David Pollak <feeder.of.the.be...@gmail.com> writes:
>
> [...]
>
> >> 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?
>
> Depends on what you mean by model. If you mean adding/changing fields at
> the db level, requiring restart is not a big problem. But when using
> mapper, this is not the only thing that lives in the model. Hiding
> showing fields, render format, the validations etc. I just tried again,
> and some stuff does seem to be working. It may have been a JRebel
> issue.
>
> I'll try to keep an eye on this and see if there are some specific
> things that doesn't change dynamically.
>
> >> 4) Change a field label? Restart server
> >>
> >
> > With JRebel, the change to a field label should be reflected
> > immediately.
>
> I swear I tried this before writing :-) But you're right, it does seem
> to work (unless you get the label from properties :-)
>
> [...]
>
> >> 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.
>
> Agreed, and I'm not looking to get a seamless incorporation of dynamic
> changes. But not having to do the restart/relogin cycle in the most
> frequent scenarios would be nice.
>
> >> 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.
>
> Agreed.
>
> > What do you keep in your properties files that can change at runtime?
>
> Translated strings.
>

You keep your translated strings in the files accessed by
net.liftweb.util.Props?  I haven't done any Lift localization, but I think
that's the wrong place for them.

If the current implementation of the localization stuff isn't reloading the
localization files on change during dev mode, that's a defect (or an
enhancement) and deserves a ticket.


>
> >> - 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.
>
> That would be awesome!
>
>
> https://www.assembla.com/spaces/liftweb/tickets/385-make-sitemap-dynamic-when-running-in-development-mode
>
> How do you envision this working? Just calling Boot again from a JRebel
> plugin?
>

I'm not going to call Boot again, but I have a bunch of ideas of an
efficient mechanism for recalculating stuff on a request-by-request basis in
dev mode, but only once in production mode.


>
> > What other things need changing?  Maybe the LiftRules stuff can be
> > more dynamic at runtime.
>
> Not sure. SiteMap is the main culprit imo. I'll try to keep an eye out
> for others....
>
> /Jeppe
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com>
> .
> 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 lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to