aspose file tools*
The moose likes Clojure and the fly likes Integrating Clojure with other systems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Clojure
Bookmark "Integrating Clojure with other systems" Watch "Integrating Clojure with other systems" New topic
Author

Integrating Clojure with other systems

Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1874
hi Authors,
How good Clojure could be as an integration language? We use Tibco EMS/WebSphere MQ as integration brokers. Programs written to send/receive the messages, transforming the messages are written mainly in Java. What are the libraries available in Clojure to perform similar tasks like
1) Parsing an XML(DOM/SAX)
2)Transforming the XML.
3)Writing webservice(like JAX etc).

Thanks


MH
Chas Emerick
author
Greenhorn

Joined: Jun 27, 2012
Posts: 27

Arjun,

Clojure provides stellar tools for consuming, transforming, and emitting XML.

clojure.xml is a core namespace that defines the most common way XML is represented in Clojure (essentially, each element is a map with three slots, for its tag, attributes and content).

Enlive (by Christophe Grand) is a library that allows you to functionally transform XML and HTML. It's billed as a templating engine, but really is an excellent generalized tool for any kind of XML transformations you need to do; we talk about Enlive in the web chapter of the book. Enlive is built on top of clojure.zip — an implementation of Huet's functional zippers — which is generally useful in terms of efficiently and concisely traversing and modifying immutable data structures.

Writing web services is one of the most common popular use cases for Clojure. The book guides you through writing one using Ring and Compojure, although there are higher-level libraries and frameworks that you might find useful as well, including Noir and Bishop (the latter of which is a very promising Clojure implementation of webmachine, a great foundation to build upon if you are aiming to write properly compliant HTTP web services).

--
(coauthor of Clojure Programming from O'Reilly; creator of Clojure Atlas)
Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1874
Thanks Chas.
Like c++ and other languages, does clojure has any one standard body responsible for its specification,libraries?
Chas Emerick
author
Greenhorn

Joined: Jun 27, 2012
Posts: 27

Arjun Shastry wrote:Thanks Chas.
Like c++ and other languages, does clojure has any one standard body responsible for its specification,libraries?


The organization around Clojure roughly follows that around Python, Ruby, and other languages that are not the result of a single company's efforts. The reference implementation is guided by Rich Hickey (its creator), with the bulk of the work done by him and Clojure/core, which he heads. Contributions (patches, documentation, etc.) also come from the community via a patch process.

The libraries are almost entirely community-driven; thus, each one is managed by its author, usually with the help of 1-1,000 other contributors from the community.

At this point in time, I think it's taken as a given that standards bodies are generally not an ideal way to develop new languages. Perhaps after some extended period of real-world use, a language might be submitted to a standards body (here I'm thinking of C#), but I wouldn't bet on that being commonplace, either.
Sean Corfield
Ranch Hand

Joined: Feb 09, 2011
Posts: 267
    
    5

Chas Emerick wrote:At this point in time, I think it's taken as a given that standards bodies are generally not an ideal way to develop new languages. Perhaps after some extended period of real-world use, a language might be submitted to a standards body (here I'm thinking of C#), but I wouldn't bet on that being commonplace, either.

As someone who was a voting member of the ANSI C++ Standards Committee for eight years (and secretary for three), as well as the UK's (BSI) "Principal Expert" on the ISO committee for most of those eight years, I'll just +1 what Chas said about modern language development not being best served by a standards body (at least, not unless there are multiple competing implementations which is hampering commerce - the whole point of a standards body is to "enable commerce" around a technology).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Integrating Clojure with other systems