APTScriptingTools

Download Report

Transcript APTScriptingTools

Jazz Foundation Deep Dive
Agile Planning’s Scripting Tools
© 2006 IBM Corporation
Agile Planning’s JavaScript Experience
 > 3 years of experience with JavaScript and Dojo
 Used WTP (JSDT), Aptana, Dashcode, Text Editors
 Writing JavaScript code is easy...
 …evolving and refactoring a large codebase is not
 requires disciplined programming
 requires well organized and talented team
 hard for new team members to get started
© 2006 IBM Corporation
Ways to Improve - Requirements
 Need a growth-path from existing code
 No lock-in
 Must fit in existing infrastructure
 Do not introduce new layers / indirections
 Should leverage existing tooling
© 2006 IBM Corporation
Ways to Improve - Options
 Tooling for (Dojo flavored) JavaScript
 Translate from another language
– GWT
– Eclipse E4
– JavaScript++
© 2006 IBM Corporation
Introducing JDojo
 JDojo provides a pragmatic solution
 JDojo is an JDT Compiler Participant
 Doesn’t bring Java to JavaScript, but JavaScript
to the Java tooling
 No new layers:
– Use dojo as the widget toolkit
– Allow working with the DOM
© 2006 IBM Corporation
Demo
© 2006 IBM Corporation
Outroducing JDojo
 Takes full advantage of JDT Tooling
 Interest in generated JavaScript code only
 Generated JavaScript code is readable
 Debugging can be done using existing tools
 Interoperable with existing JavaScript code
 No overhead in generated JavaScript code
© 2006 IBM Corporation
JDojo Benefits
 Compiler helps finding API breakages
 More consistent JavaScript code
 Allows components to specify API
 Document API using JavaDoc, @Deprecated, ...
 Tooling opportunities
© 2006 IBM Corporation
Java based JavaScript Runtime
 Developed for RTC 2.0
 Improved for optimal interoperability with JDojo
 Allows sharing code between Web and Eclipse
© 2006 IBM Corporation
Sharing Code using the ScriptEngine
Data
Business
Source
Logic
UI
JavaScript
© 2006 IBM Corporation
Sharing Code using the ScriptEngine
Data
Source
Business
UI
Logic
JavaScript
© 2006 IBM Corporation
Sharing Code using the ScriptEngine
Data
Business
Source
Logic
UI
JavaScript
Java
© 2006 IBM Corporation
Source
Business
Logic
ScriptEngine
Data
ScriptEngine
Sharing Code using the ScriptEngine
UI
JavaScript
?
Java
© 2006 IBM Corporation
Use Case: Tempo Simulation
© 2006 IBM Corporation
Why a ScriptEngine?
 Rhino exposes low level interfaces
 Rhino exposes Java objects using LiveConnect
 Allow to move the Java / JavaScript boundary
 Usage by define an Eclipse Extension
© 2006 IBM Corporation
ScriptEngine Features
 Initialize Dojo Runtime
 Script loading infrastructure
 Java types are exported as Dojo types
 Transparent wrapping of Java / Script Object
 Supports debugging using Eclipse E4 debugger
 Future: Web Environment for WebUI Testing
© 2006 IBM Corporation
Conclusion
 JDojo and ScriptEngine are independent tools…
 … yet are a perfect marriage
 Proven to work in RTC releases
 Enabler to build what APT is today in a short
timeframe
 Allows us to provide an unified API
© 2006 IBM Corporation
Future Development
 Zurich Team
– writes new code with JDojo
– Uses ScriptEngine in APT and Work Item
– Provides stubs for other components as Bundle
Fragments as long as they did not yet adopt
 Looking for other Teams (you?) to participate
© 2006 IBM Corporation
C/ALM RTC-RRC Integration
© 2006 IBM Corporation
C/ALM RTC-RRC Integration
© 2006 IBM Corporation
C/ALM RTC-RRC Integration
© 2006 IBM Corporation
C/ALM RTC-RRC Integration
© 2006 IBM Corporation
Agile Planning Scripting Tools and You!
 Give it a try
– Wiki Page
– Install the JDojo compiler from updatesite
– Download the samples, try it yourself
– Grab the source from the JDojo stream on jazzdev
 Links will be sent out by mail afterwards
© 2006 IBM Corporation
Thank You!
Questions?
[email protected]
[email protected]
© 2006 IBM Corporation