Tag Archives: rails

Pune Rails Meetup #1 – 21st May

Pune Rails LogoWhat: A get together for Pune’s Ruby on Rails enthusiasts
When: Thursday, 21st May, 8pm
Where: North Main Lounge, Koregaon Park
Registration and Fees: This event is free for all to attend. No registration required
Links: Follow @punerailsmeetup on twitter, Facebook Pagex

Details:
A meetup for all the developers in and around Pune working on ruby on rails – the coolest web technlogy available. A meetup to chill out together and talk! It is being organized for the first time to initiate and encourage interaction between the rails community in Pune!

Also: Check the Facebook Page for PuneRailsMeetup

Reblog this post [with Zemanta]

Why Ruby is cool – take 2

Official Ruby logo
Image via Wikipedia

Earlier today, we had an article by Nick Adams on why you need to learn Ruby and Ruby-on-Rails. That post attracted a detailed comment by  Ravindra Jaju which elaborated on some of the themes touched upon in the original article. Since it brings out nicely the power of Ruby, we decided to post the comment as a new article to ensure it reaches all the readers who don’t necessarily read the comments. (By the way, you should subscribe to PuneTech comments by email or via RSS.)

Those interested in Ruby should check out Ruby Fun Day in Pune on Saturday, 21st February. If you want to learn Ruby, take a look at RubyLearning.org, a site that provides free, online courses for Ruby, by Pune’s own Satish Talim. Also check out the Pune Ruby mailing list, which is reasonably active.

This “article” only makes sense in the context of the original article, so ensure that you’ve read it before you read this:

Depending on where you come from, the syntax 5.times… may appear either beautiful or plain weird. But whatever the initial impression, one starts appreciating it as the power unfolds. The syntax ‘5.times’ might look like something completely out of the blue at first glance, but once one recognizes that 5 (or any number for that matter) is a first-class object, things start falling in place.

Try playing with this further using ‘irb’ (the ‘interactive ruby’ command-line tool which is a part of the ruby distribution) to explore the object ‘5? further as follows: 5.class, 5.methods, 5.methods.sort [send message ‘methods’ to 5, which returns an ‘Array’ – further send a message ‘sort’ to this returned Array object if you like to see the methods ordered]. And if you haven’t guessed this already, do note that brackets to function calls are absolutely optional if the syntax is unambiguous (so, the above is equivalent to

5.times(){puts “Hello Pune!”}

which is equivalent to

5.times(){puts(”Hello Pune!”)}

What comes within the braces ({}) after ‘5.times’ is a block – ‘5.times’ is by itself uninteresting, unless you can do something 5 times, no? Blocks are a very powerful concept, which are defined at one place but executed elsewhere. They have access to the context where they are defined (closures). Use of blocks (and associated Proc objects) can lead to very interesting, succinct code!

And again, if you are a C/C++ or a Java programmer feeling wary about jumping into something new and have that feeling of your uber-cool libraries not being accessible from Ruby (and hence a new learning curve apart from the heart-burn) – fear not! Ruby, being an interpreted language, runs in a VM of its own. And the Ruby VM developers have made sure that access to your favourite libraries is as easy as possible. The ‘official’ Ruby VM is C code, but obviously the cool thing that the JVM is, you can run Ruby inside the JVM (Java Virtual Machine) too. Many have already made these libraries accessible via Ruby. I would term the Java VM as more powerful in this regard, giving you access to native libraries apart from all the Java goodies (look up ‘ruby+ffi’ on yahoo/google search).

Then again, metaprogramming takes Ruby fun to newer heights. Rails wouldn’t have been (easily) possible had it not been for Ruby’s abilities in this regard. How would you feel if told that there are database access methods named (for example) ‘find_by_name’ or ‘find_by_name_city’ that aren’t defined anywhere but still create appropriate SQL calls (’where name = …’ or ‘where name = … and city = …’) because you can intercept ‘function undefined’ events, look at the function name and arguments, and create the right SQL on the fly? Or even before that, a class mapped to a database table ‘knows’ which table it is supposed to represent in an object form, just by looking at its *own* name? The good news is that all the cool libraries developed as part of the Rails initiative can be used in plain Ruby code without all the rails framework overhead too.

Well, enough said for a comment. You’ve got to experience it to believe it!

(PS: Not saying here that Ruby is unique – Python, for example, is cool too – but a Python-junkie would be a better marketeer for it 😉 )

Reblog this post [with Zemanta]

Why you need to learn Ruby and Rails

Official Ruby logo
Image via Wikipedia

With increasing visibility for the Ruby programming language, and the passion that people show for Ruby-on-Rails for web development, we felt that we would like to delve a little into what makes Ruby so cool and Rails so hot. Especially, in light of the fact that Ruby Fun Day is happening in Pune on Saturday, we wanted to give our readers a feel for why the should consider attending Ruby Fun Day. With that in mind, we invited Nick Adams of Entrip and SapnaSolutions (both those companies use Ruby-on-Rails as a cornerstone of their offerings), to tell us why Ruby and why Rails.

Ruby is an interpreted language like Python, Php, Perl, and a whole host of other popular Unix based languages. It was invented in 1992 by a Japanese man. However it only shot to fame in the last few years when the web development world started getting very excited about a new framework called ‘Ruby on Rails’, which arrived in 2005. But I’m getting ahead of myself. First, I’ll look at Ruby in its own right. Then, we’ll take a look at Rails and what’s cool about it.
The first thing you’ll notice about Ruby is it’s beautifully easy syntax:
5.times { print "Hello Pune!" } 
Goodbye to semi colons, variable declaration, etc it makes for readable code while ensuring you don’t spend more time than you need with coding. Ruby is 100% object oriented, in fact, everything in ruby including variables, are objects. That can be a little overwhelming at first, but it begins to make sense as you use a framework like rails and really reveals its true power when you want to change or add to the core ‘String’ class, on the fly. It means, in basic speak, that Ruby is very flexible. But there is more. Ruby has cool features like blocks, iterators, and a wealth of all the expected higher level language features like ‘capitalize’ and ‘reverse’ methods for strings.
Ruby on Rails
Image via Wikipedia

Rails is of course a web development framework. It is important not to see Rails as simply a collection of new classes and methods designed to aid web development. There are two things that I believe are important to understand before you dive into Rails. One is the MVC pattern of design. The MVC pattern of system design separates application logic into distinct parts making development fast, but also scalable and logical. The second is the rails conventions. Although sometimes ambiguous and debated, sticking to the basic rails conventions and understanding how the framework is designed to work will greatly aid collaboration, and futureproofing of your app.

What’s so cool about Rails? I recently interviewed someone who has worked in Java, Php and Rails for web development. I could sense the passion in him to work for a company that specialises in Rails, and didn’t need to explain why. If you have ever built a web application in .net, java, or php, you’ll really appreciate the power of Rails. It’s fast, modular, and working in Ruby is fun because you create clean, readable code. It’s free. Ajax and Web 2.0 style features are easy. Fully unit testing your app is easy. Roll out new ideas in weeks instead of months. Setup is easy, in any environment, but being open source it favours ‘nix based environments like Linux and Mac.
It all sounds great, doesn’t it? I would advise, however, that Rails is best understood by those who have understanding of the web and building database driven web applications already. Rails is a framework built on long standing notions, it’s not a magical new web development language. It makes what exists already, much easier and faster. Understand the Web. Understand Web Applications. Understand MVC. Then learn Rails, and you’ll never look back!

About the Author – Nick Adams

Nick Adams is the co-founder of Entrip, an integrated travel utility that gives a map-based interface to plan your trip, capture your experiences in multimedia, and share them with friends. SapnaSolutions is the Ruby on Rails Development company behind EnTrip. They make Web Apps for clients and develop in house products. He can be reached at nick [at] entrip [dot] com
Reblog this post [with Zemanta]

Ruby Fun Day: A barcamp for Ruby developers – 21 Feb

What: Ruby Fun Day, an unconference style get-together for all those interested in Ruby
When: Saturday, 21st Feb, 10:30am-4:30pm
Where: Thoughtworks, GF-01, Tower C, Panchshil Tech Park, Yerwada, Pune
Registration and Fees: This event is free for all. Register here.

Details:

If you don’t know what Ruby is and why it is cool, see today’s PuneTech article: Why you need to learn Ruby and Rails.

The second edition of Ruby Fun Day will happen on Saturday, Feb 21 at Thoughtworks, Pune. The first edition which happened in Impetus Technologies, Noida was a great success.

Ruby is a very powerful OOP language, while at the same time fairly intuitive and easy to learn and understand. Rails is an MVC web framework where models, views, and controllers are fully integrated in a seamless fashion for the Ruby programming language. At the end of the day, Rails is all about helping you stay productive and happy while building awesome web applications.

Ruby Fun Day is an unconference like Barcamp – a sort of on the fly, day long get together for ruby geeks to talk about geeky stuff and hang out. RubyFunDay 2 is going to be a pure Code Burning session. Every session would be full of live code demonstrations.

If you are based in Pune (or on a short trip to this city) and excited about Ruby or Ruby on Rails, this is a not-to-be-missed event! For more details visit the official event page at  http://barcamp.org/RubyFunDay2

If you would like to present a session at this event, visit the event wiki at  http://barcamp.org/RubyFunDay2 . The only constraint we have is, it should not be mere presentation, you will have to show the live code in the session.

(Thanks to Kapil Bhatia of Vinsol for this write-up of Ruby Fun Day.)

Schedule:

Sr No Topic Name
1. Basics of Ruby Programming Language OR Advanced Metaprogramming with Ruby Sur
2. Integrating voice and text (sms) gateway with rails application Saurabh Purnaye
3. Test::Unit vs RSpec vs Expectations Aman + Dhaval
4. DSLs made easy with Ruby Sunit + Saager
5. What’s new in Rails Sur
7. REST full Rails Kumar Chavan(Bakal)
8. Importants of wrting “test cases” in ROR. Kumar Chavan(Bakal)
9 Web application testing using Watir Sai Venkat
10. Using Ruby to drive functional tests in Selenium Vijay Nyayapati
11. Ruby OOP: objects finally dethrone classes! Aman King
Reblog this post [with Zemanta]