Top Banner
Produk’ve Entwicklung mit Spring Roo Eberhard Wolff SpringSource – A division of VMware
35
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: More Productivitiy with Spring Roo

Produk've  Entwicklung  mit  Spring  Roo  

Eberhard Wolff SpringSource – A division of VMware

Page 2: More Productivitiy with Spring Roo

About  Eberhard  Wolff  •  Principal  Technologist  •  Consultant  &  Trainer  •  Author  (e.g.  first  German  Spring  book)  

•  [email protected]  •  TwiGer:  @ewolff  •  Blog:  hGp://ewolff.com  •  hGp://slideshare.net/ewolff  

Page 3: More Productivitiy with Spring Roo

Spring's  Mission  

Page 4: More Productivitiy with Spring Roo

#1  :  J2EE  should  be  easier  to  use  

Page 5: More Productivitiy with Spring Roo

Mission  Accomplished!  

Page 6: More Productivitiy with Spring Roo

How  can  we  make  live  even  easier?  

Page 7: More Productivitiy with Spring Roo

We  need  to  improve  in  other  areas.  

Page 8: More Productivitiy with Spring Roo

Build  

Page 9: More Productivitiy with Spring Roo

Raise  the  level  of  abstrac'on  

Page 10: More Productivitiy with Spring Roo

We  mostly  create  domain  models  +  logic  working  on  it  

Page 11: More Productivitiy with Spring Roo

Development  tool  

Page 12: More Productivitiy with Spring Roo

Roo  

Page 13: More Productivitiy with Spring Roo

"Roo's mission is to fundamentally and sustainably

improve Java developer productivity without

compromising engineering integrity or flexibility"

Roo's  Mission  Statement  

Page 14: More Productivitiy with Spring Roo

"Roo is a little genie who sits in the background and handles the

things I don't want to worry about"

End  User  

Page 15: More Productivitiy with Spring Roo

"Roo is a like a text adventures of the 80ies – it even gives you

hints!"

Page 16: More Productivitiy with Spring Roo

Demo  Time!    

Page 17: More Productivitiy with Spring Roo

You  saw…  •  Domain  objects  •  Finder  •  MVC  support  •  Web  applica'on  customiza'on  •  Embedding  TwiGer/Google  Docs  etc.  •  I18n  •  Security  

•  You  can  add  your  own  code  

Page 18: More Productivitiy with Spring Roo

Not  shown  •  Database  reverse  engineering  •  JSON  •  GWT  support  •  SOLR  support  (search)  •  Spring  Web  Flow  support  •  SELENIUM  web  tests  •  Google  App  Engine  Support  

Page 19: More Productivitiy with Spring Roo

Roo  Benefits  •  Proven  language,  tooling,  libraries  …  •  No  run'me  overhead  •  Can  be  removed  from  project  (Inter  type  declara'on  push  in)  

•  Can  also  be  used  from  the  shell  (with  vi  or  Emacs)  •  Extensions  possible  

Page 20: More Productivitiy with Spring Roo

Roo Infrastructure

Implementa'on  Overview  

User's Project

.aj .xml .jsp .properties

Roo Add-Ons Roo

Add-Ons Roo Add-Ons @Roo

Annotations provide

source only retention

.java

monitor and change

Roo Add-Ons

STS

Shell

Page 21: More Productivitiy with Spring Roo

AspectJ ITDs

Ac've  Genera'on  

Person_Roo_ ToString.aj

toString():String

Person.java

name:String

write

Person_Roo_ JavaBean.aj

getName():String

setName(String):void

read Roo Add-Ons Roo

Add-Ons Roo Add-Ons Roo

Add-Ons

Person.class

name:String toString():String

getName():String setName(String):void

AspectJ Compiler

read read

write Compilation unit separation with automated round-trips

Page 22: More Productivitiy with Spring Roo

Add  ons  •  May  add  commands  •  May  add  ITDs  or  other  files  

•  Can  be  ac'vated  if  changes  occur  •  Metadata  events  send  out  

Page 23: More Productivitiy with Spring Roo

Removing  Roo  in  Three  Steps  1  Use  AJDT's  “push-­‐in  refactoring”  feature  

– This  moves  the  Roo  .aj  content  into  normal  .java  files  2  Remove  Roo's  annota'on  JAR  from  your  POM  

– You  can  use  Roo's  “dependency  remove”  command  3  Remove  @Roo*  annota'ons  from  .java  files  

– Use  a  regular  exp  find/replace  in  Eclipse  for  speed  

•  You  can  s'll  use  Roo  on  the  project  again  –  Its  “hands  off  by  default”  will  ensure  it's  problem-­‐free  

Page 24: More Productivitiy with Spring Roo

springsource.org/roo  

Page 25: More Productivitiy with Spring Roo
Page 26: More Productivitiy with Spring Roo

Full  visibility  in  the  performance  for  each  Request  

Page 27: More Productivitiy with Spring Roo

Spring  Beans,  Transac'ons,  

SQL,  HTTP  …  

Page 28: More Productivitiy with Spring Roo

2  Steps  

Page 29: More Productivitiy with Spring Roo

#1  Deploy  applica'on  on  tc  Server  developer  edi'on  

Page 30: More Productivitiy with Spring Roo

#2  Go  to  localhost:8080/insight  

Page 31: More Productivitiy with Spring Roo

Demo  Time!  hGp://www.youtube.com/    watch?v=P_EskssNDU8  

Page 32: More Productivitiy with Spring Roo

How  it  fits  in  our  strategy  

Page 33: More Productivitiy with Spring Roo

A  division  of  VMware  

Lightweight  App  Run'me  

Virtual  App  Environment  

Hybrid  Cloud  

Spring  tc  Server  

VM  

Spring  tc  Server  

Lightweight  App  Framework  

Page 34: More Productivitiy with Spring Roo

Conclusion  •  Roo  is  based  on  established  technologies  

•  Spring,  AspectJ,  JPA…  •  ITDs  separate  clearly  generated  from  non-­‐generated  code  

•  Tackles  build,  development  tool  etc  •  Flexible  architecture:  You  can  add  your  own  add  ons  

•  And:  Spring  Insight  can  be  used  for  performance  op'miza'on  of  Spring  Apps  

Page 35: More Productivitiy with Spring Roo

The  Approach  Revisited  •  You  do  the  domain  model  –  Roo  does  the  rest    •  Opinionated:  Sensible  defaults  

•  No  lock  in  – Source  level  annota'ons  – Push  In  refactoring  can  be  used  to  eliminate  Roo  

•  You  have  nothing  to  loose  –  much  to  gain!