Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Ext JS Application Development Blueprints

You're reading from   Ext JS Application Development Blueprints Develop robust and maintainable projects that exceed client expectations using Ext JS

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781784395308
Length 340 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (13) Chapters Close

Preface 1. Introduction FREE CHAPTER 2. MVC and MVVM 3. Application Structure 4. Sencha Cmd 5. Practical – a CMS Application 6. Practical – Monitoring Dashboard 7. Practical – an E-mail Client 8. Practical – Questionnaire Component 9. A Shopping Application 10. Debugging and Performance 11. Application Testing Index

Where the wild things are


We have our design, so let's step a little closer and examine the parts of the application where a little more detail may be required. For example, we have a controller method called onAddClick that will be handling the process of adding a new record, but what will this actually entail and are there any pain points hidden within? Here's what needs to happen when this handler is done with its job:

  • Ask the user for a name for the new page

  • Create a new blank record with default values and the page name

  • Add the page as a child node of the current page

  • Load the record in the detail panel

  • Show the new record in the tree

That's a lot for a single controller action. Let's look at how we might code it to see whether we're trying to do too much. We'll write some pseudocode (fake code) to drill down into some detail:

newPageName = promptUser 'Please enter a page name'

newPageModel = new Page {
    text = newPagename
}

pageTree.addAndSelect newPageModel

There's no JavaScript here...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime