Like the previous version, Mvp4g 1.1.0 helps you build GWT
applications easily following best practices shown by Ray Ryan (MVP,
Event Bus and Dependency Injection), but now it is even easier because
you can do it with only one Java interface and a few annotations (and
you now have a strongly-typed event bus).

It also includes:
-integration of GWT 2.0 Code splitting feature: divide your
application into modules and load the module's code only when you need
it.
-optimization features: lazy loading of presenters & views (build your
views & presenters only when you need them)

For example, this is the code you need to create an event bus with 4
events:

@Events( startView = CompanyListView.class, module =
CompanyModule.class, debug = false )
public interface CompanyEventBus extends EventBus {

        @Event( handlers = CompanyEditPresenter.class )
        public void goToEdit( CompanyBean company );

        @Event( handlers = CompanyDisplayPresenter.class )
        public void goToDisplay( CompanyBean company );

        @Event( handlers = { CompanyListPresenter.class,
CompanyDisplayPresenter.class } )
        public void companyCreated( CompanyBean newBean );

        @Event( handlers = CompanyListPresenter.class )
        public void companyDeleted( CompanyBean newBean );

}


This is how you would define an event to load a child module using the
GWT code splitting feature:

@Events( startView = MainView.class, historyOnStart = true, debug =
false )
@ChildModules( { @ChildModule( moduleClass =
CompanyModule.class ), ... )
public interface MainEventBus extends EventBusWithLookup {

        @Event( modulesToLoad = CompanyModule.class, ... )
        public void goToCompany();

}

Examples and documentation are provided to illustrate the framework at
http://code.google.com/p/mvp4g

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to