I'll definitly take a look at GIN. I'm not used with Guice (as I'm a Spring user) but concept is familiar. Any chance to see Google Guice contribute to JSR 299 ? Data binding will be a killer feature when available compared to hand-written PropertyChangeListeners and related boilerplate code. Is there any implementation draft doc somewhere ? Any chance to see a GWT emulation for javax.beans.binding (JSR295) ?
2009/4/20 Arthur Kalmenson <arthur.k...@gmail.com> > > With regards to AOP, as Ray mentioned, you might want to check out > Google GIN. They haven't yet implemented Interceptors (AFAIK), so you > might want to combine efforts with them to get this to work. > > With regards to data binding, bobv is, AFAIK, working on that feature. > If you hold off until it's dropped in the incubator, you could avoid > duplicate work. > > Best regards, > -- > Arthur Kalmenson > > > > On Mon, Apr 20, 2009 at 3:03 AM, nicolas de loof > <nicolas.del...@gmail.com> wrote: > > > > What I'm looking for is both some AOP capability and a way to port javaFx > > "bind" keyword to Java / GWT. > > gwt-beans-binding is doing databinding using marker interface in model > and > > "wrappers" for widgets. This makes impossible to use advanced widgets > from > > 3rd tier librairy without some more code to write. > > Anyway, thanks a lot for this interesting link. > > Nicolas > > > > 2009/4/20 Ray Cromwell <cromwell...@gmail.com> > >> > >> GWT generators cannot access the source AST of the original class, > >> only the class metadata (fields/method names, parameters, signatures), > >> no method body stuff. If you're looking to do AOP/Method Interception, > >> I suggest you take a look at Google Gin which is a Guice > >> implementation for Git. It's a dependency injection framework, and > >> you'll only need a single GWT.create() call in the beginning to start > >> the process. > >> > >> You can't 'intercept' classes with regular GWT generators like you can > >> with a classloader if that's what you're trying to do. But with Gin, > >> the dependency injection is transitive, so in effect, you can > >> intercept other classes that appear as injected parameters or fields. > >> > >> -Ray > >> > >> > >> On Sun, Apr 19, 2009 at 11:43 PM, nicolas de loof > >> <nicolas.del...@gmail.com> wrote: > >> >> > >> >> > I wonder if there is any way to also "pre-process" Java sources, > for > >> >> > example > >> >> > this would enable support for Aspect Oriented Programming or maybe > >> >> > some > >> >> > DataBinding framework. > >> >> > >> >> Depends what you mean by "pre-process"... Generally, generators > >> >> analyze the class they're called for (for example, looking for > >> >> specific annotations on methods or on the class itself) and according > >> >> to this generate a Java class extending the one they've been called > >> >> for. > >> >> (is this understandable? is this at least no-so-bad english?) > >> > > >> > In many case the generator will create from MyClassX some MyClassXImpl > >> > or > >> > equivalent that extends the original one, bu not REPLACE it as Java > >> > source. > >> > This is what I mean by "pre-process". > >> > For example, to implement a AOP framework I'd like to instrument all > >> > calls > >> > to some method. For this reason I'd like a generator / pre-processor > to > >> > check the source files and detect the matching pointcuts to add some > >> > adived > >> > code. Many other example can apply, including annotation processing > for > >> > declarative coding (ex : @Property annotation to automagically > introduce > >> > the > >> > required PropertyChangeListeners) > >> > I never tried it myself, but I'n not sure a generator can REPLACE the > >> > original Java Source. I may be wrong but I also thing the generated > code > >> > is > >> > only available when using GWT.create(), making the code less > testable > >> > (with standard junit, not GWTTestCase) and fully GWT-dependenant. > >> > Cheers, > >> > Nicolas > >> > > >> > > >> >> > >> > > >> > > >> > > > >> > > >> > >> > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---