Microframework bringing instant development of AJAX-enabled web applications to Clojure/Ring.
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!):
Is built with the following code:
(defn box-widget [] (widgets/with-div [: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)) (box-widget))
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.
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
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
Ganelon combines great Open Source technologies and frameworks, including:
You can also use Ganelon with your own favorite JavaScript framework, even totally replacing Bootstrap and jQuery, by providing a thin JavaScript adapter layer!
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:
ring.middleware.reload/wrap-reload
middleware to your routes.Your Compojure/Ring routes and Ring middleware will be updated on the fly, without the servlet container/Clojure process restarts or redeploys.