Rick

Rick
Rick

Tuesday, January 11, 2011

Crank gets a mention

Crank/Krank gets a mention.

I wrote most of the DAO support for Crank and quite a bit of the rest. The project was always called Crank. It is Crank as in Crank something out, i.e., get it done quickly. The idea behind Crank was to idiomatically create GUIs in JSF, Spring MVC, and GWT. I only ever got around to writing the JSF front end. My personal life got a little busy, and then I got a job where I ended up writing embedded C and Python daemons instead of Java. There are about 40 or so projects that I know that use Crank. I imagine there is probably not a lot of new projects getting started who use Crank. 


I was looking at Hades. It has more momentum than Crank ever had. It also seems to be well done and documented. 


You could extend the Crank GenericDAO support and add methods, but it was not easy.


I used AOP introductions to add the additional finder methods. You could also weave in delete methods, and update methods. It also had a very useful Criteria API (before one was added to JPA 2). I got the idea from a IBM developerWorks article (the article used Hibernate). I ported the idea to JPA 1.0. 


The reason it is Krank in the google source code has nothing to do with what Crank means in German. It was because there was already an open source project called Crank (that did something else). And google code svn thingy would not let me call the project Crank. So the google project was called Krank but the project was always Crank. Clear? Ok probably not. Sort of a moot point now. 


Hades is much more focused and has much better documentation. The Crank DAO support is very similar. It has a lot more features. Crank was my first real open source project and I did not really know how to foster a community. I still don't. I think there are a lot of good ideas in Crank. Crank had a validation framework (that worked with JSF and Spring MVC), a GUI component framework, and much more. 


In early 2009, I got hired by company who used Crank to port Crank features to a Grails plugin. The project was cancelled before it really took off due to budget cuts. 


I think it makes sense to have a agnostic to technology Criteria API. This API could get reused with many persistence mechanism and state machines and whatever else needed a Criteria. I created one of these as part of Crank. It worked with JPA and straight up SQL. Crank uses JSF 1.2, Spring 2.5 and JPA 1.0. It is old school. 


http://code.google.com/p/krank/ 


The project is mainly historical at this point. I wanted to upgrade it to JSF 2.0, Spring 3 and JPA 2.0, but never got around to it. I think there are a lot of good ideas there.


It is good see that some of the ideas that were in Crank are becoming main stream. We were doing what Hades did back in 2006. I am sure someone else was doing it before us. 


Our docs (my fault) were a scattered mess. http://code.google.com/p/krank/w/list


I learned a lot about Spring AOP, JPA, Maven, etc. by writing Crank and we got a lot of work helping folks ramp up with Spring, JPA and JSF.


It was a learning experience.





3 comments:

  1. Hi there....
    Crank got my attention too not so long ago and I would like to port it to jsf 2.0 spring 3.0 ...
    but docs are not very helpful and i was not really able to make it compilable .
    I will try to get sources again to see what i can do...
    What do you say ... you can give me support for doing that ? (answer to mails from time to time or being a little bit active on discussions list)

    Cheers

    Cristian.

    ReplyDelete
  2. Crank core compilable.
    Now doing some code review and try to understand it.
    It has nice junits and this will make my life easier.

    ReplyDelete
  3. crank-crud ok as well

    ReplyDelete

Kafka and Cassandra support, training for AWS EC2 Cassandra 3.0 Training