<weavejes
...@googlemail.com> wrote:
> Hi folks,
> For those interested in contributing to Compojure, here's a list of
> things that would be useful to have. I'll start with the simplest
> tasks that require the least knowledge of Clojure and Compojure, and
> work up to the more complicated stuff:
> 1. Add a task to the Ant build script to automatically download and
> unzip the deps.zip file from:
> http://cloud.github.com/downloads/weavejester/compojure/deps.zip
> 2. Write a Clojure script to pull out all the docstrings and function
> names from the Compojure source and automatically compile them into a
> HTML API reference like the one at clojure.org/api.
> 3. Add a Clojure wrapper for another embedded Java HTTP server, such
> as Grizzly.
> 4. Implement a file-based session store, using the multimethods
> defined in compojure.http.session. Use the already-implemented :memory
> and :cookie session store types as an example.
> 5. Write a function to create a useful set of routes, such as a login
> page. You could create an "authenticate" multimethod so that users
> could add their own authentication back end, and perhaps allow them to
> specify a template for the page. You wouldn't be able to create a
> login page that would be suitable for every site, but it would be nice
> to have a basic component to use for mock-ups and simple sites. Other
> common pieces of functionality, like tables of paged data, or a list
> of comments, could also potentially be factored out into functions.
> 6. Add a middleware function to add caching functionality to existing
> routes. Something like Rack::Cache.
> 7. Add support to compojure.http.routes for full URLs. If the user
> specifies a relative path, like (GET "/" ...), it should work as it
> does now. But if the user specifies a full URL, like (GET "http://
> www.example.com/" ...) it should match the hostname and protocol.
> Additionally, you should be able to specify parameters in the URLs,
> like (GET "http://:subdomain.example.com" ...).
> Reply to this thread if you're interested in working on any of these
> areas, or if you have a suggestion for a new feature you think
> Compojure should possess that isn't listed above.
> Task no. 5 also requires some brief explanation, which I'll be happy
> to expand on. Unlike many frameworks, a route in Compojure is handled
> by a function, and several routes can be combined into one using the
> routes function. This means we can group together routes for a common
> task, such as a GET which shows a login page and a POST that
> authenticates the user based on the login form parameters. This is an
> interesting feature that isn't present in many other frameworks, and
> deserves some exploration. So task no. 5 is really a request for
> anyone interested to experiment a little with Compojure's routes, and
> see if we can't come up with something to automate a lot of the bog-
> standard features most web applications have, or at least create
> something that developers can use as a basis to create their own
> custom components.
> Let me know if you happen to have any questions or need a more
> detailed explanation.
> - James