DOC PREVIEW
CU-Boulder CSCI 5448 - Ruby on Rails

This preview shows page 1-2-16-17-18-33-34 out of 34 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 34Highly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?Sahar Jambi, Spring 2011University of Colorado at BoulderBeautiful Ruby & Powerful RailsHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?2Sahar Jambi, Spring 2011University of Colorado at BoulderOutlineWhat is RubyWhy RubyRuby FeaturesOOP in RubyDynamic RubyWhat is RailsRails HistoryWhy RailsRails Design ParadigmStrength of RailsRails FrameworkRails ArchitectureRails and MVCRails ScriptsRails ModelsRails ControllersRails ViewsRouting in RailsReal ApplicationsConclusionReferencesAvailable Resources Rubyon RailsHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?3Sahar Jambi, Spring 2011University of Colorado at BoulderA High Level Programming Language that provides an elegant, natural syntax.Created by Yukihiro Matsumoto (Matz), Japan, 1995.What is Ruby?Beautiful RubyHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?4Sahar Jambi, Spring 2011University of Colorado at BoulderObject-Oriented like Java Interpreted Scripting like Perl and Python IntrospectionDomain-Specific LanguagesWhat is Ruby?Beautiful RubyHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?5Sahar Jambi, Spring 2011University of Colorado at BoulderMore understandable code in less lines(Less code means fewer bugs)Open Source with rich libraries (open license)ExtensibleScripted languageRuby easy to learnWhy Ruby?Beautiful RubyHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?6Sahar Jambi, Spring 2011University of Colorado at BoulderLine OrientationGetter, Settter and attr_ methodsNaming ConventionsModules vs ClassesMethod MissingIterators and BlocksMethod ChainingRuby FeaturesBeautiful RubyHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?7Sahar Jambi, Spring 2011University of Colorado at BoulderRuby is purely object-orientedEverything is an object, even strings and numbers!e.g. - # Output "Beautiful Ruby!" 10 times 10.times doputs “Beautiful Ruby!” end - “sahar”.capitalize - 3.methods- 2.hours.agoOOP in RubyBeautiful RubyHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?8Sahar Jambi, Spring 2011University of Colorado at BoulderRuby is highly dynamicRuby supports many dynamic features- Duck Typing “If it quacks like a duck, it must be a duck.”Dynamic RubyBeautiful RubyHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?9Sahar Jambi, Spring 2011University of Colorado at BoulderWhat is Rails?PowerfulRailsRuby on Rails ( Rails or RoR ) isAn open source application framework composed of several libraries; working together to supply a complete framework for building Web applications.Written in Ruby by David Heinemeier Hansson.Highly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?10Sahar Jambi, Spring 2011University of Colorado at BoulderIn 2003, while Hansson was building “Basecamp”, a web application for “37signals” company, he created a core of functionality to reuse on his other applications, then turned it into an open-source project that became Ruby on Rails.In Jun 2004, Rails 0.5 was presented to the public as the first time (at IRC).In Dec 2005, Rails 1.0 was the first public release with an incredibly proud.In Dec 2007, Rails 2.0 was a fantastic release with great new features, loads of fixes and an incredible amount of polish.In Aug 2010, Rails 3.0 is the third generation of Rails with the work of more than 1,600 contributors to make Rails better, faster, cleaner, and more beautiful.Rails HistoryPowerfulRailsHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?11Sahar Jambi, Spring 2011University of Colorado at BoulderIt's an extremely productive database-driven web application framework.It's all about productivity that allows the developer to focus more on the business logic of the application, rather than the technical, behind-the-scenes stuff.It makes working with a database extremely simple.It makes development fun and easy for the developer.Almost all of the development is in Ruby, one language!.The creator of the Ruby (Matz) has referred to Rails as Ruby’s Killer App.Why Rails?PowerfulRailsHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?12Sahar Jambi, Spring 2011University of Colorado at BoulderDRYDon’t Repeat Yourself (DRY) is a philosophy that can be seen throughout the Rails framework. DRY philosophy means that you should not have to repeat yourself in code, configuration, or in many cases even documentation, within a single Web application.Rails Design ParadigmPowerfulRailsHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?13Sahar Jambi, Spring 2011University of Colorado at BoulderConvention Over ConfigurationRails relies on accepted convention over configuration.Rails asks developers to write code not configuration files.Rails Design ParadigmPowerfulRailsHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?14Sahar Jambi, Spring 2011University of Colorado at BoulderOpinionated SoftwareRails contains built-in opinions of how Web applications should be developed and designed.This aspect has been a large contributor to its ease of use and its overall success. Rails Design ParadigmPowerfulRailsHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?15Sahar Jambi, Spring 2011University of Colorado at BoulderCreates denser code that's is easy to work with and maintain.Uses metaprogramming techniques that use programs to write programs.Scaffolding that builds code skeletons.Migration that manages the database tables and columns. Embraces test-driven development.Supports three environments: development, testing, and production.Supports many database back-ends, such as MySQL, PostgreSQL, SQLite, SQL Server, Oracle, DB2 Strength of RailsPowerfulRailsHighly Dynamic?Highly Dynamic?Highly Dynamic?Highly Dynamic?16Sahar Jambi, Spring 2011University of Colorado at BoulderRails provides some excellent tools that assist in the developing process (run from the command-line). - Rails ConsoleA command-line utility- WEBrick Web serverLocal developer testing web server- GeneratorsGenerates class files for framework layers- MigrationsRoutines help to manage the


View Full Document

CU-Boulder CSCI 5448 - Ruby on Rails

Documents in this Course
Django

Django

42 pages

ENRS

ENRS

30 pages

PhoneGap

PhoneGap

22 pages

Load more
Download Ruby on Rails
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Ruby on Rails and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Ruby on Rails 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?