2 ms·
Ask HN: possible Java contract, what alternatives to suggest?
I used to be a Java consultant and my past keeps haunting me. Since I haven't earned money for a while, I did not say no immediately to a recent consulting request. It is a startup by someone I have worked with before (who is a business guy). So far I only talked to his partner, and the project does sound quite nice. Some perks for me would be that there would be a chance to bring one of my best friends on board, and we would be developing the code from scratch together (the two of us). This would give me some additional confidence because he is much more of a Java geek than I am. I haven't coded in Java for over a year now, and it would be nice to work with somebody who is more up to date with the latest developments.
But Java is also the problem: I really never wanted to do another Java project again, ever. I had some hopes to suggest Scala instead, but to my surprise my friend was against it. And it is actually reasonable: his argument is that it would cost us time to learn a new language and framework. Actually I have dismissed Scala twice before, too (from rather superficially reading the "how to get started" tutorials), but it is the only compromise that I could think of that a die hard Java person might take serious.
Also, I have now noticed that there does not seem to be a lot of online documentation about Lift, the Scala web framework. I am also not sure I really like constructs like "LongKeyedMapper" - again, a very superficial evaluation, but at first glance it just doesn't look that pretty.
Anyway, I am not sure what to do. I think by default the client was thinking Java, but they might not be hard set for it. But what else is there? I am not really good at any other web frameworks yet. I am not 100% happy about Rails (ActiveRecords, Migrations - bleah), and not about Django either (RESTful URLs???). I suppose any alternative would have to be statically typed to convince my Java friend. Also, this startup will do money transactions, so it is more down to earth than fancy, and performance DOES matter.
I guess I should just suck it up and do it in Java, as it is "only" about 4 months anyway. But I have been extremely unhappy in some previous Java projects. Or just say no to the project after all. It is also probably mostly standard web develepmont, a ka boring. I was hoping that learning a new language along with it could prevent my brain from completely shutting down during the process, but it seems unprofessional to burden the client with the additional risk.
Personally my best hope for the near future is JavaScript all the way down (perhaps with node.js), but I don't think I could suggest it to a client just yet. Maybe F# would be an option, too, but I have zero experience with .NET (is it possible to develop and run it on Linux - Mono?)
I am aware of Clojure, but I think it would be too big of a leap for my Java friend, and I am not certain that Compojure would be to my liking (don't think I dig the the HTML builder with square brackets, for instance) - yet another superficial evaluation, no less.
Perhaps there is some approximation to a fast turnaround Java web framework? I just know that if confronted with another service oriented architecture that requires me to change 10 files just to change one word on a web site I might end up getting writers block and unable to get any work done (Service, ServiceImpl, DAO, DAOImpl, Controller, ControllerImpl, jspx... ok just 7 so far, but I might have forgotten some... ah, perhaps messages.properties, application-context.xml, hm...perhaps a FormObject + Impl?).
Maybe I could say no and tell them to find a more dedicated Java developer. If they absolutely can't find anybody, I could suggest a fancy language of my choosing as a compromise and feel less bad about it because at least I would not be guilty of having prevented them from choosing the "safe" Java route :-/
- pivo 17y agoIt's hard to say not knowing the scale of the application or any of it's requirements, etc. In any case, if you do stick with Java you might try out the Play framework, it looks like a nice alternative to the typical gigantic Java framework. http://www.playframework.org/ http://www.playframework.org/ I haven't used play myself, but if I had to use Java myself I'd certainly look a it. Also, play 1.1 is supposed to support Scala, which would probably be much nicer.
- Tichy 17y agoPlay looks very much worth checking out, thanks!
- roam 17y agoIf you or your friend are not comfortable with anything else, stick with plain Java. Check out the Play framework if you really want to prevent boredom because you've all done it before. Or Groovy. If you don't want to do Java projects in the future, I suggest getting comfortable enough with other languages and frameworks on your own time. For now: what's wrong with "RESTful" URLs? And you do understand you're not required to use 4 different layers in Java either, right?
- Tichy 17y agoThanks - play looks good, will definitely consider it. I like RESTful URLs, the problem with Django seems to be that it doesn't really cater for them (or at least the routing system does not know about GET, POST, PUT and DELETE, as far as I could see). Java layers: I know, but using Java usually also entails using Spring and Hibernate and "doing things the proper way" :-/ I know I should get comfortable with other frameworks, I just haven't found one I was happy with (tried Rails, and atm doing a small Python project - where I settled for bottle.py, which is great fun, but probably too plain atm.).
- strlen 17y ago> Java layers: I know, but using Java usually also entails using Spring and Hibernate and "doing things the proper way" :-/ I highly suggest looking into Guice (why defeat the advantage of Java's static typing by passing strings around through XML documents?) and jDBI (ORMs are evil, jDBI takes a lot of the boiler plate out of writing JDBC calls: http://jdbi.org/ http://jdbi.org/). If you absolutely must use Spring, at least use Spring's JavaConfig (as opposed to XML based configuration) and SimpleJdbcTemplate (another way to avoid the boiler plate of JDBC without going to an ORM). JVM doesn't mean having to use Java (but your partner seems to be dead against Scala, which is his loss). Java, however, doesn't mean having to use Spring and JEE.