Stripes RJUG March 2012

624 views

Published on

Presentation on Stripes at the March 2012 Richmond Java Users Group (RJUG).

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

Stripes RJUG March 2012

  1. 1. INTRO TO STRIPES RICHMOND JUG — MARCH 2012
  2. 2. AUDIENCE PARTICIPATION THANK YOU ICF IRONWORKS... ROUND II THANK YOU STACKEXCHANGE! C.H.A.O.S.* HAT TIP TO ‘MXYZPLK’ ON RPG.STACKEXCHANGE.COM MIX-EE-YEZ-PIT-LIK KEL-TIP-ZIX-UM* CHEERFUL HAPPY ADVOCATES OF STACKEXCHANGE
  3. 3. AUDIENCE PARTICIPATION THANK YOU ICF IRONWORKS... ROUND II THANK YOU STACKEXCHANGE! C.H.A.O.S.* HAT TIP TO ‘MXYZPLK’ ON RPG.STACKEXCHANGE.COM MIX-EE-YEZ-PIT-LIK KEL-TIP-ZIX-UM* CHEERFUL HAPPY ADVOCATES OF STACKEXCHANGE
  4. 4. AUDIENCE PARTICIPATION THANK YOU ICF IRONWORKS... ROUND II THANK YOU STACKEXCHANGE! C.H.A.O.S.* HAT TIP TO ‘MXYZPLK’ ON RPG.STACKEXCHANGE.COM MIX-EE-YEZ-PIT-LIK KEL-TIP-ZIX-UM* CHEERFUL HAPPY ADVOCATES OF STACKEXCHANGE
  5. 5. ABOUT THE PRESENTERTIMOTHY STONEA SCJP WEB TIER ARCHITECT AND UX/UI ADVOCATESTRIPES COMMITTERGNUPG/PGP FINGERPRINT0248 FAD3 D6BE 008C 27C8 7A72 7249 DE33 22A5 2C82RPG ADVOCATEREFEREES WFRP... OK, PLAYS PATHFINDER TOO(AND LOOKING FOR A GROUP)GOOGLE PROFILEJAVAFUELED@GMAIL.COM
  6. 6. THE PITCHSTRIPES IS A PRESENTATION FRAMEWORK FOR BUILDING WEBAPPLICATIONS USING THE LATEST JAVA TECHNOLOGIES.STRIPES GOALS MAKE DEVELOPING WEB APPLICATIONS IN JAVA EASY...??? PROVIDE SIMPLE YET POWERFUL SOLUTIONS TO COMMON PROBLEMS MAKE THE STRIPES RAMP UP TIME FOR A NEW DEVELOPER LESS THAN 30 MINUTES MAKE IT REALLY EASY TO EXTEND STRIPES, WITHOUT MAKING YOU CONFIGURE EVERY LAST THING
  7. 7. THE BASE HITZERO EXTERNAL CONFIGURATION PER PAGE/ACTION (ACTIONBEANS ARE AUTO-DISCOVERED, AND CONFIGURED USING ANNOTATIONS)POWERFUL BINDING ENGINE THAT WILL BUILD COMPLEX OBJECT WEBS OUT OF THEREQUEST PARAMETERSEASY TO USE (AND LOCALIZED) VALIDATION AND TYPE CONVERSION SYSTEMLOCALIZATION SYSTEM THAT WORKS EVEN WHEN YOU USE DIRECT JSP ⇢ JSP LINKSABILITY TO RE-USE ACTIONBEANS AS VIEW HELPERSEASY TO USE INDEXED PROPERTY SUPPORTBUILT IN SUPPORT FOR MULTIPLE EVENTS PER FORMTRANSPARENT FILE UPLOAD CAPABILITIESSUPPORT FOR INCREMENTAL DEVELOPMENT (E.G. YOU CAN BUILD AND TEST YOUR JSPBEFORE EVEN THINKING ABOUT YOUR ACTIONBEAN)
  8. 8. MY INTRODUCTIONCONTEXT GOES A LONG WAY, SO ... START WITH 10 YEAR OLD LEGACY CREDIT CARD APPLICATION PLATFORM STRUTS 1.0.2, NO JSTL, WEBLOGIC 10.X STRUTS 2? SPRING MVC + WEBFLOW? OTHERS?
  9. 9. LEGACY PLATFORM10 YEARS OF CRUFTLAZY ENGINEERS PUSHING BUSINESS LOGIC TO FRONTSIGNIFICANT SCRIPTINGHEAVY JSP-BY-WAY-OF-PERL-LIKE ENGINEERINGTHE CODE IS THE DOCUMENTATION (WEAK JAVADOC)STRUTS 1.0.2
  10. 10. GOALSREMOVE THE CRUFT, DECODE, INTERVIEW, DOCUMENTPUT BUSINESS IN CONTROL AND REDUCE ERRORSUPDATE PLATFORM FRONT TO BACKELIMINATE SCRIPTING AND ENFORCE MVC PATTERNSSIMPLIFY DEVELOPMENT — FULL IDE DEV LIFECYCLE SOLVE THE PROBLEM OF ON-BOARDING JUNIOR DEVELOPERS
  11. 11. HttpSession IS NOT A BAG OF HOLDINGMAKE CODE REVIEWS PART OF GOVERNANCECRUCIBLE+FISHEYEWHY ARE WE PROCESSING THE VIEW THROUGHINCLUSION FILTERS AGAIN?CAMPAIGNS HAVE EXPIRATION DATES. WHAT HAPPENSON EXPIRATION? WHAT REGULATIONS ARE APPLICABLEON EXPIRATION?JAVADOC, DESIGN DOCUMENTS, BUSINESS PROCESSES REMOVE THE CRUFT, DECODE, INTERVIEW, DOCUMENT
  12. 12. GOALSREMOVE THE CRUFT, DECODE, INTERVIEW, DOCUMENTPUT BUSINESS IN CONTROLREDUCE ERRORSUPDATE PLATFORM FRONT TO BACKELIMINATE SCRIPTING AND ENFORCE MVC PATTERNSSIMPLIFY DEVELOPMENT — FULL IDE DEV LIFECYCLESOLVE THE PROBLEM OF ON-BOARDINGJUNIOR DEVELOPERS
  13. 13. BUSINESS KNOWS THE DURATION OF A CAMPAIGNAND THE EXPIRATION DATEBUSINESS KNOWS HOW A CAMPAIGN EXPIRES, THEREGULATION, AND THE REPLACEMENT CAMPAIGNBUSINESS ALREADY HAS BOTH THE REPOSITORY ANDTHE CHANGE CONTROL IN PRODUCTIONREMOVE DEVELOPMENT FROM CAMPAIGN DATAMANAGEMENT PUT BUSINESS IN CONTROL
  14. 14. GOALSREMOVE THE CRUFT, DECODE, INTERVIEW, DOCUMENTPUT BUSINESS IN CONTROLREDUCE ERRORSUPDATE PLATFORM FRONT TO BACKELIMINATE SCRIPTING AND ENFORCE MVC PATTERNSSIMPLIFY DEVELOPMENT — FULL IDE DEV LIFECYCLESOLVE THE PROBLEM OF ON-BOARDINGJUNIOR DEVELOPERS
  15. 15. THE BUSINESS TOOLS ALREADY HAVE ALL THECAMPAIGN DATA, STOP REKEYING IT REDUCE ERRORS
  16. 16. GOALSREMOVE THE CRUFT, DECODE, INTERVIEW, DOCUMENTPUT BUSINESS IN CONTROLREDUCE ERRORSUPDATE PLATFORM FRONT TO BACKELIMINATE SCRIPTING AND ENFORCE MVC PATTERNSSIMPLIFY DEVELOPMENT — FULL IDE DEV LIFECYCLESOLVE THE PROBLEM OF ON-BOARDINGJUNIOR DEVELOPERS
  17. 17. UI 10 YEARS OLDSERVICES. SERVICES. SERVICES.GRADUATE DATA UPDATE PLATFORM FRONT TO BACK
  18. 18. GOALSREMOVE THE CRUFT, DECODE, INTERVIEW, DOCUMENTPUT BUSINESS IN CONTROLREDUCE ERRORSUPDATE PLATFORM FRONT TO BACKELIMINATE SCRIPTING AND ENFORCE MVC PATTERNSSIMPLIFY DEVELOPMENT — FULL IDE DEV LIFECYCLESOLVE THE PROBLEM OF ON-BOARDINGJUNIOR DEVELOPERS
  19. 19. WHEN ONE SEES A JSP LIKE THIS:<%@ page import=”...”%><% Enumeration e = request.getParameters(); while(e.hasMoreElements()) { //put parameters on session } ... ... ... // 200 lines later%>IT’S TIME TO READ THE JSP SPECIFICATION.PAYING CLOSE ATTENTION TO 3.3.3:<jsp-property-group> <url-pattern>*.jsp</url-pattern> <scripting-invalid>true</scripting-invalid></jsp-property-group> ELIMINATE SCRIPTING AND ENFORCE MVC PATTERNS
  20. 20. GOALSREMOVE THE CRUFT, DECODE, INTERVIEW, DOCUMENTPUT BUSINESS IN CONTROLREDUCE ERRORSUPDATE PLATFORM FRONT TO BACKELIMINATE SCRIPTING AND ENFORCE MVC PATTERNSSIMPLIFY DEVELOPMENT — FULL IDE DEV LIFECYCLESOLVE THE PROBLEM OF ON-BOARDINGJUNIOR DEVELOPERS
  21. 21. EVER TRIED TO RUN WEBLOGIC 10.X LOCALLY? ON WINXP? 4GB... NO, 3GB RAM?EVER ASKED A JUNIOR DEVELOPER TO DO IT?EVER ASKED A JUNIOR DEVELOPER SETUP MAVENRUNNING, DEPLOY TO WEBLOGIC, DEBUG A JSP... OH,BUT NOT BEFORE INSTALLING ECLIPSE? SIMPLIFY DEVELOPMENT — FULL IDE DEV LIFECYCLE
  22. 22. GOALSREMOVE THE CRUFT, DECODE, INTERVIEW, DOCUMENTPUT BUSINESS IN CONTROLREDUCE ERRORSUPDATE PLATFORM FRONT TO BACKELIMINATE SCRIPTING AND ENFORCE MVC PATTERNSSIMPLIFY DEVELOPMENT — FULL IDE DEV LIFECYCLESOLVE THE PROBLEM OF ON-BOARDINGJUNIOR DEVELOPERS
  23. 23. HOW DO WE GET TO “FULL IDE DEV CYCLE”? CALL IT “PRESS THE GREEN BUTTON” OR “PRESS PLAY” DEVELOPMENTSOLVE THE PROBLEM OF ON-BOARDING JUNIOR DEVELOPERS
  24. 24. GOALSREMOVE THE CRUFT, DECODE, INTERVIEW, DOCUMENTPUT BUSINESS IN CONTROLREDUCE ERRORSUPDATE PLATFORM FRONT TO BACKELIMINATE SCRIPTING AND ENFORCE MVC PATTERNSSIMPLIFY DEVELOPMENT — FULL IDE DEV LIFECYCLESOLVE THE PROBLEM OF ON-BOARDINGJUNIOR DEVELOPERS
  25. 25. EVALUATIONSAPPLY GOALS TO SOLUTIONS IN EVALUATIONNO ONE SELLS MVC FRAMEWORKS, ONLY SUPPORTMEET THE CHALLENGERS: STRUTS SPRING MVC STRIPES
  26. 26. STRUTS EVALUATIONLEGACY ON STRUTS 1.0.2 STRUTS 1.2 MODERATE REENGINEERING; perform DEPRECATED STRUTS 1.3 SIGNIFICANT REENGINEERING, NIGH REWRITE; execute STRUTS 2 FULL REWRITEPROS: DEVELOPER AVAILABILITYCONS: VERSION CEILING WITHOUT FULL REWRITE
  27. 27. SPRING MVC EVALUATIONPROS SUBJECTIVELY SPEAKING: BETTER THAN STRUTS 2 DEVELOPER AVAILABILITY STACK INTEGRATIONCONS SOME CONVENTION, MOSTLY CONFIGURATION FULL REWRITE
  28. 28. COMMON PAIN POINTSNO ESCAPING FULL REWRITEFRAMEWORKS MAY ADD NEW TECHNOLOGIES TO LEARNENGINEER CENTRICCONFIGURATION VERSUS CONVENTION
  29. 29. STRIPES EVALUATIONPROS LIGHTWEIGHT ALL CONVENTION FEATURE RICH AND LATENT FUNCTIONALITYCONS DEVELOPER AVAILABILITY FULL REWRITE
  30. 30. LEGACY TO NEXT GENSTRIPES VS. ET. AL... STRIPES PREVAILS. HOW? WHY? THE STRIPES PROTOTYPE TEAM DELIVERED COMPLETE FEATURES TWO WEEKS BEFORE STRUTS AND SPRING STRUTS AND SPRING TEAMS COULD NOT DEMONSTRATE KEY PATCH AND DEPLOYMENT REQUIREMENTSSTRIPES SOLVED SIMPLY WHERE STRUTS AND SPRINGREQUIRED NEW LEARNING AND OPERATIONAL CHANGEENGINEERS CAN DIG TO EXPLOIT, BUT GETS OUT OF THEWAY FOR EVERYONE ELSE
  31. 31. LEGACY TO NEXT GENMAVENIZE APPLICATION END-TO-END ALL SERVICES ALL CONTENT ...EVERYTHINGWE’LL SEE SOME OF CONTENT AND LOGIC TONIGHT
  32. 32. STRIPES... AND JAVA WEBDEVELOPMENT IS FUN AGAIN*COVERED ACTION BEANS AND AUTO CONFIGURATION EVENT HANDLING LAYOUTS VALIDATION GET-AFTER-POSTNOT COVERED SPRING BEANS, HIBERNATE (STRIPERSIST), ETC. INTERCEPTORS AND STRIPES REQUEST LIFECYCLE WIZARDS* FREDDY DAOUD, AUTHOR
  33. 33. STRIPES MAVEN QUICKSTART NETBEANS BUG 208146 NOT IN MAVEN CENTRAL... YET. BUT SOON.BASIC ACTIONBEANWEB.XMLSO? WONDER WHERE STRUTS 2 GOT THE IDEA? ACTION BEANS AND AUTO CONFIGURATION
  34. 34. STRIPES EVENTS ARE VIEW RESOLUTIONSEASILY ENFORCES THE PRE-ACTION PATTERN IN MVCBASIC ACTIONBEANADVANCED ACTIONBEANRESOLUTION VARIETY FORWARD, REDIRECT, JAVASCRIPT, STREAMING, ERROR... EXTENDABLE EVENT HANDLING
  35. 35. STRIPES LAYOUT TAG LIBRARY SIMPLE AND ROBUST DYNAMIC WEBLOGIC 10.X ISSUE AND WORKAROUNDSIMPLE EXAMPLECOMPLEX EXAMPLE LAYOUTS
  36. 36. STRIPES VALIDATION GETS OUT OF THE WAY ZERO, NADA, NO EXTERNAL CONFIGURATION FULLY ANNOTATED IN ACTIONBEANS NIGH INSTANT SERVER SIDE VALIDATION; EASILY COUPLED WITH CLIENT SIDE VALIDATION DYNAMIC AND EXTENSIBLE COMPLEX VALIDATION THROUGH TYPE CONVERTERS FORMATTERSSIMPLE EXAMPLE BASIC FIELD VALIDATIONCOMPLEX EXAMPLE OBJECT VALIDATION AND VALIDATION METHODS VALIDATION
  37. 37. WHAT IS THIS... GET-AFTER-POST?WHY?HOW STRIPES MAKES IT EASY GET-AFTER-POST
  38. 38. RESOURCESIRC.FREENODE.NET#STRIPESUSER AND DEVELOPER MAILING LISTSWWW.STRIPESFRAMEWORK.ORGSTRIPES...AND JAVA WEB DEVELOPMENT IS FUN AGAINBY FREDERIC DAOUD (PRAGPROG PRESS)THE SOURCE IS ... ACTUALLY READABLE!
  39. 39. RESOURCESIRC.FREENODE.NET#STRIPESUSER AND DEVELOPER MAILING LISTSWWW.STRIPESFRAMEWORK.ORGSTRIPES...AND JAVA WEB DEVELOPMENT IS FUN AGAINBY FREDERIC DAOUD (PRAGPROG PRESS)THE SOURCE IS ... ACTUALLY READABLE!

×