What is Ruby ?
Before we ride on Rails, let's know a little bit about Ruby which is the base of Rails.
Ruby is
- A High Level Programming Language
- Interpreted like Perl, Python, Tcl/TK.
- Object-Oriented Like Smalltalk, Eiffel, Ada, Java.
- Originated in Japan and Rapidly Gaining Mind-share in US and Europe.
Why Ruby ?
Ruby is becoming popular exponentially in Japan and now in US and Europe as well. Following are greatest factors:
- Easy to learn
- Open source (very liberal license)
- Rich libraries
- Very easy to extend
- Truly Object-Oriented
- Less Coding with fewer bugs
- Helpful community
What is Rails ?
- An extremely productive web-application framework.
- Written in Ruby by David Heinemeier Hansson.
- You could develop a web application at least ten times faster with Rails than you could with a typical Java framework.
- An open source Ruby framework for developing database-backed web applications.
- Your code and database schema are the configuration!
- No compilation phase required.
Rails Strengths:
Rails is packed with features that make you more productive, with many of the following features building on one other.
Meta-programming : Other frameworks use extensive code
generation from scratch. Meta-programming techniques use programs to
write programs. Ruby is one of the best languages for meta-programming,
and Rails uses this capability well. Rails also uses code generation but
relies much more on meta-programming for the heavy lifting.
Active Record : Rails introduces the Active Record framework,
which saves objects to the database. The Rails version of Active Record
discovers the columns in a database schema and automatically attaches
them to your domain objects using meta-programming.
Convention over configuration : Most web development frameworks
for .NET or Java force you to write pages of configuration code. If you
follow suggested naming conventions, Rails doesn't need much
configuration.
Scaffolding : You often create temporary code in the early
stages of development to help get an application up quickly and see how
major components work together. Rails automatically creates much of the
scaffolding you'll need.
Built-in testing : Rails creates simple automated tests you can
then extend. Rails also provides supporting code called harnesses and
fixtures that make test cases easier to write and run. Ruby can then
execute all your automated tests with the rake utility.
Three environments : Rails gives you three default
environments: development, testing, and production. Each behaves
slightly differently, making your entire software development cycle
easier. For example, Rails creates a fresh copy of the Test database for
each test run.
No comments:
Post a Comment