why ruby (on rails)? - polito.it · license why ruby (on rails)? 04/03/2015 27 this work is...
TRANSCRIPT
![Page 1: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/1.jpg)
Why Ruby (on Rails)?
Motivations Luigi De Russis
![Page 2: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/2.jpg)
A little bit of history
Course requirements
04/03/2015
2
Why Ruby (on Rails)?
![Page 3: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/3.jpg)
Goal and context, 2012
04/03/2015 Why Ruby (on Rails)?
3
Goal
design and implement a Social Network site
rapid prototyping
6 credits (course) module
Uniform students’ background
previous web programming course, here
Web architecture(s), HTML, CSS, JSP, …
all of you know Java
not everybody “loves” programming
![Page 4: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/4.jpg)
Goal and context, today
04/03/2015 Why Ruby (on Rails)?
4
Goal
design and implement a Social Network site
rapid prototyping
6 credits (course) module
Diverse students’ background
no previous web programming course, here
we need to speak about Web architecture(s)
most of you know Java
not everybody “loves” programming
this year, few of you already knows PHP
![Page 5: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/5.jpg)
What we are looking for...
04/03/2015
5
Why Ruby (on Rails)?
Good documentation
A main web framework (with batteries)
Active and compact community
Rapid development/prototyping
Object-oriented language
Usage of modern technologies (REST, Ajax, ...)
![Page 6: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/6.jpg)
Other (soft) requirements
04/03/2015 Why Ruby (on Rails)?
6
No old/inactive/deprecated technologies
Modern best practice should be enforced
Real-world usage in at least one Social Network
![Page 7: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/7.jpg)
Languages to consider
04/03/2015
7
Why Ruby (on Rails)?
Python PHP
Ruby Java
![Page 8: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/8.jpg)
When Java meets the Web…
Why not Java?
04/03/2015
8
Why Ruby (on Rails)?
![Page 9: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/9.jpg)
04/03/2015 Why Ruby (on Rails)?
9
“JSP technologies is considered to be a
deprecated presentation technology for
Java Server Faces 2.0”
- The Java EE 6 Tutorial, Oracle, 2010 (http://docs.oracle.com/javaee/6/tutorial/doc/giepx.html)
Java Server Pages (JSP)
![Page 10: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/10.jpg)
Java Server Faces (JSF)
04/03/2015
10
Why Ruby (on Rails)?
Sparse documentation
A lot of jars to download and install manually Java
Available frameworks not yet fully “compatible”
![Page 11: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/11.jpg)
Java Server Faces (JSF)
04/03/2015
11
Why Ruby (on Rails)?
Good documentation
A main web framework
Active and compact community
Rapid development/prototyping
Object-oriented language
Usage of modern technologies (REST, Ajax, ...)
![Page 12: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/12.jpg)
For the enterprise!
04/03/2015 Why Ruby (on Rails)?
12
Java Server Faces (JSF) is included in Java
Enterprise Edition
Alternative, for the Web: the Spring IO platform
motto: “Let’s build a better Enterprise”
http://spring.io
rapidly evolving
25 different projects (modules) in the entire platform
the Spring Framework is the core module we could be
interested in
![Page 13: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/13.jpg)
Java/Spring Framework
04/03/2015
13
Why Ruby (on Rails)?
Good documentation
A main web framework
Active and compact community
Rapid development/prototyping
Object-oriented language
Usage of modern technologies (REST, Ajax, ...)
![Page 14: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/14.jpg)
Why not PHP?
04/03/2015
14
Why Ruby (on Rails)?
![Page 15: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/15.jpg)
PHP
04/03/2015
15
Why Ruby (on Rails)?
Fragmented communities (for frameworks)
A lot of web frameworks (18 and growing)
A lot of dilectantism (bad for docs and problems)
Very spread
Little real-world usage of OOP
Very flexible
![Page 16: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/16.jpg)
PHP
04/03/2015
16
Why Ruby (on Rails)?
Good documentation
A main web framework
Active and compact community
Rapid development/prototyping
Object-oriented language
Usage of modern technologies (REST, Ajax, ...)
![Page 17: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/17.jpg)
When Python meets the Web…
Why not Python?
04/03/2015
17
Why Ruby (on Rails)?
![Page 18: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/18.jpg)
Django
04/03/2015
18
Why Ruby (on Rails)?
Speed and agility in building applications
Usage of conventions (DRY, ORM, sort of MVC)
Big community
Good documentation
Structured code
Neat markup
Open Source
Admin built-in
Do not include any modern Web technologies
DB Schema Migration included
Caching included
One of the web framework for Python
![Page 19: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/19.jpg)
Django in the real world...
04/03/2015 Why Ruby (on Rails)?
19
![Page 20: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/20.jpg)
Python/Django
04/03/2015
20
Why Ruby (on Rails)?
Good documentation
A main web framework
Active and compact community
Rapid development/prototyping
Object-oriented language
Usage of modern technologies (REST, Ajax, ...)
![Page 21: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/21.jpg)
When Ruby meets the Web…
So... Why Rails?
04/03/2015
21
Why Ruby (on Rails)?
![Page 22: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/22.jpg)
Ruby on Rails
04/03/2015
22
Why Ruby (on Rails)?
Speed and agility in building applications
Large usage of conventions (DRY, CoC, MVC, ORM)
Predefined file structure
Big community
Good documentation
Increasing efficiency
Neat markup and structured code
Open Source
No admin built-in
Include various modern Web technologies
DB Schema Migration
Caching included
The main web framework for Ruby
![Page 23: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/23.jpg)
Ruby on Rails in the real world...
04/03/2015 Why Ruby (on Rails)?
23
![Page 24: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/24.jpg)
Ruby/Ruby on Rails
04/03/2015
24
Why Ruby (on Rails)?
Good documentation
A main web framework
Active and compact community
Rapid development/prototyping
Object-oriented language
Usage of modern technologies (REST, Ajax, ...)
![Page 25: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/25.jpg)
Final thought...
04/03/2015
25
Why Ruby (on Rails)?
![Page 26: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/26.jpg)
The “right” tool for the job
04/03/2015 Why Ruby (on Rails)?
26
Goal of this module:
rapid prototyping a Social Network
using modern Web technologies
Rails seems to be the “right” tool, here
given your various background
given the course goals
Course-specific decision
it is not a dogma
no general choice/decision
![Page 27: Why Ruby (on Rails)? - polito.it · License Why Ruby (on Rails)? 04/03/2015 27 This work is licensed under the Creative Commons “Attribution- NonCommercial-ShareAlike Unported (CC](https://reader036.vdocuments.site/reader036/viewer/2022070720/5ee10ba6ad6a402d666c11e7/html5/thumbnails/27.jpg)
License
04/03/2015 Why Ruby (on Rails)?
27
This work is licensed under the Creative Commons “Attribution-NonCommercial-ShareAlike Unported (CC BY-NC-SA 3,0)” License.
You are free:
to Share - to copy, distribute and transmit the work
to Remix - to adapt the work
Under the following conditions:
Attribution - You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
Noncommercial - You may not use this work for commercial purposes.
Share Alike - If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/