It seems much easier to use the same language when using a Lisp dialect compared to for instance Java, which would be a lot more verbose, but it is also done this way to separate logic from presentation, and because it's (supposedly) easier for front-end developers. Coming from non-CL frameworks, it was natural for me to choose a template framework for my small (and now outdated) tutorial on writing a blog in CL (http://goo.gl/YHCw).
However, I'm wondering if anyone has any experience developing web applications using a Lisp-dialect for generating the HTML (as Noire and the example in Practical Common Lisp), and if this is scalable to a team where front-end developers might not be used to or familiar with Lisp.
The syntax seems easy on the eyes, so perhaps it's not such a big problem once they get over the unfamiliarity.
Even when using simple template languages I have experienced the I didn't understand those funny bits in the HTML so I have removed them far too many times.
In Clojure, Enlive (https://github.com/cgrand/enlive) is a better solution because the HTML remains as HTML.
For example, one might write a page like:
(defn user-settings [user]
(settings-for [user]
(breadcrumbs (link home) (link settings))
(text-field :login)
(text-field :email)))
And the functions used would take care of generating the page, layout, form, fields, error notices, flash messages, CSRF protection and so forth. By the time you've finished with all that, those 4 lines of Clojure will be 50 lines of HTML.Hiccup tends to lend itself toward user interfaces that are uniform and predictable, with repeatable elements. Think Facebook or Github, for instance.
Also, I really love html functions as opposed to JQuery-esque template filling. It's cleaner and more flexible to me.
It is not a significant obstacle.
See this Stackoverflow question... CL-WHO-like HTML templating for other languages? (http://stackoverflow.com/questions/671572/cl-who-like-html-t...) which provides some examples in other languages.
However, I'm wondering if anyone has any experience developing web applications using a Lisp-dialect for generating the HTML (as Noire and the example in Practical Common Lisp), and if this is scalable to a team where front-end developers might not be used to or familiar with Lisp.
I like keeping the HTML markup within the back-end developers domain and leave the front-end developers/designers to just use Javascript & CSS around it. (disclaimer: In most cases I'm both the back-end and front-end developer :)
I agree that learning Haskell as a prelude to learning Scala and Clojure might not be a bad idea (I blogged about this a few days ago).
It looks like Noir uses a custom "lein run" command to start the server. Have you considered using the lein-ring plugin, instead?
Edit: and now it is :D
It's like someone showing off a new garbage collection library built in C. The problem's been solved. Show me something new.
However, in my rather biased opinion, many of the core Clojure web development libraries already exceed those built for Ruby, and certainly vastly exceed those that existed when RoR was first released.
For me, the most interesting part of libraries like Noir is how much they use existing libraries. It indicates we're doing something very right with regard to modularity.
Clojure's been popular in the hacker community for a good 2 years now. That's a weak argument.
In a nutshell: Make small simple things even if thats ends up beeing a bit more verbose then if you would have built it as one thing. If time shows that a set of librarys works very nicly together then you can write something new that combines these in a nice way.
This is what the Noir does it just pulls together some librarys and delivers them in a nice package.
I know Clojure doesn't support first-class continuations, but does anyone know whether is it possible to use Clojure Noir to program in this style?
Still, looks very interesting.
One question: form rendering, validation and handling are the most important as well as the most annoying things you have to do while writing a web application. Do you plan to incorporate something for that into the framework?
Level of confidence instilled in me because of this: 0% Chance I'll come back later to check it out: 0% Probability I'll go visit Enlive right now: 100%
Can't help but suspect you're choking on your own dog food here. Or crapping out a corn-studded loaf, take your pick.
Well done!