13
Globalcode – Open4education GWT e Guice, o Google apoiando a comunidade Java Eder Magalhães Instrutor Globalcode

Gwt-Guice_TDC2009

Embed Size (px)

Citation preview

Page 1: Gwt-Guice_TDC2009

Globalcode – Open4education

GWT e Guice, o Google apoiando a comunidade Java

Eder MagalhãesInstrutor Globalcode

Page 2: Gwt-Guice_TDC2009

Globalcode – Open4education

Agenda

GWTO que é?

Quais os benefícios em usar?

GuiceO que é?

Quais os benefícios em usar?

Demo

Google e Java

Links

Page 3: Gwt-Guice_TDC2009

Globalcode – Open4education

Ainda em 2010...

Cansado(a) de incompatibilidades entre navegadores ?

Seus problemas acabaram, ou quase!

Page 4: Gwt-Guice_TDC2009

Globalcode – Open4education

GWT - Google Web Toolkit

Uma solução para RIA!

Tornando desenvolvimento web mais produtivo.Construa aplicações web sem “tédio”.Use e abuse de Ajax sem uma linha de JavaScript.

Page 5: Gwt-Guice_TDC2009

Globalcode – Open4education

GWT só mais um framework Java?

Page 6: Gwt-Guice_TDC2009

Globalcode – Open4education

Benefícios

Concentre seus esforços no Java;

Muito Ajax sem se preocupar com JavaScript;

Cross-Browser;

Muitos componentes visuais / widgets prontos;

Suporte a Teste Unitário;

Page 7: Gwt-Guice_TDC2009

Globalcode – Open4education

Outra “problema”...

Qual o nível de acoplamento entre as camadas do aplicativo?

Factory pra todo lado?Deseja mais flexibilidade e transparência?

Page 8: Gwt-Guice_TDC2009

Globalcode – Open4education

Google Guice

Framework para Injeção de Dependência!

Fala-se “Juice”;Simples, curva de aprendizado pequena;Adota Annotations como forma de mapeamento;Flexível, pode ser utilizado em diversas arquiteturas Java;Faz o gerenciamento de Escopo;Não é substituto do Spring! Ambos na JSR 330

Page 9: Gwt-Guice_TDC2009

Globalcode – Open4education

No caso do DataProvider...

public class DataModule extends AbstractModule { ... bind(DataProvider.class) .annotatedWith(Names.named(”calendar")) .to(CalendarProvider.class);

bind(DataProvider.class) .annotatedWith(Twitter.class) .to(TwitterProvider.class);

public class Grid ... {

private DataProvider provider;

@Inject public Grid (@Named(”calendar") DataProvider provider) { this.provider = provider; } ...

Page 10: Gwt-Guice_TDC2009

Globalcode – Open4education

No caso do DataProvider...

public class DataModule extends AbstractModule { ... bind(DataProvider.class) .annotatedWith(Names.named(”calendar")) .to(CalendarProvider.class);

bind(DataProvider.class) .annotatedWith(Twitter.class) .to(TwitterProvider.class);

public class Grid ... {

private DataProvider provider;

@Inject public Grid (@Twitter DataProvider provider) { this.provider = provider; } ...

Page 11: Gwt-Guice_TDC2009

Globalcode – Open4education

GWT e Guice Demo

Iteratividade + Flexibilidade

Page 12: Gwt-Guice_TDC2009

Globalcode – Open4education

Google apoiando Java!

Page 13: Gwt-Guice_TDC2009

Globalcode – Open4education

Links

[email protected]