13.07.2015 Views

Strategies for Loose Coupling in Large Java Desktop ... - HrOUG

Strategies for Loose Coupling in Large Java Desktop ... - HrOUG

Strategies for Loose Coupling in Large Java Desktop ... - HrOUG

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Strategies</strong><strong>for</strong> <strong>Loose</strong> <strong>Coupl<strong>in</strong>g</strong><strong>in</strong> <strong>Large</strong> <strong>Java</strong> <strong>Desktop</strong>ApplicationsGeertjan Wielengageertjan.wielenga@oracle.comblogs.oracle.com/geertjan@geertjanwZoran SevaracMarjan ŠterkSadi El AssadiBoris Pran


<strong>Java</strong> <strong>Desktop</strong>: Sw<strong>in</strong>g / <strong>Java</strong>FX• What are typical problems with large <strong>Java</strong> desktopapplications and how to solve them?• How to reuse as much as possible from exist<strong>in</strong>gsolutions and not re<strong>in</strong>vent the wheel?• How to create applications that are solid andma<strong>in</strong>ta<strong>in</strong>able over many years?


Agenda• Background• <strong>Strategies</strong>• Demos & Discussion


NetBeans: What Is It Really?• NetBeans IDE• NetBeans Community• NetBeans Plat<strong>for</strong>m


December 1997


December 2011


NetBeans Plat<strong>for</strong>m• Overview> Framework <strong>for</strong> develop<strong>in</strong>g large <strong>Java</strong> desktopapplications.> Provides> Runtime conta<strong>in</strong>er.> APIs solv<strong>in</strong>g typical desktop problems.


NetBeans Plat<strong>for</strong>m


Why Use the NetBeans Plat<strong>for</strong>m?• Pre-def<strong>in</strong>ed generic features and solutions.• Code generators <strong>for</strong> custom features.• Less boilerplate code, less cycles.• Consistency of user <strong>in</strong>terface.• Modularity & loose coupl<strong>in</strong>g.


NetBeans Plat<strong>for</strong>m Features• Pluggable:> menubar> toolbar> w<strong>in</strong>dow system/dock<strong>in</strong>g framework> Options sett<strong>in</strong>gs> <strong>Java</strong>Help> custom features• Update Mechanism• Modularity• Generators <strong>for</strong> launchers, ZIP distributions, <strong>in</strong>stallers, and JNLP.


Exampleshttp://plat<strong>for</strong>m.netbeans.org/screenshots.html• Boe<strong>in</strong>g• Northrop Grumman• South African Defence Force• Swedish Defence Force• Banks• Bio<strong>in</strong><strong>for</strong>matics• M<strong>in</strong><strong>in</strong>g• ...


Examples


Examples


Examples


Examples


Examples


http://agrosense.nl


Examples


Examples


Examples


Examples


Three Usages <strong>in</strong> (and around) Croatia• Amph<strong>in</strong>icy Technologies• Gaea+• OpenMQAdm<strong>in</strong>• Neuroph Studio


Common BasisRuntime conta<strong>in</strong>erApp Module 1App Module 2App Module 3App Module 4App Module 5App Module 6handles lifecycle.API Modules/Plug<strong>in</strong>sRuntime Conta<strong>in</strong>erAPIs provide extensionpo<strong>in</strong>ts & utilities.


<strong>Strategies</strong> <strong>for</strong> <strong>Loose</strong> <strong>Coupl<strong>in</strong>g</strong>• Modularity– Break monolithic application <strong>in</strong>to featues• Service Registry– Decouple tools from user <strong>in</strong>terface• Context Sensitivity– Decouple actions from user <strong>in</strong>terface


Migrat<strong>in</strong>g to NetBeans Plat<strong>for</strong>m• Keep all algorithms, processors, etc.• Port everyth<strong>in</strong>g to modules.• Wrap JPanels <strong>in</strong> TopComponents.• Wrap bus<strong>in</strong>ess objects <strong>in</strong> Nodes.• Move to BeanTreeView from Jtree, etc.• Integrate NetBeans RCP features.• Leverage/reuse as much as you can.• Focus on doma<strong>in</strong>, not <strong>in</strong>frastructure.• Port<strong>in</strong>g is a process.


Technical Concepts• Module == a collection of <strong>Java</strong> packages that def<strong>in</strong>es a feature• Lookup <strong>for</strong> <strong>Loose</strong> <strong>Coupl<strong>in</strong>g</strong>• Central Registry• TopComponent• Cookies/Capabilities• Node• Explorer Views• Actions: Global/Context Sensitive


Summary• NetBeans Plat<strong>for</strong>m:> Framework simplify<strong>in</strong>g the development of modular, scalable,Sw<strong>in</strong>g applications.> Free & open source.> Stable & very extensive.> Used <strong>in</strong>ternationally <strong>in</strong> many companies.


Us<strong>in</strong>g NetBeans In Any Way At All?• geertjan.wielenga@oracle.com> We want to hear from you.> We want to help you (<strong>for</strong> free).> We want to promote any work you do (<strong>for</strong> free).


plat<strong>for</strong>m.netbeans.org/tutorials


Course• Basic Course> Cover all the basic NetBeans APIs.> A lot of hands on work & cod<strong>in</strong>g.> One lecture/one workshop pattern.> Very practically oriented, free book.• Port<strong>in</strong>g Workshop> Brief overview of NetBeans APIs.> Step by step guided migration of your app.> Simple prototype ready <strong>for</strong> demo.• 3 or 5 days, X number of eng<strong>in</strong>eers• http://edu.netbeans.org/courses/nbplat<strong>for</strong>m-certified-tra<strong>in</strong><strong>in</strong>g/


Resources• http://wiki.netbeans.org/NetBeansDeveloperFAQ• http://plat<strong>for</strong>m.netbeans.org/tutorials/nbm-port<strong>in</strong>g-basic.html• http://edu.netbeans.org/courses/nbplat<strong>for</strong>m-certified-tra<strong>in</strong><strong>in</strong>g/• dev@plat<strong>for</strong>m.netbeans.org• http://plat<strong>for</strong>m.netbeans.org


Us<strong>in</strong>g NetBeans In Any Way At All?• geertjan.wielenga@oracle.com> We want to hear from you.> We want to help you (<strong>for</strong> free).> We want to promote any work you do (<strong>for</strong> free).


Questions & Answers

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!