SlideShare una empresa de Scribd logo
1 de 27
building large apps


                rebecca murphey • dojoconf • @rmurphey


Saturday, September 17, 11
A content management system for
         constructing content-rich mobile applications.
         A content publishing system that uses Dojo
         and PhoneGap to create a mobile app from the
         output of the CMS.


Saturday, September 17, 11
Saturday, September 17, 11
Data




                                                                                            Page Controller
                                                                                                               Component


             URL Change      Router                   Route                  Page Factory                      Component
                                                                                                  Capability

                                                                                                               Component



               Device
              Storage




               Remote




                                                       UI




                                                     Browser
                             Page Container
                               Old Page Controller           New Page Controller
                                Component                      Component

                                Component                      Component

                                Component                      Component




Saturday, September 17, 11
e secret to building large apps is
           never build large apps. Break up your
           applications into small pieces. en,
           assemble those testable, bite-sized pieces
           into your big application.
                                            Justin Meyer




Saturday, September 17, 11
Data




                                                                                            Page Controller
                                                                                                               Component


             URL Change      Router                   Route                  Page Factory                      Component
                                                                                                  Capability

                                                                                                               Component



               Device
              Storage




               Remote




                                                       UI




                                                     Browser
                             Page Container
                               Old Page Controller           New Page Controller
                                Component                      Component

                                Component                      Component

                                Component                      Component




Saturday, September 17, 11
Data




                    URL Change   Router   Route




                       Device
                      Storage




                       Remote



Saturday, September 17, 11
Page Controller
                                                Component


           Page Factory                         Component
                                   Capability

                                                Component




Saturday, September 17, 11
UI




                                                    Browser
                             Page Container
                              Old Page Controller          New Page Controller
                                Component                     Component

                                Component                     Component

                                Component                     Component




Saturday, September 17, 11
Data




                    URL Change   Router   Route




                       Device
                      Storage




                       Remote



Saturday, September 17, 11
#/node/123




Saturday, September 17, 11
function nodeRoute(route, nodeId, pageState) {
                  pageState = pageState || {};

                     var nodeModel = toura.app.Data.getModel(nodeId),
                         page = toura.app.UI.getCurrentPage();

                     if (!page || !page.node || nodeId !== page.node.id) {
                       page = toura.app.PageFactory.createPage('node', nodeModel);

                       page.init(pageState);
                       toura.app.UI.showPage(page, nodeModel);
                     } else {
                       page.init(pageState);
                     }
                }




Saturday, September 17, 11
Page Controller
                                                Component


           Page Factory                         Component
                                   Capability

                                                Component




Saturday, September 17, 11
function nodeRoute(route, nodeId, pageState) {
                  pageState = pageState || {};

                     var nodeModel = toura.app.Data.getModel(nodeId),
                         page = toura.app.UI.getCurrentPage();

                     if (!page || !page.node || nodeId !== page.node.id) {
                       page = toura.app.PageFactory.createPage('node', nodeModel);

                       page.init(pageState);
                       toura.app.UI.showPage(page, nodeModel);
                     } else {
                       page.init(pageState);
                     }
                }




Saturday, September 17, 11
Saturday, September 17, 11
this.connect(this.videoList, 'onSelect', function(assetId) {
            var video = this._videoById(assetId);
            this.videoCaption.set('content', video.caption || '');
            this.videoPlayer.play(assetId);
          });




Saturday, September 17, 11
videoPlayer.set('mediaId', mediaId);




                             _setMediaIdAttr : function(mediaId) {
                               var media = this.media = this.mediasCache[mediaId];

                                  if (this.useHtml5Player && !this.player) {
                                    this._queuedMedia = media;
                                    return;
                                  }

                                  this._queuedMedia = null;

                                  if (this.player) {
                                    this.player.src = media.url;
                                  }
                             },



Saturday, September 17, 11
myComponent.set(key, val)
          to change state

          myComponent.on<Evt>(data)
          to announce state changes

          myComponent.subscribe(topic)
          to react to published topics

          dojo.publish(topic, data)
          to announce occurrences of app-wide interest

          myController.connect(component, evt, handler)
          to listen for events & methods



Saturday, September 17, 11
Saturday, September 17, 11
Search Input


                                                           toura.app.Data.search(term)
             searchInputInstance.onSearch(term)




                                            Search Page
                                            Controller          Application Data



    searchResults.set('results', resultSet)
                                                           return resultSet



                                          Search Results
                                             Display




Saturday, September 17, 11
dojo.declare(
            'toura.pageControllers.search.Search',
            [ toura.pageControllers._Page ], {

              // ...

              postCreate : function() {
                // ...
                this.connect(this.searchInput, 'onSearch', '_handleSearch');
              },

              _handleSearch : function(term) {
                if (term === this.lastSearchTerm) { return; }
                this.searchResults.set('results', toura.app.Data.search(term));
              },

            // ...
          });




Saturday, September 17, 11
Page Controller
                                                Component


           Page Factory                         Component
                                   Capability

                                                Component




Saturday, September 17, 11
UI




                                                    Browser
                             Page Container
                              Old Page Controller          New Page Controller
                                Component                     Component

                                Component                     Component

                                Component                     Component




Saturday, September 17, 11
function nodeRoute(route, nodeId, pageState) {
                  pageState = pageState || {};

                     var nodeModel = toura.app.Data.getModel(nodeId),
                         page = toura.app.UI.getCurrentPage();

                     if (!page || !page.node || nodeId !== page.node.id) {
                       page = toura.app.PageFactory.createPage('node', nodeModel);

                       page.init(pageState);
                       toura.app.UI.showPage(page, nodeModel);
                     } else {
                       page.init(pageState);
                     }
                }




Saturday, September 17, 11
showPage : function(page, node) {
                        if (page.startup) {
                          var s = dojo.subscribe('/page/transition/end', function() {
                            page.startup();
                            dojo.unsubscribe(s);
                          });
                        }

                             this.containers.pages.set('content', page);
                             this.currentPage = page;
                      }




Saturday, September 17, 11
Saturday, September 17, 11
http://toura.github.com/mulberry
                @touradev




                             rebeccamurphey.com • blog.rebeccamurphey.com • @rmurphey




Saturday, September 17, 11

Más contenido relacionado

Similar a DojoConf: Building Large Apps

Lessons from-a-rewrite-gotham
Lessons from-a-rewrite-gothamLessons from-a-rewrite-gotham
Lessons from-a-rewrite-gothamRebecca Murphey
 
Abap web dynpro
Abap   web dynproAbap   web dynpro
Abap web dynpromanojdhir
 
Abap web dynpro
Abap   web dynproAbap   web dynpro
Abap web dynpromanojdhir
 
Introduction to share point 2010 development
Introduction to share point 2010 developmentIntroduction to share point 2010 development
Introduction to share point 2010 developmentEric Shupps
 
Classification of Web Applications
Classification of Web ApplicationsClassification of Web Applications
Classification of Web Applicationstomi vanek
 
SAP WEBDYNPRO ABAP TRAINING
SAP WEBDYNPRO ABAP TRAININGSAP WEBDYNPRO ABAP TRAINING
SAP WEBDYNPRO ABAP TRAININGSanthosh Sap
 
앱스프레소를 이용한 모바일 앱 개발(1)
앱스프레소를 이용한 모바일 앱 개발(1)앱스프레소를 이용한 모바일 앱 개발(1)
앱스프레소를 이용한 모바일 앱 개발(1)mosaicnet
 
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...Brian Huff
 
Mobile Testing and Mobile Automation at eBay
Mobile Testing and Mobile Automation at eBayMobile Testing and Mobile Automation at eBay
Mobile Testing and Mobile Automation at eBayMichael Palotas
 
Mobile Test Automation at eBay
Mobile Test Automation at eBayMobile Test Automation at eBay
Mobile Test Automation at eBayDominik Dary
 
SOA/SCA FraScAti
SOA/SCA FraScAtiSOA/SCA FraScAti
SOA/SCA FraScAtiInria
 
Radu’S Robots
Radu’S RobotsRadu’S Robots
Radu’S Robotsraxorio
 
Google App Engine At A Glance
Google App Engine At A GlanceGoogle App Engine At A Glance
Google App Engine At A GlanceStefan Christoph
 
DevOps for Mobile - DevOpsDays, NY, 2013
DevOps for Mobile - DevOpsDays, NY, 2013DevOps for Mobile - DevOpsDays, NY, 2013
DevOps for Mobile - DevOpsDays, NY, 2013Sanjeev Sharma
 
Optaros Surf Code Camp Introduction
Optaros Surf Code Camp IntroductionOptaros Surf Code Camp Introduction
Optaros Surf Code Camp IntroductionJeff Potts
 
FatWire Tutorial For Site Studio Developers
FatWire Tutorial For Site Studio DevelopersFatWire Tutorial For Site Studio Developers
FatWire Tutorial For Site Studio DevelopersBrian Huff
 
Advanced SharePoint Web Part Development
Advanced SharePoint Web Part DevelopmentAdvanced SharePoint Web Part Development
Advanced SharePoint Web Part DevelopmentRob Windsor
 

Similar a DojoConf: Building Large Apps (20)

Lessons from-a-rewrite-gotham
Lessons from-a-rewrite-gothamLessons from-a-rewrite-gotham
Lessons from-a-rewrite-gotham
 
Lessons from a Rewrite
Lessons from a RewriteLessons from a Rewrite
Lessons from a Rewrite
 
Deep Dive SharePoint 2013: Developing applications in SharePoint 2013: forget...
Deep Dive SharePoint 2013: Developing applications in SharePoint 2013: forget...Deep Dive SharePoint 2013: Developing applications in SharePoint 2013: forget...
Deep Dive SharePoint 2013: Developing applications in SharePoint 2013: forget...
 
Abap web dynpro
Abap   web dynproAbap   web dynpro
Abap web dynpro
 
Abap web dynpro
Abap   web dynproAbap   web dynpro
Abap web dynpro
 
Introduction to share point 2010 development
Introduction to share point 2010 developmentIntroduction to share point 2010 development
Introduction to share point 2010 development
 
Classification of Web Applications
Classification of Web ApplicationsClassification of Web Applications
Classification of Web Applications
 
Sap webdynpro abap training
Sap webdynpro abap trainingSap webdynpro abap training
Sap webdynpro abap training
 
SAP WEBDYNPRO ABAP TRAINING
SAP WEBDYNPRO ABAP TRAININGSAP WEBDYNPRO ABAP TRAINING
SAP WEBDYNPRO ABAP TRAINING
 
앱스프레소를 이용한 모바일 앱 개발(1)
앱스프레소를 이용한 모바일 앱 개발(1)앱스프레소를 이용한 모바일 앱 개발(1)
앱스프레소를 이용한 모바일 앱 개발(1)
 
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
Seamless Integrations between WebCenter Content, Site Studio, and WebCenter S...
 
Mobile Testing and Mobile Automation at eBay
Mobile Testing and Mobile Automation at eBayMobile Testing and Mobile Automation at eBay
Mobile Testing and Mobile Automation at eBay
 
Mobile Test Automation at eBay
Mobile Test Automation at eBayMobile Test Automation at eBay
Mobile Test Automation at eBay
 
SOA/SCA FraScAti
SOA/SCA FraScAtiSOA/SCA FraScAti
SOA/SCA FraScAti
 
Radu’S Robots
Radu’S RobotsRadu’S Robots
Radu’S Robots
 
Google App Engine At A Glance
Google App Engine At A GlanceGoogle App Engine At A Glance
Google App Engine At A Glance
 
DevOps for Mobile - DevOpsDays, NY, 2013
DevOps for Mobile - DevOpsDays, NY, 2013DevOps for Mobile - DevOpsDays, NY, 2013
DevOps for Mobile - DevOpsDays, NY, 2013
 
Optaros Surf Code Camp Introduction
Optaros Surf Code Camp IntroductionOptaros Surf Code Camp Introduction
Optaros Surf Code Camp Introduction
 
FatWire Tutorial For Site Studio Developers
FatWire Tutorial For Site Studio DevelopersFatWire Tutorial For Site Studio Developers
FatWire Tutorial For Site Studio Developers
 
Advanced SharePoint Web Part Development
Advanced SharePoint Web Part DevelopmentAdvanced SharePoint Web Part Development
Advanced SharePoint Web Part Development
 

Más de Rebecca Murphey

Beyond the DOM: Sane Structure for JS Apps
Beyond the DOM: Sane Structure for JS AppsBeyond the DOM: Sane Structure for JS Apps
Beyond the DOM: Sane Structure for JS AppsRebecca Murphey
 
A New Baseline for Front-End Devs
A New Baseline for Front-End DevsA New Baseline for Front-End Devs
A New Baseline for Front-End DevsRebecca Murphey
 
Getting Started with Mulberry
Getting Started with MulberryGetting Started with Mulberry
Getting Started with MulberryRebecca Murphey
 
Mulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development ToolkitMulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development ToolkitRebecca Murphey
 
Cleaner, Leaner, Meaner: Refactoring your jQuery
Cleaner, Leaner, Meaner: Refactoring your jQueryCleaner, Leaner, Meaner: Refactoring your jQuery
Cleaner, Leaner, Meaner: Refactoring your jQueryRebecca Murphey
 
Functionality Focused Code Organization
Functionality Focused Code OrganizationFunctionality Focused Code Organization
Functionality Focused Code OrganizationRebecca Murphey
 
Building Large jQuery Applications
Building Large jQuery ApplicationsBuilding Large jQuery Applications
Building Large jQuery ApplicationsRebecca Murphey
 
Delivering a Responsive UI
Delivering a Responsive UIDelivering a Responsive UI
Delivering a Responsive UIRebecca Murphey
 
Using Objects to Organize your jQuery Code
Using Objects to Organize your jQuery CodeUsing Objects to Organize your jQuery Code
Using Objects to Organize your jQuery CodeRebecca Murphey
 

Más de Rebecca Murphey (13)

Beyond the DOM: Sane Structure for JS Apps
Beyond the DOM: Sane Structure for JS AppsBeyond the DOM: Sane Structure for JS Apps
Beyond the DOM: Sane Structure for JS Apps
 
A New Baseline for Front-End Devs
A New Baseline for Front-End DevsA New Baseline for Front-End Devs
A New Baseline for Front-End Devs
 
BVJS
BVJSBVJS
BVJS
 
Getting Started with Mulberry
Getting Started with MulberryGetting Started with Mulberry
Getting Started with Mulberry
 
Mulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development ToolkitMulberry: A Mobile App Development Toolkit
Mulberry: A Mobile App Development Toolkit
 
Modern JavaScript
Modern JavaScriptModern JavaScript
Modern JavaScript
 
Cleaner, Leaner, Meaner: Refactoring your jQuery
Cleaner, Leaner, Meaner: Refactoring your jQueryCleaner, Leaner, Meaner: Refactoring your jQuery
Cleaner, Leaner, Meaner: Refactoring your jQuery
 
Functionality Focused Code Organization
Functionality Focused Code OrganizationFunctionality Focused Code Organization
Functionality Focused Code Organization
 
The jQuery Divide
The jQuery DivideThe jQuery Divide
The jQuery Divide
 
Building Large jQuery Applications
Building Large jQuery ApplicationsBuilding Large jQuery Applications
Building Large jQuery Applications
 
Delivering a Responsive UI
Delivering a Responsive UIDelivering a Responsive UI
Delivering a Responsive UI
 
Using Objects to Organize your jQuery Code
Using Objects to Organize your jQuery CodeUsing Objects to Organize your jQuery Code
Using Objects to Organize your jQuery Code
 
Jquery Fundamentals
Jquery FundamentalsJquery Fundamentals
Jquery Fundamentals
 

Último

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 Scriptwesley chun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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 TerraformAndrey Devyatkin
 
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 educationjfdjdjcjdnsjd
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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 WorkerThousandEyes
 
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 WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Último (20)

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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

DojoConf: Building Large Apps

  • 1. building large apps rebecca murphey • dojoconf • @rmurphey Saturday, September 17, 11
  • 2. A content management system for constructing content-rich mobile applications. A content publishing system that uses Dojo and PhoneGap to create a mobile app from the output of the CMS. Saturday, September 17, 11
  • 4. Data Page Controller Component URL Change Router Route Page Factory Component Capability Component Device Storage Remote UI Browser Page Container Old Page Controller New Page Controller Component Component Component Component Component Component Saturday, September 17, 11
  • 5. e secret to building large apps is never build large apps. Break up your applications into small pieces. en, assemble those testable, bite-sized pieces into your big application. Justin Meyer Saturday, September 17, 11
  • 6. Data Page Controller Component URL Change Router Route Page Factory Component Capability Component Device Storage Remote UI Browser Page Container Old Page Controller New Page Controller Component Component Component Component Component Component Saturday, September 17, 11
  • 7. Data URL Change Router Route Device Storage Remote Saturday, September 17, 11
  • 8. Page Controller Component Page Factory Component Capability Component Saturday, September 17, 11
  • 9. UI Browser Page Container Old Page Controller New Page Controller Component Component Component Component Component Component Saturday, September 17, 11
  • 10. Data URL Change Router Route Device Storage Remote Saturday, September 17, 11
  • 12. function nodeRoute(route, nodeId, pageState) { pageState = pageState || {}; var nodeModel = toura.app.Data.getModel(nodeId), page = toura.app.UI.getCurrentPage(); if (!page || !page.node || nodeId !== page.node.id) { page = toura.app.PageFactory.createPage('node', nodeModel); page.init(pageState); toura.app.UI.showPage(page, nodeModel); } else { page.init(pageState); } } Saturday, September 17, 11
  • 13. Page Controller Component Page Factory Component Capability Component Saturday, September 17, 11
  • 14. function nodeRoute(route, nodeId, pageState) { pageState = pageState || {}; var nodeModel = toura.app.Data.getModel(nodeId), page = toura.app.UI.getCurrentPage(); if (!page || !page.node || nodeId !== page.node.id) { page = toura.app.PageFactory.createPage('node', nodeModel); page.init(pageState); toura.app.UI.showPage(page, nodeModel); } else { page.init(pageState); } } Saturday, September 17, 11
  • 16. this.connect(this.videoList, 'onSelect', function(assetId) { var video = this._videoById(assetId); this.videoCaption.set('content', video.caption || ''); this.videoPlayer.play(assetId); }); Saturday, September 17, 11
  • 17. videoPlayer.set('mediaId', mediaId); _setMediaIdAttr : function(mediaId) { var media = this.media = this.mediasCache[mediaId]; if (this.useHtml5Player && !this.player) { this._queuedMedia = media; return; } this._queuedMedia = null; if (this.player) { this.player.src = media.url; } }, Saturday, September 17, 11
  • 18. myComponent.set(key, val) to change state myComponent.on<Evt>(data) to announce state changes myComponent.subscribe(topic) to react to published topics dojo.publish(topic, data) to announce occurrences of app-wide interest myController.connect(component, evt, handler) to listen for events & methods Saturday, September 17, 11
  • 20. Search Input toura.app.Data.search(term) searchInputInstance.onSearch(term) Search Page Controller Application Data searchResults.set('results', resultSet) return resultSet Search Results Display Saturday, September 17, 11
  • 21. dojo.declare( 'toura.pageControllers.search.Search', [ toura.pageControllers._Page ], { // ... postCreate : function() { // ... this.connect(this.searchInput, 'onSearch', '_handleSearch'); }, _handleSearch : function(term) { if (term === this.lastSearchTerm) { return; } this.searchResults.set('results', toura.app.Data.search(term)); }, // ... }); Saturday, September 17, 11
  • 22. Page Controller Component Page Factory Component Capability Component Saturday, September 17, 11
  • 23. UI Browser Page Container Old Page Controller New Page Controller Component Component Component Component Component Component Saturday, September 17, 11
  • 24. function nodeRoute(route, nodeId, pageState) { pageState = pageState || {}; var nodeModel = toura.app.Data.getModel(nodeId), page = toura.app.UI.getCurrentPage(); if (!page || !page.node || nodeId !== page.node.id) { page = toura.app.PageFactory.createPage('node', nodeModel); page.init(pageState); toura.app.UI.showPage(page, nodeModel); } else { page.init(pageState); } } Saturday, September 17, 11
  • 25. showPage : function(page, node) { if (page.startup) { var s = dojo.subscribe('/page/transition/end', function() { page.startup(); dojo.unsubscribe(s); }); } this.containers.pages.set('content', page); this.currentPage = page; } Saturday, September 17, 11
  • 27. http://toura.github.com/mulberry @touradev rebeccamurphey.com • blog.rebeccamurphey.com • @rmurphey Saturday, September 17, 11