Microframework bringing instant development of AJAX-enabled web applications to Clojure/Ring.

 Browse the source codes Star on GitHub

 AJAX: as simple as possible

Ganelon is about just one thing - building real-world, AJAX-enabled web applications with Clojure/Ring as easily and quickly as possible.

Just define your views (Widgets) and UI logic (Actions) in Clojure server-side, and Ganelon framework will take care of technical details.

The in-memory shoutbox below (try it!):

Call count (since restart): 3. Last 4 entries:

12:38:14 UTC: hi
12:38:11 UTC: Hello
12:37:48 UTC

Is built with the following code:

(defn box-widget []
    [:p "Call count (since restart): " [:b @COUNTER] ". Last 4 entries:"]
    (for [entry @ENTRIES]
      [:div.hibox [:b (:time entry)] ": "
       (hiccup.util/escape-html (:msg entry))])
    (widgets/action-form "say-hi" {} {:class "form-inline"}
      [:input {:name "msg" :placeholder "Say hi!" :type "text"
               :maxlength "20" :size "20"}] " "
      [:button {:class "btn btn-primary"} "Send!"])))

(actions/defwidgetaction "say-hi" [msg]
  (swap! COUNTER inc)
  (swap! ENTRIES #(util/smart-subvec (flatten [(mkmsg msg) %]) 0 4))

Learn more

 Easy to use

If you are using leiningen, just add following dependency to your project.clj file:

[ganelon "0.9.0"]

And you are good to go!
All required libraries will be loaded, CSS and JS files will be available as well.

 Open Source

Ganelon is completely free for either commercial, personal or educational use.

The whole source code is available under Eclipse Public License 1.0 and available on GitHub

 Production tested

Ganelon is used to power user experience for the news aggregator app: Daily Social.

If you are using Ganelon, tell me about it!

This demo site is of course powered by Ganelon as well.
View source

 Solid foundation

Ganelon combines great Open Source technologies and frameworks, including:

  • Clojure - the most powerful programming language for the Java Virtual Machine.
  • jQuery - All-round, extensive JavaScript library.
  • Hiccup - consise and elastic library for representing HTML in Clojure.
  • Twitter Bootstrap 2 - Sleek, intuitive, and powerful front-end framework for faster and easier web development.
  • Compojure/Ring - abstraction and routing of HTTP(S) requests for Clojure.

You can also use Ganelon with your own favorite JavaScript framework, even totally replacing Bootstrap and jQuery, by providing a thin JavaScript adapter layer!

 Rapid development

With Clojure and little or even no custom JavaScript, you can develop dynamic web apps in minutes.
No more redeployments, time consuming project builds and web server restarts:

  1. Add ring.middleware.reload/wrap-reload middleware to your routes.
  2. Load your project in Clojure REPL from your favorite IDE, such as Emacs, Eclipse or Intellij IDEA.
  3. Modify a Clojure file.

Your Compojure/Ring routes and Ring middleware will be updated on the fly, without the servlet container/Clojure process restarts or redeploys.