ppt goransavovski_rubyonrails.ppt

Post on 19-May-2015

1.125 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Presenter: Goran Savovski Professor: Walter Maner

The fast pace in the software development The question: What comes next?

sou

rce: h

ttp://w

ww

.tiob

e.co

m/in

de

x.htm

?tio

be

_in

de

x

A new term coined recently New possibilities◦Wiki, Social Software, Podcast, RSS feed, Mashups, Web

Applications… Combining existing technologies◦ HTML , CSS , JavaScript, SQL, XML, AJAX..

What is RoR? Ruby (Yukihiro Matsumoto 1993, Japan) Rails (David Heinemeier Hansson 2003, Denmark) Where comes RoR into play?

Model-View –Controller DRY – Don’t Repeat Yourself Less Code Convention over Configuration Agile Development

image source: D. Thomas, D.H. Hansson, Agile Web Development with Rails, 2nd ed., New York, USA: Pragmatic Programmers LLC, 2007.

Incremental Development Prototyping Testing Early Integration

Ruby is a single-pass interpreted language Everything is an object Every function is a method Four levels of variable scope: global, class, instance, and local Perl-like regular expressions Automatic garbage collecting Highly portable Every variable is completely private; exposed through

accessor methods (attr_writer, attr_reader) Interactive Ruby Schell (IRB)

The nesting indentions are 2 blank spaces Now semicolon needed at the and of the line Boolean 0, “”, [] all evaluates as true only nil and false

evaluates as false Code blocks defined without braces (e.i. pair of { and})

-199.abs # 199 "ruby is cool".length # 12 “Ruby".index(“b") # 2 array = [1, 1, 'hi', 3.14]◦ array |= [2] # [1, 1, 'hi', 3.14, 2]◦ array.reverse # [2, 3.14, 'hi', 1 ,1 ]◦ array.uniq # [2, 3.14, 'hi', 1 ]◦ array.each {|item| puts item}

# => 1 # => 'hi' # => 3.14

Scalability Enterprise level support Web Hosting IDE (integrated development environment) Constraint by only one framework Deployment Configuration

-Example of Real world solution

So

urc

e:

htt

p:/

/po

ocs

.ne

t/2

00

6/3

/13

/th

e-a

dve

ntu

res-

of-

sca

ling

-sta

ge

-1

Large number of supporting Databases including Oracle

JRuby IronRuby Mac OS - Leopard

3SHost, 10for10, A2 Hosting, AFMU.com, ADM Hosting Aetheri Hosting, AmbitiousLemon, Apis Networks, AxisHOST.com , A Small Orange, Blizzard Media, BlueHost , Blue Box Grid, Bright-Byte.com, CanadianWebHosting.com, Csoft.org, CommandPrompt.Com, Cybersalad, DewaHost, Dinohost, DomainGurus, Dotnoc IT Services, DreamHost, DowntownHost, Duport Online, eApps Hosting’s Ruby on Rails Hosting, EastSolid.com, Eferi, EngineYard.com, eTecc.net, EZserver.biz, Fuse9, Gazzin.com, Gigenet, GeekISP, GeekStorage, GoDaddy, GoJimmers, GrokThis.net, High Speed Rails, Honeycomb, HostedToday, HostM.com Web Hosting, HostingMetro.com, HostMG.com, HostMonster, HostMySite, HostPC Internet Services, Hub.org, JaguarPC , Linode.com, LI Webhosting, max-king Hosting, Media Temple, MonkeyWrench Hosting, MonsterHosting.ca, Mosquito Mole Multiworks, MysticServer, NeonCube Internet Solutions, Netfirms, NetworkRedux, OCS Solutions, OpenHosting, PeconiHosting.com, Pipespring, HPWebHosting, PLANET ARGON, Plutomic Hosting, Python-Hosting.com, RailsBase, RailsPlayground.com, RailsHosting.org, Rails Hosting Info, Rails Machine, RailsWebHost.com, RimuHosting Ruby on Rails Hosting, RootR, RoundBerry, RubyOnRailsHosting.net , SeattleServer.com, Server Powered, Simplehost, Site5, SliceHost, soyhost, Squidhost.com, Steelpixel.com, SilverRack, SuccessfulHosting.com, SunsetHost.com, TerraBox.com, TextDrive, The Internet Company, TheSitePeople, ThinkHost, Voxxit, Web Experts America, WebAppCabaret, WebOnce Technologies, Webslum Internet Services, WestHost , Xelhosting.com,XMG Free, XMG Hosting,WebFaction, Zettai

IDE (integrated development environment)

◦ Aptana Studio with RadRails Development Plugin (free)◦ RadRails Plugin for Eclipse (free)◦ NetBeans support for RoR development (free)◦ Rubi in Steel by Visual Studio ($199)◦ Komodo by Active State ($295)◦ 3rdRail by CodeGear ($299)

Mac◦ Textmate (the ultimate RoR editor, but $39.95)

Windows ◦ E-Texteditor (referred as the power of Textmate on windows, $34.95)◦ Programmers Notepad (very fast, my choice, free)◦ Notepad ++ (free)

Unix◦ Emacs◦ Vim

Deployment with Capistrano [13]

Other Ruby based frameworks◦Merb◦ Sequel◦ DataMapper◦ Ambition

Basecamp – online project management BBC Programme Catalogue – video and audio archives from BBC television and

radio Blurb.com – personal book publishing ChaCha.com - a human-powered search engine Justin.tv - A live video streaming platform LinkedIn - Professional-oriented Social Networking Service OpenCongress – Aggregated news and official data about the US Congress Penny Arcade – gamer-humor webcomic Revolution Health – a health portal Twitter – micro-blogging service World Stock Exchange – Internet based Stock Exchange for the virtual world of

Second Life yellowpages.com – US telephone directory

Active Record Action Pack◦ ActionController◦ ActionView

Active Support Action Mailer Action Web Service

skeleton code (scaffolding) Autowiring (automapping) of the MVC convention over configuration unit and integration test Capistrano script/console. Rake Built in Ajax support by using Prototype and

Script.aculo.us

1. Create an application:◦ rails MyProject

2. Go into the projects folder and start the development server WeBRICK:

◦ cd MyProject◦ ./script/server

3. Open your browser on this location◦ http://localhost:3000

4. Generate the controler:◦ ./script/generate controller hello index

5. Open the the hello controller in your favorite editor and add:◦ def world

@greeting= “hello world!” end

6. Now open the world view in MyProject/views/hello/world.rhtml and add

◦ <%= @greeting %>7. Now open the http://localhost:3000/hello/world in your

browser and that is it!

image source: D. Thomas, D.H. Hansson, Agile Web Development with Rails, 2nd ed., New York, USA: Pragmatic Programmers LLC, 2007.

image source: http://beust.com/weblog/archives/000382.html

Questions, Comments, Critique?

Matz & David

[1] Kay Russell, “Ruby on Rails,” Computerworld, November 2005, Vol. 39 Issue 48, p26. www.computerworld.com.

[2] Wikipedia, “Ruby on Rails,” October 2007, [Online Document] available at http://en.wikipedia.org/wiki/Ruby_on_Rails.

[3] D. Thomas, D.H. Hansson, Agile Web Development with Rails, 2nd ed., New York, USA: Pragmatic Programmers LLC, 2007.

[4] C. Beust, “Why Ruby on Rails won't become mainstream” [Online Document] April 2006, Available at http://beust.com/weblog/archives/000382.html.

[5] G. Stark, “Java + Rails = Real Digital Media” [Online Document] 2007, Available at http://www.railsforall.org/case_studies/11.

[6] G. Grosenbach, “Future of Web Apps Conference” [Online Document] October 2007, Available at http://nubyonrails.com/.

[7] D. Sivers, “7 reasons I switched back to PHP after 2 years on Rails” [Online Document] September 22, 2007, Available at http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html.

[8] P. Lenz, “The adventures of scaling” [Online Document] March 2006, Available at http://poocs.net/2006/3/13/the-adventures-of-scaling-stage-1.

[9] I. Couto, “RailsWebHosts” [Online Document] November 2007, (last updated), Available at http://wiki.rubyonrails.com/rails/pages/RailsWebHosts.

[10] S. Bozhkov, “22 Successful Ruby On Rails Web Applications” [Online Document] March 2007, Available at http://rubycorner.net/articles/22-successful-ruby-on-rails-web-applications/.

[11] Ruby (programming language) [Onlinine Document] November 2007, http://en.wikipedia.org/wiki/Ruby_(programming_language)

[12] Ruby on Rails [Online Document] December 2007, Available at http://en.wikipedia.org/wiki/Ruby_on_Rails

[13] Ruby on Rails Tutorial [Online Document] December 2007, Available at http://wiki.rubyonrails.org/rails/pages/Tutorial

[14] Capistrano: Simple. The way it should be. Available at: http://www.capify.org/getting-started/basics

Rails podcast: http://podcast.rubyonrails.org RoR workshops (USA): http://rubyonrailsworkshops.com/countries/show/228 Mashup (JobMapper) using RoR http://saush.com/blog/?page_id=52 Resources for RoR development http://rubycorner.net/ Videos from RailsConf 2006 http://blog.scribestudio.com/pages/rails/ (there are no videos

posted anywhere from RailsConf 2007) Nice inspirational article: http://www.cio.com/article/125851/Why_Ruby_on_Rails_Succeed Very bragging like podcast, but ok once you get used to the tone: http://railsenvy.com/

top related