PDA

View Full Version : Mastering Ext.Direct by Saki



jsakalos
5 Sep 2009, 10:16 AM
Hi all,

I've just started a series of articles on Ext.Direct. Let me please know what you think about it and/or what would you like me to cover in next parts.

http://blog.extjs.eu/2009/09/05/mastering-ext-direct-part-1/

aconran
7 Sep 2009, 6:48 AM
Good read for an introduction, thanks for putting this walkthrough out!

jsakalos
7 Sep 2009, 6:51 AM
Thanks, Aaron. Any ideas what I should focus on in the next parts?

aconran
7 Sep 2009, 7:05 AM
Next thing that needs to be explained is how to do something with result. (How do use callbacks to process the result of what you have retrieved?) Also explicitly explaining that these are asynchronous requests and that the result is not available immediately.

Condor
7 Sep 2009, 7:09 AM
Some points that come to mind:
- Use of DirectProxy (and optionally TreeLoader).
- Restful stores (method or url based, writers etc.) - not Ext.direct related, but introduced at the same time.
- Different backend (most examples are PHP based; how about a Java example for once).

jsakalos
7 Sep 2009, 8:28 AM
@aconran,
definitely! I expect I'll explain it in part 3 - part 2 will be dedicated more to serverside (how to add classes, a bit about reflection class, etc)

@condor,
I'll definitely cover first 2 of your points, unfortunately, I know nothing about Java so it needs to be done by someone else.

jsakalos
7 Sep 2009, 12:55 PM
I've just finished the second part: http://blog.extjs.eu/know-how/mastering-ext-direct-part-2/

Enjoy!

Bulle Bas
11 Sep 2009, 5:40 AM
I've just finished the second part: http://blog.extjs.eu/know-how/mastering-ext-direct-part-2/

Enjoy!

You did it again. Really useful stuff.
I think that it would be valuable to explain these lines, i.e. what Echo is, and why you prefix Exception and Echo.


$api->add(
array(
'Echo' => array('prefix' => 'Class_'),
'Exception' => array('prefix' => 'Class_'),
'Time',
'File',
'Car'
)
);

Stoot98
11 Sep 2009, 6:28 AM
Thanks for the blog posts again Saki! Really looking forward to the next instalments!

steffenk
15 Sep 2009, 5:40 AM
Hi Saki,

thanks for your introduction.

I think the phpDoc description is a bit too short and people may don't understand what's going on.
I would use complete phpDoc (that brings user to do that with discipline :) )

/**
* Description of the function
*
* @remotable makes the function appear in the API
* @param string description of param
* @return string description of return value (or void)
*/
I have to admit, that reflections in php slows down a lot. If it's only a small application, it won't be a problem, but as soon yopu have big application it might be a performance problem, i hope that this will be better in future php versions.

Looking forward to next part ;)

jsakalos
15 Sep 2009, 11:34 AM
If you use caching (will be explained in some of the next parts) then the reflections don't run if classes don't change. I'd switch on caching once development (or at least a major phase of) is finished.

As to doc, I'll update it while writing the next part.

steffenk
15 Sep 2009, 12:52 PM
jep, that's why caching is a real important thing, i also wanted to have it in the "light" version i also used successfully:
http://www.extjs.com/forum/showthread.php?t=68044

jsakalos
17 Sep 2009, 4:25 AM
Part 3 (http://blog.extjs.eu/know-how/mastering-ext-direct-part-3/) is born.

Enjoy!

stefan.riedel-seifert
10 May 2010, 12:11 AM
Hello,

i am trying to check out this tutorial, but ran into error?

What have i done?

1) Installed Xampp 1.7.3 with PHP 5.3.1
2) Downloaded FirePHP, ExtJS 3.2.1, actual ExtDirectpack
3) Unzipped all files within this structure:
+ cache/
+ classes/
+ data/
+ ext/
+ ExtDirect/
+ firephp/
api.php
router.php

4) I have created confih.php as described
5) I have created index.php as described
6) Changed api.php as descrribed

Now: running http://localhost/direct/index.php i get two errors:

1) invalid XML markup in api.php
2) Example is not defined in index.php

I have exactly copied the sources.

What is going wrong?

Is there any description of implementing an own server side stack independant of any programming languages, which enables one to setup an individual own stack?

Best regards,
Stefan