View Poll Results: If you read it, did you find DirectJNgine User's Guide adequate?

Voters
54. You may not vote on this poll
  • Yes

    40 74.07%
  • No

    14 25.93%
  1. #261
    Ext JS Premium Member
    Join Date
    May 2009
    Location
    Barcelona (Spain)
    Posts
    218
    Vote Rating
    19
    pagullo will become famous soon enough pagullo will become famous soon enough

      0  

    Default


    Quote Originally Posted by Olivercomputing2 View Post
    (Quick parenthetical note: This quick reply does NOT work with Google Chrome on OS X. FYI anyone listening at Ext JS)

    Another question. Does DJN or perhaps more broadly ExtDirect, directly support the idea of "Reverse AJAX" - i.e., a server asynchronously pushing changes back to the client?
    I'm afraid there is no "reverse Ajax" support in DirectJNgine.

    Regards,
    Pedro Agulló, Barcelona (Spain)
    Agile team building, consulting, training & development
    DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/

  2. #262
    Ext User
    Join Date
    Apr 2010
    Posts
    6
    Vote Rating
    0
    Olivercomputing2 is on a distinguished road

      0  

    Default


    Thanks for your quick responses, Pedro.

    I'm puzzled though. Suppose you - say - have two tree components on the same page. Then, say you want to click on the leaf of one tree to send data to Java methods for processing, then have that method ultimately update tree #2. Is that impossible then?

  3. #263
    Ext JS Premium Member
    Join Date
    May 2009
    Location
    Barcelona (Spain)
    Posts
    218
    Vote Rating
    19
    pagullo will become famous soon enough pagullo will become famous soon enough

      0  

    Default


    You just update the second tree in the javascript callback receiving the result of the Java method invoked in the server.
    Pedro Agulló, Barcelona (Spain)
    Agile team building, consulting, training & development
    DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/

  4. #264
    Ext User
    Join Date
    Apr 2010
    Posts
    6
    Vote Rating
    0
    Olivercomputing2 is on a distinguished road

      0  

    Default


    Sorry, I don't understand what you mean, can you elaborate a little on that?

    Incidentally I ran across the "wicket-ext" project here: http://code.google.com/p/wicket-ext/

  5. #265
    Ext JS Premium Member
    Join Date
    May 2009
    Location
    Barcelona (Spain)
    Posts
    218
    Vote Rating
    19
    pagullo will become famous soon enough pagullo will become famous soon enough

      0  

    Default DirectJNgine 1.3 alpha 1 is out, with support for Google's AppEngine

    DirectJNgine 1.3 alpha 1 is out, with support for Google's AppEngine


    Today I am releasing DirectJNgine 1.3 alpha 1.

    This new release is aimed at users of Google's AppEngine, and you can download it from http://code.google.com/p/directjngine/.

    For further info, go to DirectJNgine 1.3 alpha 1 adds support for Google's AppEngine.

    For a two minutes introduction on how to make your current DirectJNgine app work with AppEngine, take a look at 1-2-3 guide to modifying your DirectJNgine app to support AppEngine (proposal for DJN 1.3 alpha 1).

    For more detailed info, check the User's Guide, which has a new chapter about AppEngine support.

    Feedback wanted
    The aim of this alpha is to get real-life feedback from people interested in using DJN with AppEngine apps.

    Confirmation on this release working for Linux-based developers as well as information about whether DJN users are able to deploy their AppEngine apps without problems will be welcome.

    Best regards,
    Pedro Agulló, Barcelona (Spain)
    Agile team building, consulting, training & development
    DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/

  6. #266
    Sencha User chrizmaster's Avatar
    Join Date
    Feb 2009
    Location
    Australia
    Posts
    441
    Vote Rating
    1
    chrizmaster is on a distinguished road

      0  

    Default


    As mentioned, I post my request in this thread:
    Hi,

    We use your api as mentioned above and first of all, we would like to thank you for provinding such a great framework.

    I’m as the head developer responsible for creating the app. Design, therefore I have a question.

    We have several classes, that’ll be used to provide database access. Everytime a call comes in from JS, the method has to open a connection and close it finally.
    As we found out, the constructor will be called everytime I call the class from JS. So we think about opening a database connection there (to spend less code).
    Is there any kind of interface or deconstructor, that we can use to close the db connection or is a try-catch-finally the only possibillity?

    Regards..

    EDIT: I looked through your code and as I expected, I didn't find anything like I described above. A method called "destroy" or something would be awesome.

    Object orientated like this:
    I have to extend a class from an abstract class which has 2 methods: create / destroy.
    This 2 method will be called by your framework.
    Method create will be called right after initialzing the class (like the constructor) and destroy is called after the method was called and is finished with it's work (means throw a result back to the receiver...)

  7. #267
    Ext JS Premium Member
    Join Date
    May 2009
    Location
    Barcelona (Spain)
    Posts
    218
    Vote Rating
    19
    pagullo will become famous soon enough pagullo will become famous soon enough

      0  

    Default


    Quote Originally Posted by chrizmaster View Post

    We use your api as mentioned above and first of all, we would like to thank you for provinding such a great framework.


    Thanks

    We have several classes, that’ll be used to provide database access. Everytime a call comes in from JS, the method has to open a connection and close it finally.
    As we found out, the constructor will be called everytime I call the class from JS.
    This is an implementation detail you should not rely on: later, I might decide to cache the object, etc.
    Besides, this will not work for application or session scoped objects. Do not rely on this.

    So we think about opening a database connection there (to spend less code).
    Is there any kind of interface or deconstructor, that we can use to close the db connection or is a try-catch-finally the only possibillity?
    try-catch-finally is the way to go.

    If the functionality you need is to create a connection and close it, you should probably write a servlet filter that does precisely that. You can get this functionality easily by using thread-local storage to store your connection and close it if it is open once the request has been handled.

    Regards,
    Pedro Agulló, Barcelona (Spain)
    Agile team building, consulting, training & development
    DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/

  8. #268
    Sencha User chrizmaster's Avatar
    Join Date
    Feb 2009
    Location
    Australia
    Posts
    441
    Vote Rating
    1
    chrizmaster is on a distinguished road

      0  

    Default


    Hi,
    I need to program a method that collects a file from my backend and send it back as a response stream, so that I can watch the file in an iframe.

    Something like this:

    PHP Code:
     WebContextManager.get().getResponse().getOutputStream().write(datastream,0,index); 
    But, I'll get exceptions like

    PHP Code:
    java.lang.IllegalStateExceptiongetWriter() has already been called for this response 
    so i guess the mechanism to collect files is wrong. any suggestions?

    Thanks
    Christian

  9. #269
    Sencha User chrizmaster's Avatar
    Join Date
    Feb 2009
    Location
    Australia
    Posts
    441
    Vote Rating
    1
    chrizmaster is on a distinguished road

      0  

    Default


    nobody knows something about my issue?

  10. #270
    Ext JS Premium Member
    Join Date
    May 2009
    Location
    Barcelona (Spain)
    Posts
    218
    Vote Rating
    19
    pagullo will become famous soon enough pagullo will become famous soon enough

      0  

    Default


    Quote Originally Posted by chrizmaster View Post
    Hi,
    I need to program a method that collects a file from my backend and send it back as a response stream, so that I can watch the file in an iframe.

    Something like this:

    PHP Code:
     WebContextManager.get().getResponse().getOutputStream().write(datastream,0,index); 
    But, I'll get exceptions like

    PHP Code:
    java.lang.IllegalStateExceptiongetWriter() has already been called for this response 
    so i guess the mechanism to collect files is wrong. any suggestions?

    Thanks
    Christian
    Not a bug, but a design decision.

    DJN implements the ExtDirect protocol, which says that you must return data formatted in a certain way. There is no provision for you to take over the response and provide your own result, as that would break the protocol.

    Though I can understand that the possibility of messing with the response result might be useful in several scenarios (yours, for example), I feel supporting that would be a hack: think, for example, about the interaction when there are batched requests, how would we handle them in a general way? And I'm quite sure we would run across other bizarre behavior sooner of later.

    At the tactical level, what you are experiencing is an indirect result of such decision, as DJN gets the writer before you do, just to be able to control the output so nobody else can mess with it.

    You might try providing a custom version of the DJN servlet so that you can process this kind of request in a different way, by overriding the doGet/doPost method to handle this special case. That way, it is very likely you will make your code future proof, so that it can work with newer versions of DJN.

    Or you might implement a special servlet filter to modify the response...

    Not sure whether you can find a workaround inside of DJN, or whether you might need to use a different mechanism this time: let us know what happens!

    Regards,
    Pedro Agulló, Barcelona (Spain)
    Agile team building, consulting, training & development
    DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/

Thread Participants: 86

  1. Animal (5 Posts)
  2. barton (4 Posts)
  3. Condor (1 Post)
  4. mauro_monti (6 Posts)
  5. mbarto (1 Post)
  6. aconran (1 Post)
  7. MoShAn480 (1 Post)
  8. asgillett (2 Posts)
  9. seade (4 Posts)
  10. zaqwsxqwer (3 Posts)
  11. Sesshomurai (16 Posts)
  12. ThierryC (3 Posts)
  13. maxm165 (3 Posts)
  14. techstudios (2 Posts)
  15. sayonara (2 Posts)
  16. kschlaudt (1 Post)
  17. hschaefer123 (2 Posts)
  18. omarc (2 Posts)
  19. lxbzmy (4 Posts)
  20. mct (6 Posts)
  21. mediacept (2 Posts)
  22. dionisexorcius (1 Post)
  23. alper (1 Post)
  24. steverc (2 Posts)
  25. chrizmaster (18 Posts)
  26. J@y (21 Posts)
  27. Georgioa (6 Posts)
  28. wguan (1 Post)
  29. minneyar (16 Posts)
  30. jhoweaa (1 Post)
  31. Ramez (2 Posts)
  32. malus (1 Post)
  33. dweller (8 Posts)
  34. stdunbar (1 Post)
  35. vlagorce (20 Posts)
  36. cwilliso (1 Post)
  37. Whatty (13 Posts)
  38. Ice (1 Post)
  39. clynnh (1 Post)
  40. SreevaniN (1 Post)
  41. Stsalomon90 (1 Post)
  42. GregT (9 Posts)
  43. jcalfee (6 Posts)
  44. set_ti (1 Post)
  45. maho2nd (3 Posts)
  46. dreamtaotao (3 Posts)
  47. Toxa (4 Posts)
  48. tungchau (3 Posts)
  49. wlan0 (2 Posts)
  50. jpr (2 Posts)
  51. gianmarco (5 Posts)
  52. extjslikeit (2 Posts)
  53. harmen_wessels (1 Post)
  54. Olivercomputing2 (4 Posts)
  55. vanessa_ng (2 Posts)
  56. alois.cochard (5 Posts)
  57. kyrillos52 (2 Posts)
  58. Tod (1 Post)
  59. Alinanila (1 Post)
  60. tfannon (2 Posts)
  61. Kynao (1 Post)
  62. feiq (4 Posts)
  63. dalt (1 Post)
  64. xfolch (1 Post)
  65. avijit (1 Post)
  66. marcelsnews (2 Posts)
  67. maddhippy (1 Post)
  68. sritter (1 Post)
  69. july (2 Posts)
  70. jtkeller7983 (1 Post)
  71. lfranchini (2 Posts)
  72. 7/11 (2 Posts)
  73. yAdEs (1 Post)
  74. zazz (1 Post)
  75. waqar (5 Posts)
  76. pjain11 (1 Post)
  77. alexMobimesh (2 Posts)
  78. zachHurt (4 Posts)
  79. n0n3 (5 Posts)
  80. adavis2 (1 Post)
  81. mark.peters (1 Post)
  82. lee el (4 Posts)
  83. frengo19 (3 Posts)
  84. prakashwagle (1 Post)
  85. extejnar (2 Posts)
  86. alin@sonatype.com (1 Post)