Your SlideShare is downloading. ×
Ruby on rails
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Ruby on rails

484
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
484
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

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 = Post.new
        • 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
    Summary
  • 14. Its just like this
  • 15. Thank you