Ruby on rails
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


Ruby on rails






Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Ruby on rails Presentation Transcript

  • 1. Ruby on Rails ::The New Gem of Web Development
  • 2.
    • Web application framework
    • Dynamically typed programming language
    • Create or manage web applications which
      • manipulate relational database from a web-based user interface
    Ruby on Rails
  • 3. Ruby ??
    • Pure object-oriented programming language
    • Everything is an object
    • Interpreted scripting language
    • Ruby successfully combines Smalltalk's conceptual elegance,
    • Python's ease of use and learning and Perl's pragmatism.
    • Ruby originated in Japan in 1993 by Yukihiro “matz” Matsumoto,
    • and has started to become popular worldwide in the past few
    • years as more English language books and documentation have
    • become available.
    • Ruby is a metaprogramming language.
  • 4. What is Rails? Ruby on Rails or just Rails (RoR)
    • An open source Ruby framework
    • Created by David Heinemeier Hansson – DHH Partner
    • The Rails framework was extracted from real-world web applications.
    • All layers in Rails are built to work together so you Don’t Repeat Yourself
    • Everything in Rails (templates to control flow to business logic) is written
    • in Ruby Except for configuration files - YAML
  • 5. Rails Strengths – It’s all about Productivity
    • Metaprogramming techniques
      • Metaprogramming replaces these two primitive techniques and eliminates their disadvantages.
      • Ruby is one of the best languages for metaprogramming, and Rails uses this capability well.
    • Scaffolding
      • which can quickly construct most of the logic and views needed to do common operations, such as Create, Read, Update and Delete (CRUD).
  • 6. Rails Strengths – Write Code not Configuration
    • Convention over configuration
        • Naming your data model class with the same name as the corresponding database table
        • ‘ id’ as the primary key name
    • 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 metaprogramming.
        • This approach to wrapping database tables is simple, elegant, and powerful.
  • 7. Rails Strengths – Full-Stack Web Framework
    • Rails implements the model-view-controller (MVC) architecture. The MVC design pattern separates the component parts of an application
  • 8.
    • For example
    • If there is a class Post, the following code:
        • a =
        • a.subject = "Example message"
        • a.body = "This is an example message."
        • a.Save
    • INSERT INTO posts (subject, body) VALUES ('Example message', 'This is an example message.');
  • 9. b = Post.find(:all, :conditions => ['score > 80']) is conceptually equivalent to the following SQL command: SELECT * FROM posts WHERE score > 80;
  • 10. Rails Strengths
    • Three environments: development, testing, and production
    • Rails embraces test-driven development.
      • Unit testing: testing individual pieces of code
      • Functional testing: testing how individual pieces of code interact
      • Integration testing: testing the whole system
    • Database Support: Oracle, DB2, SQL Server, MySQL, PostgreSQL, SQLite
    Rails Application Directory Structure
  • 11. Hello Rails!
    • def sayGoodmorning(name)
    • result = "GoodMorning," + name
    • return result
    • end
          • # Time for tea...
    • puts sayGoodmorning(“Think ahead")
    • puts sayGoodmorning(“Think ahead ")
  • 12. Hello Rails!
    • Out put is:
    • GoodMorning Think ahead
    • GoodMorning Think ahead
  • 13.
    • Rail’s two guiding principles:
      • Less software (Don’t Repeat Yourself - DRY)
      • Convention over Configuration (Write code not configuration files)
    • High Productivity and Reduced Development Time
  • 14. Its just like this
  • 15. Thank you