Part 2 of Ruby on Rails Tutorial Online 187
An anonymous reader writes "Curt Hibbs has released Part 2 of his tutorial Rolling with Ruby on Rails to the O'Reilly ONLamp site. The first part was published in January. Topics covered are database transactions, callbacks, unit testing and caching." From the article: "In Rolling with Ruby on Rails, I barely scratched the surface of what you can do with Ruby on Rails. I didn't talk about data validation or database transactions, and I did not mention callbacks, unit testing, or caching. There was hardly a mention of the many helpers that Rails includes to make your life easier. I can't really do justice to all of these topics in the space of this article, but I will go into details on some of them and present a brief overview of the rest, with links to more detailed information."
Python Version of RoR (Score:4, Interesting)
It's rough, but it's coming along.
Any interesting projects? (Score:4, Interesting)
Sounds exciting... (Score:4, Interesting)
Now that really made me curious. Is that really true, tried, and tested? If so, we need another bunch of tutorials about how to use Rails under Tomcat, Apache, etc. There is no way this framework will replace existing Java frameworks, but using it for prototyping is promising.
ROR rocks! (Score:5, Interesting)
And ruby is a really nice scripting language. You should check it out.
Re:ROR rocks! (Score:3, Interesting)
Re:ROR rocks! (Score:1, Interesting)
Thanks,
-dan
Comparing RoR with Java solutions (Score:5, Interesting)
A big advantage that Ruby and Python have over Java is that they are dynamic languages that makes it not too difficult to write a database wrapper class that dynamically looks at database/tables meta data and generates access methods on the fly. Java Tails (using XDoclet market tags) can't really compete.
I really love the full J2EE stack for developing large scalable web applications but I am now looking at alternatives for creating smaller systems much more quickly.
BTW, I really like RoR's templating scheme: much like JSPs in syntax (JSP non-XML syntax, that is) but do to Ruby's much terser notation for enumerating collections, the the templates tend to look a little cleaner.
For Python, I really like the light weight CherryPy web application framework. I plan on checking out Python Subway also when I have some time.
-Mark
Re:Comparing RoR with Java solutions (Score:4, Interesting)
It's called Trails and it uses spring, hibernate and tapestry.
Site - http://trails.dev.java.net [java.net]
Tutorial - https://trails.dev.java.net/tutorial/" [java.net]
Trails in action - https://trails.dev.java.net/media/trails_withnarr
It's still beta but you can try it.
Rails got me curious about Ruby (Score:3, Interesting)
34 different packages (Score:3, Interesting)
The entire Ruby system isn't 3MB, either, if you're calling those 34 packages the system. The log4r package alone is 1.1MB, libqt-ruby is another 1.3MB, and libxmlparser-ruby is 0.8MB.
And Debian does have Ruby 1.8.2, I run Debian unstable and I've been using 1.8.2 for a while now.
Re:Comparing RoR with Java solutions (Score:3, Interesting)
I'm not sure that Java can be used to replicate Rails. It might be possible, but it would probably mean abandoning a lot of existing infrastructure. Ruby does a lot of very clever/strange things, like dynamically adding methods to classes based off database schemas. The best we've seen Java do thus far is do this kind of thing statically via code generation and hints garnered from the source file comments.
Trails is a neat idea and it does bring some great things to the table when it comes to Rapid Web Application Development, but it isn't fair (for Trails) to compare it to Rails... at least as of yet, anyways.
Re:Shortcomings of Rails (Score:3, Interesting)
Also, AR has gone through some extensive changes in the last release, it may better suit your purposes now.
Keep in mind that it's still a fairly new framework. It will only get better!
Re:Shortcomings of Rails (Score:3, Interesting)
Your DBA just realized he should read the Postgres manual a few more times.
Re:Shortcomings of Rails (Score:3, Interesting)
If you're regularly dynamically creating and nameing tables, that sounds like you're abusing SQL to create trees and other arbitrarily nested hierarchies. Assuming Oracle and it's tree extensions isn't an option, maybe you should reconsider using an RDBMS for a tree-based back end? Or maybe you're doing something totally different, in which case just ignore me.
Re:Shortcomings of Rails (Score:3, Interesting)
The design of the database drew high praise from the inhabitants of the Postgres listhost, and it was their advice that led me to the decision to write my own framework to handle it. The information we got from them says that only the most advanced databases out there are using these techniques this extensively (yet), and most frontends that they've heard of can't handle it.
Performance-wise, the thing absolutely flies.
Re:Shortcomings of Rails (Score:3, Interesting)
Unless you enjoy having to explain yourself over and over.