So, ideally, in my opinion, based on one schema definition, I should completely generate the full Create Read Update Delete (CRUD) in the web context, i.e.:
- client: an interactive component of the HTML data table for operations, possibly with built-in editing, etc.
- client: form component for editing a single record, including validation, as deduced from the diagram
- server: route to access data to populate and update the specified components (REST endpoint)
- server: implementation for storing data, for example, in an SQL table.
So perfect; I would just define a schema for, say, a Person data type with first and last name and address fields, and then call a macro or function like (defcrud Person my-person-schema) and it works, I can go to the web page, see data, delete data and save data to the server.
My question is: is there anything in the clojure world that does something (or partially) as described above?
In my recent first full clj / cljs project, I found that I wrote a lot of code for this core material. In the old days, when I used a GWT structure called SmartGWT , I just needed to define a new ListGrid(myDataSource) and define a data source (equivalent to a schema) and the rest was output (at least something with reasonable default values was) .
The high level of development of SmartGWT is what allows me to quickly create prototypes for such business applications that I need to build quite often. GWT has its drawbacks, such as the very slow compilation time for larger applications, and the fact that I have to write Java, but this is the level of integration with the server and client that I am looking for in Clojure.
clojure crud
Marten sytema
source share