7 Apr 2009

Q2. Ruby is "an interpreted scripting language" for quick and easy object-oriented programming...

Q2. Ruby is "an interpreted scripting language" for quick and easy object-oriented programming. Find out about the Ruby language and discover what this means.

Answer:

Interpreted scripting language is a program whose instructions are actually a logically sequenced series of operating system commands, handled one at a time by a command interpreter . In turn, the command interpreter requests services from the operating system. The writer of the interpreted program need not be concerned by low-level storage management considerations. On the other hand, an interpreted program cannot be as efficient as a compiled program, which has been processed by a language compiler. A language compiler converts source statements into something close to the strings of 0's and 1's that a processor ultimately is given to work on. Because this work (0's & 1's conversion) is already done before a compiled program is run, the compiled program runs much more quickly. (Whatis.com, 2005)

Put simply, complied program like C/C++ is faster than interpreted program like Perl. However, the interpreted scripting language compensates for this drawback. For instance, the interpreted scripting language can run in multi-platforms as interpretation happens at runtime.

One of the interpreted scripting languages namely Ruby is rapidly gaining popularity in the US after a long period of incubation in its native Japan. Ruby is the language, in recent tradition of Perl, Python & Tcl. It allows for a rapid development cycle and the rapid prototyping of applications.
It is also a general purpose language. Its flexible syntax makes it easy to write a quick three-line script to do a one-time task. However, Ruby is also powerful to write large applications as well as C++ or Java.
Ruby is a radically object-oriented language. The OOP features of Ruby surpass those of Java and C++, approaching Smalltalk in flexibility. Primitive types in Ruby are true objects. Besides, Ruby allows singleton methods which is useful in GUI programming. Next, Ruby has open classes in the sense that one program can add to the existing classes at will, making new methods available even to previously-instantiated objects. Code itself can be objectified as a code block wrapped in an object. Finally, Many of the well-known OO design patterns have already been implemented as Ruby libraries.
Rub y us a Very High-Level Language. It has a rich set of built-in classes and methods allowing the manipulation of arrays, strings, hashes, files and other objects. (Fulton, 2002)

Hibbs (2005) also describes that Ruby is a pure object-oriented programming language with a super clean syntax that makes programming elegant and fun. Ruby successfully combines Smalltalk's conceptual elegance, Python's ease of use and learning, and Perl's pragmatism. Ruby originated in Japan in the early 1990s, and has started to become popular worldwide in the past few years as more English language books and documentation have become available.

I am a Beginner of Ruby. After using Ruby, it is very different with PHP. It can generate codes easily so that the web application can be built in a quick and easy way. This is my first sight for Ruby. After digging deeper, I find that it generate codes easily because it is OO reusability feature. Many classes and methods are ready to use after installation of Ruby. It is exactly the same as what Fulton states. Finally, as it is the interpreted programming language, it support multi-platforms.

Reference:

1. Whatis.com (2005). "What is interpreted?". WhatIs.com, Retrieved Mar-28th-2009 from URL - http://whatis.techtarget.com/definition/0,,sid9_gci212373,00.html
2. Fulton Hal (2002). "InformIT: What is Ruby? > What is Ruby?". informIT.com, Retrieved Mar-28th-2009 from URL - http://www.informit.com/articles/article.aspx?p=27359
3. Hibbs Curt (2005). "Rolling with Ruby on Rails". O'Reilly ONLamp.com, Retrieved Mar-28th-2009 from URL - http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html







No comments:

Post a Comment