tg.pl - Drab: Server Side User Interface Access

Example domain paragraphs

Drab is the extension library to Phoenix Framework for providing an access to the browser's User Interface (DOM objects) from the server side . The main advantage is to eliminate necessity of writing two applications: one for the client-side, and one for the backend. All the UI control may be now done in the backend, eliminating JS and AJAX.

Additionally, because http is a stateless and an one-way protocol, it is not easy to communicate back from the server to the browser. Like, for example, during execution of the long running process, when there is a need to update status (eg. progress bar), or to ask the operator about something (like "would you like to continue?"). Of course there are workarounds for this, like polling the server every few seconds to get a status, or even auto-refreshing the page, but those are just a dirty workarounds. The

Drab is made with Elixir on Phoenix . This page is a living demo - all examples are actually working on the Drab server (v0.10.0) . You can find the source code of Drab on Github , and the source code of this demo page: here . For more detailed instructions, please refer to the documentation .

Links to tg.pl (1)