REST ON RAILS
March 16, 2006 at 9:15 pm | In REST on Rails, Ruby on Rails, XML, gizmoojo, rails engines | Leave a CommentWow.. Its been a while since I last wrote something for the blog. And that is because I am coding away for the past few nights (I am still working full time as a software engineer and really after a long day at work, you can be sure that you would just want to sit back and relax). But I really think that what I am trying to build is going to be pretty exciting, well at least for me. So that’s what motivating me right now. And of course, the support from my wife plays a huge part too!
Rails is just a well thought out framework, really, if you can put aside the thought of the magic that it is doing in the background. But like what it is meant to be, it helps Web developers with Agile and Rapid prototyping or developing. The reason why I felt that way is my smooth it was for me to just type a few command lines and then edit a few controller files, and BAM! Gizmoojo now has well working User’s and Role Management module. I am refering to the UserEngine from Rails-Engine! Honestly, it really surprised me on how smooth the setup went. You see, I am a Linux fan and have been using different distros, since the days of RedHat 6. And believe me, during the days of RedHat 6, installing and having Redhat worked right out of initial setup with your PC hardware is not magically at all
.
Now if you are wondering why this post is titled “REST ON RAILS”, here’s why. I was writing one of the service app for Gizmoojo and this service bascially needs to interface with a third party web service provider, eg “Google maps, Flickr, and many others”. And I need something to parse and handle the XML response from the web service and you know what, without any work, well not really without any work, you had to type a couple of lines but that was it!
require ‘rexml/document’
include REXML
You see, Rails has the REXML module and that is included with the Rails installation. So by typing these 2 lines in your controller files, you basically have an easy way of generating and consuming XML for the controller.
*Good reference to using REXML with Rails and with the same title as this post too!
No Comments Yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.