Reputation: 3608
Good day. I'm still learning GWT so please help me. I'm working on a project - Web Application with GWT
on the Client Side. This app has lots of CRUD
operations so I'd like to make a model
for this. Can anyone suggest a prototype for my CRUD class?
CRUD on this app goes something like this:
When I clicked the Details button in a module, a popup will be shown that allows the user to do CRUD operations. This popup do have the module title, info on the selected item, and the buttons - Edit, New, Delete.
I have already finished building the base GUI for this project but I'm just starting to work on each module. I choose to begin on those module with CRUD operations. So, please help me and give your ideas on this project. Thanks in advance :)
Upvotes: 3
Views: 1945
Reputation: 17489
Your question is a little bit general. You probably have to deal with two questions which can be handled separately:
It depends on which kind of backend you are using.
Java-backend: For Java backends the recommended client-server communication protocol is RequestFactory.
Non-Java-backend: In case you are using a non-java backend (python, PHP, etc) you have to use RequestBuilder using JSON or XML (I would recommend JSON).
For mapping JSON/XML to DTO's and vice verca you can use different methods:
For mapping your DTOs to your UI and doing the CRUD operations you can do it either:
I would recommend to use the Editor
framework as it reduces the amount of boilerplate code
to move an object from your object graph to the UI and back.
The Editor framework works well with RequestFactory
(RequestFactoryEditorDriver
), Autobean
(SimpleBeanEditorDriver
) and Javascript Overlay Types
.
Upvotes: 2