Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Introduction to Spring Roo

USyd guest lecture - 04-09-2012

Geoff Chiang

on 5 September 2012

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Introduction to Spring Roo

Introduction to Spring Roo Presented by Geoff Chiang Creative and critical thinkers wanted… We are looking for people with…
Superb communication skills
Strong core programming skills
A passion for software development …code monkeys need not apply Send applications to engineers@tyro.com
More info at http://www.tyro.com/begin/careers Working at Tyro Engineering-driven company
Building solutions that make a difference to Australian businesses
eXtreme Programming (XP)
Small, talented and passionate team
Individual contributions count
Working on more than "just another webapp" About Tyro Payments Australia's first and only fully-independent EFTPOS acquirer
Located in the heart of the Sydney CBD
About 70 staff, currently 20 software developers
BRW Fast 100
2010 - 4th
2011 - 7th Introducing Spring Roo History of Spring Roo Ben Alex, Principal Software Engineer with SpringSource, came up with the idea in 2005
The project's initial code-name was "ROO" (Real Object Oriented)
Ben did some demonstrations of the project during 2006-2007
Technology demonstration during keynote of the SpringOne Europe conference in April 2009
Version 1.0.0 released in December 2009
Current release version is 1.2.2 Key technologies Spring framework
AspectJ (inter-type declarations)
Java Persistence API
Java Bean Validation (JSR-303)
Spring MVC, JSF, GWT
Hibernate, OpenJPA
Maven Rapid application development tool for Java developers
Mission statement: "(to) fundamentally and sustainably improve Java developer productivity without compromising engineering integrity or flexibility"
Generates boilerplate configuration
Hides boilerplate Java code
Caters for a wide range of technology choices via an extensible plug-in system Working with Roo Analyse your problem domain and create a domain model
Pick your technology stack
Create and execute your Spring Roo script
Customise the results Let's work through an example Tyro is hiring! We need something to keep track of all the job applications we receive.
Candidates apply by sending a resumé, either directly to us, or via a recruiter
Applications go through our application process (resumé review, phone interview, etc)
A decision on the candidate's application is made at the end of the application process About me Education
2000 - Bachelor of Commerce (Finance) / Bachelor of Laws (UNSW)
2004 - Graduate Diploma in Information Technology (UTS) Experience
2001-2004 - Consultant at Accenture
2004-2005 - Analyst/Programmer at Australian Securities Exchange
2006-present - Software Engineer at Tyro Payments The Roo shell Spring Tool Suite IntelliJ IDEA Good ol' console Using the Roo shell Roo applications are built by entering commands into the shell
The "project" command gets you started Creating entities The "jpa setup" command configures your project for database access The "enum" command creates Java enumerations The "entity jpa" and "field" commands are used to create the entities The "embeddable" command creates embeddable types The "field reference" and "field set" commands create entity relationships Creating the web layer Choice of Spring MVC, JSF or GWT
The "web" commands generate controllers and views for your entities What did Roo create? The "finder list" and "finder add" commands create query methods for your entities Annotated entity classes AspectJ ITDs gchiang@tyro.com What did Roo create? Annotated controller classes Views Customising the output Push-in refactoring Part of getting our resumé upload functionality working involves customising the "create candidate" function Push-in refactoring Voilà! The code is pushed from the ITD into the controller. Navigate to the method to push-in and select Refactor > Push In Customising views Don't program by coincidence! Professionals learn the theory before they learn the tools
Roo is a tool, not a replacement for knowledge and expertise in the underlying technologies
If you want to develop anything remotely complex using Roo, you still need to know the intricacies of Spring, Hibernate… Customising code The code in the AspectJ ITDs is managed by Roo - hands off!
The code in controllers and entities can be customised
Move code from ITDs to controllers and entities by "pushing the code" into those classes The "z" attribute lets Roo know whether you've made changes to a form tag Page layouts can be changed by modifying the Tiles configurations Java is great... …but Java development can be sloooow! Paradoxically, the wealth of choices that make Java great can also cause great confusion Java enterprise application configuration is both complex and verbose spring-context.xml web.xml hibernate.cfg.xml spring-webapp-context.xml persistence.xml spring-security.xml pom.xml server.xml Java class files can be filled
with boilerplate accessors mutators toString equals hashCode One possible design… (obviously, there is more than one way to skin a cat…) What else can Roo do? Integration test generation
Database reverse engineering
Spring Web Flow
Spring Integration
Apache Solr
Quite a bit more - check out the list of integrations on the Spring Roo website Using the Roo shell The current context is displayed before the prompt, and the context can be changed with the "focus" command A tilde "~" can be used to refer to the top level package in subsequent commands The "hint" command provides guidance relevant to the current context The Roo shell Securing the application The "security setup" command configures your project with Spring Security
You still need to configure the actual authentication rules and provider! In summary… Spring Roo is a great tool for speeding up Java enterprise application development
Model your domain, choose your technologies, create your entities, generate your views, customise
Know the underlying technologies! Thank you for listening! Remember, if you're interested in a career with Tyro, check out our careers information page at http://www.tyro.com/begin/careers

Applications can be sent to engineers@tyro.com
Full transcript