• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Modern Webdevelopment With Ruby On Rails
 

Modern Webdevelopment With Ruby On Rails

on

  • 1,780 views

A presentation on Ruby on Rails for Fontys Technical Highschool Venlo (Netherlands)

A presentation on Ruby on Rails for Fontys Technical Highschool Venlo (Netherlands)

Statistics

Views

Total Views
1,780
Views on SlideShare
1,779
Embed Views
1

Actions

Likes
1
Downloads
44
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

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…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Modern Webdevelopment With Ruby On Rails Modern Webdevelopment With Ruby On Rails Presentation Transcript

  • Modern webdevelopment with Ruby on Rails Robert Glaser Software Developer at Planetactive
  • Me • Studied at Fontys Venlo • 26 years • Software Developer at Planetactive - an Ogilvy Company in Düsseldorf twitter.com/mrreynolds
  • Planetactive • Ogilvy / WPP worldwide agency group • Full service digital marketing agency
  • So...
  • Modern? • What exactly does „modern“ mean? • „Modern“ is a very subjective and opinionated term • So is Ruby on Rails!
  • • 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
  • Wait. There are hundreds of MVC web frameworks!
  • „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
  • Rails is „full stack“... • ActiveRecord (ORM) • ActionPack (ActionController, ActionView) • ActiveSupport (Class Extensions, Helpers) • ActionMailer • ActiveResource (REST Mapper) • Rails (Core Lib)
  • ...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
  • ORM • Database abstraction & persistance ORM • ActiveRecord also a pattern • Migrations for incremental schema management
  • YEAH! I don‘t have to write SQL!!!
  • Yes, but you should understand what you are doing.
  • 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
  • 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
  • Model • Business logic • Data persistence • ActiveRecord
  • View • Data presentation • User Interaction • Template language ERB (Embedded Ruby) • ActionView
  • Controller • Event handling • Operation on models • Redirection and rendering • ActionController
  • ActionController ActiveRecord ActionView
  • 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
  • ActionView • ERB (Embedded Ruby) • Javascript generators (AJAX) • XML templates • Reusing template elements via partials and layouts
  • 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.)
  • REST • Representational State Transfer • Representation of resources with only HTTP • Actions on resources defined by HTTP methods • Stateless • No additional transport layer like SOAP
  • REST
  • 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
  • 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
  • Libraries, libraries!! • Plugins • Ruby Gems (Ruby‘s package management system)
  • So, what is Ruby?
  • 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“
  • Everything is an object!
  • True open classes!
  • Loops
  • Loops
  • Classes, objects, loops, iterators
  • Symbols
  • Symbols
  • Classes & modules
  • Mixins
  • Mixins
  • Metaprogramming
  • Exceptions
  • If you want to use Ruby, use it idiomaticly!
  • Demo time!
  • Fin! • Diploma thesis? • Practical semester? • Get in touch with me!