[Weekend Chat] A secretly Clojure web framework?

107 views
Skip to first unread message

HB

unread,
Sep 3, 2010, 11:45:42 PM9/3/10
to Clojure
Hey,
Since Relevance is heavily investing in Clojure, do you think they are
working on a Clojure web framework?
Personally, I wish.

Saul Hazledine

unread,
Sep 4, 2010, 4:13:01 AM9/4/10
to Clojure
Its also worth looking at Conjure if you're interested in a web
framework:
http://github.com/macourtney/Conjure

Saul

Aaron Bedra

unread,
Sep 4, 2010, 9:32:11 AM9/4/10
to clo...@googlegroups.com
We aren't currently working on creating a new web framework, but I am
working to make the web development experience a little better by
helping out where I can. I have spent my time working with compojure
and very recently with sandbar. There's a fair amount of work to be
done in this area, but there are some great people who have already
dedicated time to it.

Cheers,

Aaron

HB

unread,
Sep 4, 2010, 11:51:51 AM9/4/10
to Clojure
My wish is vanquished :)
But I really wish if Relevance will work on a web framework since it
is in a unique position to achieve this (having the brightest Clojure
folks).
I read that Relevance embracing the "20%" principle like Google, this
is also will help you Relevance folks.
Have a nice day all.

Shantanu Kumar

unread,
Sep 4, 2010, 1:26:30 PM9/4/10
to Clojure


On Sep 4, 8:51 pm, HB <hubaghd...@gmail.com> wrote:
> My wish is vanquished :)
> But I really wish if Relevance will work on a web framework since it
> is in a unique position to achieve this (having the brightest Clojure
> folks).
> I read that Relevance embracing the "20%" principle like Google, this
> is also will help you Relevance folks.
> Have a nice day all.

HB,

I am interested to know what deficiencies do you see in present state
of affairs in Clojure web development space. It would be something
useful to discuss. There are libraries, such as:
1. Ring+Clout+Compojure, Ring+Conjure, Ring+Moustache etc as web
controllers
2. Enlive, Hiccup, Gulliver, Clj-StringTemplate, Cfmljure etc for web
template stuff
3. c.c.sql, clj-record, ClojureQL, SQLRat for relational databases
4. Sandbar, Conjure, Compojure-REST for additional web stuff
5. clj-http, clj-apache-http for client-side HTTP
6. Lein-WAR, Maven-Clojure plugin WAR artifact for production
deployment

What do you think is missing? Development-environment/IDE integration?
REST support? Caching, security, SEO, AJAX? WebSockets? Ready-made web-
UI components for rapid prototyping? Feel free to describe in detail.

Regards,
Shantanu

Stuart Sierra

unread,
Sep 4, 2010, 1:45:52 PM9/4/10
to Clojure
What's missing, frankly, is a coherent design. Lots of pieces are
there, but they don't always fit together well. As one trivial
example, we discovered this week that Sandbar's user authentication
doesn't work with Ring's keyword-parameter-names middleware. But
these problems will be ironed out over time.

The best thing we can do for Clojure web development right now is
start developing web applications in Clojure, find the pieces that are
missing, and fill them in. Rails wasn't built in a day, it was the
consummation of years of experience, distilling best practices and
patterns into a framework. Clojure is a very different language from
Ruby, and we will have to grow our own best practices.

-S

Abhishek Reddy

unread,
Sep 4, 2010, 1:53:58 PM9/4/10
to clo...@googlegroups.com
On Sun, Sep 5, 2010 at 5:26 AM, Shantanu Kumar <kumar.s...@gmail.com> wrote:

I am interested to know what deficiencies do you see in present state
of affairs in Clojure web development space. It would be something
useful to discuss. There are libraries, such as:
 
1. Ring+Clout+Compojure, Ring+Conjure, Ring+Moustache etc as web
controllers
2. Enlive, Hiccup, Gulliver, Clj-StringTemplate, Cfmljure etc for web
template stuff

Documentation.  Especially for integrating various combinations of those libraries, and for deployment.

More generally, the fragmented state of support -- too many separate and underused mailing lists, IRC channels, websites, each for small, composable components.  There is now a  clojure-web-dev mailing list and a #clojure-web IRC channel, but I'd like to see a similarly overarching website too, which documents broader stories like integration, development workflows, deployment to various platforms, etc.

4. Sandbar, Conjure, Compojure-REST for additional web stuff

They are not sufficiently complete or mature yet.  For example, a lot of people want a pre-cooked authentication API, and only Sandbar comes close (as of last month).

Regards,
Shantanu


--
Abhishek Reddy
http://abhishek.geek.nz


Saul Hazledine

unread,
Sep 4, 2010, 1:59:31 PM9/4/10
to Clojure
26 pm, Shantanu Kumar <kumar.shant...@gmail.com> wrote:
> I am interested to know what deficiencies do you see in present state
> of affairs in Clojure web development space. It would be something
> useful to discuss.

I think the packages that exist are exciting and that some of them
represent a step forwards even when compared to more established
languages.

However, much that I hate frameworks (personal opinion not meant to
offend), they are very good for plugins that touch different layers of
an application (e.g data storage, routing and HTML generation). I
can't see a way things like Django style user management or admin
screens can be done by libraries.

Frameworks are also very good for rapid prototyping. You usually pay
for such power with inflexibility but Rails and Django seem to hit a
sweet spot where you can develop a website fast and still run a
business on them.

Saul

Sean Corfield

unread,
Sep 4, 2010, 3:25:36 PM9/4/10
to clo...@googlegroups.com
On Sat, Sep 4, 2010 at 10:26 AM, Shantanu Kumar
<kumar.s...@gmail.com> wrote:
> 2. Enlive, Hiccup, Gulliver, Clj-StringTemplate, Cfmljure etc for web
> template stuff

Since cfmljure got a mention...

Would folks be interested in a ready-to-run Jetty-based download that
ran CFML and Clojure out-of-the-box?

It would be based on the Railo 'Express' package - just download,
unzip and run - Railo is a fast, free, open source CFML engine (a
JBoss Community project) and the download is currently ~35MB without a
JRE (but including Jetty).

I'm probably going to put one together anyway for the CFML community
to try out and get them exposed to Clojure but I thought I'd mention
it here for a bit of cross-fertilization...
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

Shantanu Kumar

unread,
Sep 4, 2010, 4:05:05 PM9/4/10
to Clojure


On Sep 5, 12:25 am, Sean Corfield <seancorfi...@gmail.com> wrote:
> On Sat, Sep 4, 2010 at 10:26 AM, Shantanu Kumar
>
> <kumar.shant...@gmail.com> wrote:
> > 2. Enlive, Hiccup, Gulliver, Clj-StringTemplate, Cfmljure etc for web
> > template stuff
>
> Since cfmljure got a mention...
>
> Would folks be interested in a ready-to-run Jetty-based download that
> ran CFML and Clojure out-of-the-box?

+1
I know nothing about CFML but the idea looks neat to me. Lower the
barrier to get started quickly, the better it gets I suppose. Pre-
included documentation and some demo code should be nice to have.

>
> It would be based on the Railo 'Express' package - just download,
> unzip and run - Railo is a fast, free, open source CFML engine (a
> JBoss Community project) and the download is currently ~35MB without a
> JRE (but including Jetty).

Is it possible to push the deps (Railo Express, for example) to
Clojars or a Maven repo and just put up a Lein based download or
GitHub URL? Just an idea.

Regards,
Shantanu

Brenton

unread,
Sep 4, 2010, 4:05:52 PM9/4/10
to Clojure
> The best thing we can do for Clojure web development right now is
> start developing web applications in Clojure, find the pieces that are
> missing, and fill them in.

This is the best advise I have heard in a while. We need to just start
doing it. If something that we need is missing then there is a great
opportunity for you to contribute. If you try to use a library and
find a problem, then either fix it or let the author know about the
problem. As the author of Sandbar, I wasn't even aware of with-keyword-
params but because Stuart and Aaron ran into this problem, I was made
aware of it and happily fixed it. New libraries tend to solve the
exact problems of the author so if you can use something in a
different environment and then provide feedback, you are performing a
great service.

> Clojure is a very different language from
> Ruby, and we will have to grow our own best practices.

Finding our own best practices is the big task ahead of us. The
flexibility of Compojure and Clojure can lead to vastly different ways
of doing things. I think this is a point where Relevance and Clojure/
core can show some real leadership. They will be doing a lot more
Clojure projects than the average developer over the coming years and
they have some of the top Clojure people. We will be able to learn a
lot from their experience.

> I can't see a way things like Django style user management or admin screens
> can be done by libraries.
> Frameworks are also very good for rapid prototyping. You usually pay
> for such power with inflexibility but Rails and Django seem to hit a
> sweet spot where you can develop a website fast and still run a
> business on them.

I think that this can be done in libraries. It will not be easy but it
will be much easier that doing it in Python or Ruby and will come at
less of a cost. Why? Because, if you are doing things right in
Clojure, your data is not hidden away in Objects behind mini-
languages. This makes it much easier to come up with generic solutions
to problems. For example, in 90% of my applications I need the same
exact user management component. I have created a way to simply add
this component to my application by adding a set of parametrized
routes. This gives me a paged table that can be filtered and sorted as
well as forms for adding, editing and deleting. All I need to
implement is a set of functions that define how to work with the data.
I will release this at some point but it still needs a little work to
be generally useful.

Final thought: As we move forward I think we need to be careful about
wanting a framework. We do need to have a common base that we can all
work from, which I believe we have in Ring/Compojure, but we don't
need to have something like Rails. A framework tries to make
everything easy. I believe this is folly. After using a framework for
too long, you start to forget about all the parts that the framework
hides from you and this diminishes your ability to solve problems in
the best possible way. When starting to solve a new problem, I want to
start thinking at the lowest level that I am willing to work, then add
libraries for the things that I want to make easy. We need to have a
common base, best practices and good libraries.

Brenton

HB

unread,
Sep 4, 2010, 10:30:23 PM9/4/10
to Clojure
Thank you all guys, I'm really happy and proud to be around.

Shantanu,
Stuart, Abhishek and Brenton said every thing I was thinking about and
much more:
Lack of coherent design, sometimes it is really hard to get help,
documentation is rare.

I don't know even how to getting started with Compojure to build a web
application.

I definitely agree with Brenton, I'm thinking about a minimal
framework (first things come to mind):
1. Clean and friendly URLs (like Django and Rails).
2. Templates neutral.
3. Persistence neutral.
4. Ajax lib neutral (like Django).
5. Definitely not component-based.
6. Rest support.

(Btw Brenton, your post worth its weight in gold, thank your for
writing).
And yes Sean, this ideas looks amazing.
I really want to help and participate in one of these projects you all
mentioned but I'm pretty new to Clojure and I don't know how I can
fit.

Brenton

unread,
Sep 5, 2010, 12:01:13 AM9/5/10
to Clojure

Martin DeMello

unread,
Sep 5, 2010, 12:56:05 AM9/5/10
to clo...@googlegroups.com
On Sat, Sep 4, 2010 at 11:23 PM, Abhishek Reddy <arb...@gmail.com> wrote:
> More generally, the fragmented state of support -- too many separate and
> underused mailing lists, IRC channels, websites, each for small, composable
> components.

This is an endemic problem, though, not one confined to clojure. I've
seen it happen in pretty much every open source language community
I've been on - once the language gets popular, people don't want
library support cluttering the already-busy mailing list, but then it
becomes a real nuisance to join one mailing list per library you use.

martin

Abhishek Reddy

unread,
Sep 5, 2010, 7:38:45 AM9/5/10
to clo...@googlegroups.com

Absolutely.  However, the fine granularity at which Clojure's web libraries are fragmented is, I think, novel.  The familiar problem is that much more painful (for now!).


martin

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
Reply all
Reply to author
Forward
0 new messages