SlideShare uma empresa Scribd logo
1 de 37
Dojo CRUD
Components
  by Tom Mahieu
   PeopleWare
Overall presentation goal


                 Why did we choose dojo as browser technology
                        How have we experienced dojo
                  How have we evolved from dojo user to dojo
                     developer: dojo CRUD components
www.devoxx.com
Agenda
                  PeopleWare
                  The road to dojo @ PeopleWare
                  CRUD Components in dojo
                  Summary
www.devoxx.com
PeopleWare
                  Custom software development
                    Desktop apps, Web apps, Mobile apps, EAI, ...
                    Technology: Java, .NET, Delphi
                  Business Intelligence
                    Microsoft BI, Pentaho
                  Content Management
                    Plone, Sharepoint, ...
www.devoxx.com




                  Training
Java @ PeopleWare
                  Desktop Applications
                    Eclipse RCP
                  Web Applications
                    Emphasis on information-handling administrative apps
                  PPWCode (http://www.ppwcode.org)
                    Captures coding style, programming idioms, architectural
                    decisions, ...
                    Reusable components (emphasis on semantics rather
                    than technology)
www.devoxx.com
The road to dojo @ PeopleWare
                  End 2007, beginning of 2008
                    Web Interface technologies: JSF, Struts, ..
                    Move towards RIA
                     Drag and drop, animation, single page applications, ...

                    Look at JavaScript libraries
www.devoxx.com
The road to dojo @ PeopleWare
                  GWT
                   At the time only Java 1.4    EJB3
                  WaveMaker
                   Monolithic, automatically generated server-side war
                  Dojo
                   Pure client side JavaScript (steeper learning curve)
                   Mature component model + UI widget set
                   Development tools: unit testing, custom builds, ...
www.devoxx.com




                   Open source with a large community
The learning curve
                  JavaScript
                    OO language + prototype inheritance + closures
                  Dojo
                    Thorough JavaScript knowledge required
                    Learn Dijit framework
                    Learn development tools: unit testing, custom builds, ...
                  Distilled our knowledge in training courses
                    JavaScript, the language
www.devoxx.com




                    Dojo
Dojo powered applications
Dojo powered applications
                  Administrative applications
                    CRUD of Objects
                     Business entities: Create an Order, Update an Invoice, Delete a Stock Item
                     entities & business rules developed in Java (POJOs), stored in a database (ORM)

                    Custom Workflow
                     Implemented in JavaScript

                  Custom Dojo Components
                    CRUD User Interface
www.devoxx.com




                    CRUD Ajax “scenarios”
Agenda
                  PeopleWare
                  The road to dojo @ PeopleWare
                  CRUD Components in Dojo
                    Master-Detail
                    Form Components
                    MVC on the browser
                    n-tier Architecture
                    Attention points
www.devoxx.com




                  Summary
Master view
                  List of objects
                   without loss of typing
                     superclass + subclasses

                  Retrieve
                   App. specific search criterium
                  Parent-child relations
                   to-many relation
                   Second Master view
                     MV1.selectedItem determines content

                  Create button
www.devoxx.com




                   Select specific type
Master view
                  List of objects
                   without loss of typing
                     superclass + subclasses

                  Retrieve
                   App. specific search criterium
                  Parent-child relations
                   to-many relation
                   Second Master view
                     MV1.selectedItem determines content

                  Create button
www.devoxx.com




                   Select specific type
Detail view
                  Displays (all) properties
                    Related object properties
                  Possible form states
                    View, update, create mode
                  Optional delete button
                  Internationalization
                    Button labels
www.devoxx.com
Form widgets
                  Specialized widgets
                    usually based on existing Dijits
                  Examples
                    Multi-valued attributes
                    Localized textbox
                      text in a particular locale

                    AddressBox
                      Address fields encapsulated in one Dijit
www.devoxx.com




                    ...
Model - View - Controller
                  Master & Detail export events
                    ItemSelect, CreateButtonClick, SaveButtonClick, ...
                  Override to add application specific functionality
                  Off-the-shelf CRUD Controllers
                    Attach to events
                    Coordinate between Master and Detail
                    Implement CRUD scenarios
www.devoxx.com




                     Master - Detail View consistency
                     Encapsulate Ajax call handling
Event driven programming



ViewViewController   ViewFormController



                                      Ajax/
                                      DWR
Architecture
                  Dojo components show object graphs
                    Parent-child relations in Master View
                    (Complex) properties in forms
                     Multivalued attributes, postal addresses, pictures

                  Object graphs must be exchanged with browser
                    Classes implemented in Java
                  DWR: marshals Java objects to JavaScript objects
                    maintains object graph structure (object references)
www.devoxx.com




                    maintains (basic) typing
Architecture
                  Dojo components show object graphs                      A

                    Parent-child relations in Master View                     B

                    (Complex) properties in forms
                                                                          C
                     Multivalued attributes, postal addresses, pictures

                  Object graphs must be exchanged with browser
                    Classes implemented in Java
                  DWR: marshals Java objects to JavaScript objects
                    maintains object graph structure (object references)
www.devoxx.com




                    maintains (basic) typing
Architecture
Browser tier   Web tier   Business tier   Data tier
Architecture
Browser tier   Web tier   Business tier   Data tier


                                                A


                                                      B


                                               C
Architecture
Browser tier   Web tier   Business tier     Data tier


                                                  A


                                                        B


                                                 C




                                          JPA
Architecture
Browser tier   Web tier   Business tier             Data tier

                            Persistence Context
                                                          A
                                   A
                                                                B
                                       B


                                   C                     C




                                                  JPA
Architecture
Browser tier   Web tier      Business tier                Data tier

                                  Persistence Context
                                                                A
                                         A
                                                                      B
                                             B


                                         C                     C




                          EJB3,
                                                        JPA
                           RMI
Architecture
Browser tier   Web tier           Business tier                Data tier

                                       Persistence Context
                                                                     A
                     A        Detach          A
                                                                           B
                          B                       B


                     C                        C                     C




                               EJB3,
                                                             JPA
                                RMI
Architecture
Browser tier      Web tier           Business tier                Data tier

                                          Persistence Context
                                                                        A
       A                A        Detach          A
                                                                              B
           B                 B                       B


       C                C                        C                     C




               Ajax,              EJB3,
                                                                JPA
               DWR                 RMI
Architecture
Browser tier      Web tier           Business tier                Data tier

                                          Persistence Context
                                                                        A
       A                A        Detach          A
                                                                              B
           B                 B                       B


       C                C                        C                     C




               Ajax,              EJB3,
                                                                JPA
               DWR                 RMI
Architecture
Browser tier      Web tier           Business tier                Data tier

                                          Persistence Context
                                                                        A
       A                A        Detach          A
                                                                              B
           B                 B                       B


       C                C                        C                     C




               Ajax,              EJB3,
                                                                JPA
               DWR                 RMI
Architecture
Browser tier      Web tier           Business tier                Data tier

                                          Persistence Context
                                                                        A
       A                A        Detach          A
                                                                              B
           B                 B                       B
                                 Merge
       C                C                        C                     C




               Ajax,              EJB3,
                                                                JPA
               DWR                 RMI
Architecture
Browser tier      Web tier           Business tier                Data tier

                                          Persistence Context
                                                                        A
       A                A        Detach          A
                                                                              B
           B                 B                       B
                                 Merge
       C                C                        C                     C




               Ajax,              EJB3,
                                                                JPA
               DWR                 RMI
Architecture (2)
Browser tier          Web tier                     Data tier

                           Persistence Context
                                                         A
      A
                 Detach          A
                                                                    B
          B                          B

               Merge                                    C
      C                          C




    JavaScript     Ajax,         Java                        Java
                                                 JPA
                   DWR
Architecture: attention points
                  Grids need custom dojo.data stores
                    data store may alter objects for bookkeeping purposes
                     add properties (add an ID, tracking changes, ...)

                    Objects are sent back to the server
                     bookkeeping properties must be removed.

                  Semantics on detached objects
                    Enforce all business constraints on browser is not possible
                     partial checks are possible
www.devoxx.com




                    Checks must be repeated on the server side
Architecture: attention points(2)
                  DWR
                    Browser side: only dumb objects with properties
                    no automatic business constraint checks on client side
                     getters, setters, business methods are not “compiled” to JavaScript
                     must be translated manually to JavaScript
www.devoxx.com
Agenda
                  PeopleWare
                  The road to dojo @ PeopleWare
                  CRUD Components in dojo
                  Summary
www.devoxx.com
Summary
                  CRUD components in Dojo
                   Implemented & tested on IE, FireFox, Safari, Chrome
                   DOH: Unit tests
                    mainly correct rendering and API tests
                    no UI event test (yet, doh.robot?)
                    no CI (yet)

                  Open Source
                   http://www.ppwcode.org
www.devoxx.com
Summary
                  Advantages
                    MVC: Ajax technology independent
                    Server side independent
                     Should work as well with PHP or .NET Technology

                  Disadvantages
                    No automatic business constraints checks on all tiers
                    Only tested with DWR/Java backend
www.devoxx.com
Thanks for your attention!
                  http://www.peopleware.be
                  http://www.ppwcode.org

                  http://www.dojofoundation.org
                  http://www.dojotoolkit.org
                  http://www.directwebremoting.org
www.devoxx.com

Mais conteúdo relacionado

Mais procurados (12)

Built to Last
Built to LastBuilt to Last
Built to Last
 
CV
CVCV
CV
 
Kiely mitchell
Kiely mitchellKiely mitchell
Kiely mitchell
 
Unit 02: Web Technologies (2/2)
Unit 02: Web Technologies (2/2)Unit 02: Web Technologies (2/2)
Unit 02: Web Technologies (2/2)
 
Mohamed ali ibrahim
Mohamed ali ibrahimMohamed ali ibrahim
Mohamed ali ibrahim
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
 
Modular applications with montage components
Modular applications with montage componentsModular applications with montage components
Modular applications with montage components
 
Divya ASP Developer
Divya ASP Developer Divya ASP Developer
Divya ASP Developer
 
Jsf Framework
Jsf FrameworkJsf Framework
Jsf Framework
 
Python - A Comprehensive Programming Language
Python - A Comprehensive Programming LanguagePython - A Comprehensive Programming Language
Python - A Comprehensive Programming Language
 
Custom PrimeFaces components
Custom PrimeFaces componentsCustom PrimeFaces components
Custom PrimeFaces components
 
Client-Side Packages
Client-Side PackagesClient-Side Packages
Client-Side Packages
 

Semelhante a Dojo CRUD Components

TERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case StudyTERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case StudyTerminalfour
 
Introduction To Dojo
Introduction To DojoIntroduction To Dojo
Introduction To Dojoyoavrubin
 
Rich internet application development using the dojo toolkit
Rich internet application development using the dojo toolkitRich internet application development using the dojo toolkit
Rich internet application development using the dojo toolkitalexklaeser
 
The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repositorynobby
 
The web as it should be
The web as it should beThe web as it should be
The web as it should bethebeebs
 
Building Rich User Experiences Without JavaScript Spaghetti
Building Rich User Experiences Without JavaScript SpaghettiBuilding Rich User Experiences Without JavaScript Spaghetti
Building Rich User Experiences Without JavaScript SpaghettiJared Faris
 
Class 6: Introduction to web technology entrepreneurship
Class 6: Introduction to web technology entrepreneurshipClass 6: Introduction to web technology entrepreneurship
Class 6: Introduction to web technology entrepreneurshipallanchao
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introductionaswapnal
 
Miha Lesjak Mobilizing The Web with Web Runtime
Miha Lesjak Mobilizing The Web with Web RuntimeMiha Lesjak Mobilizing The Web with Web Runtime
Miha Lesjak Mobilizing The Web with Web RuntimeNokiaAppForum
 
MVC pattern for widgets
MVC pattern for widgetsMVC pattern for widgets
MVC pattern for widgetsBehnam Taraghi
 
XEO Framework - TDose 2011
XEO Framework - TDose 2011XEO Framework - TDose 2011
XEO Framework - TDose 2011Pedro
 
Modern JavaScript Applications: Design Patterns
Modern JavaScript Applications: Design PatternsModern JavaScript Applications: Design Patterns
Modern JavaScript Applications: Design PatternsVolodymyr Voytyshyn
 
Oracle adf online training
Oracle adf online trainingOracle adf online training
Oracle adf online trainingo2education
 
Advanced Techniques for Ext Designer
Advanced Techniques for Ext DesignerAdvanced Techniques for Ext Designer
Advanced Techniques for Ext DesignerSencha
 
End-to-end Model-driven Development of Applications with Eclipse using the ...
End-to-end Model-driven Development of Applications with Eclipse using  the ...End-to-end Model-driven Development of Applications with Eclipse using  the ...
End-to-end Model-driven Development of Applications with Eclipse using the ...emanuelemolteni
 

Semelhante a Dojo CRUD Components (20)

TERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case StudyTERMINALFOUR t44u 2009 - University of St Andrews Case Study
TERMINALFOUR t44u 2009 - University of St Andrews Case Study
 
Introduction To Dojo
Introduction To DojoIntroduction To Dojo
Introduction To Dojo
 
Rich internet application development using the dojo toolkit
Rich internet application development using the dojo toolkitRich internet application development using the dojo toolkit
Rich internet application development using the dojo toolkit
 
The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repository
 
The web as it should be
The web as it should beThe web as it should be
The web as it should be
 
Building Rich User Experiences Without JavaScript Spaghetti
Building Rich User Experiences Without JavaScript SpaghettiBuilding Rich User Experiences Without JavaScript Spaghetti
Building Rich User Experiences Without JavaScript Spaghetti
 
Class 6: Introduction to web technology entrepreneurship
Class 6: Introduction to web technology entrepreneurshipClass 6: Introduction to web technology entrepreneurship
Class 6: Introduction to web technology entrepreneurship
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Miha Lesjak Mobilizing The Web with Web Runtime
Miha Lesjak Mobilizing The Web with Web RuntimeMiha Lesjak Mobilizing The Web with Web Runtime
Miha Lesjak Mobilizing The Web with Web Runtime
 
Dojo training
Dojo trainingDojo training
Dojo training
 
MVC pattern for widgets
MVC pattern for widgetsMVC pattern for widgets
MVC pattern for widgets
 
XEO Framework - TDose 2011
XEO Framework - TDose 2011XEO Framework - TDose 2011
XEO Framework - TDose 2011
 
Metaworks4 intro
Metaworks4 introMetaworks4 intro
Metaworks4 intro
 
Js frameworks
Js frameworksJs frameworks
Js frameworks
 
Modern JavaScript Applications: Design Patterns
Modern JavaScript Applications: Design PatternsModern JavaScript Applications: Design Patterns
Modern JavaScript Applications: Design Patterns
 
The Enterprise Dilemma: Native vs. Web
The Enterprise Dilemma: Native vs. WebThe Enterprise Dilemma: Native vs. Web
The Enterprise Dilemma: Native vs. Web
 
o
oo
o
 
Oracle adf online training
Oracle adf online trainingOracle adf online training
Oracle adf online training
 
Advanced Techniques for Ext Designer
Advanced Techniques for Ext DesignerAdvanced Techniques for Ext Designer
Advanced Techniques for Ext Designer
 
End-to-end Model-driven Development of Applications with Eclipse using the ...
End-to-end Model-driven Development of Applications with Eclipse using  the ...End-to-end Model-driven Development of Applications with Eclipse using  the ...
End-to-end Model-driven Development of Applications with Eclipse using the ...
 

Último

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Último (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Dojo CRUD Components

  • 1. Dojo CRUD Components by Tom Mahieu PeopleWare
  • 2. Overall presentation goal Why did we choose dojo as browser technology How have we experienced dojo How have we evolved from dojo user to dojo developer: dojo CRUD components www.devoxx.com
  • 3. Agenda PeopleWare The road to dojo @ PeopleWare CRUD Components in dojo Summary www.devoxx.com
  • 4. PeopleWare Custom software development Desktop apps, Web apps, Mobile apps, EAI, ... Technology: Java, .NET, Delphi Business Intelligence Microsoft BI, Pentaho Content Management Plone, Sharepoint, ... www.devoxx.com Training
  • 5. Java @ PeopleWare Desktop Applications Eclipse RCP Web Applications Emphasis on information-handling administrative apps PPWCode (http://www.ppwcode.org) Captures coding style, programming idioms, architectural decisions, ... Reusable components (emphasis on semantics rather than technology) www.devoxx.com
  • 6. The road to dojo @ PeopleWare End 2007, beginning of 2008 Web Interface technologies: JSF, Struts, .. Move towards RIA Drag and drop, animation, single page applications, ... Look at JavaScript libraries www.devoxx.com
  • 7. The road to dojo @ PeopleWare GWT At the time only Java 1.4 EJB3 WaveMaker Monolithic, automatically generated server-side war Dojo Pure client side JavaScript (steeper learning curve) Mature component model + UI widget set Development tools: unit testing, custom builds, ... www.devoxx.com Open source with a large community
  • 8. The learning curve JavaScript OO language + prototype inheritance + closures Dojo Thorough JavaScript knowledge required Learn Dijit framework Learn development tools: unit testing, custom builds, ... Distilled our knowledge in training courses JavaScript, the language www.devoxx.com Dojo
  • 10. Dojo powered applications Administrative applications CRUD of Objects Business entities: Create an Order, Update an Invoice, Delete a Stock Item entities & business rules developed in Java (POJOs), stored in a database (ORM) Custom Workflow Implemented in JavaScript Custom Dojo Components CRUD User Interface www.devoxx.com CRUD Ajax “scenarios”
  • 11. Agenda PeopleWare The road to dojo @ PeopleWare CRUD Components in Dojo Master-Detail Form Components MVC on the browser n-tier Architecture Attention points www.devoxx.com Summary
  • 12. Master view List of objects without loss of typing superclass + subclasses Retrieve App. specific search criterium Parent-child relations to-many relation Second Master view MV1.selectedItem determines content Create button www.devoxx.com Select specific type
  • 13. Master view List of objects without loss of typing superclass + subclasses Retrieve App. specific search criterium Parent-child relations to-many relation Second Master view MV1.selectedItem determines content Create button www.devoxx.com Select specific type
  • 14. Detail view Displays (all) properties Related object properties Possible form states View, update, create mode Optional delete button Internationalization Button labels www.devoxx.com
  • 15. Form widgets Specialized widgets usually based on existing Dijits Examples Multi-valued attributes Localized textbox text in a particular locale AddressBox Address fields encapsulated in one Dijit www.devoxx.com ...
  • 16. Model - View - Controller Master & Detail export events ItemSelect, CreateButtonClick, SaveButtonClick, ... Override to add application specific functionality Off-the-shelf CRUD Controllers Attach to events Coordinate between Master and Detail Implement CRUD scenarios www.devoxx.com Master - Detail View consistency Encapsulate Ajax call handling
  • 17. Event driven programming ViewViewController ViewFormController Ajax/ DWR
  • 18. Architecture Dojo components show object graphs Parent-child relations in Master View (Complex) properties in forms Multivalued attributes, postal addresses, pictures Object graphs must be exchanged with browser Classes implemented in Java DWR: marshals Java objects to JavaScript objects maintains object graph structure (object references) www.devoxx.com maintains (basic) typing
  • 19. Architecture Dojo components show object graphs A Parent-child relations in Master View B (Complex) properties in forms C Multivalued attributes, postal addresses, pictures Object graphs must be exchanged with browser Classes implemented in Java DWR: marshals Java objects to JavaScript objects maintains object graph structure (object references) www.devoxx.com maintains (basic) typing
  • 20. Architecture Browser tier Web tier Business tier Data tier
  • 21. Architecture Browser tier Web tier Business tier Data tier A B C
  • 22. Architecture Browser tier Web tier Business tier Data tier A B C JPA
  • 23. Architecture Browser tier Web tier Business tier Data tier Persistence Context A A B B C C JPA
  • 24. Architecture Browser tier Web tier Business tier Data tier Persistence Context A A B B C C EJB3, JPA RMI
  • 25. Architecture Browser tier Web tier Business tier Data tier Persistence Context A A Detach A B B B C C C EJB3, JPA RMI
  • 26. Architecture Browser tier Web tier Business tier Data tier Persistence Context A A A Detach A B B B B C C C C Ajax, EJB3, JPA DWR RMI
  • 27. Architecture Browser tier Web tier Business tier Data tier Persistence Context A A A Detach A B B B B C C C C Ajax, EJB3, JPA DWR RMI
  • 28. Architecture Browser tier Web tier Business tier Data tier Persistence Context A A A Detach A B B B B C C C C Ajax, EJB3, JPA DWR RMI
  • 29. Architecture Browser tier Web tier Business tier Data tier Persistence Context A A A Detach A B B B B Merge C C C C Ajax, EJB3, JPA DWR RMI
  • 30. Architecture Browser tier Web tier Business tier Data tier Persistence Context A A A Detach A B B B B Merge C C C C Ajax, EJB3, JPA DWR RMI
  • 31. Architecture (2) Browser tier Web tier Data tier Persistence Context A A Detach A B B B Merge C C C JavaScript Ajax, Java Java JPA DWR
  • 32. Architecture: attention points Grids need custom dojo.data stores data store may alter objects for bookkeeping purposes add properties (add an ID, tracking changes, ...) Objects are sent back to the server bookkeeping properties must be removed. Semantics on detached objects Enforce all business constraints on browser is not possible partial checks are possible www.devoxx.com Checks must be repeated on the server side
  • 33. Architecture: attention points(2) DWR Browser side: only dumb objects with properties no automatic business constraint checks on client side getters, setters, business methods are not “compiled” to JavaScript must be translated manually to JavaScript www.devoxx.com
  • 34. Agenda PeopleWare The road to dojo @ PeopleWare CRUD Components in dojo Summary www.devoxx.com
  • 35. Summary CRUD components in Dojo Implemented & tested on IE, FireFox, Safari, Chrome DOH: Unit tests mainly correct rendering and API tests no UI event test (yet, doh.robot?) no CI (yet) Open Source http://www.ppwcode.org www.devoxx.com
  • 36. Summary Advantages MVC: Ajax technology independent Server side independent Should work as well with PHP or .NET Technology Disadvantages No automatic business constraints checks on all tiers Only tested with DWR/Java backend www.devoxx.com
  • 37. Thanks for your attention! http://www.peopleware.be http://www.ppwcode.org http://www.dojofoundation.org http://www.dojotoolkit.org http://www.directwebremoting.org www.devoxx.com

Notas do Editor

  1. Web applications: * CRUD + Workflow in User interface. * Business semantics checking coded in Java. * Design by contract: as prescribed by PPWCode
  2. We have components... now we must get the data in the components Remember... Objects are written in Java, Interface is JavaScript