View Full Version : What Is Your Development Process?

1 Dec 2012, 10:29 PM
I'm quite new to javascript and I'm struggling to get going with the loosly typed nature and I find myself tediously deploying and reloading the page in order to find out that a method isn't valid or is null or what not.

I find that my only way of working with ExtJS is to look for an example and copy and paste it then modify it slightly as I really struggle finding out how anything works by myself from the IDE.

The API docs are extensive and are one place I look but there just seems to be loads of random arrays and functions everywhere and it only seems to become clear at runtime if the method you have chosen is valid or not.

e.g. from the Panel (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.panel.Panel)

var resultsPanel = Ext.create (http://docs.sencha.com/ext-js/4-1/#!/api/Ext-method-create)('Ext.panel.Panel (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.panel.Panel)', {
title: 'Results', width: 600, height: 400, renderTo: Ext.getBody (http://docs.sencha.com/ext-js/4-1/#!/api/Ext-method-getBody)(), layout: { type: 'vbox', // Arrange child items vertically align: 'stretch', // Each takes up full width padding: 5 }, items: [{ // Results grid specified as a config object with an xtype of 'grid' xtype: 'grid', columns: [{header: 'Column One'}], // One header just for show. There's no data, store: Ext.create (http://docs.sencha.com/ext-js/4-1/#!/api/Ext-method-create)('Ext.data.ArrayStore (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.ArrayStore)', {}), // A dummy empty data store flex: 1 // Use 1/3 of Container's height (hint to Box layout) }, { xtype: 'splitter' // A splitter between the two child items }, { // Details Panel specified as a config object (no xtype defaults to 'panel'). title: 'Details', bodyPadding: 5, items: [{ fieldLabel: 'Data item', xtype: 'textfield' }], // An array of form fields flex: 2 // Use 2/3 of Container's height (hint to Box layout) }] });

How would you know that you could add bodyPadding to the last item if it wasn't in the example?

Do you have to memorise the API or constantly go back and forth looking things up?
What is your development process and can you give me some tips on how to work more effectively?

3 Dec 2012, 10:25 AM
Just like everything new, it takes time to get used to things. Ext JS does have a learning curve. You're not going to be able to memorize everything, I still consult the docs and the actual source code on some things.