Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
HOW TO MAKE A
 FRAMEWORK PLUGIN
THAT DOES NOT SUCK
       by Max Rydahl Andersen, Red Hat
WHICH OF THESE ARE
   FRAMEWORK PLUGINS ?
• Hibernate Tools           • Seam Tools
• Eclipse   JDT             • SpringIDE...
TYPICAL KEY FUNCTIONS
•   Provide support for a (Java) framework

•   To be used by new and seasoned developers

•   Setup...
FRAMEWORK PLUGINS
• Hibernate Tools           • Seam Tools
• Eclipse   JDT             • SpringIDE
• JUnit   Plugin       ...
DEVELOPERS, DEVELOPERS,
     DEVELOPERS, ...
DEVELOPERS, DEVELOPERS,
     DEVELOPERS, ...
                                       ...are lazy
                          ...
HOW DO
   WE SUPPORT
 LAZY DEVELOPERS
THAT DOESN’T READ ?
DEFAULTS BASED ON
CURRENT SELECTION
DEFAULTS BASED ON
  CURRENT SELECTION


       s !
   c k
S u
HOW DO
     WE SUPPORT
     DEVELOPERS
      THAT USES
MULTIPLE FRAMEWORKS ?
s !
   c k
S u
s !
   c k
S u
s !
   c k
S u         S uc ks !
GOING BEYOND NATURES
• Natures    are “stupid markers” and require custom UI

• Facets
       are an API to provide unified...
FACET USER INTERFACE
FACET USER INTERFACE
‘N’-RUNTIMES
‘N’-RUNTIMES
        s !
  c k
Su
‘N’-RUNTIMES
        s !
  c k
Su
NAVEL-GAZING CLASSPATH
      CONTAINERS
NAVEL-GAZING CLASSPATH

           !
      CONTAINERS
         s
   c k
S u
NAVEL-GAZING CLASSPATH

           !
      CONTAINERS
         s
   c k
S u
NAVEL-GAZING CLASSPATH
      CONTAINERS
                s !
   c k
S u
   Consider integrating with Maven...
PRACTICE RELATIVITY




Folders/Files should be defined relative to a “root”
          Avoid hard coded names/paths
       ...
BECAUSE THEN YOU ARE
SUPPORTING DEVELOPERS
THAT WORK WITH OTHER
   DEVELOPERS, AND...
...YOUR PLUGIN WILL NOT
               SUCK!
       ...because you are implementing the key functionalities
...you use sel...
...YOUR PLUGIN WILL NOT
               SUCK!
       ...because you are implementing the key functionalities
...you use sel...
RELATED LINKS

    How to report bugs effectively http://bit.ly/cbUW9d
             Eclipse Facets Tutorial http://bit.ly/...
QUESTIONS ?

Up Next in Steven’s Creek:
     Pimp My
    Bug Report

                        • http://in.relation.to/Blogg...
How To Make A Framework Plugin That Does Not Suck
How To Make A Framework Plugin That Does Not Suck
Upcoming SlideShare
Loading in …5
×

How To Make A Framework Plugin That Does Not Suck

3,400 views

Published on

Eclipse plugins that tries to support a specific framework such as Hibernate, JPA, servlets, Struts, Spring, Drools, log4j, etc. all have many of the same challenges but somehow they have a tendency to solve it differently and we end up with a fractured IDE from a usability and architectural perspective.

It seems like everyone understands what functionallity that is specific for their framework, but forget to consider issues like multiple version support, classpath libraries, debugging/launching and coexistence with other 3rd party framework plugins.

After working five years with this in context of JBoss Tools and Eclipse itself I came to realize a lot of this fracture is caused by either not using already existing functionallity available in Eclipse API's or simply not realizing how little effort it actually takes to handle these common issues.

This talk will outline the identified issues and present patterns and in some cases implementation for how framework plugins should be done so they work well within the majority of the Eclipse Java ecosystem.

Published in: Technology

How To Make A Framework Plugin That Does Not Suck

  1. 1. HOW TO MAKE A FRAMEWORK PLUGIN THAT DOES NOT SUCK by Max Rydahl Andersen, Red Hat
  2. 2. WHICH OF THESE ARE FRAMEWORK PLUGINS ? • Hibernate Tools • Seam Tools • Eclipse JDT • SpringIDE • JUnit Plugin • TestNG Plugin • Apache Ant Plugin • CVS Plugin • SVN Plugin • Eclipse CDT • GEF • DroolsIDE
  3. 3. TYPICAL KEY FUNCTIONS • Provide support for a (Java) framework • To be used by new and seasoned developers • Setup of Libraries/Dependencies • Wizards to Create Artifacts • Editors for artifacts with code completion • “Compile/Validate” • Navigate between artifacts • Refactoring
  4. 4. FRAMEWORK PLUGINS • Hibernate Tools • Seam Tools • Eclipse JDT • SpringIDE • JUnit Plugin • TestNG Plugin • Apache Ant Plugin • CVS Plugin • SVN Plugin • Eclipse CDT • GEF • DroolsIDE
  5. 5. DEVELOPERS, DEVELOPERS, DEVELOPERS, ...
  6. 6. DEVELOPERS, DEVELOPERS, DEVELOPERS, ... ...are lazy ...don’t read docs ...are not working alone ...uses more than just one framework
  7. 7. HOW DO WE SUPPORT LAZY DEVELOPERS THAT DOESN’T READ ?
  8. 8. DEFAULTS BASED ON CURRENT SELECTION
  9. 9. DEFAULTS BASED ON CURRENT SELECTION s ! c k S u
  10. 10. HOW DO WE SUPPORT DEVELOPERS THAT USES MULTIPLE FRAMEWORKS ?
  11. 11. s ! c k S u
  12. 12. s ! c k S u
  13. 13. s ! c k S u S uc ks !
  14. 14. GOING BEYOND NATURES • Natures are “stupid markers” and require custom UI • Facets are an API to provide unified enablement and configuration of frameworks •Iview Facets as installer/uninstaller of Natures + standardized Configuration UI • Facet’s have been around since 2006 (Scary!) • Start use them!
  15. 15. FACET USER INTERFACE
  16. 16. FACET USER INTERFACE
  17. 17. ‘N’-RUNTIMES
  18. 18. ‘N’-RUNTIMES s ! c k Su
  19. 19. ‘N’-RUNTIMES s ! c k Su
  20. 20. NAVEL-GAZING CLASSPATH CONTAINERS
  21. 21. NAVEL-GAZING CLASSPATH ! CONTAINERS s c k S u
  22. 22. NAVEL-GAZING CLASSPATH ! CONTAINERS s c k S u
  23. 23. NAVEL-GAZING CLASSPATH CONTAINERS s ! c k S u Consider integrating with Maven...
  24. 24. PRACTICE RELATIVITY Folders/Files should be defined relative to a “root” Avoid hard coded names/paths Use logical names instead Make sure sharable settings are storable in a project...
  25. 25. BECAUSE THEN YOU ARE SUPPORTING DEVELOPERS THAT WORK WITH OTHER DEVELOPERS, AND...
  26. 26. ...YOUR PLUGIN WILL NOT SUCK! ...because you are implementing the key functionalities ...you use selections and good defaults so users doesn’t have to think, type or read (too much) ...you use the configure menu and/or facets to provide consistent UI for framework setup ...you support multiple runtimes to allow use of old and new ...you use relative settings to allow for shareable projects/ configuration in teams
  27. 27. ...YOUR PLUGIN WILL NOT SUCK! ...because you are implementing the key functionalities ...you use selections and good defaults so users doesn’t have to think, type or read (too much) ...you use the configure menu and/or facets to provide consistent UI for framework setup ...you support multiple runtimes to allow use of old and new ...you use relative settings to allow for shareable projects/ configuration in teams
  28. 28. RELATED LINKS How to report bugs effectively http://bit.ly/cbUW9d Eclipse Facets Tutorial http://bit.ly/aEf1am Navel Gazing Classpath Containers http://bit.ly/9q0h7S Eclipse 2009 Long talk http://bit.ly/cxy61Q
  29. 29. QUESTIONS ? Up Next in Steven’s Creek: Pimp My Bug Report • http://in.relation.to/Bloggers/Max • http://twitter.com/maxandersen • http://twitter.com/jbosstools

×