the singularity of being and nothingness
ExtJS 4.2. App Walkthrough
ExtJS 4.2 Walkthrough — Part 11: Executive Dashboard
Jul 14th
With the successful roll-out of our workflow system, management has come up with another great idea: an Executive Dashboard. The main idea is that when anyone with the “Admin” role logs in, they should be greeted with a “dashboard” of sorts that will allow them to see a variety of details from across the application, such as snapshots of the charts we previously built, outstanding workflow actions, and the most recently added inventory records.
Of course, we’ve already built all this stuff, so we confidently respond that this is no problem, and we’ll have it done in a jiffy. So let’s get jiffy-ing!
StrategyNOTE: Code for this installment can be found on GitHub.
One of the best things about the way we’ve built our ExtJS 4 app is that we can now really start to benefit from reuse of code. Instead of having to re-create all the components (charts, grids, etc), we can simply instantiate them in new contexts and move on with our lives.
For this Executive Dashboard, we’ll reuse both of the charts that we created earlier, as we all reusing the inventory grid twice. Since we’ve already created stores and models for all of these, there’s ZERO that we have to create More >
ExtJS 4.2 Walkthrough — Part 10: Workflow
Jul 13th
Wow! Part 10 already! Looking back over the last 9 sessions, we’ve accomplished A TON. Starting from scratch, we’ve generated a brand new app, developed a nice little inventory management system, wrapped it up in role-based security, and even implemented a few shiny reports. We should feel pretty good about what we’ve accomplished, and so should our boss.
As is typical, though, pat-on-the-backs for a job well done generally come bundled with a list of 20 more things that need to be done…yesterday. In our case, management wants us to implement a role-based workflow system that will allow them to more granularly track how inventory products go from initial creation to a final “Approved” status.
This is no problem for us, however. By now, we’ve been around the block a few times with ExtJS 4. Sure, the details vary from task to task, but we’ve found the sweet spot for attacking problems and solving them with code. All that’s left is to implement the skills that we are mastering on a daily basis.
The RequirementsNOTE: Code for this installment can be found on GitHub.
As mentioned, we need to implement a simple workflow process into our inventory management. While the workflow process will not alter the “how” More >
ExtJS 4.2 Walkthrough — Part 9: Oooh, Shiny!
Jul 9th
In our last installment, we dealt with a very common occurrence that happens in the course of real-life development: putting out the fire of a managerial ad-hoc requirement. In our case, we implemented a login and role-management system (something which was not required in initial requirements-gathering). And even though this came out of the blue, we saw that the MVC structure and event-based development methodology of ExtJS allowed us to quickly and easily respond to the crisis. Phew.
But now, we’re back on track, and ready to develop some reports!
Reports are interesting things in the domain of the business application. In a lot of ways, reports are the ultimate goal. Sure, we need an inventory management system, and yes, being able to manage content for our Cars is really nice. However, from the perspective of the people writing our paychecks, the reports are where the real value comes into play. We can make the rest of the application as awesome as we like, but they’ll probably never use it or notice it. But if we develop some really nice reports that gives them instant visibility into what they care about…well, we’ve not only given them what they ultimately care about, but More >
ExtJS 4.2 Walkthrough — Part 8: Logged In
Jun 30th
Things have been going great. We’ve been plugging along in our app, making cool input forms and more or less getting to a place where we felt we had something that works. And then the bombshell.
One of the business users asked about the login form. Login form? Our impression up until this time was that this app was being developed for one person to use. And because we were going to keep this behind our internal network firewall, there really wasn’t any need for user authentication, session management, etc.
Well, so much for that assumption. Now not only do we have to provide some form of user authentication, the higher-ups also want to restrict access within the app itself to certain parts, so that only certain users can access certain sections.
We freeze for a moment, and feel that strange feeling of panic start to arise. But then we realize: oh yeah, we’ve been developing an ExtJS application. All of this will be easy, and will only require the most minor of refactoring.
Content in this thought, we return blissfully to dungeon raids in Cube World.
User Authentication and RolesNOTE: The code for this session can be found on GitHub.
While the story above is probably a More >
ExtJS 4.2 Walkthrough — Part 7: Some Polish
Jun 26th
In our last installment, we tackled the “Big Form”, the grand inventory management form that we’ve been working toward through our whole journey thus far. But even though it worked well enough, it was still incomplete, and we promised ourselves that we’d add in a few more features to polish it off, namely:
- Add Car image management
- Add restriction for Make/Model selections
- Add “detail” view to the car.
Since we always live up to our promises (:)), it’s time we knock this out!
A Few AdditionsNOTE: The code for this session can be found on GitHub.
Before we jump in headfirst, however, there are a few more supporting pieces we need to add. I’ll outline them below, and you can add them as you have a chance (it’s good practice, right?).
Drive Train OptionsI created a new “Option” called “Drive Trains.” This should be managed under Options, and can have the same data structure as the other options. Eat, sleep, repeat.
New Car FieldsI added a few more fields to the Car model to make it more realistic to something that might actually exist:
- VIN (string)
- StockNumber (string)
- Mileage (number)
- Fuel (string)
- Engine (string)
- Transmission (string)
- Drive Train (option/combobox)
After you add these to your database and ExtJS model, also add fields for these into the More >
ExtJS 4.2 Walkthrough — Part 6: The Big Form
Jun 23rd
After a few weeks off, we’re back to it! Hopefully, you’ve done your homework and are caught up 🙂
We’ve been working over the last several sessions on laying down some supporting pieces for some real functionality within our application. Not that we haven’t been doing “real” stuff to this point; but most of the pieces have been admittedly simple and are parts of the app that will be used infrequently. That is, managing car colors, categories, makes and models isn’t particularly “business logic”–they’re just ancillary (although necessary) parts of a greater whole.
But now that we have several of these foundational elements in place, we can really start plugging away at the core purpose of our app, which is Inventory Management.
So without further ado, let’s get to it.
Our Goals for this SessionNOTE: The code for this session can be found on GitHub.
In this installment, we want to tackle the following:
- Build an Inventory Form for entering data
- Wire up form to a new controller for adding/editing inventory records
- Display inventory records in a grid (surprise, surprise!)
- Build a search form for our inventory records
Our inventory management form is actually going to be a bit complex (not in difficulty, but in data collection), so we won’t actually finish the whole thing More >
ExtJS 4.2 Walkthrough — Intermission…and Homework
Jun 14th
If you’ve been following along the last couple weeks, we’ve been walking through the process of building a real(ish) application using ExtJS 4.2. We’ve made great progress, and we’re literally on the precipice of bringing together all the supporting pieces that we’ve been building thus far.
While I’m wrapping up the next installment, I have some homework for you 🙂 If you’ve been building your app in tandem with these walkthroughs, I’d encourage you to tackle the list I describe below. Not only will this put in place some pieces that are necessary for the next steps (and which I won’t necessarily cover in any detail), but will also give you a chance to try out some stuff on your own and get some very useful experience under your belt before we continue.
The Homework New CRUD ListsThe first thing to tackle is a few more of our favorite CRUD grids:
- Make
- Model
Both of these can have the same structure as the Color, Category, Feature, etc. tables. However, to make things a bit interesting, we’ll also want to create a foreign key on Model that will associate the relevant Make.
NOTE: As you’ll remember, our “option” editable grid is used by all our CRUD tables. it More >
ExtJS 4.2 Walkthrough — Part 5: Back to the Grind
Jun 2nd
After not one, but TWO diversions, we’re finally back on track! If you remember from our last installment, we built a handy editable grid with support for all our fancy CRUD actions. We also saw that we could build this in a very abstract way, thus accommodating a lot of separate but similar models, yet with very little code duplication.
While this approach definitely has its place, there are times when our data becomes a bit complex and no longer lends itself very well to the editable grid. In these cases, it’s probably best to go back to the ol’ web form…which is precisely what we’ll do.
A Bit o’ PlanningNOTE: The code for this session can be found on GitHub.
Before we start hacking away at a form, let’s plan out what we’ll need. What we want to build in this installment is a management tool for Sales Staff. This has a few initial requirements:
- Display sortable list of all Sales Staff
- Allow for adding new Sales Staff members
- Allow for editing existing Sales Staff members
And here is the data that management wants us to collect:
- First Name
- Last Name
- Date of Birth
- Address (Addy 1, Addy 2, City, State, Zip)
- Phone
- Hire Date
- Position (a value from our “Position” table)
Now that we have our requirements, let’s More >
ExtJS 4.2 Diversion: Custom Panel UIs…Part Deux
May 31st
Theming in ExtJS 4.2+ is a beautiful, tricky, complicated mistress. On the one hand, it has been completely reworked (for the better…mostly) to be a lot more extensible, take advantage of theme inheritance, care less about how themes are created (and where), and a host of other really nice features.
However, the elegance of the new theming engine comes with a price…namely, a steep learning curve (I should know, I’m still having trouble ascending this hill). Prior to 4.2, casual theming was really easy. You could open a single file, edit a few SASS variables, run the compiler, and you were done. Now, however, the logic and structure of themes is much more distributed, make for a lot more complexity than most people who dabbled in the previous version are probably prepared for.
And of course, there is the brand-newness of it. The documentation, while helpful in getting setup, is particularly thin on the point of actually theming. Most other tutorials, books, etc. follow the documentation in this regard, making really good examples of theming very hard to come by (unless, of course, you only want to change the color of the app from blue to green…if so, you’re covered :)).
This, ultimately, More >
ExtJS 4.2 Walkthrough — Part 4: Steppin’ in Some CRUD
May 27th
We’ve finally arrived! After some setup, a bit of layout work, the creation of our first controller, a full version upgrade and even a bug fix, we’re ready to get into the heart of our application…specifically, interacting with data from our server. In order to do this, we’ll need to explore the concepts of Models, Stores and Proxies, as well as creating a new controller and even a fancy data grid with inline editing capability.
We’re in for a long haul in this installment, but it’s worth it. When we come out the other side, we’ll not only have real functionality working in our app, but we’ll also have covered some very important concepts that will let us ramp up our development of the rest of the application. Ready? Let’s do it.
Data ModelsNOTE: The code for this session can be found on GitHub.
As a developer, you’ve no doubt utilized data models on a regular basis. They are handy things, for not only do they let you describe objects via their properties and relationships, but they also semantically describe your application. In ExtJS, the Ext.data.Model fills this role, providing a really nice way to manage objects which can be grouped together in caches (a Store) and, More >