Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction...
Transcript of Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction...
![Page 2: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/2.jpg)
Outline
● What is Spring Roo ?● Self-trained, documentations● 5 Minutes demo● Explained design principles● Eclipse and Roo
![Page 3: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/3.jpg)
In few Words
● Tool to Create a complete Web application ● In 2 Minutes● Including Database Persistence● With standards JAVA libraries only● No runtime dependency
● Make Java FUN, FAST, EASY
![Page 4: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/4.jpg)
http://www.infoq.com/presentations/Introducing-Spring-Roo
![Page 5: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/5.jpg)
Roo : Shell, Hint Command
![Page 6: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/6.jpg)
Why I didn't Heard About It Before ?
● Strange name … ● ROO = Real Object Oriented ● Now “Roo” … a name by itself
● Recent : 1.0.0.RELEASE in December 2009
● Concurrenced by Grails, Rails, Php● Roo is “only“ a tool above java standards
● Many many Java standards (spring, jpa, web, …)● Simple but underlying frameworks are “not”
![Page 7: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/7.jpg)
Google - Spring Roo
![Page 8: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/8.jpg)
Roo Home: http://www.springsource.org/spring-roo
![Page 9: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/9.jpg)
Wikipedia - Spring Roo
![Page 10: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/10.jpg)
Spring Roo Wikipedia ExplainedIn githubby springsource
shell window+ code generator .. NO runtime
Like Ruby-On-Rails, Grails
Simplify code (spring annotations ...)
Standards JAVA
![Page 11: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/11.jpg)
Roo = Java Standards
Extensibitly Plugins
![Page 12: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/12.jpg)
Comparison Building Blocks – Strength
PHP
Grails (runtime ... Groovy syntax)
PythonRuby
Java JVM --- Stable - Efficient
Oracle SunSTABLE …But NO Innovation
Glue: Spring, Maven, AspectJ ... Jakarta, SpringSource, Eclipse, ...(Open Source )
Roo SpringSource, OpenSourceINNOVATION
Custom Langages,Isolated, Un-efficientRe-invent wheel
JdbcHibernate
Jsp JSRs Mail,Jms
RestJson
![Page 13: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/13.jpg)
Rod Johnson: the Future Of Java Innovation
![Page 14: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/14.jpg)
Install
![Page 15: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/15.jpg)
Getting Started
● Open shell window, Type “roo”
● Interactively :● Type “hint” for wizard● “tab” for autocompletion on mandatory args● “--” then “tab” for optional args● “help” : list all commands● “help <<command>>”
● Execute tutorial script “script <<file>>”
![Page 16: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/16.jpg)
Sample Script
● Cf in roo/examples/<<project>>.roo● Cf in your project log.roo● Sample:
![Page 17: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/17.jpg)
Compile, Test & Run It
● Compile:● Use maven from shell: $ mvn install● From roo: roo> perform package
● Test:● $ mvn tomcat:run● open http://localhost:8080/test
● Import in Eclipse:● Using m2eclipse … import as maven project● (old: “perform eclipse” or “mvn eclipse:eclipse” )
![Page 18: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/18.jpg)
Running CRUD !
create
Create
list, new, edit, delete
List
Show, edit, delete
list
UpdateShow
![Page 19: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/19.jpg)
Small Is Beautiful … KISS
● See ALL User Code in Eclipse (not Generated )
![Page 20: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/20.jpg)
Where Is The Magic ?
![Page 21: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/21.jpg)
User Code + ITD ==AspectJ==> Bytecode
![Page 22: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/22.jpg)
Video – Demo Tutorial
http://s3.springsource.com/MRKT/roo/2010-01-Five_Minutes_Roo.mov
Cf from Home Page :
![Page 23: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/23.jpg)
Video from Ben Alexhttp://www.infoq.com/presentations/Introducing-Spring-Roo
![Page 24: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/24.jpg)
Tutorial
![Page 25: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/25.jpg)
Books
http://spring-roo-repository.springsource.org/Getting_Started_with_Roo.pdf
![Page 26: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/26.jpg)
Source Code
![Page 27: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/27.jpg)
http://www.infoq.com/presentations/Introducing-Spring-Roo
![Page 28: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/28.jpg)
![Page 29: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/29.jpg)
Eclipse AspectJ – Push In...
![Page 30: Cours IUT – CSID 2012arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-SpringRoo.pdf · An Introduction to Spring Roo arnaud.nauwynck@gmail.com. Outline ... Concurrenced by Grails, Rails,](https://reader034.fdocuments.us/reader034/viewer/2022042307/5ed3df6973d3d24575700df0/html5/thumbnails/30.jpg)
Happy Runtime End – Roo is gone