Build your RESTful Weblog in RoR in 30 minutes


The First Rails 2.0 Screencast from akitaonrails on Vimeo.

Remember that original “Building a Blog in Ruby on Rails in 15 minutes” screencast that captured the whole emerging RoR community (myself included) ??? The very one that got me started in Rails…sweet memories !!!!

Here’s another one, but is created in Rails 2.0, and it is RESTful!!!! Apparently it is also the first one for Rails 2.0.

I quickly skimmed through the video, and I thought it was awesome. It covered the basics of Rails 2.0, from your scaffolding to your Models, and then all the way to custom named routes and creating a custom interface for your iPhone !!!!!

Hope you enjoy it.

Share/Save/Bookmark

Enterprise 2.0 Slide Pack

I recently did a presentation on Enterprise 2.0, and the topic seems to have generated good interest in the listening audience. Most of the audience seem to understand the topic after the presentation, so I thought I would share the slide with the wider community of interest within the Enterprise 2.0 space.

Hopefully this slide will give you a good debrief on what Enterprise 2.0 is all about. As usual, feel free to drop any comments regarding the pack.

Share/Save/Bookmark

Scaffolding Rails 2.0 Style

Amidst all the recent non-technical work that I have been doing, I have managed to plug myself back to the wonderful world of Ruby on Rails.  I have written a number of posts regarding my experience with Rails 1.0 before in my blogs. Having made a recent decision to focus my engineering skills in Rails 2.0, I thought it would be a good time to continue that Rails 1.0 legacy that I left off. 


The first thing that caught me while doing Rails 2.0 was Scaffolding. Being as lazy as I am when it comes to programming, I loved scaffolding to bits in Rails 1.0. I like the idea of being provided with scaffolds and build the software inside out. 
I was surprised when my usual

?>script/generate scaffold model_name controller_name actions
did not work. It turned out that the new way to do scaffolding in Rails 2.0 is the following way :-
?>script/generate scaffold modelName field_name:field_type
It’s that simple!
For example, ?>script/generate scaffold User name:string role:string will generate a User model with the attribute of Name and Role in it. The screen shot below shows the physical database model created after migration ( ?>db:migrate) is done. It’s filled with stub data created with the scaffolded interface.
That single line of command generates the usual CRUD operations associated with the model. Furthermore, scaffolding also creates the usual methods in the controller that responds to both conventional + REST style information access!!! For instance, the below screenshot shows the XML returned when I did a /users/1.xml in Firefox.
I will be playing more and more with Rails 2.0 in the coming days.
Stay tuned!!!

Share/Save/Bookmark

Scalability with Ruby on Rails

Much have been said about the scalability of Ruby on Rails, given the amount of “magic” that it is providing to lazy programmers like myself.

I have been asked numerous times about scalability when trying to preach Ruby on Rails as a technology of choice to build new web applications.

For those who have been seeking the answer, I would like to take this opportunity to point you to a blog written by Jeremy Thomas (whom I have made a number of references throughout my blog) on the issue. In fact, I will directly paste this statement on RoR’s ability to scale from the original creator, David Heinemeier.

I’ve said it before, but it bears repeating: There’s nothing interesting about how Ruby on Rails scales. We’ve gone the easy route and merely followed what makes Yahoo!, LiveJournal, and other high-profile LAMP stacks scale high and mighty. Take state out of the application servers and push it to database/memcached/shared network drive (that’s the whole Shared Nothing thang). Use load balancers between your tiers, so you have load balancers -> web servers -> load balancers -> app servers -> load balancers -> database/memcached/shared network drive servers. (Past the entry point, load balancers can just be software, like haproxy). In a setup like that, you can add almost any number of web and app servers without changing a thing.

Jeremy also made a very good point about the volume that will hit an Enterprise server Vs Consumer Web server. Read his blog post here.

Share/Save/Bookmark

Meebo Me Mates!!!

I have embedded a Meebo widget in my blog ! You can try meebo-ing me. The widget is at the right hand side of the page!

Btw, Meebo is an in-browser multiprotocol chat client. Personally, I call it a life saver. Saves me from having to install a thick client on my computer. Now everything can be done via a browser !!! (except P2P…)
You can find them here.
Have fun meebo-ing!!

Share/Save/Bookmark

Andrew McAfee Vs Tom Davenport debate

I would like to point you to an interesting debate on whether Enterprise 2.0 can truly transform an enterprise between two leading business academics.

Below is a recorded mp3 link. Definitely worth checking out if you are into the Enterprise 2.0 space. MP3 Recording

Here’s the link to Andrew’s blog, which I enjoyed reading a lot. It provides a lot of insightful and depth of thinking towards the topic.

Share/Save/Bookmark