Archive for the 'Ruby Compared to other Languages' Category

Ruby and Rails – Parent/Child Relationship II

The number of programmers learning Ruby and Rails is increasing every year and that is a good sign! Some are having a hard time but some are actually having fun!

Ruby is a big help to a programmer to become a better developer by nourishing him with a better understanding on the code he is currently working on. Programming task is much more easier if the developer is quite familiar with the idioms and conventions available in Ruby. Debugging will also be an easy task for the programmer if he is working with Rails language.

Ruby on Rails is a very efficient way of creating and developing successful web applications in a short span of time compared to other programming and development environments.

Ruby and Rails – Parent/Child Relationship I

Have you realized that Ruby and Rails are mostly spoken together knowing the fact that they actually have individual differences and that they can go on without the other? For you information, Ruby is the base foundation of Rails. In other words, Ruby and Rails have this sort of parent-child relationship.

You can easily work with Rails if you have background with Ruby since both have similar conventions. We are not saying that you wouldn’t understand Rails without any knowledge on Ruby. You will save more precious time learning Rails if you are already familiar with Ruby. The code and functionality if Rails will be understood easily if you actually have knowledge on Ruby while studying Rails.

Differences of Ruby and Perl

Ruby and Perl might have a number of similarities, but there are a number of features that makes them unique from each other.

In Ruby, you won’t encounter context-dependent rules like with Perl. The array literals go in brackets instead of parentheses. A variable isn’t the same as the object to which it refers in Ruby. Instead, it’s always seen just as a reference to an object. Ruby uses “def” instead of “sub”. Semicolons are not needed after each line. You end it up with ‘end’ instead. Diamond operators are not found in Ruby and fat commas are only used in hash literals.

Similarities of Ruby and Perl

Perl is an awesome program and it creates awesome documents, but the only problem with Perl is its complexity.

Are you aware that Perl and Ruby has a lot of similarities? Read on and learn.

The parentheses are optional and the strings work just the same. There’s a package management system that is similar to CPAN (called Ruby Gems). You can see a lot of commonly used built-ins too. Both programs have Regexes that are built right. Both have embedded doc tools. In Ruby, it is called rdocs, and lastly, there is a general delimited string and regex quoting syntax similar to Perl’s.

Rails 2.3 Finally!!

railscreenshotThe much awaited upgrade to the much loved yet seemingly less loved Roby gets a full update with the full release of Rails 2.3 loaded with many updates and improvements to the rising underdog of the open-sourced world. Top features includes more built-in templates, making implementation of stripped down rails applications onto a skeleton framework easier, loaded with your default gem stacks, configuration settings and much much more. Nested forms have also become easier with improved built in handling allowing complex forms to be included easy as pie. Reusable application pieces in the engine completes the whole picture which allows developers and programmers to use, reuse and recycle working modules, easily including them into their current projects. Continue Reading »

First Steps through Ruby on Rails


Image Source:www.flickr.com

Classes, attributes, methods, and objects are the core of any Object-Oriented language. I am going to discuss how these classes, attributes, methods etc can be implemented in Ruby. There are two types of classes ‘close-ended’ and ‘open-ended’. If a class is close-ended, then new functionalities cannot be added to it without inheriting the class.
If a class is open-ended, then new functionalities can be added to it without inheriting it. Ruby is open-ended.
The class declared and defined just now is an empty class as it doesn’t contain any attributes or methods. You will notice that the procedure to define methods in ruby is very simple. def is the keyword used to define methods.
In ruby we don`t use brackets to define a set of code and we don`t use any semicolon at the end of the statements.

Copyright ©Basic Ruby On Rails Programming.