Slashdot Mirror


Ajax On Rails

mu-sly writes "Ajax and Rails - probably two of the biggest buzzwords in web development at the moment. In this article over at ONLamp, Curt Hibbs introduces the incredibly powerful Ajax support that is part of the Ruby on Rails web application framework. It's a great read, and serves as a gentle introduction to the cool stuff you can accomplish with ease using the Ajax features of Rails."

12 of 235 comments (clear)

  1. Rails, great for those fed up with J2EE. by newdamage · · Score: 5, Interesting

    I'm sure many developers like myself have a day job that probably involves J2EE. The first time I did the iniitial tutorials for Rails several weeks ago I was blown away. Connecting to a database is not susposed to be this easy.

    Even when using newer frameworks like Spring, Tapestry and Hibernate (I hate you so much Struts) Rails still manages to be easier.

    I highly suggest any developers looking for a change of pace at least give Ruby on Rails a few hours of your evening. While it's not nearly as comprehensive as Java, it's gaining libraries and functionality by leaps and bounds.

    And just so I don't get labeled as a Rails fanboy/Java basher: Rails is not perfect, I still would recommend using J2EE for large corporate projects. It's just a much more mature solution with less unknowns. I think Rails needs another year at least before people are ready to really give it a shot in the corporate environment.

    --
    ce n'est pas un Sig.
    1. Re:Rails, great for those fed up with J2EE. by sucresemoule123 · · Score: 5, Informative

      RoR has caching : here and supports transactions : here

    2. Re:Rails, great for those fed up with J2EE. by zorander · · Score: 4, Informative

      Enterprise software is a different game. Rails is pretty all around terrible at integrating with non-rails-intended database schemas which are plentiful in any enterprise situation.

      I'm going to overlook the fact that a flexible caching mechanism has been in place since pre-snowdevil (maybe february) and transaction support was added at some point before the last time I worked with rails (late april). Keep in mind that it's still pre-1.0 and beta and not yet feature-complete. Criticizing it for a lack of features it supports, though, is in poor taste.

      Furthermore, almost all rails development at this point has been executed using very small (5 people) core teams. J2EE supports large scale development because it was designed for it. Rails was designed to let a relatively small number of people write an agile application using the set of paradigms which rails was built on. Coming at it from an "I use java in the enterprise and couldn't plug rails in its place tomorrow" is a little bit unfair, because in the same sense, I couldn't just drop J2EE onto my own desktop and start developing with it tomorrow. (Not to mention that my boss would not even begin to authorize such an expenditure for one developer on one product).

      I see rails more as a contender to PHP than to J2EE. J2EE and rails are not really comparable in the same market. Sure, rails beats the crap out of J2EE when you've got 1-3 developers on the project, and inversely, when there's more than 10, J2EE has a clear advantage. Coming from java, you're likely to miss many of the benefits of metaprogramming in rails. Even coming from python (a somewhat similar language to ruby), I was a bit startled at some of the techniques being used.

      Your project might have failed, but I'm not sure it was completely rails that caused it. AR is very easily extensible (in a matter of hours, usually) to do all sorts of more enterprise-java-like things. Ruby's dynamic messaging and open classes makes that a much simpler affair than it would be in java. Why didn't you extend it to meet your needs? Also, how did you miss the fact that caching and transactions have been there for a while? Were you trying to shoehorn rails onto an old schema? Did you have prior ruby programming experience or were you learning as you went? Did you have prior experience in a dynamically typed language writing an app of similar complexity? Nothing is going to make the solution of a hard problem easy. Some things can make it more pleasant, if used correctly.

    3. Re:Rails, great for those fed up with J2EE. by Cyberax · · Score: 4, Interesting

      First, you have some misconeptions about J2EE.

      True, you can't just drop J2EE on your desktop because there's no such _thing_ as J2EE. J2EE is a set of standards (which contains just about everything).

      The only things you need to start developing J2EE applications are: Tomcat (http://jakarta.apache.org/tomcat/index.html), optionally a web-framework (like http://jakarta.apache.org/tapestry/index.html) and you can start developing tomorrow (if you know Java of course) and a decent IDE (http://www.eclipse.org/). It will cost you about $0.

      Java has some metaprogramming featues starting from version 1.5. Right now we're writing application in C++ and Python, so I don't miss metaprogramming features :)

      RoR is extensible, but some features are just very hard to implement: maintaning persistent object identity, complex mappings support, distributed caching and long-running transactions with optimistic locking.

      We had previous expirience in dynamic languages (Python, Perl, PHP). This project was a sort of expirement - we wanted to see what can be done with RoR.

    4. Re:Rails, great for those fed up with J2EE. by milesegan · · Score: 4, Informative

      Rails supports optimisting locking out of the box. Just add a lock_version column to your table and it will do the rest.

  2. Ruby on Rails as a threat to PHP? by Sv-Manowar · · Score: 4, Insightful

    Every time I see material surrounding Ruby on Rails, I'm further convinced that it could be the web application programming foundation that starts to displace PHP as developers start to look at the transition from PHP 4 to PHP 5. Getting an increased install base for ruby on rails, as is the case with php (a fairly difficult task, admittedly) would definitely help no end in increasing the framework's popularity, at least amongst those programming smaller web applications.

  3. Rails book from the Pragmatic Bookshelf by gavri · · Score: 4, Informative

    Get the Beta book http://pragmaticprogrammer.com/titles/rails/index. html If you're interested in Rails at all, this book is all you need.

    1. Re:Rails book from the Pragmatic Bookshelf by mav[LAG] · · Score: 5, Informative

      Agreed 100%. I bought it last week. Don't be fooled by its "beta" status - it's a thoroughly well written introduction to Rails that takes you through everything you need to know - including building a REAL application (a shopping cart) from start to finish.

      I also bought Programming Ruby by the same author because I want to do more with Ruby than just Rails, but this isn't necessary for those who just need Rails - all Ruby constructs and idioms are cross-referenced with an included introduction to the language.

      --
      --- Hot Shot City is particularly good.
  4. it's an illusion alright by udderly · · Score: 4, Funny

    From the article:The most visually impressive of these is Google Maps, which gives you the illusion of being able to drag around an infinitely sizable map in its little map window.

    It's illusory alright, when I start at the US and scroll due west the first thing that I come to is the UK. Where'd all the other countries go?

    1. Re:it's an illusion alright by MyLongNickName · · Score: 4, Funny

      All the other countries don't really exist. You see, Oceana needs to have enemies in order to keep the people focused, and subservient to the government. It is all part of the plan.... ... oh shit... its the Ministry of Love. See you in a few years...

      --
      See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
  5. Will that be 5 or 10 years experience? by GoofyBoy · · Score: 4, Funny

    Time to add Ajax and Rails on my resume!

    (To all potential employeers: I kid!)

    --
    The surprise isn't how often we make bad choices; the surprise is how seldom they defeat us.
  6. No, you hold the hype for 3 months. by Some+Random+Username · · Score: 4, Insightful

    I am sick of seeing this excuse. You can't run around the internet screaming how rails is the greatest thing since the wheel, and how it renders java obsolete because its 100x faster to work with, and then say "its not done" when people actually try to use it. If you are ready to hype something and tell everyone how great it is, then you need to be ready to accept criticism too. If we can't compare it yet because it isn't finished, then stop running around telling us how great it is and how we should all be using it.