Adding DeftJS5 to existing ExtJS5 app

250 views
Skip to first unread message

Maciej Rzymski

unread,
Aug 26, 2014, 12:59:17 PM8/26/14
to def...@googlegroups.com
Hi,
I never use Deft JS library. I want to add Deft5 to existing Ext5 application.

I read http://docs.deftjs.org/deft-js/0.9.1/#!/api/Deft.mvc.Application but in my index.html is included only bootstrap.js:
<script id="microloader" type="text/javascript" src="bootstrap.js"></script>

bootstrap.js is created likely based on .sencha/app/Boot.js but I feel that this a wrong way to do this :)
I prefer Sencha Cmd, so I read paragraph "Using Sencha Cmd (with Deft JS 0.9+ only)"
I added repo, next in app.json I play with "de...@0.9.0?" (e.g. "de...@5.0.0"),  but unfortunately Sencha gives me "[WRN] Failed to resolve package de...@5.0.0".

I want to use only Deferred and Promises for now and application have to work in both debug and production (compiled) environment.

How should I correctly add Deft JS5?



Brian Kotek

unread,
Aug 26, 2014, 1:49:09 PM8/26/14
to deftjs
Right now we're still in alpha (with a beta upcoming), so Deft 5 isn't available in the Sencha repository yet. You'd need to download the alpha build and add it to your app manually. You can find the alpha at: https://github.com/deftjs/DeftJS5/releases


--
Deft JS home page: http://deftjs.org/
Wiki: https://github.com/deftjs/DeftJS/wiki
For rules and tips on asking questions on the Deft JS mailing list: https://github.com/deftjs/DeftJS/wiki/Asking-Questions-on-the-Mailing-List
---
You received this message because you are subscribed to the Google Groups "Deft JS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deftjs+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/deftjs/3d400fb2-b7df-4bfe-852a-4b46e4cee643%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

stephan.a...@gmail.com

unread,
Aug 28, 2014, 5:20:25 AM8/28/14
to def...@googlegroups.com
Hello,

I've got exactly the question but since I'm new to ExtJS 5 and DeftJS 5 I cannot do anything with your answer above.

I've got a sencha cmd application (5.0.1). Now I want to use DI from Deft. Adding the deft package to my app (like described in the wiki) did not work since deftjs 5.0.0 or 5.0.1 is not yet available as package. Right? Can you tell me when it will? So what can I do now? Can I manually download the "package source" from github and copy it to myapp/packages/deft? This did not work either. After reading the question above I downloaded deft.js from the alpha release you linked to. I added it to my index.html but still had no luck. sencha app build failed. What am I missing?

Would be great if you could provide detailed instruction on how to work with the latest development build of deftjs5 in my extjs 5.0.1 application.


Thanks in advance.

Maciej Rzymski

unread,
Aug 28, 2014, 5:29:56 AM8/28/14
to def...@googlegroups.com
OK.
For now, I have following setup which works fine:
  • in app.json added to classpath:  ${app.dir}/libs
  • deft.js copied to ${app.dir}/libs/deft
  • in Application.js added to requires: 'Deft.promise.*'

Brian Kotek

unread,
Aug 28, 2014, 11:58:38 AM8/28/14
to deftjs
Maciej is correct. You'd want to:
  • Add the deft.js library file to your project, e.g. libs/deft
  • Add the library to the Cmd projct's classpath property in app.json, e.g. "${app.dir}/libs/deft/deft.js" (obviously, the actual value depends on where you put the file in your project)
We're still in alpha right now, which is why Deft 5 isn't in the Sencha repo and why we don't have updated docs yet. The main point of the alpha was to let folks already familiar with Deft (and Ext JS/Cmd) try things out and report any major problems.

When will a final version be out? That depends on whether anyone runs into any problems that need fixing. 

As far as docs go, 75-80% of the current docs will be unchanged for Deft 5. The main areas of difference are around ViewControllers. We're working to get the docs updated to coincide with a beta release. Keep in mind that (as with all things open source) we're doing this on our own time, on top of work and other projects. So we're moving along as quickly as we can. Please bear with us. :-)

Brian

stephan.a...@gmail.com

unread,
Aug 28, 2014, 12:02:10 PM8/28/14
to def...@googlegroups.com
Alright, thank you for your answer! I'm looking forward to the final release.
Reply all
Reply to author
Forward
0 new messages