Modern Webdevelopment With Ruby On Rails

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

    1 Favorite

    Modern Webdevelopment With Ruby On Rails - Presentation Transcript

    1. Modern webdevelopment with Ruby on Rails Robert Glaser Software Developer at Planetactive
    2. Me • Studied at Fontys Venlo • 26 years • Software Developer at Planetactive - an Ogilvy Company in Düsseldorf twitter.com/mrreynolds
    3. Planetactive • Ogilvy / WPP worldwide agency group • Full service digital marketing agency
    4. So...
    5. Modern? • What exactly does „modern“ mean? • „Modern“ is a very subjective and opinionated term • So is Ruby on Rails!
    6. • Created in 2004 by David Heinemeier Hansson (DHH) at 37signals • Extracted from Basecamp (basecamphq.com) • Based on pragmatic solutions for common problems • Opinionated software • DRY - Don‘t Repeat Yourself
    7. Wait. There are hundreds of MVC web frameworks!
    8. „It‘s a very pragmatic, very targeted framework with a strong sense of direction. You might not share it‘s vision, but it undeniably has one.“ DHH photo copyright by James Duncan Davidson
    9. Rails is „full stack“... • ActiveRecord (ORM) • ActionPack (ActionController, ActionView) • ActiveSupport (Class Extensions, Helpers) • ActionMailer • ActiveResource (REST Mapper) • Rails (Core Lib)
    10. ...with many ingredients • Instant start defaults • Strong REST support • Webserver • Session Handling • Logger • Middleware (Rack) • Staging • Test Framework • AJAX • Plugins • Webservices • Engines • Mail • Clean MVC architecture • Debugger • Scaffolding • Caching
    11. ORM • Database abstraction & persistance ORM • ActiveRecord also a pattern • Migrations for incremental schema management
    12. YEAH! I don‘t have to write SQL!!!
    13. Yes, but you should understand what you are doing.
    14. Convention over configuration • File naming conventions and assumptions • DB naming conventions for databases, tables, primary- and foreign keys • Pluralization and singularization through String inflectors • Per-Environment configuration files
    15. DRY - Don‘t Repeat Yourself • Table column names don‘t need to be manually defined => read from DB • Reusing code (e.g. in views via partials) • Metaprogramming • DSLs
    16. Model • Business logic • Data persistence • ActiveRecord
    17. View • Data presentation • User Interaction • Template language ERB (Embedded Ruby) • ActionView
    18. Controller • Event handling • Operation on models • Redirection and rendering • ActionController
    19. ActionController ActiveRecord ActionView
    20. ActiveRecord • Conventions (pluralized table names, ...) • Dynamic getters and setters • SQL mostly unnecessary • Entity relations (1:1, 1:n, n:n) • SQL injection protection • Validators • Callbacks
    21. ActionView • ERB (Embedded Ruby) • Javascript generators (AJAX) • XML templates • Reusing template elements via partials and layouts
    22. ActionController • Actions are public controller methods • Automatic template rendering • Multiple formats can easily be supported • RESTful model representations • Callbacks • Complete routing system • Security (CSRF, IP spoofing, etc.)
    23. REST • Representational State Transfer • Representation of resources with only HTTP • Actions on resources defined by HTTP methods • Stateless • No additional transport layer like SOAP
    24. REST
    25. Testing • Test environment & database • Fixtures or Factories, depending on you • Unit tests for models • Functional tests for controllers • Integration tests for workflow • Automated browser tests via Selenium
    26. Made for agile! • Test driven development encouraged • It‘s hard not to test • Coverage testing via rcov • Behaviour driven development with Rspec, Cucumber or Shoulda (Stories and contexts) • Iterative DB schema evolvement via migrations
    27. Libraries, libraries!! • Plugins • Ruby Gems (Ruby‘s package management system)
    28. So, what is Ruby?
    29. Ruby • Released 1995 in Japan • Created by Yukihiro Matsumoto „Matz“ • Ruby should feel „natural, not simple“ • Ruby should be „more powerful than perl, more object-oriented than python“
    30. Everything is an object!
    31. True open classes!
    32. Loops
    33. Loops
    34. Classes, objects, loops, iterators
    35. Symbols
    36. Symbols
    37. Classes & modules
    38. Mixins
    39. Mixins
    40. Metaprogramming
    41. Exceptions
    42. If you want to use Ruby, use it idiomaticly!
    43. Demo time!
    44. Fin! • Diploma thesis? • Practical semester? • Get in touch with me!

    + Robert GlaserRobert Glaser, 8 months ago

    custom

    480 views, 1 favs, 0 embeds more stats

    A presentation on Ruby on Rails for Fontys Technica more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 480
      • 480 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 32
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

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

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories