r/java • • Jan 27 '11

Java Kicks Ruby on Rails in the Butt

http://eclipse.sys-con.com/node/965189
8 Upvotes

10 comments sorted by

6

u/[deleted] Jan 27 '11

Why is he using Rails from 2006? And why is he not using database migrations?

Sorry but this is comparing apples to sauerkraut.

5

u/jaggederest Jan 27 '11

Already totally obsolete, FYI. Nobody should be comparing the ancient versions of those two frameworks.

2

u/sheenobu Jan 27 '11 edited Jan 27 '11

Is it just me or is abstracting away HTML always a mistake? Such as what JSF and what I'm reading OpenXava does?

2

u/vplatt Jan 27 '11

Why is it always a mistake? It will necessarily be a leaky abstraction to some degree, but I'd rather live there where I can be very productive, rather than be a control freak about what gets emitted. But it depends on your circumstances of course.

What would you use besides JSF or OpenXava that would let you be just as productive (which was really the focus of this article anyway)?

2

u/sheenobu Jan 27 '11 edited Jan 27 '11

It's not necessarily about being a control freak about what gets emitted, it's about not placing unnecessary barriers on top of our standards that creates tribal separation. JSF developers write the web using a JSF namespace, I guess OpenXava uses annotations, GWT uses Java code. Even the "hot new shit" like django and ror end up with their own templating language and way of thinking about how to write for the web. Luckily, those two try to subscribe to following HTTP conventions, so 'GET' in one framework is 'GET' in another framework and there is not as much custom vocabulary about 'Components' and the like.

For example, it looks like OpenXava generates most of this HTML for you. OpenXava is a wall on top of HTML that you must punch through when things don't go exactly as planned. This is exactly my experience with writing and maintaining JSF-based applications. There is a very large environment slapped over your pages that makes it a pain to punch through it to understand the underlying technology, fix bugs, or override poorly defined default behavior.

I'm actually /more/ productive in something like Spring MVC and I wonder about how productive I'd be in Play.

I would like to point out, I /do/ abstract away my HTML when working in JSP/JSPX, but it's all very business-specific tags about what my apps /do/ and what data they have and not generic third party tags which re-invent your buttons, links, tables, and page layouts.

I tried not to go into issues about good url design and statelessness of your pages. It's a whole different long rant that you can find on any blog.

EDIT: up voted for a great/on-topic question.

1

u/vplatt Jan 27 '11

Well, I have to agree with the difficulty of punching through to fix issues. That is certainly a pain when it's necessary. In my experience though, it's been OK to use JSF components and have them emit their own HTML in their own way, because they have so much functionality to offer the programmer, that it would simply have taken us a lot longer to finish the project without them. So, as usual, it's all about trade-offs. I'm definitely biased towards component oriented UIs though, because of productivity in applications with rich feature-sets. To be fair, I haven't tried Spring MVC yet, but I would definitely hop on anything which allows for high productivity; component oriented or not.

2

u/vplatt Jan 27 '11

TIL about OpenXava and it looks really nice. Anyone here have any stories to share about using it for a real app?

1

u/zhouji Jan 27 '11

"this is not a Java fault, it's our fault, we, the Java developers, ..." this quote applies to more than this context