This software is a Python-based implementation of an Ext.Direct router using Zope and Django frameworks. It enables easy communication between HTTP endpoints and remote servers by facilitating data exchange in a straightforward and secure manner.
ExtDirect provides a Python implementation of a server-side Ext.Direct router that can receive and parse request data, route it to the correct method, and create, encode, and return the appropriate data structure wrapping the results. It also has a class that can generate client-side JavaScript defining an Ext.Direct provider from a router class.
To see how the server side works, a DirectRouter class is defined with two methods that need to be remoted to the client-side. Then, a DirectProviderDefinition class generates the code that needs to be given to the client to define the provider. Assuming this code is provided to the client and the class is available at the specified URL, the methods can be accessed from the browser.
For example, a call could be made to the 'capitalize' method on the TestUtils class, and the result would be fed to a callback, which would print the result to the JS console. To make this call, a POST request with a JSON-encoded body is created that includes the class and method names and any data sent.
An instance of the server-side class is created, which is callable and accepts the request body. It returns a JSON-encoded object exhibiting the structure expected by Ext.Direct on the client.
In summary, using extdirect is a very easy way to remote server-side methods to the client side, and the implementation in Python makes it simple to use with ExtJS 3.0.
Version 0.3: N/A