Questions tagged [deftjs]

Dependency Injection and other essential extensions for enterprise web and mobile application development with ExtJS and Sencha Touch.

http://deftjs.org/

Essential extensions for enterprise web and mobile application development with Ext JS and Sencha Touch

DeftJS enhances Ext JS and Sencha Touch’s APIs with additional building blocks that enable large development teams to rapidly build enterprise scale applications, leveraging best practices and proven patterns discovered by top RIA developers at some of the best consulting firms in the industry.

FEATURES

IoC Container

  • Provides class annotation driven dependency injection.
  • Maps dependencies by user-defined identifiers.
  • Resolves dependencies by class instance, factory function or value.
  • Supports singleton and prototype resolution of class instance and factory function dependencies.
  • Offers eager and lazy instantiation of dependencies.
  • Injects dependencies into Ext JS class configs and properties before the class constructor is executed.

MVC with View Controllers

  • Provides class annotation driven association between a given view and its view controller.
  • Clarifies the role of the controller - i.e. controlling a view and delegating work to injected business services (ex. Stores).
  • Supports multiple independent instances of a given view, each with their own view controller instance.
  • Reduces memory usage by automatically creating and destroying view controllers in tandem with their associated views.
  • Supports concise configuration for referencing view components and registering event listeners with view controller methods.
  • Integrates with the view destruction lifecycle to allow the view controller to potentially cancel removal and destruction.
  • Simplifies clean-up by automatically removing view and view component references and event listeners.

Promises and Deferreds

  • Provides an elegant way to represent a ‘future value’ resulting from an asynchronous operation.
  • Offers a consistent, readable API for registering success, failure, cancellation or progress callbacks.
  • Allows chaining of transformation and processing of future values.
  • Simplifies processing of a set of future values via utility functions including all(), any(), map() and reduce().
  • Implements the CommonJS Promises/A specification.
15 questions
4
votes
1 answer

Deftjs promise done() not working

I'm new to promises, but I've looked at some examples using Deft.js and I'm wondering why my basic example isn't working. Looking at This site, I thought the .done() function should work, but I keep getting errors. Here is my code: onScopeChange:…
Blundering Philosopher
  • 6,245
  • 2
  • 43
  • 59
3
votes
1 answer

Routing in Extjs with DeftJs

deftjs looks really promising as it adds exactly the necessary things I missed in the MVC implementation of ExtJs. What I actually miss is a functionality that makes routing possible/ easy. Extjs has a Ext.ux.Router functionality but I formerly used…
3
votes
1 answer

Ext JS 4.2.1 loading controller - best practice

I am currently developing a Ext JS application with many views/controlers/... I am wondering myself what the best practice is for loading the JS controllers/views/and so on... currently i have my application defined like this: // enable javascript…
JuHwon
  • 2,033
  • 2
  • 34
  • 54
2
votes
1 answer

Ext 4.2, Sencha Cmd 3 + deftjs - Can't build a working applicaton

I've upgraded my build tools for an ext + deftjs application from Sencha SDK to Sencha Cmd (v3). In doing so I also upgraded Ext to 4.2 and Deft to Ext 0.8. I initially had a problem with Ext.onReady() not being fired, resulting in my…
Rob Squires
  • 2,108
  • 16
  • 15
1
vote
1 answer

How can I inject a store into a panel's toolbar?

My app uses Deft to inject stores. However, when I try to inject a store into a pagingtoolbar at the bottom of a grid panel, it does not work. Ext.define("My.grid.Panel", { ... inject: { store: 'myStore' // works fine }, ... …
anonymouse
  • 639
  • 1
  • 8
  • 18
1
vote
2 answers

How to avoid passing promise through multiple callbacks to resolve promise? - Deft.js

As my code shows, I currently am passing a promise down two asynchronous callbacks functions (success and callback). I think it should be possible to do this differently, but I have found no other way yet. Here is my function that creates the…
Blundering Philosopher
  • 6,245
  • 2
  • 43
  • 59
1
vote
1 answer

DeftJs 0.9.1 with ExtJs 4.2.1

I'm struggling to get DeftJs working with Sencha Cmd. At first I suspected Cmd 4, but I've also tried with Cmd 3 with exactly the same result, so I reckon I'm just missing something. I'm getting the error "Cannot set property 'instance' of…
Matt Jenkins
  • 2,824
  • 1
  • 30
  • 34
1
vote
1 answer

How to change initial View config in Controller

I use Extjs 4.2 and Deftjs. In my gridpanel view I define a plugin like: plugins: [ Ext.create( 'Ext.grid.plugin.CellEditing', { clicksToEdit: 1, listeners: {} } ) ] But I do not want to define the…
Shlomo
  • 3,880
  • 8
  • 50
  • 82
0
votes
0 answers

How to initilize different apps from the main appin extJS

How to initilize different apps from the main appin extJS I have a main app where i am calling two different apps. like this in my app.json "classpath": [ "app", "${toolkit.name}/src", "${app.dir}/../appone", …
David
  • 4,266
  • 8
  • 34
  • 69
0
votes
1 answer

Sencha 2 Routing with Deft JS

Does sencha touch 2 routing works with Deft JS ? I am extending my controllers with Deft.mvc.ViewController instead of Ext.app.Controller and looks like routing is not working.
Rakesh Goyal
  • 3,117
  • 8
  • 39
  • 69
0
votes
1 answer

ExtJS-based time spinner control

I'm looking for the time spinner control implementation (as it shown on the attached image) based on ExtJS classes. Is there any like this?
Rom098
  • 2,445
  • 4
  • 35
  • 52
0
votes
1 answer

ExtJS 4.2 : RowExpander - not working

I'm working within a ExtJS 4.2 MVC style application using coffeescript and attempting to use rowExpander. The grid doesn't seem to render the 'rowBodyTpl' and whenever I click to expand the row I get an error : 'Uncaught TypeError: Cannot call…
Cadean
  • 61
  • 5
0
votes
0 answers

How do i Compare three dates in Extjs?

I need to compare three dates.. but i could get the result for only two dates can any one tell me how to do.. I have start date, end date and due date I have to compare like start date should be greater than end date and due date... My code is var…
sakthi
  • 11
  • 3
0
votes
1 answer

Passing parameters from a deftjs controller to another

I'm using Deftjs´s ViewControllers, and now I had to pass some variables from a controller to another. How is the best way, since I create a view and not a controller? My actual solution is: In controller 1: var me = this; var win =…
Beetlejuice
  • 4,292
  • 10
  • 58
  • 84
0
votes
2 answers

Relative component query selectors

ExtJS 4.1 & DeftJS 0.6.8 The documentation says "References to view components can be established via the control annotation and view-relative component query selectors" Documentation example: control: { submitButton: 'panel >…
Shlomo
  • 3,880
  • 8
  • 50
  • 82