GWT with spring dependency injection

77 views
Skip to first unread message

Aju Mathai

unread,
Sep 16, 2009, 1:56:30 PM9/16/09
to google-we...@googlegroups.com
Forgot to modify the subject in my earlier email.

Thanks ,
mathaj

On Wed, Sep 16, 2009 at 11:23 PM, Aju Mathai <math...@gmail.com> wrote:
> Hi,
>
> I want to know if I can use spring in my GWT code to use the
> dependency injection framework? I am not talking about GWT gui
> interaction with backend spring app.The reason I am asking is the GWT
> code gets compiled to JavaScript and this is what gets executed in
> browser. If I am using spring code in that, then would it work or for
> that matter any other library like log4j, etc.?By doing this i could
> also control the access to components based on the user permissions.
>
> Or the GUI code have to be pure GWT API only?
>
> For example,
>
> public class MyTable {
>   private Button myButton;
>   @Autowired
>   public MyTable(Button aMyButton) {
>      myButton = aMyButton;
>   }
> }
> Can you gimme some pointers whether this can be done . Some sample
> code egs will help me.
>

charlie

unread,
Sep 16, 2009, 2:20:00 PM9/16/09
to google-we...@googlegroups.com
You'll want to use googles GIN, a GUICE version for GWT ( dependency injection framework )

http://code.google.com/p/google-gin/.

Aju Mathai

unread,
Sep 16, 2009, 2:25:59 PM9/16/09
to google-we...@googlegroups.com
Hi,

Thanks , can you point me to some examples using GIN (GWT Injection) ,
where the widgets are added using the spring config file. It will help
me understand it.

Thanks ,
mathaj

Sripathi Krishnan

unread,
Sep 16, 2009, 2:35:55 PM9/16/09
to google-we...@googlegroups.com
See this page - http://code.google.com/p/google-gin/. It has links to using gin. Also, you should read about GUICE (http://code.google.com/p/google-guice/) because GIN borrows ideas heavily from GUICE.

GIN hasn't been officially release as yet, but you can download the code from svn and create the gin.jar.

--Sri


2009/9/16 Aju Mathai <math...@gmail.com>
Reply all
Reply to author
Forward
0 new messages