• Save
Ruby on Rails: Building Web Applications Is Fun Again!
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Ruby on Rails: Building Web Applications Is Fun Again!

on

  • 25,726 views

Anthony Eden presentents us for Ruby on Rails.

Anthony Eden presentents us for Ruby on Rails.

Statistics

Views

Total Views
25,726
Views on SlideShare
25,606
Embed Views
120

Actions

Likes
55
Downloads
1
Comments
1

16 Embeds 120

http://www.slideshare.net 83
http://www.techgig.com 12
http://blog.phuha.net 6
http://clickwatchlearn.blogspot.com 4
http://s.deeeki.com 3
http://localhost 2
http://www.lonerunners.net 1
http://dev.toeska.cl 1
http://clickwatchlearn.blogspot.in 1
http://10.150.200.102 1
https://nuigalway-test.blackboard.com 1
http://ec2-79-125-83-211.eu-west-1.compute.amazonaws.com 1
http://www.lmodules.com 1
http://phuha.net 1
http://vasselc.ninehub.com 1
http://seekr-artemis.heroku.com 1
More...

Accessibility

Categories

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.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • I am new to ruby on rails I don't have an idea systax also
    can you give me some sourcess to learn ruby on rails programming
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Ruby on Rails: Building Web Applications Is Fun Again! Presentation Transcript

  • 1. Ruby on Rails Building Web Applications Is Fun Again!
  • 2. What is Ruby on Rails?
    • Web application framework written in Ruby
    • Ruby is an Object Oriented scripting language
    • Model-view-controller
    • Database agnostic
    • Open source
    • Lots of nice tools, classes and methods to make development easier
  • 3. The Rails Way
    • DRY (Don’t Repeat Yourself)
    • Convention over configuration
    • Baked in testing
    • Minimal code with maximum effect
  • 4.
    • Installing Ruby, Gem and Rails
    • Install Ruby OCI8 Driver
    • Connect using TNSNAMES.ORA
    • Connect using InstantClient and a URL
    • More information on wiki.rubyonrails.com
    Getting Started
  • 5. Rails on Oracle
    • Key generation assumes sequences for each table with the name ${table_name}_seq
    • Sequence name can be changed using ActiveRecord::Base.set_sequence_name
    • Timezones and sub-second precision not supported
    • More info: http://wiki.rubyonrails.com/rails/pages/Oracle
  • 6. Building Your First App
    • Create a new Rails app by typing: rails myapp
    • Edit the config/database.yml
    • Generate a model using: script/generate model MyModel
    • Creating a model creates a class and a migration
  • 7. ActiveRecord Conventions
    • Naming convention simplifies development and encourages good database design
    • Tables are plural, models are singular
    • Example:
      • Model: LineItem
      • Table: line_items
    • Handles non-regular pluralization such as Person/people
    • Can be overridden, although this complicates things for the developer
  • 8. Database Migrations
    • Database agnostic means of defining schema
    • Lowest-common-denominator approach
    • Ruby code with full access to ActiveRecord
    • Methods for creating, altering and dropping tables, columns and indexes
    • Can execute arbitrary SQL with ‘execute’ method
  • 9. ActiveRecord Models
    • Object/Relational Mapping
    • Model classes extend from ActiveRecord::Base
    • ActiveRecord::Base provides:
      • Database agnostic record creation, finding, saving and removal
      • Data validation methods
      • Relationships
      • All in an easy to use package
    • Rails encourages keeping business logic in the model where it belongs
    • AR can be used outside of web applications
  • 10. Views
    • Responsible for creating part or all of the page displayed in a browser
    • By default uses ERb (Embedded Ruby)
    • Other views include ‘builders’ for XML documents or RJS templates to generate JavaScript for AJAX driven views
    • Includes elegant means for including helper functions for rendering
    • Supports partials and components
  • 11. Controllers
    • Generate controllers with script/generate controller MyController
    • Controllers tie the view to the model through actions
    • Controllers also have access to “helpers”
    • Designed for people-friendly URLs
    • Provides caching, session management, query parsing, cookie management, pagination
  • 12. ActiveRecord Relationships
    • Relationships are through primary keys
    • Supported relationship types:
      • belongs_to (book belongs to author)
      • has_one (book has one publisher)
      • has_many (book has many pages)
      • has_and_belongs_to_many (book has and belongs to many readers)
      • has_many :through (book has many contributors through contributions)
  • 13. ActiveRecord Validation
    • validates_presence_of
    • validates_uniqueness_of
    • validates_confirmation_of
    • validates_acceptance_of
    • validates_associated
    • validates_each
    • validates_format_of, _length_of
    • validates_exclusion_of, _inclusion_of
  • 14. More ActiveRecord
    • Acts As
      • acts_as_list (position)
      • acts_as_tree (parent_id)
    • Aggregations
      • composed_of
    • Callbacks
      • Full lifecycle
      • Before and after validation, creation, saving, destroying
    • Calculations
      • average, count, maximum, minimum, sum
  • 15. Just When You Thought You Had Enough ActiveRecord
    • Callback objects
    • Observers
    • Façade columns
    • Object-level transaction management
    • Magic column names
      • created_on, created_at, updated_on, updated_at auto timestamping and dating
      • lock_version and optimistic locking
      • type for single table inheritence
      • xxx_count counter cache
  • 16. Other Stuff
    • ActionMailer for sending mail messages
    • ActionView helpers
      • Form helpers
      • Asset tags
      • Javascript support (yummy AJAX!)
      • Pagination
      • Text helpers
    • ActionWebService
    • Ruby language extensions
    • Breakpoint and debugging
  • 17. Where To Go Next?
    • http://www.rubyonrails.com /
    • http://api.rubyonrails.com /
    • http://wiki.rubyonrails.com/
    • Agile Web Development with Rails
    • http://www.ruby-doc.org/ for Ruby
    • Programming Ruby
    • IRC, Mailing Lists, Seth Ladd’s brain