File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Clojure and the fly likes Clojure made simple Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Clojure
Bookmark "Clojure made simple" Watch "Clojure made simple" New topic

Clojure made simple

Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1874
Hi Author,
How easy to write server side application in Clojure ? For example- JMS Queue receiver program? or XML file parsing ? Is there any advantage of writing server side applications in Clojure over Java ?

Hussein Baghdadi
clojure forum advocate

Joined: Nov 08, 2003
Posts: 3476

You can try it yourself and see
I would say the advantages that you will have are much less typing, the ability to wrap some repetitive code patterns in Macros an of course the functional programming concepts that are really suitable for asynchronous communications. For example, a fully-fledged functions as the callback handlers.
Sean Corfield
Ranch Hand

Joined: Feb 09, 2011
Posts: 252

Arjun Shastry wrote:XML file parsing ? Is there any advantage of writing server side applications in Clojure over Java ?

Clojure has a standard library for parsing XML to data structures and rendering data structures to XML:

As Hussein said, concise code, immutability, and higher order functions are all big benefits of Clojure over Java.

We've been using Clojure in production for two years to power increasingly larger parts of the server side of our Internet dating platform and we're very happy with the results.
subject: Clojure made simple
Similar Threads
Clojure versus JavaScript
Web development with ClojureScript One
Executing jars from jsp
Why learn Clojure
What to learn first for Java?