Java Code Generation for Productivity

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    Java Code Generation for Productivity - Presentation Transcript

    1. Practical Code Generation: Java Productivity Enhancement
        • David Noble
        • [email_address]
        • Sr. Solutions Architect, Exist Global
        • San Gabriel Valley Java Users Group
        • http://www.sgvjug.org/
        • February 25, 2008
    2. Target
      • Faster development
      • Less defects
      http://flickr.com/photos/ntang/21736774
    3. Target http://flickr.com/photos/ntang/21736774 Tools Practices Productivity
    4. Java
      • public List getIds(List items) {
      • List result = new ArrayList();
      • Iterator itemIterator = items.iterator();
      • while (itemIterator.hasNext()) {
      • item = (Item) itemIterator.next();
      • result.add(item.getId());
      • }
      • return result;
      • }
      Example from Matt Good @ matt-good.net
    5. Java
      • public List<ItemId> getIds(List<Item> items) {
      • List<ItemId> result = new ArrayList<ItemId>();
      • for (Item item : items) {
      • result.add(item.getId());
      • }
      • return result;
      • }
      Example from Matt Good @ matt-good.net
    6. Python
      • def get_ids(items):
      • return [item.id for item in items]
    7. Verbosity
      • “ Succinctness is power”
        • Paul Graham [1]
      • Case study [citation needed]
        • Yellowpages.com
        • Originally in Java: 100 KLOC
        • Converted to Rails: 10 KLOC
          • [1] http://www.paulgraham.com/power.html
    8. Defect Rates
      • Bugs/LOC is basically constant
        • CMU study [citation needed]
      • LOC/day is basically constant
        • Fred Brooks
    9. Syntax
      • Declarations
      • Casting
      • Generics
      • Data structures
      • Helper classes
    10. Meta-programming Issues
      • Annotations
      • Reflection
      • Aspect-Oriented Programming (AOP)
      • Bytecode manipulation
    11. Startup Weekend
      • One weekend to launch
      • Over a dozen companies started
      • Only 1 chose Java
    12. DEMO Rails web application
    13. Rails Productivity
      • Project generation
      • File generation
      • Model-driven framework
      • Meta-programming
    14. DEMO Basic Java application
    15. Java Productivity: IDE
      • Project generation
      • File generation
      • Code snippet generation
    16. Java Productivity: Language
      • Annotations (JSR 175)
        • Metadata
        • Design time for tools
        • Execution time
    17. Java Productivity: Framework
      • Model-driven frameworks
        • Grails
        • Wicket
        • NakedObjects
        • OpenXava
    18. Java Productivity: AOP
      • Aspect - feature
      • Advice - behavior
      • Joinpoint - execution trigger
      • Pointcut - set of joinpoints
      • Targets - objects to apply aspects to
      • Introduction - add methods to object
    19. Bytecode Manipulation
      • Example: persistence injection
        • Hibernate
        • TopLink
      • Libraries, etc
        • ASM, BCEL, CGLIB, Javassist, JiBX
    20. DEMO AppFuse
    21. DEMO GUI Builder
    22. SOAP Web Services
      • WSDL to Java
      • Java to WSDL
    23. Application Generators
      • CASE revisited
    24. Resources
    25. Resources
      • Code Generation Network
        • http://codegeneration.net/
    26. Resources
      • Eclipse macros
        • Window > Preferences > Java > Editor > Templates
      • Annotations
        • http://java.sun.com/javase/6/docs/technotes/guides/language/annotations.html
        • http://www.developer.com/java/other/article.php/3556176
        • http://jcp.org/en/jsr/detail?id=175
      • Maven archetypes
        • http://maven.apache.org/guides/introduction/introduction-to-archetypes.html
    27. Resources
      • AppFuse
        • http://appfuse.org/display/APF/AppFuse+Maven+Plugin
      • GWT
        • http://code.google.com/webtoolkit/
    28. Resources
      • Wicket
        • http://wicket.apache.org/
      • Grails
        • http://grails.org/
      • NakedObjects
        • http://www.nakedobjects.org/
    29. Resources
      • Metro (JAX-WS et al)
        • https://metro.dev.java.net/
      • Axis2
        • http://ws.apache.org/axis2/
      • CXF (formerly XFire)
        • http://cxf.apache.org/
    30. Resources
      • Netbeans Matisse
        • http://www.netbeans.org/features/java/swing.html
      • Eclipse VE
        • http://wiki.eclipse.org/VE
    31. Resources
      • AOP (Aspect Oriented Programming)
      • AspectJ
        • http://www.eclipse.org/aspectj/
      • JBoss AOP
        • http://www.jboss.org/jbossaop/
      • Spring
        • http://springframework.org/about
    32. Resources
      • Eclipse JET
        • http://www.eclipse.org/modeling/m2t/?project=jet
      • Eclipse EMF
        • http://www.eclipse.org/modeling/emf/
    33. Resources
      • Sculptor
        • http://fornax-platform.org/cp/display/fornax/Sculptor+(CSC)
        • http://www.theserverside.com/tt/articles/article.tss?l=ProductivityWithSculptor
      • OptimalJ
        • http://frontline.compuware.com/javacentral/tools/
    34. Resources
      • MDA (model driven architecture)
        • http://www.omg.org/mda/
      • Executable UML
        • http://en.wikipedia.org/wiki/Executable_UML
    35. DISCUSSION Productivity, practices, tools Thanks for coming! David Noble [email_address]

    + David NobleDavid Noble, 12 months ago

    custom

    1518 views, 2 favs, 0 embeds more stats

    Using code generation to enhance developer producti more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1518
      • 1518 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 64
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories