Example project -- Image gallery

7 views
Skip to first unread message

Jim Wise

unread,
Jan 6, 2010, 12:12:59 PM1/6/10
to liftweb
I've put the image gallery code I've been working on up at:

http://github.com/jimwise/shared

as a runnable project, both in hope that it will be useful to other
people learning lift, and in hope of some (gentle) pointers as to what I
could do better with this.

Oh, one caveat -- I've set Jetty to run on port 9080 within this code,
so use accordingly when playing with this.

This code, building on David Pollak's image upload example, provides an
image gallery with support for uploading, renaming, categorizing and
deleting images, as well as browsing uploaded images by category.

This is still very much a work in progress -- next steps from where I'm
sitting are:

a.) some corner cases of form validation -- don't allow categories to
be created with a '/' in their name, as this breaks the URL
rewrites

b.) Ajax, Ajax, Ajax

c.) make it easier to use this within a larger project -- this is
already split into a separate package hierarchy from the
surrounding project, but I'd like to follow the ProtoUser stuff
in, eg, providing a canned Sitemap fragment for a surrounding
project to use.

d.) require a logged in user to upload or edit, but anyone can view
(easy enough to add -- I've done it in other code -- but I haven't
done it here)

e.) reduce the number of queries this makes -- it's not too heavy, but
some convenience functions encapsulating joins could still save some.

Anyway, I'd love any thoughts on what I could be doing differently here,
and hope this helps anyone else who is, like me, just starting out with
lift.

--
Jim Wise
jw...@draga.com

Jim Wise

unread,
Jan 6, 2010, 12:15:25 PM1/6/10
to lif...@googlegroups.com
Jim Wise <jw...@draga.com> writes:

> Oh, one caveat -- I've set Jetty to run on port 9080 within this code,
> so use accordingly when playing with this.

Actually, I've removed this limitation -- this now runs by default on
8080, which can be changed with -Djetty.port=<port number> or with some
config xml in the pom.
--
Jim Wise
jw...@draga.com

David Pollak

unread,
Jan 6, 2010, 12:20:05 PM1/6/10
to lif...@googlegroups.com
Thanks for sharing!

Double thanks for spelling my last name correctly!!
--
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

Neil.Lv

unread,
Jan 6, 2010, 8:59:32 PM1/6/10
to Lift
Thanks for sharing this, it's very useful and helpful to us
(beginner).

Cheers,
Neil

> Beginning Scalahttp://www.apress.com/book/view/1430219890

Reply all
Reply to author
Forward
0 new messages