Hi list, migae-examples <https://github.com/greynolds/migae-examples> is a series of examples demonstrating the use of Clojure to implement servlets for both standard servlet containers and Google App Engine. The purpose is not so much to explain how to code as to show what's going on behind the scenes with gen-class, the Clojure runtime, and servlet containers. The examples start with a minimal Java implementation and progress through use of Ring and Compojure, to use of GAE. (The GAE stuff is very minimal at the moment; a Clojure wrapper for GAE services is under development). Along the way they show how to use a Servlet Filter to get interactive repl-like behavior out of a servlet container. The focus is on understanding what happens at compile time and runtime.
The approach is a little different from that of Ring. Ring uses an embedded Jetty server to run web apps. I wanted support for multiple servlets, filters, use of web.xml, etc. and use of standalone servers. So these examples are a sort of record of how to figure out how to do that. They might be useful even for people who have been using Ring, if they have not looked at how it all works under the covers. The code, with a bunch of explanatory text, is at https://github.com/greynolds/migae-examples I also came up with a somewhat perverse hack that supports interactive development using the GAE dev_appserver. It's a little twisted but it works. See example gae2. Feedback would be welcome, especially from people who know the gory details of Clojure. I made the examples as I was exploring the workings of servlets and clojure, so some of what I say is based on knowledge but some is based on inference, so there may be some errors of explanation. Cheers, Gregg -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.