5 ms·
I've looked off and on into using App Engine's Java interface. But even the "hello world" app looked much more bureaucratic than the Python equivalent (it's due
by psranga 16y ago
I've looked off and on into using App Engine's Java interface. But even the "hello world" app looked much more bureaucratic than the Python equivalent (it's due to Google trying to do things the Java way).
Do you still have to deal with Java's baggage even if you run Clojure on App Engine? How much can you abstract away? Any libs?
- francoisdevlin 16y agoOccasional you do have to deal with Java's baggage in Clojure. The best example I can think of right now is the build process. The consensus is to use Maven or the Clojure tool Leiningen. The good news is that you also get Java's "Deployment for Dummies" solutions (just copy the JAR/WAR and you're good to go), though.
- jwr 16y agoLeiningen is actually pretty cool. It uses Maven under the hood (but you don't have to know that). The nice thing is that if you suddenly decide you need to use a Java library (say, one of the Apache Commons libs), you just add one line to your project.clj file, do "lein deps" and boom, you can use the library in your project. Having written quite a bit of software in Common Lisp, this is a welcome change.
- aerique 16y agoHuh?, how's this easier than adding a package entry to the depends-on form in an asdf-file in CL?
- LaPingvino 16y agoYou can add jars from any JVM language and use it directly with the great Clojure Java-interop.
- weavejester 16y agoLeiningen only uses Maven's dependency resolution API. Everything else is written in Clojure.
- brown9-2 16y agoI think the headache comes from accessing the datastore in an OO-like way. The GAE Python API makes this a lot simpler.
- joelgwebber 16y agoThe Java Datastore API is much more straightforward as well. I strongly prefer to just use it directly over JDO/JPA, which suffers from a bit of an impedance mismatch.
- brown9-2 16y agoThis is correct - I was referring to using JDO.
- nmorris 16y agoFor small crud apps you can avoid the java baggage. Using ring and ring-servlet you can build the servlet app engine wants. Libraries like compojure build on top of ring. The datastore can be accessed using http://github.com/r0man/appengine-clj http://github.com/r0man/appengine-clj or http://github.com/smartrevolution/clj-gae-datastore http://github.com/smartrevolution/clj-gae-datastore. Accessing the blobstore has not been abstracted away yet and requires a bit of work to get uploads acting correctly with ring/compojure. I've not touched task queues, xmpp, mail, or memcache and have not seen any abstractions for them.