KEMBAR78
How To Make A Framework Plugin That Does Not Suck | KEY
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
• JUnit   Plugin            • TestNG Plugin
• Apache Ant       Plugin   • CVS Plugin
• SVN     Plugin            • Eclipse CDT
• GEF                       • DroolsIDE
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
FRAMEWORK PLUGINS
• Hibernate Tools           • Seam Tools
• Eclipse   JDT             • SpringIDE
• JUnit   Plugin            • TestNG Plugin
• Apache Ant       Plugin   • CVS Plugin
• SVN     Plugin            • Eclipse CDT
• GEF                       • DroolsIDE
DEVELOPERS, DEVELOPERS,
     DEVELOPERS, ...
DEVELOPERS, DEVELOPERS,
     DEVELOPERS, ...
                                       ...are lazy
                             ...don’t read docs
                     ...are not working alone
       ...uses more than just one framework
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 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!
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
             Use logical names instead
   Make sure sharable settings are storable in a
                      project...
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 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
...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
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
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

How To Make A Framework Plugin That Does Not Suck

  • 1.
    HOW TO MAKEA FRAMEWORK PLUGIN THAT DOES NOT SUCK by Max Rydahl Andersen, Red Hat
  • 2.
    WHICH OF THESEARE 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.
    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.
    FRAMEWORK PLUGINS • HibernateTools • Seam Tools • Eclipse JDT • SpringIDE • JUnit Plugin • TestNG Plugin • Apache Ant Plugin • CVS Plugin • SVN Plugin • Eclipse CDT • GEF • DroolsIDE
  • 5.
    DEVELOPERS, DEVELOPERS, DEVELOPERS, ...
  • 6.
    DEVELOPERS, DEVELOPERS, DEVELOPERS, ... ...are lazy ...don’t read docs ...are not working alone ...uses more than just one framework
  • 7.
    HOW DO WE SUPPORT LAZY DEVELOPERS THAT DOESN’T READ ?
  • 9.
  • 10.
    DEFAULTS BASED ON CURRENT SELECTION s ! c k S u
  • 11.
    HOW DO WE SUPPORT DEVELOPERS THAT USES MULTIPLE FRAMEWORKS ?
  • 13.
    s ! c k S u
  • 14.
    s ! c k S u
  • 15.
    s ! c k S u S uc ks !
  • 16.
    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!
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
    NAVEL-GAZING CLASSPATH ! CONTAINERS s c k S u
  • 24.
    NAVEL-GAZING CLASSPATH ! CONTAINERS s c k S u
  • 25.
    NAVEL-GAZING CLASSPATH CONTAINERS s ! c k S u Consider integrating with Maven...
  • 26.
    PRACTICE RELATIVITY Folders/Files shouldbe defined relative to a “root” Avoid hard coded names/paths Use logical names instead Make sure sharable settings are storable in a project...
  • 27.
    BECAUSE THEN YOUARE SUPPORTING DEVELOPERS THAT WORK WITH OTHER DEVELOPERS, AND...
  • 28.
    ...YOUR PLUGIN WILLNOT 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
  • 29.
    ...YOUR PLUGIN WILLNOT 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
  • 30.
    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
  • 31.
    QUESTIONS ? Up Nextin Steven’s Creek: Pimp My Bug Report • http://in.relation.to/Bloggers/Max • http://twitter.com/maxandersen • http://twitter.com/jbosstools

Editor's Notes

  • #4 Project Wizards Class Path containers New Java Class Wizard, New Servlet, New JPA Mapping .java, web.ml, .drl, hbm.xml open-on, find references, open type/resources compile/validate requires full domain knowledge refactoring if you are really good
  • #5 Primary use case for Apache Ant Plugin is not as a framework but as to being used. CVS plugin and SVN plugin team provider plugins; again for using - not for developers to use. GEF, a plugin to build other plugins with - relies on pure Java plugin for its framework “features”
  • #22 Libraries not explicitly defined Upgrades to plugin magically updates users libraries Only One Runtime
  • #23 Libraries not explicitly defined Upgrades to plugin magically updates users libraries Only One Runtime
  • #24 Libraries not explicitly defined Upgrades to plugin magically updates users libraries Only One Runtime