Chapter 11. Remote method invocation with Ext Direct
This chapter covers
- Setting up Ext Direct servers and clients
- Invoking methods directly
- Using Ext Direct with Ext.data.Store
In previous chapters, you exchanged data from servers with widgets like grids, trees, forms, and even XTemplates. You used Ext.data.Stores and Ext.Ajax.requests for communicating with a server. If you’ve spent some time working with Ext JS 4, you know that setting up Ajax requests for creating, reading, updating, and destroying data allows for great precision in configuring processes, but it can also be cumbersome. Writing blocks for each operation with separate success and failure callbacks will take up quite a few lines of code on both server and client sides, not to mention the amount of code required to dedicate URL paths or variables to distinguish between operations.
A common way to reduce the amount of code on the server side is to employ a RESTful interface. On the client side, stores and Ext.data packages are there to automate most of the CRUD process and make your life much simpler. But the clever developers from Redwood City have gone a step further.