innovationM
← Back to Blogs

Ext JS

Sencha Touch and Ext JS – Best Architecture, Design and Coding Practices

Manish Seth 29 Dec 2013 1 min read
Sencha Touch and Ext JS – Best Architecture, Design and Coding Practices

We have identified some of the best practices that we need to follow while working on architecture, design and development of Sencha Touch and Ext JS applications. We will keep on adding more and more to it. Stay tuned…

Best Coding Practices

Nesting of Function calls (Avoid it)

Avoid nesting of function calls. This degrades the code readability and impacts performance.
Ex.
Incorrect
store.getProxy().setExtraParam();

Correct:
var proxy = store.getProxy();
proxy.setExtraParam();

In the above example, if proxy object has to be used again in the same function then we already have access to that object. No need to call store.getProxy() again. This improves performance.

Message key naming convention

1. Validation Messages
MSG_VALIDATION_NAME_REQUIRED = ‘Name is Required’

2. Task In Progress Messages
MSG_PROGRESS_CREATE_USER = ‘Creating User…’

3. Confirmation Messages
MSG_CONFIRM_DELETE_USER = ‘Do you want to delete user?’

4. Global
MSG_VALIDATION_ALERT_TITLE = ‘Check Data’
MSG_CONFIRM_ALERT_TITLE = ‘Confirm’
MSG_FAILURE_SERVER = ‘There is an unexpected problem. Please try again.’
MSG_TITLE_FAILURE_SERVER = ‘Unexpected Error’

About the Author

Manish Seth

Contributor at InnovationM.

LinkedIn

Transform Your Ideas with Expert Guidance

icon
15+ Years of Expertise

Delivering high-impact solutions with years of industry experience.

icon
100+ Satisfied Clients

Helping contact industry software experts to achieve their brand goals.

icon
250+ In-House Team Members

A skilled team ready to tackle projects of any scale.

Book a consultation call with our experts today