Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Introducing



Ruby
MVC Framework
Ruby on Rails
TAG Cloud
    
            Java   Ruby PHP Object oriented ActiveRecord
        
             python   Ruby on Rails Rai...
Do we need???

Another Language...
Another Framework...
A new design pattern...
Wide range of new tools...
  ...
  ...
  ....
So let's dive in...
Ruby is...

    An interpreted language
  
     - a.k.a dynamic, scripting
  
     - e.g., perl

    Modules allow add...
Ruby is...

    All classes derived from Object including Class (like Java) but
    there are no primitives (not like Jav...
Traditional Applications

    Browser directly accesses page.
      - Do not offer centralized control
•     - No separati...
MVC Applications
Browser accesses a “controller”
  - Centralizes control
  - Clean separation of content/style
  - More in...
MVC


MVC is an Architectural Design Pattern
Separates a web application into three different
modules.
Model | View | Cont...
MVC Advantages
Separation of interests.
Model centralizes business logic.
View centralizes display logic.
Controller centr...
RAILS & MVC


Rails in an MVC framework
”…Rails is such a framework that tries to remove the
 complexity and drudgery of M...
Model - ActiveRecord

ActiveRecord is a design pattern. (Martin Fowler)
Object wraps a row in the database.
Encapsulates d...
View - ActionView


Renders the view.
Both .rhtml and .rxml files.
Provides master layouts.
Uses ERb (embedded ruby) for t...
Controller – ActionController

Controls application flow.
Controls which view to use.
Makes data available as instance var...
What it looks like?
Walk through...
Folder Structure
RAILS in 10 points

    Don’t Repeat Yourself

    Convention Over Configuration

    Model View Controller

    Agile...
Worth diving. Isn't it?
Who's using...
Applications...
References...

http://wiki.rubyonrails.org
http://rubyonrails.org
http://www.workingwithrails.com
http://www.37signals.com...
Thanks!
     Sumanth Krishna. A
  www.sumanthkrishna.com
tosumanthkrishna@gmail.com
Introducing Ruby/MVC/RoR
Upcoming SlideShare
Loading in …5
×

Introducing Ruby/MVC/RoR

2,115 views

Published on

An introduction session of Ruby, Ruby on Rails, MVC architecture...

Published in: Technology
  • Hi Sumanth,can you please share your contact number at a.shalini.rao@gmail.com or call on 9845377421
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Introducing Ruby/MVC/RoR

  1. 1. Introducing Ruby MVC Framework Ruby on Rails
  2. 2. TAG Cloud  Java Ruby PHP Object oriented ActiveRecord  python Ruby on Rails Rails J2EE Hibernate  Framework MVC RadRails Aptana NetBeans  Struts IDE Architecture ActionPack gems  Webserver Testing plugins OpenSource Helpers  webrick Methods
  3. 3. Do we need??? Another Language... Another Framework... A new design pattern... Wide range of new tools... ... ... ...
  4. 4. So let's dive in...
  5. 5. Ruby is...  An interpreted language  - a.k.a dynamic, scripting  - e.g., perl  Modules allow addition of behaviors to a class  Object Oriented  Single inheritance  High level  - Good support for system calls, regex and CGI  Relies heavily on convention for syntax
  6. 6. Ruby is...  All classes derived from Object including Class (like Java) but there are no primitives (not like Java at all)  Ruby uses single-inheritance  Mixins give you the power of multiple inheritance without the headaches  Modules allow addition of behaviors to a class  Things like ‘=‘ and ‘+’ that you might think are operators are actually methods (like Smalltalk)  Variables are not typed  Automatic memory allocation and garbage collection
  7. 7. Traditional Applications Browser directly accesses page. - Do not offer centralized control • - No separation of content/style - Difficult to maintain
  8. 8. MVC Applications Browser accesses a “controller” - Centralizes control - Clean separation of content/style - More involved to produce - Easier to maintain and expand
  9. 9. MVC MVC is an Architectural Design Pattern Separates a web application into three different modules. Model | View | Controller
  10. 10. MVC Advantages Separation of interests. Model centralizes business logic. View centralizes display logic. Controller centralizes application flow. Clean separation of content/style. Improved decoupling. Easier testing. Allow multiple people to work on different parts.
  11. 11. RAILS & MVC Rails in an MVC framework ”…Rails is such a framework that tries to remove the complexity and drudgery of MVC, while still allowing you to realize all the benefits.” - DHH (David Heinemeier Hansson)
  12. 12. Model - ActiveRecord ActiveRecord is a design pattern. (Martin Fowler) Object wraps a row in the database. Encapsulates data access. Contains business logic. Handles relationships. Handles validation.
  13. 13. View - ActionView Renders the view. Both .rhtml and .rxml files. Provides master layouts. Uses ERb (embedded ruby) for templating and control.
  14. 14. Controller – ActionController Controls application flow. Controls which view to use. Makes data available as instance variables @var Contains several actions/defs Controls rendering and redirection.
  15. 15. What it looks like?
  16. 16. Walk through...
  17. 17. Folder Structure
  18. 18. RAILS in 10 points  Don’t Repeat Yourself  Convention Over Configuration  Model View Controller  Agile Development  Configuring DB  ActiveRecord (Built-in ORM support)  CRUD – operations  Generators  Migrations  Plugins
  19. 19. Worth diving. Isn't it?
  20. 20. Who's using...
  21. 21. Applications...
  22. 22. References... http://wiki.rubyonrails.org http://rubyonrails.org http://www.workingwithrails.com http://www.37signals.com ... ...
  23. 23. Thanks! Sumanth Krishna. A www.sumanthkrishna.com tosumanthkrishna@gmail.com

×