Coding – it's been a long time

We've spent a lot of time examining this proposed application and thinking about the techniques we can use to create it in an elegant way. Now, it's time to start building it.

We mentioned that the data layer for this application is very straightforward with lots of boilerplate code and nothing that is unexpected based on the knowledge we've gained in previous chapters. Let's jump straight in:

// app/model/BaseModel.js Ext.define('Postcard.model.BaseModel', { extend: 'Ext.data.Model', schema: { namespace: 'Postcard.model', urlPrefix: 'http://localhost:3000', proxy: { type: 'rest', url: '{prefix}/{entityName:uncapitalize}' } }, }); // app/model/Contact.js Ext.define('Postcard.model.Contact', { extend: 'Postcard.model.BaseModel', ...

Get Ext JS Application Development Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.