© 2006 IBM Corporation JDojo & ScriptEngine Agile Planning’s Scripting Tools.

Slides:



Advertisements
Similar presentations
® IBM Software Group Copyright © 2005 IBM Corporation AJAX Toolkit Framework Emerging Internet Technologies Group.
Advertisements

Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems.
Component Development for the Component Description Framework (CDF) Training Dr.-Ing. Ulrich Dinger.
Extending Eclipse Kai-Uwe Mätzel IBM OTI Labs Zurich
SYDJS July What is HaXe? Multi-platform language Open source ( Community driven Version 2.07 (around since 2005) Single syntax for.
Web Toolkit Julie George & Ronald Lopez 1. Requirements  Java SDK version 1.5 or later  Apache Ant is also necessary to run command line arguments 
Enhancing a Grid Portlet Using JavaScript Phil Chung Komla Etse John Nipp.
Copyright © IBM Corp., Introducing the new Web Tools JavaScript™ Features Phil Berkland IBM Software Group 9/26/2007.
1 GWT Google Web Toolkit Build AJAX apps in the Java language
© 2007 IBM Corporation IBM Emerging Technologies Enabling an Accessible Web 2.0 Becky Gibson Web Accessibility Architect.
Google Web Toolkit - Gufran Mohammed. Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications.
Integrated Development Environments. Today We Will: Go over more advanced functionality of Eclipse. Break up into teams to work on presentation and final.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of The Java Development Tools project.
Tutorial 10 Programming with JavaScript
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
© 2008 Zend Technologies; made available under the EPL v March 2008 PDT – The PHP Development Toolkit Assaf Almaz, PDT co-Project Leader Zend Technologies.
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
© 2006 by IBM 1 How to use Eclipse to Build Rich Internet Applications With PHP and AJAX Phil Berkland IBM Software Group Emerging.
XML on the Web: is it still relevant? O'Neil D. Delpratt.
RIA Introduce Comparison among several technology.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Developing Web Services with the Eclipse Web Tools Platform Boris Minkin.
Programming with JavaScript (Chapter 10). XP Various things Midterm grades: Friday Winter Career Fair – Thursday, April 28, 2011 (11 am to 3 pm). – MAC.
1 v1.6 08/02/2006 Overview of Eclipse Lectures 1.Overview 2.Installing and Running 3.Building and Running Java Classes 4.Refactoring 5.Debugging 6.Testing.
Definition of the SDK for FIspace Augusto Morales & Hector Bedón UPM.
© 2006 IBM Corporation Jazz Foundation Deep Dive Agile Planning’s Scripting Tools.
Introduction to Eclipse Plug-in Development. Who am I? Scott Kellicker Java, C++, JNI, Eclipse.
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
Google Web Toolkit An Overview By Shauvik Roy Choudhary.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
How Java becomes agile riding Rhino Xavier Casellato VP of engineering, Liligo.com.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
Ontology Engineering and Plugin Development with the NeOn Toolkit Plug-in Development for the NeOn Toolkit June 1st, 2008 Michael Erdmann, Peter Haase,
Ex3 Preview, Swing tutorial Ex1 review Amit Shabtay.
Tutorial 10 Programming with JavaScript. XP Objectives Learn the history of JavaScript Create a script element Understand basic JavaScript syntax Write.
© 2005 by IBM; made available under the EPL v1.0 | June 9, 2005 David Williams WTP Source Editing Open House.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
1 Documenting with Javadoc. 2 Motivation  Why document programs? To make it easy to understand, e.g., for reuse and maintenance  What to document? Interface:
© 2006 IBM Corporation Agile Planning Web UI. © 2006 IBM Corporation Agenda  Overview of APT Web UI  Current Issues  Required Infrastructure  API.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
CMSC 466 / 666 Yong Rao Feb. 11, 2004 Revised Mar. 15, 2004.
DEV-8: OpenEdge® Architect – Extensibility & Third Party Integration Sunil Belgaonkar Principal Software Engineer Architect Phillip Magnay.
JavaScript, jQuery, and Mashups Incorporating JavaScript, jQuery, and other Mashups into existing pages.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
Eclipse 24-Apr-17.
1 CSC/ECE 517 Fall 2010 Lec. 3 Overview of Eclipse Lectures Lecture 2 “Lecture 0” Lecture 3 1.Overview 2.Installing and Running 3.Building and Running.
JDojo and Its Usage Te-Hsin Shih 04/30/2013. Dojo Dojo Toolkit is an open source JavaScript library designed to ease the rapid development of cross-platform,
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and web applications Very rich GUI libraries Portability (machine independence) A real Object.
Eclipse. An IDE is an Integrated Development Environment Different IDEs meet different needs BlueJ, DrJava are designed as teaching tools Emphasis is.
Spring and DWR Frameworks for Rich Web Enterprise Application Thomas Wiradikusuma Presentation to the 20 th.
Java Doc Guideline R.SANTHANA GOPALAN. Java Doc Guideline Audience Internal Developers PQA - who write test plans PPT – who write the documentation Customers.
Javascript Static Code Analyzer
® Emerging Internet Technologies © Copyright 2007 IBM Corp. ; made available under the EPL v1.0 AJAX Toolkit Framework Robert Goodman
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Developing GUIs With the Eclipse Visual Editor, SWT Edition David Gallardo.
Object orientation and Packaging in Java Object Orientation and Packaging Introduction: After completing this chapter, you will be able to identify.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Ronen Vaisenber, Zohrab Basmajian, Phong Pham, Keith Mogensen, Arjun Satish Mentors: Prof. Sharad Mehrotra, Prof. Ramesh Jain.
Eclipse 27-Apr-17.
JavaScript and AJAX 2nd Edition Tutorial 1 Programming with JavaScript.
Google Web Toolkit for Mobile Applications Development INGENUITY AT ITS BEST……………….
Technologies For Creating Rich Internet Applications Presenter's name
DecisionSoft Java in the real world DecisionSoft Stephen White 8 th February 2007.
/* LIFE RUNS ON CODE*/ Konstantinos Pantos Microsoft MVP ASP.NET
Chapter No. : 1 Introduction to Java.
Google Web Toolkit - Gufran Mohammed
AJAX Toolkit Framework
Java IDE Dwight Deugo Nesa Matic Portions of the notes for this lecture include excerpts from.
Presentation transcript:

© 2006 IBM Corporation JDojo & ScriptEngine 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  hard for new team members to get started  component based development is very hard due to the lack of clear interface definitions

© 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 –This still doesn’t solve the problem of component based development  Enhance JavaScript with typed variable declarations –Support typed variable declarations to allow clear interface definitions  Translate from another language –GWT –Eclipse E4

© 2006 IBM Corporation Introducing JDojo  JDojo provides a pragmatic solution  JDojo brings JavaScript to the Java tooling, NOT Java to JavaScript –It is a typed/extended JavaScript using Java as its syntax –Not all Java language features are supported –Data types are JS not Java oriented  No new layers or abstractions: –Use dojo as the widget toolkit –Allow working with the DOM  Implemented as a compiler participant in Eclipse’s JDT

© 2006 IBM Corporation JDojo Code Example

© 2006 IBM Corporation JDojo Code Example (1/3) package jdojo.example; import static com.ibm.jdojo.dom.BrowserEnvironment.window; import com.ibm.jdojo.base.dojo;... public class PersonRecordWidget extends _Widget { public static class PersonRecord { public String name; public int age; } private PersonRecord[] records= {}; private HTMLTableElement table; public void addPerson(String name, int age) { PersonRecord record= new PersonRecord(); record.name= name; record.age= age; JSArrays.push(records, record); } // to be continued on next slide... // NOTE: THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY! dojo.provide("jdojo.example.PersonRecordWidget"); dojo.require("dijit._Widget"); (function() { var _Widget= dijit._Widget; dojo.declare("jdojo.example.PersonRecordWidget", _Widget, { records: null, table: null, constructor: function() { this.records= []; }, addPerson: function(name, age) { var record= {}; record.name= name; record.age= age; this.records.push(record); }, // to be continued on next slide...

© 2006 IBM Corporation JDojo Code Example public void postCreate() { super.postCreate(); HTMLDocument doc= window.document; table= (HTMLTableElement) doc.createElement("table"); domNode.appendChild(table); HTMLButtonElement button= doc.createElement(HTMLTags.BUTTON); button.appendChild(doc.createTextNode("Add")); connect(button, MouseEventType.CLICK, new IEventHandler () { public void handle(MouseEvent e) { addPerson( window.prompt("Name?", ""), (int) (100 * JSMath.random())); refresh(); } }); domNode.appendChild(button); } // to be continued on next slide... postCreate: function() { this.inherited("postCreate", arguments, []); var doc= window.document; this.table= doc.createElement("table"); this.domNode.appendChild(this.table); var button= doc.createElement("button"); button.appendChild(doc.createTextNode("Add")); this.connect(button, 'click', dojo.hitch(this, function(e) { this.addPerson( window.prompt("Name?", ""), (((100 * Math.random()))|0)); this.refresh(); }) ); this.domNode.appendChild(button); }, // to be continued on next slide...

© 2006 IBM Corporation JDojo Code Example (3/3) private void _refresh() { dojo.empty(table); for (int i= 0; i < records.length; i++) { _createRow(records[i]); } private void _createRow(PersonRecord personRecord) { HTMLDocument doc= window.document; HTMLTableRowElement recordRow= doc.createElement(HTMLTags.TR); HTMLTableCellElement nameCell= doc.createElement(HTMLTags.TD); nameCell.appendChild(doc.createTextNode( personRecord.name)); recordRow.appendChild(nameCell); HTMLTableCellElement ageCell= doc.createElement(HTMLTags.TD); ageCell.appendChild(doc.createTextNode( JSNumbers.toString(personRecord.age))); recordRow.appendChild(ageCell); table.appendChild(recordRow); } _refresh: function() { dojo.empty(this.table); for (var i= 0; i < this.records.length; i++){ this._createRow(this.records[i]); } }, _createRow: function(personRecord) { var doc= window.document; var recordRow= doc.createElement("tr"); var nameCell= doc.createElement("td"); nameCell.appendChild(doc.createTextNode( personRecord.name)); recordRow.appendChild(nameCell); var ageCell= doc.createElement("td"); ageCell.appendChild(doc.createTextNode( personRecord.age.toString())); recordRow.appendChild(ageCell); this.table.appendChild(recordRow); } }); })();

© 2006 IBM Corporation Calculator Demo

© 2006 IBM Corporation JDojo Benefits  Takes full advantage of the JDT tooling –Compiler helps finding API breakages –Eclipse’s API tooling –Refactoring, Search, …  Allows components to specify API –Document API using  Interoperable with existing JavaScript code  No overhead in generated JavaScript code

© 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 UI Data Source Business Logic JavaScript

© 2006 IBM Corporation Sharing Code using the ScriptEngine UI Data Source Business Logic JavaScript

© 2006 IBM Corporation Sharing Code using the ScriptEngine Data Source Business Logic UI JavaScript Java

© 2006 IBM Corporation Sharing Code using the ScriptEngine Data Source Business Logic UI ScriptEngine JavaScript Java ?

© 2006 IBM Corporation Use Case: Tempo Simulation

© 2006 IBM Corporation ScriptEngine Features  Hide low-level Rhino API  Avoid using LiveConnect due to security  Initialize Dojo runtime  True bidirectional seamless integration  Supports debugging using Eclipse E4 debugger  Very simple usage  In progress: Web environment for WebUI testing

© 2006 IBM Corporation Calculator Demo

© 2006 IBM Corporation Bundle Design EclipseSharedWeb API

© 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 –Follow on Twitter

© 2006 IBM Corporation Thank You! Questions?