EntryPoint interface void onModuleLoad()
– Service interface extending RemoteService
– ServiceAsync Interface for SI with AsyncCallback<Output> as last param
– ServiceImpl extending RemoteServiceServlet
– DTO’s (DomainModel) to be returned by ServiceImpl
– DTO (DomainModel) needs to be Serializable to be sent from server to client
– define servlet paths for serviceImpl in web.xml
– ServiceAsyncCallBack implementing AsyncCallback<T>
– implements methods onFailure(Throwable) & onSuccess(T)
– takes view as a constructor param and onSuccess paints the result (Presentation Model) on the view (dto (Domain) -> model (Presentation) ; (Presentation) model -> view)
(Presentation) Model representing the UI data
– converts dto (DomainModel) to itself (Presentation Model)!
View representing the display screen/widgets – can take (Presentation) model as constructor param
EntryPointImpl hooks everything together
– creates Async version of service using GWT.create(class)
– creates the view and attaches handlers to widgets
– handlers implement onClick(ClickEvent ) etc.,
– handlers creates AsyncCallback, views and services (or obtains references to them) and invokes the Async service and passes the AsyncCallback created to handle the service response asynchronously.
*only ServiceImpl is in Server pkg.
*shared package is for classes shared between client and server
*note the difference between presentation model and domain model