39
Developer Tools David Avendasora Senior Software Engineer, K12, Inc. @avendasora

WebObjects Developer Tools

Embed Size (px)

Citation preview

Page 1: WebObjects Developer Tools

Developer ToolsDavid AvendasoraSenior Software Engineer, K12, Inc.@avendasora

Page 2: WebObjects Developer Tools

• Available Versions of WOLips

• What’s New in WOLips

• Linking to WebObjects Javadoc

• Decompiling

• ERProfiling

• SnapshotExplorer

Topics

Page 3: WebObjects Developer Tools

Available Versions• WOLips 3.4

• Update Site: http://webobjects.mdimension.com/hudson/job/WOLips34Stable/lastSuccessfulBuild/artifact/site/

• Eclipse 3.4.2 Carbon Only

• Previously known as “WOLips Stable”

• Maclipse Compatiblehttp://webobjects.mdimension.com/wolips/support/preview/

• It has known Bugs

• NO fixes/updates!

Page 4: WebObjects Developer Tools

Available Versions

• WOLips 3.5

• Update Site: http://webobjects.mdimension.com/hudson/job/WOLips35Stable/lastSuccessfulBuild/artifact/site/

• Eclipse 3.5 Cocoa or Carbon

• Maclipse Compatible (Cocoa only)http://webobjects.mdimension.com/maclipse/

• Eclipse Cocoa is slow

Page 5: WebObjects Developer Tools

Available Versions• WOLips 3.6

• Update Site: http://webobjects.mdimension.com/hudson/job/WOLips36Current/lastSuccessfulBuild/artifact/site/

• Eclipse 3.6 (surprise!) Carbon/Cocoa

• Where all the new features are added and bugs fixed

• Fast(er) Cocoa

• What all the cool devs use (experimental)

• No Maclipse (yet?) :-(

Page 6: WebObjects Developer Tools

What’s new in WOLips 3.6?Plugins

• Removed Maven 1 and Apple Maven Support

• Reorganized Plugin Install Options

• Updated JRebel plugin to work with JRebel 3

Page 7: WebObjects Developer Tools

What’s new in WOLips 3.6?Plugins

Page 8: WebObjects Developer Tools

What’s new in WOLips 3.6?Plugins

• Removed Maven 1 and Apple Maven Support

• Reorganized Plugin Install Options

• Updated JRebel plugin to work with JRebel 3

Page 9: WebObjects Developer Tools

What’s new in WOLips 3.6?Preferences

• New UI for wolips.properties that allows you to edit the values directly in the WOLips preference pane

• WOLips validation preference pane now uses popups for severity levels

Page 10: WebObjects Developer Tools

What’s new in WOLips 3.6?Preferences

Page 11: WebObjects Developer Tools

What’s new in WOLips 3.6?Preferences

• New UI for wolips.properties that allows you to edit the values directly in the WOLips preference pane

• WOLips validation preference pane now uses popups for severity levels

Page 12: WebObjects Developer Tools

What’s new in WOLips 3.6?Preferences

Page 13: WebObjects Developer Tools

What’s new in WOLips 3.6?Building

• Bundle-less Builds - no more build directory that WOLips has to keep in sync with project. Requires ERJars (r11001 or later)

• New Wonder EOGenerator templates

Page 14: WebObjects Developer Tools

What’s new in WOLips 3.6?Building

Page 15: WebObjects Developer Tools

What’s new in WOLips 3.6?Building

• Bundle-less Builds - no more build directory that WOLips has to keep in sync with project. Requires ERJars (r11001 or later)

• New Wonder EOGenerator templates

Page 16: WebObjects Developer Tools

What’s new in WOLips 3.6?Modeling

• Entity Modeler now opens in a new window by default

• Cmd-Shift-V allows you to type an entity name and Entity Modeler will open the right EOModel and select the requested entity (entity name, not class name)

• Double-Clicking an EOModel in the finder can open it in WOLips

Page 17: WebObjects Developer Tools

What’s new in WOLips 3.6?Modeling

Page 18: WebObjects Developer Tools

What’s new in WOLips 3.6?Modeling

• Entity Modeler now opens in a new window by default

• Cmd-Shift-V allows you to type an entity name and Entity Modeler will open the right EOModel and select the requested entity (entity name, not class name)

• Double-Clicking an EOModel in the finder can open it in WOLips

Page 19: WebObjects Developer Tools

What’s new in WOLips 3.6?Summary

WOLips 3.6 is an evolution, not a revolution• Many things are refined, work smother, made easier

Page 20: WebObjects Developer Tools

Linking to WebObjects Javadoc

• Use Xcode 3.2 to install the Mac OS X Legacy Library docset (847 MB) in the Preferences > Documentation tab

• In WOLips preference pane, set WebObjects Javadoc to:/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleLegacy.CoreReference.docset/Contents/Resources/Documents/documentation/InternetWeb/Reference/WO542Reference/(this directory is in a package, so you can’t just browse to it.)

• Restart Eclipse

Page 21: WebObjects Developer Tools

Linking to WebObjects Javadoc

Page 22: WebObjects Developer Tools

Linking to WebObjects Javadoc

• Use Xcode 3.2 to install the Mac OS X Legacy Library docset (847 MB) in the Preferences > Documentation tab

• In WOLips preference pane, set WebObjects Javadoc to:/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleLegacy.CoreReference.docset/Contents/Resources/Documents/documentation/InternetWeb/Reference/WO542Reference/(this directory is in a package, so you can’t just browse to it.)

• Restart Eclipse

Page 23: WebObjects Developer Tools

Linking to WebObjects Javadoc

Page 24: WebObjects Developer Tools

Linking to WebObjects Javadoc

• Use Xcode 3.2 to install the Mac OS X Legacy Library docset (847 MB) in the Preferences > Documentation tab

• In WOLips preference pane, set WebObjects Javadoc to:/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleLegacy.CoreReference.docset/Contents/Resources/Documents/documentation/InternetWeb/Reference/WO542Reference/(this directory is in a package, so you can’t just browse to it.)

• Restart Eclipse

Page 25: WebObjects Developer Tools

Linking to WebObjects Javadoc

Page 26: WebObjects Developer Tools

Decompiling on-the-fly in Eclipse

• Sometimes Javadoc just isn’t enough. You want to know what’s really going on behind the curtain...

• Java Decompiler (JD): http://java.decompiler.free.fr/

• JD-Eclipse is a plug-in for Eclipse. It allows you to display the source code of “.class” files during development and debugging.

• Follow JD-Eclipse install instructions for Eclipse 3.2, 3.3 & 3.5 here: http://java.decompiler.free.fr/?q=jdeclipse

• Intel Only

Page 27: WebObjects Developer Tools

Decompiling on-the-fly in Eclipse

Page 28: WebObjects Developer Tools

Decompiling on-the-fly in Eclipse

• Sometimes Javadoc just isn’t enough. You want to know what’s really going on behind the curtain...

• Java Decompiler (JD): http://java.decompiler.free.fr/

• JD-Eclipse is a plug-in for Eclipse. It allows you to display the source code of “.class” files during development and debugging.

• Follow JD-Eclipse install instructions for Eclipse 3.2, 3.3 & 3.5 here: http://java.decompiler.free.fr/?q=jdeclipse

• Intel Only

Page 29: WebObjects Developer Tools

Decompiling on-the-fly in Eclipse

Page 30: WebObjects Developer Tools

In-Browser ToolsExtending development beyond Eclipse/WOLips UI

• DirectToWeb Panel - helps debug D2W apps by providing controls for rules, logging, localization, CSS, etc.

• ERProfiling - helps you understand how your app is functioning, what parts of a page are slow and why.

• SnapshotExplorer - allows you to browse the snapshots in your application’s EODatabases

• ClickToOpen - helps you figure out what components render what parts of a page and how they interact with each other

Page 31: WebObjects Developer Tools

ERProfilingWhat is it?

• Designed around WebObjects

• Page-based approach to profiling your app.

• Allows you to look at the statistics for individual pages and actions

• Helps you understand why pages and actions perform the way they do.

Page 32: WebObjects Developer Tools

ERProfilingAdding it to your project

• Add ERProfiling.framework to your app

• Add the javaagent setting to the VM args section of your launch config:

• Wonder source: -javaagent:${workspace_loc:ERProfiling}/Libraries/gluonj-1.5beta.jar=er.profiling.PFProfilerMixin

• Wonder binaries: -javaagent:/path/to/ERProfiling.framework/Resources/Java/gluonj-1.5beta.jar=er.profiling.PFProfilerMixin

• Run/Debug your app

Page 33: WebObjects Developer Tools

ERProfiling

Page 34: WebObjects Developer Tools

ERProfiling

• Add ERProfiling.framework to your app

• Add the javaagent setting to the VM args section of your launch config:

• Wonder source: -javaagent:${workspace_loc:ERProfiling}/Libraries/gluonj-1.5beta.jar=er.profiling.PFProfilerMixin

• Wonder binaries: -javaagent:/path/to/ERProfiling.framework/Resources/Java/gluonj-1.5beta.jar=er.profiling.PFProfilerMixin

• Run/Debug your app

Page 35: WebObjects Developer Tools

SnapshotExplorerWhat is it?

• NOT the “FreshnessExplorer” demoed by Mark last year - no matter how many times I’ve misspoken in the last 10 minutes

• Allows you to look over EOF’s shoulder and see what it sees compared to what the UI or Database show

• Runs only in Development

Page 36: WebObjects Developer Tools

SnapshotExplorerAdding it to your project

• Add the following Wonder frameworks to your Build Path:➡ SnapshotExplorer➡ Ajax➡ ERRest➡ WOOgnl

• Add the following line to your Application() constructor:SESnapshotExplorer.register();or (if your project already uses ERRest):SESnapshotExplorer.register(routeRequestHandler);

Page 37: WebObjects Developer Tools

Adding SnapshotExplorer to your Application

package er.modern.movies.demo;

import er.extensions.appserver.ERXApplication;import er.extensions.appserver.navigation.ERXNavigationManager;import er.snapshotexplorer.SESnapshotExplorer;

public class Application extends ERXApplication { public static void main(String[] argv) { ERXApplication.main(argv, Application.class); }

public Application() { ERXApplication.log.info("Welcome to " + name() + " !"); setDefaultRequestHandler(requestHandlerForKey(directActionRequestHandlerKey()));

SESnapshotExplorer.register();

}

@Override public void finishInitialization() { super.finishInitialization();

// Setup main navigation ERXNavigationManager.manager().configureNavigation();

}}

Page 38: WebObjects Developer Tools

DEMO

Page 39: WebObjects Developer Tools

Q&ADavid AvendasoraSenior Software Engineer, K12, Inc.@avendasora