wonu wns
wonu wns

Reputation: 3608

GWT CRUD GUI Model

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

Answers (1)

Ümit
Ümit

Reputation: 17489

Your question is a little bit general. You probably have to deal with two questions which can be handled separately:

  1. Communication with the backend.
  2. GUI for CRUD operations

Communication with the backend:

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:

  1. Third party tools like piriti which are based on GWT generators
  2. Javascript Overlay Types (JSO)
  3. GWT Autobean framework (which is used by RequestFactory btw).

GUI for CRUD operations

For mapping your DTOs to your UI and doing the CRUD operations you can do it either:

  1. manually
  2. with the Editor framework

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

Related Questions