aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » Clojure
Bookmark "Clojure made simple" Watch "Clojure made simple" New topic
Author

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 ?


MH
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

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: 261
    
    5

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: https://github.com/clojure/data.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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Clojure made simple