Learn how to build enterprise applications with Sencha & DeftJS. This session will discuss the build process and application architecture, as well as DeftJS integration — leave with all of the tools needed to begin writing scalable, maintainable and testable Sencha applications.
3. Sencha CMD
•
Command line tool
•
Provides automated tasks around the
•
Cross-platform
full life-cycle of your applications
ryancanulla.com | @ryancanulla
Thursday, November 7, 13
11. Integrating DeftJS
•
Add Deft to your app.json
"requires": [ "deft@0.9.0" ]
• Refresh & build your app
$ sencha app refresh
$ sencha app build
ryancanulla.com | @ryancanulla
Thursday, November 7, 13
12. DeftJS Features
•
MVC with ViewControllers
•
Promises and Deferreds
•
IoC Container
ryancanulla.com | @ryancanulla
Thursday, November 7, 13
13. IoC Container
•
Injects dependencies before the class
•
Eager and lazy instantiation
constructor is executed
•
inject[ ‘userService’ ]
•
userService: ‘SampleApp.service.UserService’
ryancanulla.com | @ryancanulla
Thursday, November 7, 13
14. MVC with ViewControllers
•
Supports multiple view instances
•
Integrates with destruction lifecycle
•
Automatically cleans up listeners
•
Control a view and delegate work to
•
Class annotation-driven
injected business service
(service classes, Stores, etc.)
ryancanulla.com | @ryancanulla
Thursday, November 7, 13
15. Promises and Deferreds
•
Provides an elegant way to deal with async
calls
•
Register success, failure, cancellation or
progress callbacks
•
Implements the CommonJS Promises/A
•
Allows chaining
specification
ryancanulla.com | @ryancanulla
Thursday, November 7, 13
16. Configure DeftJS IOC Container
and create a login view
https://github.com/ryancanulla/sencha-deft-sample/tree/step-one
ryancanulla.com | @ryancanulla
Thursday, November 7, 13
19. Modular Directory Structure
•
Essential for large applications
•
module.js
•
Organized by functionality
- Configure IOC container
- Define events
- Define constants
ryancanulla.com | @ryancanulla
Thursday, November 7, 13
20. View Controllers
•
Listen for events
•
Configure view data
- View: user interaction
- Services, stores, models
(data changes)
ryancanulla.com | @ryancanulla
Thursday, November 7, 13
21. Business Services
•
Build the data to power your view
•
Available for injection
•
Fire events
•
Business specific logic
ryancanulla.com | @ryancanulla
Thursday, November 7, 13