18
Ext JS JavaScript Framework [email protected] Basics of

Extjsslides 091216224157-phpapp02

Embed Size (px)

Citation preview

Page 1: Extjsslides 091216224157-phpapp02

Ext JSJavaScript Framework

[email protected]

Basics of

Page 2: Extjsslides 091216224157-phpapp02

(1)INTRODUCTION

Page 3: Extjsslides 091216224157-phpapp02

What is JavaScript ? Client script, ran at web

browser Make web sites interactive and

programmable Manipulate page elements DOM manipulations Events

<script type="text/javascript">alert("Hello");

</script>

Page 4: Extjsslides 091216224157-phpapp02

What are JavaScript Frameworks ?

Collection of reusable codes to help you code JavaScripts.

Better DOM manipulations, event handling, etc.

Page 5: Extjsslides 091216224157-phpapp02

Prototype script.aculo

.us jQuery MooTools

WidgetsUI components like panels, grids, tabs...

YUI Dojo jQuery UI Ajax.org Ext JS Ext Core

BasicUseful methods, DOM, event, AJAX...

Page 6: Extjsslides 091216224157-phpapp02

Why Ext JS ? Mature and

stable. Lots of widgets

available. Consistent look

and feel Good

documentation and community support.

Page 7: Extjsslides 091216224157-phpapp02

What does Rally’s AppSDK do?Easy access to Rally data.Use the same components we

make the Rally UI out of.

Page 8: Extjsslides 091216224157-phpapp02

(2)FUNDAMENTALS

Page 9: Extjsslides 091216224157-phpapp02

Basic Ext ComponentsButtons, ComboBox, DateField, Slider, Quicktip, Tree, ListView...var btn = new Ext.Button({ text: ‘Click me!‘, width: 200, height: 100});

CONFIG OPTIONS

Page 10: Extjsslides 091216224157-phpapp02

Rally Specific ComponentsCardboard, Tree, RichTextDialog, Reports, Charts...var board= this.add({ xtype:”rallycardboard”, attribute:’ScheduleState’});

CONFIG OPTIONS

Page 12: Extjsslides 091216224157-phpapp02

Eventslistenerson()handler

var btn = new Ext.Button({ text: 'Click me!', width: 200, height: 100, listeners: { 'click': function() { alert('Clicked!'); } }});

btn.on('mouseover', function() { alert('Hovered!');});

Page 13: Extjsslides 091216224157-phpapp02

(3)Records And Data

Page 14: Extjsslides 091216224157-phpapp02

Basic Records and StoresStore are based on a model, and communicate with the rally api based on that model to generate records.

Records can be used to access the attributes of an artifact.

Use event listeners to invoke store actions once the store actions have completed.

Use the get method on a record to retrieve attribute data.

Ext.create(‘Rally.data.WsapiDataStore’, {model: ‘User Story’,fetch: true,listeners: {

load: function(store, records, success) {records[0].get(‘Schedule State’);

}}

});

Page 15: Extjsslides 091216224157-phpapp02

Fetch and FiltersThe config for the data store supports optional settings for fetching specific fields, sorting, and filtering.

fetch: [‘Name’, ‘State’]

filters: [{

property: ‘State’,operator: ‘=‘,value: ‘Open’

}]

sorters: [{

property: ‘Severity’,direction: ‘DESC’

}]

Page 16: Extjsslides 091216224157-phpapp02

(4)Component Interactions

Page 17: Extjsslides 091216224157-phpapp02

IterationCombobox To Cardboardthis.add({

xtype: ‘rallyiterationcombobox’, listeners: { ‘select’: function(combobox) { this.add({ xtype: ’rallycardboard’, model: ’defect’, storeConfig : { filters: [ { property : 'Iteration', value : combobox.getRecord().get('_ref') } ] } }); }, scope: this }});

Page 18: Extjsslides 091216224157-phpapp02

(5)First App