1

I hope my question is not to generic.

I created a framework in gwt/gxt which helps developer to create very quick a web application with a set of pre definied widgets.

Now over the days they want to have new functionality which are very related to a specific customer and I found it very difficult to extend my framework. I am using the MVP pattern on client side with GIN and GUICE on server side. The client components which needs to be extended also have related services on the server to load their data.

I already thought about creating new guice modules and over"bind"(dont know if this is the right word) the existing ones but than the developer has to rewrite the complete module or its service.

Does somebody already has some experiences with designing a framework with gwt on client and server side? If yes how can I provide my framework with easy possiblities to extend with customer specific stuff. Maybe there are some nice patterns out there which I could use.

Thanks a lot

1

1 Answer 1

0

If I understand right you question, you can do something similar to this idea I got now.

In your framework, you could provide a module with all your modules, like this:

public class MyAPI {
    public static List<Module> MODULES = Arrays.asList(new FooModule(), new BarModule(), new OtherModule());
    public static Module getMyAPIModule() {
        return new AbstractModule() {
             protected void configure() {
                  for(Module m : MODULES) install(m);
             }
         }
    }
}

Then, in your app, when you create the injector, or in your servlet module, you can do a install(MyAPI.getMyAPIModule()); and it will work

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.