migrating an old application to lift

24 views
Skip to first unread message

Alexandre Russel

unread,
Oct 12, 2012, 2:38:19 PM10/12/12
to lif...@googlegroups.com
Hi,

I'm planning to move an old app to lift. It is a spring 2 app from
2003, but still in use and with some bug fix small improvement from
time to time. I'm extremely reluctant to rewrite everything to lift
and spend maybe 3~6 month before having the new app running. Ideally,
I would like to do it little by little, when a screen needs update/bug
fix then we move it to lift, so having both side by side for a while.
I was thinking about something like in the web.xml having some path
for lift, some path for the legacy spring app.
How does it sound ?

Alex

Olek Swirski

unread,
Oct 12, 2012, 3:04:50 PM10/12/12
to lif...@googlegroups.com
I would use embedded jetty setup, and put new app next to
the old one (different port). You would probably need to connect
to the same db, to keep data consistent. This might be tricky,
quite possibly you will need to adjust Mapper/Record fields
in the new app to exactly match field types used so far. Then with
nginx you might, one by one proxy some contexts to the new site,
while those not yet ready could be still served from the old one.

Anyway, this is just my suggestion, so perhaps some more
experienced lifters will give more insight.

David Whittaker

unread,
Oct 12, 2012, 3:12:51 PM10/12/12
to lif...@googlegroups.com
I've had more success mapping all requests to the LiftFilter, then excluding the Spring stuff using LiftRules.liftRequest.  Otherwise you'll run into issues with stuff like lift wanting to use a URL off of the root folder for ajax requests.


--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code




Diego Medina

unread,
Oct 12, 2012, 3:14:17 PM10/12/12
to lif...@googlegroups.com
This thread may help
https://groups.google.com/forum/?fromgroups=#!searchin/liftweb/paul$20dale/liftweb/XoBTDkbfHt0/w3j2RpzSIZcJ

Diego

On Fri, Oct 12, 2012 at 2:38 PM, Alexandre Russel <alex...@russel.fr> wrote:
> --
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
>
>



--
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://www.fmpwizard.com

Alexandre Russel

unread,
Oct 12, 2012, 3:55:54 PM10/12/12
to lif...@googlegroups.com
thanks guys, very helpful pointers. Funny how the thread diego showed
is similar to this one.

Diego Medina

unread,
Oct 13, 2012, 12:27:45 AM10/13/12
to lif...@googlegroups.com
On Fri, Oct 12, 2012 at 3:55 PM, Alexandre Russel <alex...@russel.fr> wrote:
> thanks guys, very helpful pointers. Funny how the thread diego showed
> is similar to this one.

we are consistent :)

And a side note, I know you said that you don;t want to go 4-6 months
until the complete app is migrated, but if there is any chance, I
would try to start fresh and write it "The Lift way". You may find
places where you can easily fit a Lift page instead of the spring2,
but there may be areas where a big chuck of logic may have to change.

Just my $0.02

But in any case, best wishes on the migration!

Peter Petersson

unread,
Oct 13, 2012, 5:01:51 AM10/13/12
to lif...@googlegroups.com

About a year+ ago I faced a similar situation although it was not a
spring based app it was a state-full java MVC app with lots of business
logic.

My initial goal was two folded
1) To improve the Look&Feel of the app
2) To make it easier for designers to get involved in the front stuff.

I found Lift to be a perfect fit for the initial goals and I concluded
that it would also fit long term goals like ease of maintenance....

The way I got about doing it was to focus on replacing the stuff in the
view with Lift templates and snippets and hook up the java controllers
with some wrappers in between to make the logic fit, it was lees of a
job than i thought it would be.

This worked out pretty well, so well in fact that I have not got around
to step 2 and 3, replacing the module stuff with squeryl record and
replacing the remaining business logic in the controllers with Scala
code, there has simply not been any need for it although it is perfectly
doable.

best regards
Peter Petersson
Reply all
Reply to author
Forward
0 new messages