Live data from Hacker News

Ask HN: Modern approach to web application development with Common Lisp

news.ycombinator.com

11–20 of 26 posts

Re: Ask HN: Modern approach to web application development with Common Lisp

#11
post #5

I'd hesitate about MongoDB - I'm not aware of a mature Mongo-backed ORM, for starters. Personally, I like http://marijnhaverbeke.nl/postmodern/ .

Since you directly pull JSON objects out of MongoDB (i.e. usable data structures), MongoDB lends itself to a slightly different programming style than you'd have with a relational database and an ORM. I'd hesitate to call either one more idiomatic in a lisp-ish programming style.

EDIT: That said, MongoDB's reliability model (you have to have a synchronized pair of DB servers to get the reliability you get from a single PostgreSQL instance), PostgreSQL may be the safer choice.

Re: Ask HN: Modern approach to web application development with Common Lisp

#12
post #4

How about going 3/4 of the way to Common Lisp and try Clojure instead. Great lightweight web + mongo libs + all the java libs.

Yes, taking a serious look at clojure is worth it, the language is awesome, the libraries are maturing and growing in numbers, and the community is awesome. But i wouldn't bet against common lisp either, im currently learning it, and im amazed, clojure programmers can only gain by learning it.

Re: Ask HN: Modern approach to web application development with Common Lisp

#13
How about tpd2? If you're comfortable rewriting everything from scratch, at least you'll be working from a high performance foundation -- http://github.com/vii/teepeedee2/tree/master

Weblocks is a very good concept if you're willing to get your head round it, and work within its worldview (which is about displaying widgets rather than manually generating HTML).

Everybody uses parenscript, which is a great concept.

Re: Ask HN: Modern approach to web application development with Common Lisp

#14
SproutCore + Hunchentoot + MongoDB is it right choice?

Even then you're not yet off to the races. In particular, Hunchentoot's session management capabilities are anemic out of the box.

I haven't seen any drop-in replacements, so you're looking at reinventing at the very least this extremely core part of any web development stack.

Hunchentoot also doesn't have any built-in capabilities for handling updates to the website's source code.

Re: Ask HN: Modern approach to web application development with Common Lisp

#15
post #13

How about tpd2? If you're comfortable rewriting everything from scratch, at least you'll be working from a high performance foundation -- http://github.com/vii/teepeedee2/tree/master Weblocks is a very good concept if you're willing to get your head round it, and work within its worldview (which is about displaying widgets rather than manually generating HTML). Everybody uses parenscript, which is a great concept.

Both TPD2 and Weblocks rewrite your code using a continuation-passing style transformer, which makes web apps written in them harder to debug than they need to be. It also makes testing your apps or doing any kind of automated HTTP client scripting much harder than it needs to be. There's no upside to managing app state with continuations if you are able to use AJAX.

Re: Ask HN: Modern approach to web application development with Common Lisp

#16
post #9
post #2

Personally, I'd leverage on PostgreSQL rather than MongoDB, because I think relational databases are still the best fit for the majority of modern web applications. Unless, of course, you have a really simple schema so that you want to use the DB as a mere persistence layer. Or you know from the beginning that you'll have to scale really huge. But then, you'd need a highly customized framework anyway, which would som…

Following the above, if you're looking for an object store you'd find interesting cl-prevalence which is entirely written in CL. About web frameworks others have mentioned AllegroServe, which looks quite good with the logic and view separation in templates and actions, similar to Django. Other people prefer to code the HTML inline with cl-who i.e. If you're developing an application in the web you may find worth a co…

bknr-datastore works on the same principle as cl-prevalence, but is actively developed: http://www.cliki.net/bknr-datastore

Re: Ask HN: Modern approach to web application development with Common Lisp

#17

SproutCore + Hunchentoot + MongoDB is it right choice? Even then you're not yet off to the races. In particular, Hunchentoot's session management capabilities are anemic out of the box. I haven't seen any drop-in replacements, so you're looking at reinventing at the very least this extremely core part of any web development stack. Hunchentoot also doesn't have any built-in capabilities for handling updates to the web…

"In particular, Hunchentoot's session management capabilities are anemic out of the box."

Do you mean user authentication? What would be really nice to have is a user authentication library that offered a generic protocol that could be used with several web servers and persistence mechanisms.

"Hunchentoot also doesn't have any built-in capabilities for handling updates to the website's source code."

You just load the new code and it works.

Re: Ask HN: Modern approach to web application development with Common Lisp

#19
post #7

We've been using Portable Allegroserve + mysql (running on SBCL on EC2) with very good results.

I second the Portable Allegroserve advice. It is an older project, but John Foderaro really put a lot of good functionality in Portable Allegroserve. That said, Edi's Hunchentoot project is very popular.

Re: Ask HN: Modern approach to web application development with Common Lisp

#20
as someone who has written webapps in both lisp and python, I would recommend sticking with python. you have to choose the right tool for the job and get comfortable working with different languages. I am a huge fan of CL, but if you go down that road for a webapp, you will spend a lot of time filling in gaps in the framework instead of focusing on the functionality of your app.

Django may be the wrong tool for the job in your case. If so, I recommend exploring some of the more flexible python frameworks like pylons before making the switch to common lisp.

Post reply on HN