On Tue, Dec 3, 2013 at 4:20 PM, James Laver <james.la...@gmail.com> wrote:
> I did have a quick look at liberator earlier but by that time i'd scratched
> most of my itch with compojure. I do intend to look into it in more depth
> though since there's a lot of application left to write.

Yes, there's a lot of detail in REST behavior and Liberator captures
all of that.

> The lisp mindset is rather why I came over to clojure, but I wasn't
> expecting to have to write quite so much code to get on with things.

I'm curious how this experience would have fared in Lisp? (I haven't
done any serious work in Lisp - and haven't used any Lisp systems much
since the mid-80's - so I don't know what sort of web and DB libraries
exist out there for Lisp)

> Part of the 14 hours has been a learning curve for the libraries involved.

Ah, yes, understandable.

As Phil says, rolling your own migrations, native to Postgres, is
probably the best way to go in that area. At World Singles, we use
external SQL files with a prefix indicating DB "level" and an
indicator of dev vs prod migration, and a small Clojure script that
figures out what needs applying. That's partly because we started out
with SQL files - sometimes provided by DBAs - before we introduced
Clojure to the project.

Like Phil, I tend to prefer to avoid SQL abstractions, unless I
specifically need the ability to compose fragments of SQL, so I tend
to work directly with java.jdbc with just a few helpers built on top
of it (find-by-keys, get-by-id, delete-by-id). I ported my own simple,
convention-based MVC framework to Clojure (from CFML) and it's based
on Ring and I just tend to "go with the flow" as far as the standard
middleware is concerned. That framework has simple render-json etc
functions for returning JSON or XML or whatever as a REST response,
and controllers are simple functions (operating on a simple map of
parameters) and views - if returning HTML rather than just data - are
Selmer templates (Django style).
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to