Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Compojure 0.4.0 released
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
James Reeves  
View profile  
 More options Jun 23 2010, 4:19 pm
From: James Reeves <weavejes...@googlemail.com>
Date: Wed, 23 Jun 2010 13:19:57 -0700 (PDT)
Local: Wed, Jun 23 2010 4:19 pm
Subject: Compojure 0.4.0 released
Hi folks,

Compojure 0.4.0 has (finally) been released.

It's more or less the same as 0.4.0-RC3, but I updated the Ring
dependency to 0.2.3, and I sneakily added response type handling for
ISeq and InputStream.

- James


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Carper  
View profile  
 More options Jun 23 2010, 9:16 pm
From: Brian Carper <briancar...@gmail.com>
Date: Wed, 23 Jun 2010 18:16:39 -0700 (PDT)
Local: Wed, Jun 23 2010 9:16 pm
Subject: Re: Compojure 0.4.0 released
On Jun 23, 1:19 pm, James Reeves <weavejes...@googlemail.com> wrote:

> Hi folks,

> Compojure 0.4.0 has (finally) been released.

Congrats!  It's a fine piece of work.  Thanks for your efforts.

Is there work underway to provide more complete documentation for
Compojure?  I may soon have some time to help in that area, if you're
interested.

--Brian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Reeves  
View profile  
 More options Jun 24 2010, 9:01 am
From: James Reeves <jree...@weavejester.com>
Date: Thu, 24 Jun 2010 14:01:00 +0100
Subject: Re: Compojure 0.4.0 released
On 24 June 2010 02:16, Brian Carper <briancar...@gmail.com> wrote:

> Is there work underway to provide more complete documentation for
> Compojure?  I may soon have some time to help in that area, if you're
> interested.

The documentation for Compojure itself is fairly complete already, but
that's because Compojure has factored out most of its functionality to
Ring. Documentation on things like Ring sessions would be useful.

To that end, I've been considering setting up a site for Clojure web
development, which would start by covering the basic ideas of Ring,
and then discuss how to use Ring in conjunction with libraries like
Compojure or Moustache, how to generate HTML with Hiccup or Enlive,
and so forth. I was thinking something similar in style to the Git
Community Book [http://book.git-scm.com/].

Does this sound like a good idea to you?

- James


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Keith Lancaster  
View profile  
 More options Jun 24 2010, 9:30 am
From: Keith Lancaster <klancaster1...@acm.org>
Date: Thu, 24 Jun 2010 08:30:02 -0500
Local: Thurs, Jun 24 2010 9:30 am
Subject: Re: Compojure 0.4.0 released
+1

On Jun 24, 2010, at 8:01 AM, James Reeves wrote:

Keith Lancaster
klancaster1...@acm.org

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anders Rune Jensen  
View profile  
 More options Jun 24 2010, 9:38 am
From: Anders Rune Jensen <anders.rune.jen...@gmail.com>
Date: Thu, 24 Jun 2010 15:38:31 +0200
Local: Thurs, Jun 24 2010 9:38 am
Subject: Re: Compojure 0.4.0 released

More documentation would be very welcome :-)

--
Anders Rune Jensen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Carper  
View profile   Translate to Translated (View Original)
 More options Jun 24 2010, 1:54 pm
From: Brian Carper <briancar...@gmail.com>
Date: Thu, 24 Jun 2010 10:54:54 -0700 (PDT)
Local: Thurs, Jun 24 2010 1:54 pm
Subject: Re: Compojure 0.4.0 released
On Jun 24, 6:01 am, James Reeves <jree...@weavejester.com> wrote:

> To that end, I've been considering setting up a site for Clojure web
> development, which would start by covering the basic ideas of Ring,
> and then discuss how to use Ring in conjunction with libraries like
> Compojure or Moustache, how to generate HTML with Hiccup or Enlive,
> and so forth. I was thinking something similar in style to the Git
> Community Book [http://book.git-scm.com/].

> Does this sound like a good idea to you?

Yes, this sounds great.  The Compojure and Ring documentation often
assumes too high a level of knowledge, in my opinion.  You dive right
into "Here's how to define a route", but what is a "route"?  What is
"middleware"?  What are the advantages of doing things this way?
Ring uses the word "app" a lot, what is that?  If you haven't already
used another toolkit from another language, these things aren't going
to be clear at all.  I had to read the source code for Compojure to
figure out what it does, in a lot of areas.

In http://wiki.github.com/weavejester/compojure/route-syntax, it says
to refer to Clojure's own destructuring docs, but Compojure's syntax
doesn't look much at all like Clojure's syntax.  It might be nice to
show the equivalence explicitly:

(let [{:foo foo} request] ...)
=> (GET "/" [] {:foo foo} ...)

Even this won't make sense unless you know exactly how Ring works,
that your routes are dealing with a Ring request map that always has
certain standard keys.  A note saying "Go read the Ring SPEC document
to see what keys are available, and keep in mind that more keys may be
added by middleware" would be helpful here.

The docs say:

> If the binding is a vector, the request parameters are
> bound to the symbols in the vector. If an & more form
> is used, the map of parameters that have not been bound
> to a symbol are bound to more.

Which parameters?  POST?  GET?  Route?

A lot of examples are given like this:

(PUT "/user/:id" [id & updated-attrs]
  (update-user id updated-attrs))

OK, so what does that do exactly?  What is the value of updated-attrs
now?  It'd be nice to spell it out explicitly.  Or if I want to figure
out what it does myself, how do I inspect it?  How do you debug a
Compojure app?  I still don't really know if I'm doing it the best way
sometimes, to be honest.  I println from my handlers, or have a route
return {:body (pr-str request)}, or I throw an exception with an
object I want to inspect and use stacktrace-dumping-to-HTML middleware
to look at it.

The examples for Ring and Compojure both are always at a "hello world"
level, which is OK, but I've seen a lot of people ask for more
complex / real-world examples.  Examples of integrating with Hiccup or
Enlive would be excellent, as you mention, because a user is almost
certainly going to need one of those (or equivalent).

And then there's the "Now how do I deploy it?" issue, which would
benefit greatly from documentation.

If not for this group and for reading the source for most of Compojure
and Ring, personally I would still be in the dark about how a lot of
things work.  I guess I prefer my documentation dumbed down a few
notches.  A book-style document would be a great way to solve most or
all of this, so I think it's a great idea.  Distributing the doc-
writing work to the community is also a good idea.

--Brian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »