Top Banner
Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga http://blogs.sun.com/geertjan Sun Microsystems Source Talk Tage, 27 September, 2006
31

Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

Nov 02, 2018

Download

Documents

NguyenDiep
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

Web Frameworksand ToolingWhat is it?How do I use it?And why should I want to?

Geertjan Wielengahttp://blogs.sun.com/geertjanSun MicrosystemsSource Talk Tage, 27 September, 2006

Page 2: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Agenda• Introduction• 1. Why?• 2. What?• 3. How?• 4. When?• Conclusion

Page 3: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Once upon a time...• JSP• Servlet

But now...

Page 4: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Wicket

Cocoon

Hibernate

Struts Echo

Maverick Beehive Beehive

SiteMesh

JDO

Keel

Facelets

Aranea

JSF

EJB

iBatis

Tiles WebWork

iBatis

Spring

Velocity

WebObjects

iBatis

Tapestry

Struts

Click

Page 5: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Wicket

Struts Facelets

JSF

These are currently supportedin NetBeans IDE...

Page 6: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Plus... many more in-house frameworks...

Page 7: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

How the IDE can help• NetBeans module a.k.a. “plugin”• manifest.mf• layer.xml• Java classes with functionality• “Matisse” GUI Builder for design• Easy to install in NetBeans IDE• Easy to distribute as binary file to others

Page 8: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

NetBeans module can provide...• Creating a source structure• Syntax highlighting• Code completion• Refactoring• Hyperlinking• Component Palette• Multiview Editors• Error annotations

Page 9: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

...and also these:• File templates• Indentation engines• Internationalization• Options• Project samples• JavaHelp helpsets• Junit testing

Page 10: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Creating a source structure

Component Palette

Options

Syntax highlighting

File templates

JavaHelp helpsets

Refactoring

Code completion

Indentation engines

Multiview Editors Hyperl

inking

Web Framework Tooling...

Page 11: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Where everything begins...

Page 12: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Configuration Panel...

Page 13: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

When you click “Finish”...

Page 14: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Creating new artifacts...

Page 15: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Page 16: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

After you click “Finish”...

Page 17: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

JAR Files...

Page 18: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Project Properties Extension...

Page 19: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Hyperlinking...

Page 20: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Creating a source structure

Component Palette

Options

Syntax highlighting

File templates

JavaHelp helpsets

Refactoring

Code completion

Indentation engines

Multiview Editors Hyperl

inking

Web Framework Tooling...

Page 21: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Good news: Lots of help!• 1. Great source code in NetBeans sources.• 2. Open source projects:> https://nbwicketsupport.dev.java.net/> https://nbfaceletssupport.dev.java.net/

• 3. [email protected]● 4. Javadoc & Tutorials (let's have a look...)• 5. http://blogs.sun.com/geertjan• 6. Two very recent developments...

Page 22: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Pilot Chapter of NetBeans API Book

Page 23: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Let's browse through the chapter...

Page 24: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Let's put it into practise...• platform.netbeans.org (not www.netbeans.org)• Look in Javadoc• WebFrameworkProvider class (NetBeans Web API)> extend()> isInWebModule()> getConfigurationFiles()> getConfigurationPanel()

Page 25: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Wizard for Getting Started

Page 26: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Wizard for Getting Started (ctd.)

Page 27: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

public class TapestryWebFrameworkProvider extends WebFrameworkProvider {

/** Creates a new instance of __NAME__ */ public TapestryWebFrameworkProvider() { super("Tapestry","Description"); }

//Empty for now, but this is where all the artifacts are created: public Set extend(WebModule webModule) { return null; }

//If true, the Project Properties dialog box will show that the framework is selected. public boolean isInWebModule(WebModule webModule) { return true; }

//Works with the framework's configuration files public File[] getConfigurationFiles(WebModule webModule) { return null; }

//Returns the lower part of the New Project wizard or the Project Properties dialog //box, where the user can specify settings that are specific to your framework. //Here, nothing is returned: public FrameworkConfigurationPanel getConfigurationPanel(WebModule webModule) { return null; }

}

Page 28: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

...and three small little steps:• Declare dependency on the module that provides

the WebFrameworkProvider class• Register the WebFrameworkProvider class in the

layer.xml file• Install the module.

...and then the framework is registered!

Page 29: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Demo!1.Create module (plugin) project2.Declare dependency on Web API3.Use WebFrameworkProvider wizard4.Register the framework provider class5.Install the module

Page 30: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Summary• Integrating support for a web framework> Wizards and templates> Pilot chapter for upcoming module development book> NetBeans API JavaDoc> Samples and Tutorials

• Need help? > [email protected]> http://blogs.sun.com/geertjan

• Which frameworks do you want support for?

Page 31: Web Frameworks and Tooling - NetBeans · Web Frameworks and Tooling What is it? How do I use it? And why should I want to? Geertjan Wielenga Sun Microsystems Source Talk Tage ...

© 2006 Sun Microsystems

Questions & Answers