Derrell Lipman, a long-term qooxdoo contributor and active supporter of the framework, has been working on a very exciting project for the past year or so, and has already based a complete application on it. We happily share the following information with the community. Great achievement, Derrell, thanks for contributing!
In traditional client-server development…
Be LIBERATED from those hassles!
LIBERATED is a new methodology for web-based client-server application development, in which a simulated server is built into the browser environment to run the backend code. This allows the frontend code to issue requests to the backend in either a synchronous or asynchronous fashion, step, using a debugger, directly from frontend code into backend code, and to completely test both the frontend and backend portions. That exact same backend code, now fully tested in the simulated environment, is then moved, unaltered, to a real server. Since the application-specific code has been fully tested in the simulated environment and moves unchanged to the server, it is unlikely that bugs will be encountered at the server that did not exist in the simulated environment.
The real benefit of LIBERATED is that it allows the entire application, both frontend and backend, to be debugged and tested fully within the browser environment, running the backend code in the LIBERATED server simulator. This means you can set breakpoints with Firebug in your backend code, step through to find bugs, etc. Once all of your code is fully debugged and tested in the simulated environment, you simply move the backend code, generally with no changes, to the real server.
The figure above shows the architecture of the development and production environment when developing with LIBERATED. The frontend code runs on the client machine (i.e., in the browser). Backend code runs on a server machine and/or on the client machine, with the exact same application code (“business logic”) and application communication protocol, e.g., JSON-RPC, REST, etc., code in both environments. The actual database differs in the two cases, but the application’s interface to the database is identical regardless of which backend is in use. Similarly, the application communication protocol code is the same regardless of backend, but the messages arrive from web servers unique to the backend, for parsing.
LIBERATED is simply a “library”, in qooxdoo parlance. It is installed like any qooxdoo contrib or other library by referencing its Manifest.json file in the application’s config.js “libraries” section. LIBERATED currently runs in App Engine or with the Jetty web server.
As to using it, LIBERATED is described in excruciating detail in Derrell’s thesis. Although that document uses the current name of the library (LIBERATED), it predates the renaming of the namespace, so anyplace you see rpcjs in the document is now called liberated.
The API documentation should be quite complete, so running
./generate.py api from the top level will provide the normal API viewer with a fair amount of useful information. In particular, for database manipulation, see
liberated.dbif.Entity. Some additional and better user-level documentation would definitely be useful, and might be added over time. Derrell invites you to get familiar with LIBERATED and appreciates your feedback.