Slashdot Mirror


Going beyond JSP with Ruby and Seaside

An anonymous reader writes "The Java community has used JavaServer Pages (JSP) technology through most of the last decade, but signs of rust are starting to show. Longstanding conventions inhibit Java programmers from using Java code within Web pages now. Other languages handle Web development much better than Java. This article discuss how code generation works in Ruby, and it delve into a more radical component-based approach in Seaside."

12 of 66 comments (clear)

  1. Flame on! by Mark_Uplanguage · · Score: 4, Insightful

    Come on! How many times must we endure these kinds of debates? Just use the right tool for the job. You could say there are signs of nothing but rust on COBOL yet it's still very heavily used in financial applications (back end). There is nothing gained by making inflamatory statements, just state the benefits of Seaside and Ruby and leave other languages out of it.

    --
    "The difference between stupidity and genius is that genius has its limits." -- Albert Einstein
    1. Re:Flame on! by telbij · · Score: 3, Insightful

      There is nothing gained by making inflamatory statements, just state the benefits of Seaside and Ruby and leave other languages out of it.

      Wrong. Ruby on Rails came to prominence because of DHH's brilliant marketing--poking Java guys with a stick.

  2. Yay, it's better than JSP. by cbiffle · · Score: 4, Insightful

    I know I'm going to have a hard time convincing the PHP audience of this, but the conventions preventing people from using code in JSP are a good thing. You're going to have a hard time selling me a solution that makes it easier to mix my business logic and presentation, even if it's written in a language I like (like Ruby or Smalltalk).

    It's better than JSP? Yay. So is everything else developed in the last ten years (and some systems developed before). The Java community has moved on to alternative presentation technologies -- WebWork, JSF, GWT, and the myriad XSLT frameworks come to mind.

    Now, if it's more productive than GWT or JSF...well, then we'll talk. But don't attack the strawman of JSP. That's like saying "Ruby is better than Perl 4!"

    1. Re:Yay, it's better than JSP. by telbij · · Score: 2, Insightful

      You're going to have a hard time selling me a solution that makes it easier to mix my business logic and presentation

      Attacking JSP is a strawman, but so is this. Presentation requires logic. Ruby makes an excellent templating language. If we try to replace it with a secondary crippled syntax just to avoid people putting business logic in their templates, then we run the risk of forcing people who know what they're doing to mix presentation logic in with their business logic. Designing languages to prevent people from doing stupid things is a good thing for shitty programmers, but it's a terrible thing for good programmers.

  3. Starting to show??? by curunir · · Score: 1, Insightful

    The signs of rust have been showing since it started to get any kind of serious use. JSP is basically an abomination. It makes the simple stuff hard and the hard stuff require using scriptlets. And it makes it far too easy to put far too much application logic in JSP code. JSP 2.0 has helped a bit, but it's a bit like putting a prom dress on 600 lb hooker...she looks better, but only slightly.

    But thankfully for Java programmers, there's a ton of other better alternatives that can be used. Freemarker, Velocity, Tapestry and Cocoon are all vastly superior options to JSP. Tapestry was a component-based view-layer framework long before Seaside or any other Smalltalk server-side framework. So comparing it to JSP is a bit like comparing apples to Ford Pintos.

    Picking on JSP is like kicking a starving puppy...try picking on one of Java's guard dogs (listed above) and they'll put up a stronger fight.

    --
    "Don't blame me, I voted for Kodos!"
  4. To be expected by hexghost · · Score: 4, Insightful

    One look at the author being Bruce Tate, and you wonder why they didn't just link to his book at the top of the article instead of the bottom. Way to go Brucey!

  5. Re:confusing syntax, anyone? by telbij · · Score: 2, Insightful

    I'm sorry, but to me this is just yet another confusing syntax for the same old tricks.

    You really oughtta learn LISP. Instead of spending half an hour looking at some code and concluding that it's more confusing than the language you've been working with for the last 5 years, work with it long enough to 'get it' and then make a proper comparison.

    Wheee! 2 different kinds of strings... yet another invitation for novices to create spaghetti code that I will have to clean up later, thanks!

    Explain to me how string syntax has anything to do with spaghetti code. Honestly.

  6. Re:confusing syntax, anyone? by jaydonnell · · Score: 2, Insightful

    are you talking about symbols? If so your spaghetti code conclusion makes no sense to me.

    has_many :comments
    vs
    has_many 'comments'

    I see no source of spaghetti code from this!

  7. eh... by aleksiel · · Score: 2, Insightful

    not "better", "differently".

    if i only learned one thing in my later classes in college, it was that a language is a tool. some languages make some tasks easy. some languages are better used given specific circumstances. there are differences between jsp and ruby. sure, maybe ruby does somethings better, but there are also definite advantages on the jsp side, as well.

    1. Re:eh... by Anonymous Coward · · Score: 0, Insightful

      Everything you said is just a propagation of the Big Lie that permeates all of society these days. Just like in many other fields (in science as well as politics for example) there are not always advantages to - or even a necessity to hear out the arguments of - each side. Sometimes, one is simply better than the other, no need to be politically correct about it.

      I'd be very surprised to find even one non-constructed, realistic task in which jsp has any advantages over Seaside. Newer Java-based frameworks may very well have some, but jsp? It's an abomination.

  8. Once again, wishful thiking by Anonymous Coward · · Score: 2, Insightful

    Not a single article from Bruce Tate manages to convince me of "killer funcionalities" in their Ruby solutions (only a web framework cannot match the whole Java for making it worth migrating), it seems more like a mediocre developer in love with his new toy trying to get the attention he needs. His sensationalitic approach makes him look like a fraud, an untalented programmer that proclaims himself as the spokesperson of something. Maybe a "fraud with a big mouth" is what he is after all.

    All non-Java developers keep in mind that all this loser says has nothing to do with the general perception inside the Java community. The only general perception there's is that he's an idiot.

    Once again he shows a pathetic template system, which could be easily done in Java but no one is crazy to do it because it's crap, and a framework like many others.

    BTW, he needs to study Java web development, that goes beyond JSP. Not to mention the many options we have, including templating, but also a tool support unseen in the Ruby world, that makes web development as easy as drag'n drop.

    Ruby is not a match for Java, give up. Why 10 out of 10 articles written about "dynamic languages" must have sensationalistic and impossible claims involving Java?

    And opensource is not trustworthy. I see many people complaining about Java's commitment to compatibility between versions (including Bruce Tate) and then they recommend Opensource as a solution! That's CRAZY. Would you like to know that you need to rewrite that big application of yours because of a new version that has just came out??

    How do they expect to be taken seriously?

  9. JSP != Java by iangreen · · Score: 4, Insightful

    The main article here says 'there are better languages for web than java', or something to that effect. How irrelevant. This article is about JSP, not Java. One could in theory write a ruby language bytecode compiler/interpreter for Java and use it there.

    JSP has issues, yes, but some of us dont even use it for our web VIEWS, which are independent of the java backend, (if you're an architect worth hiring, anyway) -- for which Java is unparalled in doing the job. Try to scale like Java does with Ruby at the backend. Good luck.