Archive for April, 2008

Ruby and the World Wide Web

Ruby is not a foreign word to the Internet. You can write your own SMTP server or Web server as well as use Ruby for common tasks such as CGI programming or a replacement for PHP. Writing CGI scripts with Ruby is easy because class CGI provides for writing CGI scripts – manipulate forms, cookies, and the environment. The use of class CGI lets you get into HTML query parameters for it has a number of techniques for creating HTML – that is, one method per tag. You can save all kinds of materials on an unsuspecting net user’s machine using cookies.

A Scripting Language

Programming languages fall into one of two categories: compiled languages or scripting languages. Ruby is a scripting language and as such relies upon an operation’s source code all the time. Scripting languages use a program that runs on the web server to decode hand-written symbols into machine-executable code, which is known as an interpreter. The scripting code is translated for every web page that your application executes, therefore the link between the running application and your hand-written symbols is never disconnected. Ruby as a scripting language is simple, you can sort out the typo and reload the page in your browser, no need to restart or recompile.

Ruby on Rails: Blocks and Closures

Based on an interview with Yukihiro Matsumoto, Ruby’s architect, a closure object has the executable, or the code to run, and the scope, which is the state around the code. When you capture the environment, namely the local variables, in the closure, you can refer to the local variables inside a closure as a result. Even after the function has returned, and its local scope has been destroyed, the local variables remain in existence as part of the closure object. When no one refers to the closure anymore, it is considered as garbage collected, and the local variables go away.

What are the advantages of using Ruby on Rails

Ruby on Rails offers two important benefits to the business owner and these are:
Improved Productivity – It is a simple and effective framework for developing web based applications that necessitates to “talk” to a database. It conceals a number of intricate internal functions and frees up time for the developer to focus on the business logic and its implementation.
Cost Savings – The developer can do more in the amount of time that he works, and the number of hours required to do a particular job is greatly reduced and therefore it follows that adopting Ruby on Rails saves you a lot of money

Why RoR is Effective

Ruby on Rails relies on the powerful and feature rich programming language of Ruby. It is an MVC framework for Ruby and separates the GUI, Business Logic and Data in 3 separate and distinct tiers. The application code and running database contains all that Rails needs as it uses intelligent reflection to automatically map relational database tables to Ruby objects. Lesser amount of code is needed to implement the business logic therefore the application testing time is lessened. It can automatically generate the Create, Review, Update and Delete code for the applications so you can do database update and views to meet the changing business requirements.

Web 2.0 Programming and Rails

Rails is fast becoming the in thing with a new generation of Web 2.0 programmers. They say that it’s a dream platform for writing software because it’s easy and simple. Compared to Java and PHP, users avow that it is also easier to code and maintain. Rails is starting to attract attention of banks and corporations that depend on huge software applications because of its sophisticated engineering. Programmers go for it because it’s fast, straightforward and elegant. It is simple enough to attract the people with minimum programming skills, but it also draws people having computer sciences degrees who are designing complex systems for large corporations.