Sample Google Web Toolkit (GWT) application for creating update and deletion (CRUD)

Hello.
Does anyone know of any examples of the Create Update Update application and the Google Web Took (GWT) removal.
That is, an application that uses GWT to manipulate and display database contents.

thank

+3
source share
4 answers

GWT is a client technology, so basically you get only the user interface. Any CRUD process will occur on the server side, which can be any J2EE code.

StockWatcher, ( )

RequestFactory

?

+1

. :

, :

  • GreentingService.java :

    GreentingServiceextends RemoteService {   ArrayList getEverything(); }

  • GreentingServiceSync.java :

    GreentingService {  void getEverything ( AsyncCallback); }

  • , GreentingServiceImpl :

       public class GreentingServiceIMPL extends RemoteSericeServlet implments GreentingService
       {
         public ArrayList<String> getEverything()
         {
            String query="Select * from....";
            Class.forName("com.mysql.jdbc.Driver").newInstance();
            Connection conn=DriverManager.getConnection(url,user,password);
            Statement stmt = conn.createStatement();
            //get stuff out of daatabase here and retun as an arraylist
            }
         }
    
  • : public Someclass EntryPoint { public void onModuleload() {   SQLRunnerAsync sql = (SQLRunnerAsync) GWT.create(SQLRunner.class);   AsyncCallback > callback = new AsyncCallback > () {

        @Override
        public void onFailure(Throwable caught) {
            //do nothing
    
        }
    
        @Override
        public void onSuccess(ArrayList<String> result) {
    
            for(int i = 0; i < result.size(); i++)
                             {
    
    
            }
        }};
        sql.getEverything(callback);
    

    ............... }//onModulelOad }//

: http://altair.cs.oswego.edu/~tenberge/tenbergen.org/misc/DB-Access-in-GWT-The-Missing-Tutorial.pdf

+3

- CRUD, , :

https://github.com/fhcampuswien/atom

It uses GWT for front-end and Hibernate for storing data in the backend. The data structure should be defined in only one central place (DomainObject classes), since both the graphical interfaces and the backend are written in a common way that is independent of the data structure.

I would love to hear comments or answer questions about this if anyone takes the time to take a look.

0
source

Source: https://habr.com/ru/post/1772376/


All Articles