Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Questions regarding evaluation of SmartGWT

    Our team is evaluating Smartgwt Enterprise and have reviewed most of the samples and relevant forum posts. As this is a new project, we would follow the suggestion to use the sql connector with ds.xml text datasource definitions.

    We have a couple of questions to complete our evaluation matrix:

    Unit Testing - we tried writing a simple test using GWTTestCase and encountered some problems. It seems like when one calls DataSource.get() from within the test case method, the datasource returned is null, however when I do the same thing in the regular onModuleLoad() method, the datasource get instantiated correctly.

    Datasources - it is clear that datasources can be subclassed on the server side to override default behaviour and that a callback can be passed on the client to take action after a server request in methods like listgrid.fetch() etc. Is there a way to do pre/post processing on all request on the client by subclassing the client side datasource class if we are using ds.xml definitions and DataSource.get() to instantiate them? Perhaps this could be done by passing a callback to the parent class.

    Transactions - I see that one can batch up requests to be processed at once on the server, what about database transactions? If I update a record through a listgrid, is this wrapped in a db transaction? How can I start my own transactions on the server using the DSRequest object or can I add a "start transaction" and "commit" statement to a customSQL operation binding?

    SQL customization - I notice that there is a $defaultSelectClause, is there also a corresponding $defaultUpdateClause, $defaultDeleteClause, etc? Where is this documented?

    Also some general questions:
    - how long has smartgwt been in production?
    - how many clients do you have?

    I hope this isnt too much for one post, any answers are appreciated.
    Thanks

    #2
    Unit testing - we recommend Selenium for a free solution, or SOASTA for a commercially supported solution that also includes load testing. Download a nightly build to pick up special support for Selenium - see the included simple user guide.

    Data transforms - what's your use case here? If you explain what you're trying to accomplish we can point to the most appropriate APIs.

    Support for declaring transactions explicitly is days away from being committed - stay tuned.

    SQL customization - additional variables exist - take a look at all the SQL and Velocity- related overviews under the special "docs" package in JavaDoc and let us know if there seems to be a need for additional variables.

    General - the SmartClient engine, which is wha powers SmartGWT, has been in production deployment since 2000, and is deployed at tens of thousands of institutions to many millions of end users.

    Comment


      #3
      Data transformations -
      We want to do be able to preprocess and post process every request to the server. I realise this can be done by programmatically adding a callback to a datasource.fetch/listgrid.fetch (or any other) CRUD method, however, we would like to do this in one place and have access to all server requests in a top level way, rather than having to add the same code to every datasource.fetch request. Say for instance, if we catch an exception on the server and send a nicely formatted reply back by calling setfailure() and setdata() on the dsResponse, we may want to add some more information when the client receives the failure which goes in the popup up message generated by the framework. The client code will know more about the users stage in a multi step business process and can add more details to the error message regarding the business process. Also, this would be useful to override default behaviour like in a listgrid where it rolls back your new data to the previous data, perhaps the user doesnt want to lose what they have entered.

      SQL customization - if we want to implement multiple sql statements in one shot (for instance for cascading deletes), it would be nice to be able to say
      <customSQL>
      Delete from childTable where parentid=x;
      $defaultDeleteQuery;
      </customSQL>

      Comment


        #4
        There are separate, best entry points for the use cases you've cited - for centrally customizing error behavior, see RPCManager.addErrorHandler(), for doing special on failed ListGrid save, add an editFailed handler.

        On multiple SQL statements, we may be adding the ability to just have multiple <customSQL> tags, but what you can do right now is just declare a second operationBinding with the other customSQL, and trigger that operation programmatically via adding a DMI to the first operation that just creates a second DSRequest to call the second operation.

        Comment


          #5
          This answers our questions for now. Thank you.

          Comment

          Working...
          X