SlideShare ist ein Scribd-Unternehmen logo
1 von 74
Downloaden Sie, um offline zu lesen
Slim3 + GWT in Action
                                         Go Tanaka

Thursday, April 8, 2010
Thursday, April 8, 2010
Introduction




Thursday, April 8, 2010
Introduction




Thursday, April 8, 2010
-   -

                                  http://d.hatena.ne.jp/nowokay/20100305




Thursday, April 8, 2010
Thursday, April 8, 2010
http://www.ipa.go.jp/about/research/2009cloud/pdf/100324_cloud.pdf

Thursday, April 8, 2010
Thursday, April 8, 2010
Google App Engine?




Thursday, April 8, 2010
Google App Engine?




Thursday, April 8, 2010
Google App Engine?




Thursday, April 8, 2010
Google App Engine?




Thursday, April 8, 2010
Google App Engine?




Thursday, April 8, 2010
Google App Engine?




Thursday, April 8, 2010
Google App Engine?

                                  API
                           API
                     URL            API

                            API

                     Memcache API

Thursday, April 8, 2010
Google App Engine?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




                          http://www.youtube.com/watch?v=uExEw3OVMd0
Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?


                      Button b = new Button("Click me", new ClickHandler() {
                        public void onClick(ClickEvent event) {
                          GWT.runAsync(new RunAsyncCallback() {
                            public void onFailure(Throwable caught) {
                              Window.alert("Code download failed");
                            }
                            public void onSuccess() {
                              Window.alert("Hello, AJAX");
                            }
                          });
                        }
                      });


Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?




Thursday, April 8, 2010
GWT?
                          http://code.google.com/p/google-web-toolkit-incubator/




Thursday, April 8, 2010
Slim3


                    Spin Up

                    HOT reloading

                                         JDO, JPA

                    Global Transaction



Thursday, April 8, 2010
Slim3


                          HOT reloading

                          Slim3 Controller

                          Validation

                          Global Transaction

                          Slim3 DataStore

                          Slim3 JSP
Thursday, April 8, 2010
Slim3




Thursday, April 8, 2010
HOT reloading




Thursday, April 8, 2010
HOT reloading



                   ClassCastException   IllegalAccessException




Thursday, April 8, 2010
HOT reloading



                             HOT reloading


                     Slim3                   CoolBridge




Thursday, April 8, 2010
HOT reloading

                              Bootstrap
                                                                • Bootstrap classes of your JVM
                               System                           • System class loader classses
                                                                • /WEB-INF/classes of your web application
                               Common                           • /WEB-INF/lib/*.jar of your web application
                                                                • $CATALINA_HOME/lib
                           Application                          • $CATALINA_HOME/lib/*.jar



                          Tomcat6
          http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html



Thursday, April 8, 2010
HOT reloading

                             Bootstrap       HotReloadingClassLoader
                                             →Request
                              System         ※Cool

                              Common

                                             Request
                          Application
                                             HotReloadingClassLoader

                   HotReloadingClassLoader
                                             Request




Thursday, April 8, 2010
HOT reloading

                                              Static
                             Bootstrap
                                                       Web
                                                                   HOT reloading
                               System
                                                             HOT reloading
                              Common              COOL
                                                                   cool

                          Application


                    HotReloadingClassLoader


                                              ※


Thursday, April 8, 2010
HOT reloading

                             Bootstrap      COOL             HOT reloading
                                                       ClassCastException
                              System
                                                   Web Application
                              Common        HotReloadingClassLoader


                          Application
                                            COOL            HOT reloading
                                                             CoolBridge
                  HotReloadingClassLoader




Thursday, April 8, 2010
HOT reloading


                   cool               Interface


                          Interface     HOT reloading

                                              “.cool”


                   CoolBridge

Thursday, April 8, 2010
HOT reloading

        COOL interface                                               HOT reloadable implementation class
        package root.cool.service;                                   package root.service;

        public interface EeeService {                                import root.cool.service.EeeService;
           void foo();
        }                                                            public class EeeServiceImpl implements
                                                                     EeeService {
                                                                         public void foo() {
                                                                             Bbb bbb = new Bbb();
                                                                             ...
                                                                         }
                                                                     }

         EeeService service = CoolBridge.create(EeeService.class);
         service.foo();

          http://sites.google.com/site/slim3documentja/documents/hot-reloading

Thursday, April 8, 2010
HOT reloading



                          HOT reloading


                ClassCastException        IllegalAccessException

                          CoolBridge



Thursday, April 8, 2010
*.gwt.xml
                                             entry-point


                          Service
                          Slim3 Validation
                          Slim3 DataStore

Thursday, April 8, 2010
Web Application Project

                   Slim3       Google Code                  (http://
                   code.google.com/p/slim3)          Slim3-blank-
                   x.x.x.zip

                   Zip


                   Java Build Path, Factory Path, web.xml

Thursday, April 8, 2010
Factory Path                                            Meta




                          http://sites.google.com/site/slim3documentja/getting-started/getting-blank-project

Thursday, April 8, 2010
GWTServiceServlet

          <servlet>
              <servlet-name>GWTServiceServlet</servlet-name>
              <servlet-class>org.slim3.gwt.server.rpc.GWTServiceServlet</servlet-class>
              <load-on-startup>1</load-on-startup>
          </servlet>
            	
          <servlet-mapping>
              <servlet-name>GWTServiceServlet</servlet-name>
              <url-pattern>*.s3gwt</url-pattern>
          </servlet-mapping>




Thursday, April 8, 2010
<inherits name='org.slim3.gwt.emul.S3Emulation' />

             ※ S3Emulation   client      Key




Thursday, April 8, 2010
Thursday, April 8, 2010
Service




Thursday, April 8, 2010
Service




Thursday, April 8, 2010
Service



                      build.xml                Run As ... -> Ant build
                      Target gen-gwt-service




Thursday, April 8, 2010
Service




Thursday, April 8, 2010
Service




                            GWT

                             GWT

                              S3Emulation   inherit   source-
                     path



Thursday, April 8, 2010
Service




              Enum name




Thursday, April 8, 2010
Service




                  IsSerializable    Serializable

                  final, transient

                  GWT1.5


                                            GWT2.0


Thursday, April 8, 2010
Slim3 Validation




           ByteTypeValidator, DateTypeValidator, DoubleTypeValidator, FloatTypeValidator,
           IntegerTypeValidator, LongTypeValidator, NumberTypeValidator, ShortTypeValidator



           DoubleRangeValidator, LongRangeValidator



           MaxlengthValidator, MinlengthValidator, RegexpValidator, RequiredValidator




Thursday, April 8, 2010
Slim3 Validation


         Controller
         Validators v = new validators(request);
         v.add(“arg1”, v.required(), v.maxlength(200));
         if(v.validate()){
            // OK
         }


         Service
         Map<String, Object> params = // Dto      Map   Object
         //               Service        Errors
         params.put(ControllerConstants.ERRORS_KEY, new Errors());
         v.add(“arg1”, v.required(), v.maxlength(200));
         if(v.validate()){
            // OK
         }


Thursday, April 8, 2010
Slim3 Validation




                          AbstractValidator

                          getMessageKey()

                          validate()



                          Validators

Thursday, April 8, 2010
Slim3 Validation




                          AbstractValidator

                  import org.slim3.controller.validator.AbstractValidator;



                  public class BooleanValidator extends AbstractValidator {


                  }




Thursday, April 8, 2010
Slim3 Validation



                          getMessageKey()


            Validation
            ※                         Constructor
                                              application(_locale).properties (   )

             @Override
             protected String getMessageKey() {
                return "validator.xxxxx";
             }


Thursday, April 8, 2010
Slim3 Validation



                          validate()
                                                    String                       null


               public String validate(Map<String, Object> parameters, String name) {
                  if(//      ){
                          if (message != null) {
                             return message;
                          }
                          return ApplicationMessage.get(getMessageKey(), getLabel(name));
                     }
                     return null;
               }



Thursday, April 8, 2010
Slim3 Validation




          getMessageKey()


               validator.required={0} is required.


               validator.xxxxx={0} is xxxxx.

               label.arg1=ARG_1




Thursday, April 8, 2010
Slim3 Validation




                          Validators



               public BooleanValidator condition(boolean condition){
                   return new BooleanValidator(condition);
               }




Thursday, April 8, 2010
Slim3 DataStore




                          DataStore.put()


                                        DataStore
                      DataStore   GAE




Thursday, April 8, 2010
Slim3 DataStore




Thursday, April 8, 2010
Slim3 DataStore



                                        Google App Engine                      Transaction
      Slim3                                Global Transaction

                          Transaction               Entity Group                     Transaction
                                          Slim3                 Global Transaction


      ※                    Entity Group           Transaction     Global Transaction




Thursday, April 8, 2010
GWT                        Java

       HTML5


       GAE/J                  Slim3

                  DataStore




Thursday, April 8, 2010
Thursday, April 8, 2010
Thursday, April 8, 2010

Weitere ähnliche Inhalte

Ähnlich wie Slim3 Gwt In Action

Large problems, Mostly Solved
Large problems, Mostly SolvedLarge problems, Mostly Solved
Large problems, Mostly Solved
ericholscher
 
Html5 apps nikolaionken-08-06
Html5 apps nikolaionken-08-06Html5 apps nikolaionken-08-06
Html5 apps nikolaionken-08-06
Skills Matter
 
IPTC NITF Maintenance June 2010
IPTC NITF Maintenance June 2010IPTC NITF Maintenance June 2010
IPTC NITF Maintenance June 2010
Stuart Myles
 
Eye em potato_library_presentation
Eye em potato_library_presentationEye em potato_library_presentation
Eye em potato_library_presentation
EyeEm
 
Using+javascript+to+build+native+i os+applications
Using+javascript+to+build+native+i os+applicationsUsing+javascript+to+build+native+i os+applications
Using+javascript+to+build+native+i os+applications
Muhammad Ikram Ul Haq
 

Ähnlich wie Slim3 Gwt In Action (20)

Large problems, Mostly Solved
Large problems, Mostly SolvedLarge problems, Mostly Solved
Large problems, Mostly Solved
 
Adobe AIR Overview
Adobe AIR OverviewAdobe AIR Overview
Adobe AIR Overview
 
Become Master of Your Own Universe - DIBI 2013
Become Master of Your Own Universe - DIBI 2013Become Master of Your Own Universe - DIBI 2013
Become Master of Your Own Universe - DIBI 2013
 
Html5 apps nikolaionken-08-06
Html5 apps nikolaionken-08-06Html5 apps nikolaionken-08-06
Html5 apps nikolaionken-08-06
 
Edted 2010 Dicas de Web
Edted 2010 Dicas de WebEdted 2010 Dicas de Web
Edted 2010 Dicas de Web
 
HTML5 offline
HTML5 offlineHTML5 offline
HTML5 offline
 
Database Scalability Patterns
Database Scalability PatternsDatabase Scalability Patterns
Database Scalability Patterns
 
Google App Engine - Devfest India 2010
Google App Engine -  Devfest India 2010Google App Engine -  Devfest India 2010
Google App Engine - Devfest India 2010
 
20100608sigmod
20100608sigmod20100608sigmod
20100608sigmod
 
A Guide To PostgreSQL 9.0
A Guide To PostgreSQL 9.0A Guide To PostgreSQL 9.0
A Guide To PostgreSQL 9.0
 
iBizLog. Smalltalking the Web
iBizLog. Smalltalking the WebiBizLog. Smalltalking the Web
iBizLog. Smalltalking the Web
 
IPTC NITF Maintenance June 2010
IPTC NITF Maintenance June 2010IPTC NITF Maintenance June 2010
IPTC NITF Maintenance June 2010
 
Eye em potato_library_presentation
Eye em potato_library_presentationEye em potato_library_presentation
Eye em potato_library_presentation
 
App Engine Meetup
App Engine MeetupApp Engine Meetup
App Engine Meetup
 
Using+javascript+to+build+native+i os+applications
Using+javascript+to+build+native+i os+applicationsUsing+javascript+to+build+native+i os+applications
Using+javascript+to+build+native+i os+applications
 
Eran Rom, IBM - Bringing Compute to Openstack Swift, OpenStack Israel 2015
Eran Rom, IBM - Bringing Compute to Openstack Swift, OpenStack Israel 2015Eran Rom, IBM - Bringing Compute to Openstack Swift, OpenStack Israel 2015
Eran Rom, IBM - Bringing Compute to Openstack Swift, OpenStack Israel 2015
 
Java pode ser_hipster
Java pode ser_hipsterJava pode ser_hipster
Java pode ser_hipster
 
Cloud Log Analysis and Visualization
Cloud Log Analysis and VisualizationCloud Log Analysis and Visualization
Cloud Log Analysis and Visualization
 
Bytecode manipulation with Javassist and ASM
Bytecode manipulation with Javassist and ASMBytecode manipulation with Javassist and ASM
Bytecode manipulation with Javassist and ASM
 
Defeating firefox by Muneaki Nishimunea - CODE BLUE 2015
Defeating firefox by Muneaki Nishimunea - CODE BLUE 2015Defeating firefox by Muneaki Nishimunea - CODE BLUE 2015
Defeating firefox by Muneaki Nishimunea - CODE BLUE 2015
 

Mehr von Go Tanaka

Jvm internal
Jvm internalJvm internal
Jvm internal
Go Tanaka
 
Knockout handson
Knockout handsonKnockout handson
Knockout handson
Go Tanaka
 
Knockout bindings
Knockout bindingsKnockout bindings
Knockout bindings
Go Tanaka
 
Implement curry
Implement curryImplement curry
Implement curry
Go Tanaka
 
Log4j 2 writing
Log4j 2 writingLog4j 2 writing
Log4j 2 writing
Go Tanaka
 
Log4j 2 source code reading
Log4j 2 source code readingLog4j 2 source code reading
Log4j 2 source code reading
Go Tanaka
 
InvokeDynamic at #shikadriven 2012
InvokeDynamic at #shikadriven 2012InvokeDynamic at #shikadriven 2012
InvokeDynamic at #shikadriven 2012
Go Tanaka
 
Studying Network #1
Studying Network #1Studying Network #1
Studying Network #1
Go Tanaka
 
Inside The Java Virtual Machine
Inside The Java Virtual MachineInside The Java Virtual Machine
Inside The Java Virtual Machine
Go Tanaka
 
Nettyらへん
NettyらへんNettyらへん
Nettyらへん
Go Tanaka
 
T2 reading 20101126
T2 reading 20101126T2 reading 20101126
T2 reading 20101126
Go Tanaka
 
はじめてのPHP
はじめてのPHPはじめてのPHP
はじめてのPHP
Go Tanaka
 
T2 - 関ジャバ1月27日
T2 - 関ジャバ1月27日T2 - 関ジャバ1月27日
T2 - 関ジャバ1月27日
Go Tanaka
 

Mehr von Go Tanaka (18)

DevLOVE Kansai KnockoutJS
DevLOVE Kansai KnockoutJSDevLOVE Kansai KnockoutJS
DevLOVE Kansai KnockoutJS
 
Jvm internal
Jvm internalJvm internal
Jvm internal
 
CPU
CPUCPU
CPU
 
Knockout handson
Knockout handsonKnockout handson
Knockout handson
 
Knockout bindings
Knockout bindingsKnockout bindings
Knockout bindings
 
Implement curry
Implement curryImplement curry
Implement curry
 
Log4j 2 writing
Log4j 2 writingLog4j 2 writing
Log4j 2 writing
 
Log4j 2 source code reading
Log4j 2 source code readingLog4j 2 source code reading
Log4j 2 source code reading
 
InvokeDynamic at #shikadriven 2012
InvokeDynamic at #shikadriven 2012InvokeDynamic at #shikadriven 2012
InvokeDynamic at #shikadriven 2012
 
Studying Network #1
Studying Network #1Studying Network #1
Studying Network #1
 
Inside The Java Virtual Machine
Inside The Java Virtual MachineInside The Java Virtual Machine
Inside The Java Virtual Machine
 
FxUG HTML5
FxUG HTML5FxUG HTML5
FxUG HTML5
 
Nettyらへん
NettyらへんNettyらへん
Nettyらへん
 
T2 reading 20101126
T2 reading 20101126T2 reading 20101126
T2 reading 20101126
 
Kanjava20110302
Kanjava20110302Kanjava20110302
Kanjava20110302
 
GWT♥HTML5
GWT♥HTML5GWT♥HTML5
GWT♥HTML5
 
はじめてのPHP
はじめてのPHPはじめてのPHP
はじめてのPHP
 
T2 - 関ジャバ1月27日
T2 - 関ジャバ1月27日T2 - 関ジャバ1月27日
T2 - 関ジャバ1月27日
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Slim3 Gwt In Action