• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Clojure with Spring/Hibernate?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm coming from a Java background, but I've played with Scala a bit. In general, I liked what I saw. But, the Spring set of functionality is also important to me, and I was disappointed in the availability of Scala to Spring integration.

From what I saw, Scala doesn't provide a particularly clean integration with Spring/Hibernate. In some ways, the community has tried to provide replacements (Lift, for example) rather than integrate with the existing libraries. I was wondering in what ways the story with Clojure is similar or different. Is Spring integration, for example, a relatively clean process? Or, does the community provide some equivalent functionality? Same question goes for Hibernate.

Also, if there are some equivalent libraries, how mature are the solutions?

Thanks...Eric
 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not an expert but I don't think there is something called Scala-Spring integration of Clojure-Spring integration.
Both Scala and Clojure provide JVM integration and that is what really matter.
Code your Spring application in Scala or Clojure, you will got JVM bytecode at the end of the day.
 
Rancher
Posts: 379
22
Mac OS X Monad Clojure Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, Spring and Hibernate are very object-centric so, whilst you can write Java-compatible objects in Clojure, it's more idiomatic to work at a functional level on more general data structures.

Clojure's SQL library (formerly clojure.contrib.sql, now clojure.java.jdbc) allows for maps to be read from / inserted into database tables very cleanly - and there are some Clojure libraries that offer additional abstractions - so Hibernate isn't really an idiomatic fit for Clojure.

What aspects of Spring are important to you? Dependency injection doesn't really make sense for Clojure. AOP is easy (but handled slightly differently). If you're thinking about MVC and web apps, that's definitely an area where Clojure is fairly weak at the moment, in my opinion (and why I use Clojure for the Model of my apps, but not the View-Controller portions, right now).
 
Hot dog! An advertiser loves us THIS much:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic