Zero to Riding the Rails in Four Months
hackd.wordpress.com
hackd.wordpress.com
For example with Java annotations, I only have to press ctrl+space in Eclipse above a variable in a model, and it gives me the options for mapping all sorts of things with hibernate (ie many to many etc). Much nicer than looking things up in a book. Presumably it would be possible to set up the Dev Environment to be able to offer completions in the rails migrations, but that would be a hack - in Java, it follows from the types... Oh and btw, isn't it ugly to have the model code distributed all over the place (migrations, model, database schema)? I'd rather have it all in one place.
Internationalization seemed very fishy in Rails, too, from what I gather from "Agile Rails".
Anyway, sorry for the rant - I really have to force myself to complete at least one Rails application, but my expectations are rather low. At least perhaps I can appreciate Java again afterwards...
I like Ruby, but the reality is probably that in a typical Web Application, it's features don't come into play that often. It's mostly CRUD, after all...
Ruby is just PHP 2.0, or at least it seems that the same crowd that sweared by PHP few years ago, are attracted to it and "have seen the light". Every beginner is a "Rails" expert now. Same people, same crap will come out.
I like it a lot, and do not consider myself one of the "crap producing PHP crowd".
Also, how can you equate Ruby to PHP? They're very different in terms of philosophy and design. Ruby has all kinds of nice language features that make it a pleasure to use. PHP basically borrows things from here and there, and was never a very "inspired" programming language.
Why do you thing startup is using Rails? because they want to get rich fast by throwing their simple products faster.
People can't wait for 8 months to see their work comes to fruition.
Basically it's human nature to like Ruby on Rails, not because of the technical merit.
Hibernate is just another complexity with a steep curve, and it's propertary stuff to learn (HQL ?).
If you must do a ORM, I like Apache's Cayenne. It comes with a very nice utility, which creates everything for you. Much simpler than Hibernate.
Overrall I'd rather not use java. Python seems a much better fit for web development, thou it's most popular framework, Django, suffers a lot of the same stuff as Rails.
And Ruby is an ugly language. Too perl-ish.
Hibernate does one thing, and does it well. With the annotations, it has improved even more. What parts of it do you consider magic? Magic is not necessarily a bad thing - I like the magic of higher level programming languages that shield me from the gory details of assembly language. I just don't like it if code is not readable anymore without knowing the magic.
I will look into Cayenne on occasion. Hibernate is the industry standard now, though, and for a good reason in my opinon.
I would like to move to a more dynamic language, though...
Maybe using GORMS (the ORM from Grails, based on Hibernate) standalone in a Java project would be nice.
Definately a taste thing, but I would agree (having done a bit of both over the last year). Ruby OO is nice, but then OO is often the cause of problems for me (python makes quasi functional styles easy).
People don't really use XML with hibernate (and haven't for some years from what I see). Hibernate does try to cater for every corner case though (perhaps the cause of the "bloat"). But its the 80/20 rule again - most people only want 20% of the features, the problem is that every one wants a different 20% (hence you get subjective bloat).
Ruby is PHP 2.0? Have you spent any time with Ruby, or have you only looked at Rails, one of several Ruby Web frameworks?
I suspect few ex-PHPers are doing straight-up Ruby coding.
http://www.symfony-project.com/blog/2007/10/02/delicious-pre...
Why would they choose that??
Give it a shot for your own edification - a lot of making a rails app is the command line: install ... The lightweight plugins are just beautiful, and they would only be possible with Ruby or a language like it. It really makes your code a joy to create, maintain, and update.
I agree with the reasons mentioned for not using GWT, with the exception of the loading process (this is no longer used in GWT 1.4) and the CSS/HTML argument. You could code your entire site in HTML/CSS if you wanted to, wrapping your HTML in HTMLPanels.
That being said, I am not surprised that someone would switch from GWT to RoR. It really depends on what you need. I think for most applications, GWT is simply overkill. Sometimes people dont need to utilize RPC's or client side processing. Rails is so fast and elegant and you can reach desirable results quickly. And lots of people are simply tired of looking at Java syntax from their day jobs (I think this partly fuels the Java-hate).
But I would argue that there are times when RoR is not the best choice. The application I'm working on would not be possible for me to build in RoR (realistically). It could be, but I would have to write entire RPC and event listener frameworks to handle the level of complexity required for the asynchronous components. I need bullet-proof debugging, a native Ajax environment, low-level server back-end control, and high-level RPC abstraction right out of the box. We'd like to internationalize this stuff too, and directly integrate iPhone support (loaded via user-defined properties). It is for this type of stuff that GWT is my tool of choice. Sometimes complicated tasks require leveraging tools a bit more complicated to get the job done...
Actually, I'm looking for a more comprehensive way way to do authentication in Rails (that doesn't require as much manual intervention as I had to do last time), and this article definitely helped out.
On the other hand, what puts me off is that it seems to require an application container. I wonder if that would have been the case if it had not been developed by employees of JBoss... So far I was very happy with Tomcat, and I am reluctant to move to a full-fledged application server.
Some other questions:
- When do you plan on releasing your git bundle for TextMate? :)
- Has there been any gotchas when using Joyent's Sun platform?
- Did you consider using extjs? (http://extjs.com/tutorial/using-ext-grid-ruby-rails)
Thanks again for posting.
The git bundle is pretty basic (add, commit, pull, and push) if you are interested in it shoot me an email and I will send it to you.
As for javascript - javascript is actually a decent language IMHO, the debugging just SUCKS. And the libraries are quite young.
I hadn't seen extjs, but maybe I'm alone when I prefer old fashion ULs & LIs for lists and grids and so on. I haven't seen anything that a framework does that betters this. However, I'll look more into extjs. Thanks for the tip!
2) Scaling is a problem for Twitter because it has to scale to such an absolutely massive scale. Saying that you won't choose Rails because Twitter has scaling problems with it is a stupid argument unless you are reasonably sure that you're going to be building an application that will get Twitter-like traffic. No matter what language/framework you choose, if you get the kind of traffic that Twitter does, you will have problems.
You rarely have to reinvent the wheel with RoR, which is a wonderful experience.