Ruby on Rails For .Net Programmers

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Ruby on Rails For .Net Programmers - Presentation Transcript

    1. me http://shinydevelopment.com
    2. Hype
    3. “Ruby on Rails is astounding. Using it is like watching a kung-fu movie, where a dozen bad-ass frameworks prepare to beat up the little newcomer only to be handed their asses in a variety of imaginative ways.” Nathan Torkington
    4. “Powerful web applications that formerly might have taken weeks or months to develop can be produced in a matter of days.” Tim O'Reilly
    5. What is Ruby on Rails?
    6. Ruby Language C# or VB.NET on Rails Framework ASP.NET
    7. Ruby
    8. Ruby is Object Oriented
    9. > 2.next => 3 > “Hello”.reverse => “olleH” > 2.class => Fixnum > 2.class.class => Class
    10. > 2.class => Fixnum > 2.class.superclass => Integer > 2.class.superclass.superclass => Numeric > 2.class.superclass.superclass.superclass => Object
    11. Ruby is Readable
    12. > 5.times { print \"Hello \" } Hello Hello Hello Hello Hello > print “Stuff” unless x.nil? => Stuff > [3, 5, 78, 2, 43].sort.reverse => [78, 43, 5, 3, 2] > 2.weeks.from_now.utc => Wed Dec 27 11:25:06 UTC 2006
    13. > [1, 2].empty? => false > x.nil? => true
    14. > arr = [5, 4, 3] > arr.sort => [3, 4, 5] # arr is still [5, 4, 3] > arr.sort! => [3, 4, 5] # arr is now [3, 4, 5]
    15. Ruby is Dynamic
    16. > Linguistics::use(:en) > \"runs\".en.present_participle => \"running\" > 5.en.ordinal => \"5th\" > \"cow\".en.quantify(1005) => \"thousands of cows\"
    17. > animals = %w{dog cow ox chicken goose goat cow dog rooster llama pig goat dog cat cat dog cow goat goose goose ox alpaca} > puts \"The farm has \" + animals.en.conjunction => “The farm has four dogs, three cows, three geese, three goats, two oxen, two cats, a chicken, a rooster, a llama, a pig, and an alpaca”
    18. class ReverseString def method_missing(method_name) return method_name.to_s.reverse end end > s = ReverseString.new > s.Hello_World => “dlroW_olleH”
    19. Rails
    20. “Ruby on Rails is an opinionated framework for developing web applications”
    21. Convention over Configuration
    22. Model Controller View
    23. ActiveRecord ActionPack Model View & Controller ActiveSupport JavaScript Libraries Prototype & Script.aculo.us ActionMailer ActionWebService
    24. Convention over Configuration
    25. Table Class groups Group people Person string.pluralize ABC_usrdetails User table_name_prefix “ABC_” set_table_name “usrdetails”
    26. Dynamic Scaffolding and Validations demo
    27. Magic?
    28. scaffold :customer
    29. Ruby is Dynamic
    30. Hey, have you seen my new Rails app? I can imagine! *sigh*
    31. script / generate
    32. More Magic?
    33. Routing
    34. URL http://localhost:3000/customer/show/2 Routes.rb map.connect ':controller/:action/:id'
    35. ActiveRecord
    36. “The essence of an Active Record is a domain model in which the classes match very closely the record structure of an underlying database. Each active record is responsible for saving and loading to the database and also for any domain logic that acts on the database” Martin Fowler
    37. ActiveRecord ActionPack Model View & Controller MySQL PostgreSQL ActiveSupport JavaScript Libraries MS SQL - ADO Prototype & Script.aculo.us MS SQL - ODBC Oracle ActionMailer ActionWebService SQLite DB2
    38. class Customer < ActiveRecord::Base end >> Customer.column_names => [\"id\", \"name\", \"email\", \"notes\"] >> Customer.columns_hash[\"id\"] => default=nil, text=false, null=false, sql_type=\"int(11)\", primary=true, name=\"id\", type=:integer, number=true
    39. class Customer < ActiveRecord::Base end Customer.find(:all) Customer.find(1) Customer.find_by_email(‘bill@example.com’) Customer.find_by_email_or_name( ‘bill@example.com’, ‘Ben’)
    40. class Customer < ActiveRecord::Base end Customer.new do |c| c.email = ‘bill@example.com’ c.name = ‘Bill’ c.save end Customer.delete(1)
    41. ActiveRecord Relationships
    42. Describe the relationship “A customer has many orders and an order belongs to a customer.”
    43. has_many belongs_to
    44. Database Relationships demo
    45. More Magic?
    46. Ruby is Dynamic
    47. Orders id Customers customer_id id item name email quantity notes unit_price
    48. customer = Customer.find(params[:id]) customer.orders.create(params[:order])
    49. Migrations demo
    50. Capistrano
    51. What next?
    52. Try Ruby http://tryruby.hobix.com
    53. Instant Rails http://instantrails.rubyforge.org
    54. Locomotive http://locomotive.raaum.org/
    55. SubSonic http://www.codeplex.com/Wiki/View.aspx? ProjectName=actionpackext Castle Project http://www.castleproject.org/
    56. IronRuby
    57. Newcastle Ruby on Rails User Group
    58. Thank You dave.verwer@shinydevelopment.com

    + daveverwerdaveverwer, 2 years ago

    custom

    3575 views, 0 favs, 0 embeds more stats

    An introduction to Ruby on Rails for .NET programme more

    More Info

    © All Rights Reserved

    Go to text version
    • Total Views 3575
      • 3575 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 193
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as innappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel

    Categories