SlideShare uma empresa Scribd logo
1 de 48
Baixar para ler offline
A Mobile App
                Development Toolkit
                Rebecca Murphey & Dan Imal
                Boston Front End Developer Meetup
                January 2012



Tuesday, January 24, 12
Rebecca Murphey
                          Lead JavaScript Developer
                          @rmurphey

                          Dan Imal
                          Senior User Experience Developer
                          @mrdanimal



Tuesday, January 24, 12
Tuesday, January 24, 12
linkage
                mulberry.toura.com
                bit.ly/toura-mulberry
                bit.ly/toura-mulberry-demos




Tuesday, January 24, 12
Tuesday, January 24, 12
Tuesday, January 24, 12
command line tools
                scaffold your app and
                generate skeleton
                 les for the pieces
                you’ll need
                application code
                harness a powerful
                CSS and JavaScript
                framework to develop
                rich interfaces
                app builder
                generates production-
                ready builds for
                Android, iOS (mobile
                web is on the way)


Tuesday, January 24, 12
Callback
               Cordova


Tuesday, January 24, 12
$ mulberry scaffold recipes




Tuesday, January 24, 12
Tuesday, January 24, 12
Tuesday, January 24, 12
$ mulberry generate




Tuesday, January 24, 12
dramatic pause.




Tuesday, January 24, 12
Tuesday, January 24, 12
create content with
                          yaml, markdown & html




Tuesday, January 24, 12
create functionality with javascript




Tuesday, January 24, 12
create styles with css & sass




Tuesday, January 24, 12
Tuesday, January 24, 12
$ mulberry serve




Tuesday, January 24, 12
ohai sane development tools.




Tuesday, January 24, 12
$ mulberry test




Tuesday, January 24, 12
Tuesday, January 24, 12
Tuesday, January 24, 12
$ mulberry deploy




Tuesday, January 24, 12
it’s just javascript.
                (ok, and some haml, yaml, & sass.)




Tuesday, January 24, 12
todos:
                            capabilities:
                            - name: PageTodos
                            screens:
                              - name: index
                                regions:
                                  - components:
                                     - custom.TodoForm
                                  - className: list
                                    scrollable: true
                                    components:
                                     - custom.TodoList
                                  - components:
                                     - custom.TodoTools




                          NB: You can define this with JavaScript, too,
                          using toura.pageDef(‘todos’, { ... }).




Tuesday, January 24, 12
$YOURAPP/javascript/routes.js

        mulberry.page('/todos', {
          name : 'Todos',
          pageDef : 'todos'
        }, true);

        mulberry.page('/completed', {
          name : 'Completed',
          pageDef : 'completed'
        });




                                        #/todos   #/completed

Tuesday, January 24, 12
$YOURAPP/javascript/components/TodoForm.js


           mulberry.component('TodoForm', {
             componentTemplate : dojo.cache('client.components', 'TodoForm/TodoForm.haml'),

               init : function() {
                 this.connect(this.domNode, 'submit', function(e) {
                   e.preventDefault();

                      var description = dojo.trim(this.descriptionInput.value),
                          item;

                      if (!description) { return; }

                      item = { description : description };
                      this.domNode.reset();
                      this.onAdd(item);
                    });
               },

             onAdd : function(item) { }
           });




Tuesday, January 24, 12
$YOURAPP/javascript/components/TodoForm/TodoForm.haml

                 %form.component.todo-form
                   %input{ placeholder : 'New todo', dojoAttachPoint : 'descriptionInput' }
                   %button{ dojoAttachPoint : 'saveButton' } Add




Tuesday, January 24, 12
$YOURAPP/javascript/stores/todos.js

                mulberry.store('todos', {
                  model : 'Todo',

                    finish : function(id) {
                       this.invoke(id, 'finish');
                    },

                  unfinish : function(id) {
                    this.invoke(id, 'unfinish');
                  }
                });




Tuesday, January 24, 12
$YOURAPP/javascript/models/Todo.js

                mulberry.model('Todo', {
                  complete : false,

                    finish : function() {
                       this.set('complete', true);
                    },

                  unfinish : function() {
                    this.set('complete', false);
                  }
                });




Tuesday, January 24, 12
@touradev @rmurphey @mrdanimal
                mulberry.toura.com
                bit.ly/toura-mulberry
                bit.ly/toura-mulberry-demos


Tuesday, January 24, 12
Tuesday, January 24, 12
routes manage high-level application state
                components receive and render data,
                and react to user input
                capabilities provide data to components,
                and broker communications between them
                page de nitions reusable groupings
                of components and capabilities
                stores persist data on the device, make that
                data query-able, and return model instances


Tuesday, January 24, 12
routes manage high-level application state




Tuesday, January 24, 12
$YOURAPP/javascript/routes.js

        mulberry.page('/todos', {
          name : 'Todos',
          pageDef : 'todos'
        }, true);

        mulberry.page('/completed', {
          name : 'Completed',
          pageDef : 'completed'
        });




                                        #/todos   #/completed

Tuesday, January 24, 12
stores persist data on the device, make that
                data query-able, and return model instances




Tuesday, January 24, 12
$YOURAPP/javascript/stores/todos.js

                      mulberry.store('todos', {
                        model : 'Todo',

                          finish : function(id) {
                             this.invoke(id, 'finish');
                          },

                        unfinish : function(id) {
                          this.invoke(id, 'unfinish');
                        }
                      });




Tuesday, January 24, 12
page de nitions reusable groupings
                of components and capabilities




Tuesday, January 24, 12
todos:
                            capabilities:
                            - name: PageTodos
                            screens:
                              - name: index
                                regions:
                                  - components:
                                     - custom.TodoForm
                                  - className: list
                                    scrollable: true
                                    components:
                                     - custom.TodoList
                                  - components:
                                     - custom.TodoTools




                          NB: You can define this with JavaScript, too,
                          using toura.pageDef(‘todos’, { ... }).




Tuesday, January 24, 12
components receive and render data,
                and react to user input




Tuesday, January 24, 12
$YOURAPP/javascript/components/TodoForm.js


           mulberry.component('TodoForm', {
             componentTemplate : dojo.cache('client.components', 'TodoForm/TodoForm.haml'),

               init : function() {
                 this.connect(this.domNode, 'submit', function(e) {
                   e.preventDefault();

                      var description = dojo.trim(this.descriptionInput.value),
                          item;

                      if (!description) { return; }

                      item = { description : description };
                      this.domNode.reset();
                      this.onAdd(item);
                    });
               },

             onAdd : function(item) { }
           });




Tuesday, January 24, 12
$YOURAPP/javascript/components/TodoForm/TodoForm.haml

                 %form.component.todo-form
                   %input{ placeholder : 'New todo', dojoAttachPoint : 'descriptionInput' }
                   %button{ dojoAttachPoint : 'saveButton' } Add




Tuesday, January 24, 12
$YOURAPP/javascript/components/TodoForm.js


           mulberry.component('TodoForm', {
             componentTemplate : dojo.cache('client.components', 'TodoForm/TodoForm.haml'),

               init : function() {
                 this.connect(this.domNode, 'submit', function(e) {
                   e.preventDefault();

                      var description = dojo.trim(this.descriptionInput.value),
                          item;

                      if (!description) { return; }

                      item = { description : description };
                      this.domNode.reset();
                      this.onAdd(item);
                    });
               },

             onAdd : function(item) { }
           });




Tuesday, January 24, 12
capabilities provide data to components,
                and broker communications between them




Tuesday, January 24, 12
mulberry.capability('PageTodos', {
            todos:
                                              requirements : {
              capabilities:
                                                 todoList : 'custom.TodoList',
              - name: PageTodos
                                                 todoForm : 'custom.TodoForm',
              screens:
                                                 todoTools : 'custom.TodoTools'
                - name: index
                                              },
                  regions:
                    - components:
                                              connects : [
                       - custom.TodoForm
                                                 [ 'todoForm', 'onAdd', '_add' ],
                    - className: list
                                                 [ 'todoList', 'onComplete', '_complete' ],
                      scrollable: true
                                                 [ 'todoList', 'onDelete', '_delete' ],
                      components:
                                                 [ 'todoTools', 'onCompleteAll', '_completeAll' ]
                       - custom.TodoList
                                              ],
                    - components:
                       - custom.TodoTools
                                              init : function() {
                                                 this.todos = client.stores.todos;
                                                 this._updateList();
                                              },

                                              _add : function(item) {
                                                 this.todos.add(item);
                                                 this._updateList();
                                              },

                                             _delete : function(id) {
                                                 this.todos.remove(id);
                                                 this._updateList();
                                              },


Tuesday, January 24, 12                       _complete : function(id) {
mulberry.capability('PageTodos', {
            todos:
                                              requirements : {
              capabilities:
                                                 todoList : 'custom.TodoList',
              - name: PageTodos
                                                 todoForm : 'custom.TodoForm',
              screens:
                                                 todoTools : 'custom.TodoTools'
                - name: index
                                              },
                  regions:
                    - components:
                                              connects : [
                       - custom.TodoForm
                                                 [ 'todoForm', 'onAdd', '_add' ],
                    - className: list
                                                 [ 'todoList', 'onComplete', '_complete' ],
                      scrollable: true
                                                 [ 'todoList', 'onDelete', '_delete' ],
                      components:
                                                 [ 'todoTools', 'onCompleteAll', '_completeAll' ]
                       - custom.TodoList
                                              ],
                    - components:
                       - custom.TodoTools
                                              init : function() {
                                                 this.todos = client.stores.todos;
                                                 this._updateList();
                                              },

                                              _add : function(item) {
                                                 this.todos.add(item);
                                                 this._updateList();
                                              },

                                             _delete : function(id) {
                                                 this.todos.remove(id);
                                                 this._updateList();
                                              },


Tuesday, January 24, 12                       _complete : function(id) {
mulberry.capability('PageTodos', {
            todos:
                                              requirements : {
              capabilities:
                                                 todoList : 'custom.TodoList',
              - name: PageTodos
                                                 todoForm : 'custom.TodoForm',
              screens:
                                                 todoTools : 'custom.TodoTools'
                - name: index
                                              },
                  regions:
                    - components:
                                              connects : [
                       - custom.TodoForm
                                                 [ 'todoForm', 'onAdd', '_add' ],
                    - className: list
                                                 [ 'todoList', 'onComplete', '_complete' ],
                      scrollable: true
                                                 [ 'todoList', 'onDelete', '_delete' ],
                      components:
                                                 [ 'todoTools', 'onCompleteAll', '_completeAll' ]
                       - custom.TodoList
                                              ],
                    - components:
                       - custom.TodoTools
                                              init : function() {
                                                 this.todos = client.stores.todos;
                                                 this._updateList();
                                              },

                                              _add : function(item) {
                                                 this.todos.add(item);
                                                 this._updateList();
                                              },

                                             _delete : function(id) {
                                                 this.todos.remove(id);
                                                 this._updateList();
                                              },


Tuesday, January 24, 12                       _complete : function(id) {

Mais conteúdo relacionado

Destaque

Proyectos Tecnológicos
Proyectos TecnológicosProyectos Tecnológicos
Proyectos Tecnológicosguestd0064fb
 
Tecnologia cuarto
Tecnologia cuartoTecnologia cuarto
Tecnologia cuartoLeonel47
 
Influencia de la_tecnologia_en_la_sociedad
Influencia de la_tecnologia_en_la_sociedadInfluencia de la_tecnologia_en_la_sociedad
Influencia de la_tecnologia_en_la_sociedadKagomeNekosawa
 
Introduction to Business Strategy Development & Strategy Execution
Introduction to Business Strategy Development & Strategy ExecutionIntroduction to Business Strategy Development & Strategy Execution
Introduction to Business Strategy Development & Strategy ExecutionFlevy.com Best Practices
 
Proyecto Tecnologico Para 4° Y 5° De Primaria
Proyecto Tecnologico Para 4° Y 5° De PrimariaProyecto Tecnologico Para 4° Y 5° De Primaria
Proyecto Tecnologico Para 4° Y 5° De Primariaguestc14d1b
 
Ejemplo de un proyecto de tecnología
Ejemplo de un proyecto de tecnologíaEjemplo de un proyecto de tecnología
Ejemplo de un proyecto de tecnologíaGabriel Diaz
 
Secuencia didáctica Tecnología-herramientas manuales 1º grado
Secuencia didáctica Tecnología-herramientas manuales 1º gradoSecuencia didáctica Tecnología-herramientas manuales 1º grado
Secuencia didáctica Tecnología-herramientas manuales 1º gradoLaura Soluaga
 
Proyecto Reciclaje
Proyecto ReciclajeProyecto Reciclaje
Proyecto Reciclajealetopher94
 

Destaque (11)

Proyectos Tecnológicos
Proyectos TecnológicosProyectos Tecnológicos
Proyectos Tecnológicos
 
Tecnologia cuarto
Tecnologia cuartoTecnologia cuarto
Tecnologia cuarto
 
Influencia de la_tecnologia_en_la_sociedad
Influencia de la_tecnologia_en_la_sociedadInfluencia de la_tecnologia_en_la_sociedad
Influencia de la_tecnologia_en_la_sociedad
 
Introduction to Business Strategy Development & Strategy Execution
Introduction to Business Strategy Development & Strategy ExecutionIntroduction to Business Strategy Development & Strategy Execution
Introduction to Business Strategy Development & Strategy Execution
 
Proyecto Tecnologico Para 4° Y 5° De Primaria
Proyecto Tecnologico Para 4° Y 5° De PrimariaProyecto Tecnologico Para 4° Y 5° De Primaria
Proyecto Tecnologico Para 4° Y 5° De Primaria
 
Proyecto Tecnologico
Proyecto TecnologicoProyecto Tecnologico
Proyecto Tecnologico
 
Ejemplo de un proyecto de tecnología
Ejemplo de un proyecto de tecnologíaEjemplo de un proyecto de tecnología
Ejemplo de un proyecto de tecnología
 
Proyecto de reciclaje 2014
Proyecto de reciclaje 2014Proyecto de reciclaje 2014
Proyecto de reciclaje 2014
 
Secuencia didáctica Tecnología-herramientas manuales 1º grado
Secuencia didáctica Tecnología-herramientas manuales 1º gradoSecuencia didáctica Tecnología-herramientas manuales 1º grado
Secuencia didáctica Tecnología-herramientas manuales 1º grado
 
Proyecto Reciclaje
Proyecto ReciclajeProyecto Reciclaje
Proyecto Reciclaje
 
PROYECTO RECICLAR PARA CREAR ARTE
PROYECTO RECICLAR PARA CREAR ARTEPROYECTO RECICLAR PARA CREAR ARTE
PROYECTO RECICLAR PARA CREAR ARTE
 

Semelhante a Getting Started with Mulberry

jQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptjQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptGuy Royse
 
JQuery In Drupal
JQuery In DrupalJQuery In Drupal
JQuery In Drupalkatbailey
 
JavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to knowJavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to knowkatbailey
 
JavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to knowJavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to knowWork at Play
 
Kharkivpy#3: Javascript and Python backend
Kharkivpy#3: Javascript and Python backendKharkivpy#3: Javascript and Python backend
Kharkivpy#3: Javascript and Python backendMax Klymyshyn
 
JavaScript the Smart Way - Getting Started with jQuery
JavaScript the Smart Way - Getting Started with jQueryJavaScript the Smart Way - Getting Started with jQuery
JavaScript the Smart Way - Getting Started with jQuerykatbailey
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebJames Rakich
 
Mobile Day - React Native
Mobile Day - React NativeMobile Day - React Native
Mobile Day - React NativeSoftware Guru
 
Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalystsvilen.ivanov
 
Drupal & javascript
Drupal & javascriptDrupal & javascript
Drupal & javascriptAlmog Baku
 
Rails Model Basics
Rails Model BasicsRails Model Basics
Rails Model BasicsJames Gray
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVCAlive Kuo
 
Choosing a Javascript Framework
Choosing a Javascript FrameworkChoosing a Javascript Framework
Choosing a Javascript FrameworkAll Things Open
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteDr Nic Williams
 
Beyond DOMReady: Ultra High-Performance Javascript
Beyond DOMReady: Ultra High-Performance JavascriptBeyond DOMReady: Ultra High-Performance Javascript
Beyond DOMReady: Ultra High-Performance Javascriptaglemann
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyDavid Padbury
 
Introduction To Ruby On Rails
Introduction To Ruby On RailsIntroduction To Ruby On Rails
Introduction To Ruby On RailsSteve Keener
 
Drupal Javascript for developers
Drupal Javascript for developersDrupal Javascript for developers
Drupal Javascript for developersDream Production AG
 

Semelhante a Getting Started with Mulberry (20)

jQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptjQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
 
JQuery In Drupal
JQuery In DrupalJQuery In Drupal
JQuery In Drupal
 
JavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to knowJavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to know
 
JavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to knowJavaScript in Drupal 7: What developers need to know
JavaScript in Drupal 7: What developers need to know
 
Kharkivpy#3: Javascript and Python backend
Kharkivpy#3: Javascript and Python backendKharkivpy#3: Javascript and Python backend
Kharkivpy#3: Javascript and Python backend
 
JavaScript the Smart Way - Getting Started with jQuery
JavaScript the Smart Way - Getting Started with jQueryJavaScript the Smart Way - Getting Started with jQuery
JavaScript the Smart Way - Getting Started with jQuery
 
Everything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
 
Mobile Day - React Native
Mobile Day - React NativeMobile Day - React Native
Mobile Day - React Native
 
Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalyst
 
Drupal & javascript
Drupal & javascriptDrupal & javascript
Drupal & javascript
 
WebGL and three.js
WebGL and three.jsWebGL and three.js
WebGL and three.js
 
Rails Model Basics
Rails Model BasicsRails Model Basics
Rails Model Basics
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
Choosing a Javascript Framework
Choosing a Javascript FrameworkChoosing a Javascript Framework
Choosing a Javascript Framework
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
RubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - KeynoteRubyEnRails2007 - Dr Nic Williams - Keynote
RubyEnRails2007 - Dr Nic Williams - Keynote
 
Beyond DOMReady: Ultra High-Performance Javascript
Beyond DOMReady: Ultra High-Performance JavascriptBeyond DOMReady: Ultra High-Performance Javascript
Beyond DOMReady: Ultra High-Performance Javascript
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
 
Introduction To Ruby On Rails
Introduction To Ruby On RailsIntroduction To Ruby On Rails
Introduction To Ruby On Rails
 
Drupal Javascript for developers
Drupal Javascript for developersDrupal Javascript for developers
Drupal Javascript for developers
 

Mais 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
 
DojoConf: Building Large Apps
DojoConf: Building Large AppsDojoConf: Building Large Apps
DojoConf: Building Large AppsRebecca Murphey
 
Lessons from-a-rewrite-gotham
Lessons from-a-rewrite-gothamLessons from-a-rewrite-gotham
Lessons from-a-rewrite-gothamRebecca 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
 
Delivering a Responsive UI
Delivering a Responsive UIDelivering a Responsive UI
Delivering a Responsive UIRebecca Murphey
 

Mais 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
 
BVJS
BVJSBVJS
BVJS
 
Introducing Mulberry
Introducing MulberryIntroducing Mulberry
Introducing Mulberry
 
DojoConf: Building Large Apps
DojoConf: Building Large AppsDojoConf: Building Large Apps
DojoConf: Building Large Apps
 
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
 
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
 
Delivering a Responsive UI
Delivering a Responsive UIDelivering a Responsive UI
Delivering a Responsive UI
 
Dojo Confessions
Dojo ConfessionsDojo Confessions
Dojo Confessions
 
Jquery Fundamentals
Jquery FundamentalsJquery Fundamentals
Jquery Fundamentals
 

Último

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
 
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
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
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
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
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
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Último (20)

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
 
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
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
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
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
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
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Getting Started with Mulberry

  • 1. A Mobile App Development Toolkit Rebecca Murphey & Dan Imal Boston Front End Developer Meetup January 2012 Tuesday, January 24, 12
  • 2. Rebecca Murphey Lead JavaScript Developer @rmurphey Dan Imal Senior User Experience Developer @mrdanimal Tuesday, January 24, 12
  • 4. linkage mulberry.toura.com bit.ly/toura-mulberry bit.ly/toura-mulberry-demos Tuesday, January 24, 12
  • 7. command line tools scaffold your app and generate skeleton les for the pieces you’ll need application code harness a powerful CSS and JavaScript framework to develop rich interfaces app builder generates production- ready builds for Android, iOS (mobile web is on the way) Tuesday, January 24, 12
  • 8. Callback Cordova Tuesday, January 24, 12
  • 9. $ mulberry scaffold recipes Tuesday, January 24, 12
  • 15. create content with yaml, markdown & html Tuesday, January 24, 12
  • 16. create functionality with javascript Tuesday, January 24, 12
  • 17. create styles with css & sass Tuesday, January 24, 12
  • 19. $ mulberry serve Tuesday, January 24, 12
  • 20. ohai sane development tools. Tuesday, January 24, 12
  • 21. $ mulberry test Tuesday, January 24, 12
  • 24. $ mulberry deploy Tuesday, January 24, 12
  • 25. it’s just javascript. (ok, and some haml, yaml, & sass.) Tuesday, January 24, 12
  • 26. todos: capabilities: - name: PageTodos screens: - name: index regions: - components: - custom.TodoForm - className: list scrollable: true components: - custom.TodoList - components: - custom.TodoTools NB: You can define this with JavaScript, too, using toura.pageDef(‘todos’, { ... }). Tuesday, January 24, 12
  • 27. $YOURAPP/javascript/routes.js mulberry.page('/todos', { name : 'Todos', pageDef : 'todos' }, true); mulberry.page('/completed', { name : 'Completed', pageDef : 'completed' }); #/todos #/completed Tuesday, January 24, 12
  • 28. $YOURAPP/javascript/components/TodoForm.js mulberry.component('TodoForm', { componentTemplate : dojo.cache('client.components', 'TodoForm/TodoForm.haml'), init : function() { this.connect(this.domNode, 'submit', function(e) { e.preventDefault(); var description = dojo.trim(this.descriptionInput.value), item; if (!description) { return; } item = { description : description }; this.domNode.reset(); this.onAdd(item); }); }, onAdd : function(item) { } }); Tuesday, January 24, 12
  • 29. $YOURAPP/javascript/components/TodoForm/TodoForm.haml %form.component.todo-form %input{ placeholder : 'New todo', dojoAttachPoint : 'descriptionInput' } %button{ dojoAttachPoint : 'saveButton' } Add Tuesday, January 24, 12
  • 30. $YOURAPP/javascript/stores/todos.js mulberry.store('todos', { model : 'Todo', finish : function(id) { this.invoke(id, 'finish'); }, unfinish : function(id) { this.invoke(id, 'unfinish'); } }); Tuesday, January 24, 12
  • 31. $YOURAPP/javascript/models/Todo.js mulberry.model('Todo', { complete : false, finish : function() { this.set('complete', true); }, unfinish : function() { this.set('complete', false); } }); Tuesday, January 24, 12
  • 32. @touradev @rmurphey @mrdanimal mulberry.toura.com bit.ly/toura-mulberry bit.ly/toura-mulberry-demos Tuesday, January 24, 12
  • 34. routes manage high-level application state components receive and render data, and react to user input capabilities provide data to components, and broker communications between them page de nitions reusable groupings of components and capabilities stores persist data on the device, make that data query-able, and return model instances Tuesday, January 24, 12
  • 35. routes manage high-level application state Tuesday, January 24, 12
  • 36. $YOURAPP/javascript/routes.js mulberry.page('/todos', { name : 'Todos', pageDef : 'todos' }, true); mulberry.page('/completed', { name : 'Completed', pageDef : 'completed' }); #/todos #/completed Tuesday, January 24, 12
  • 37. stores persist data on the device, make that data query-able, and return model instances Tuesday, January 24, 12
  • 38. $YOURAPP/javascript/stores/todos.js mulberry.store('todos', { model : 'Todo', finish : function(id) { this.invoke(id, 'finish'); }, unfinish : function(id) { this.invoke(id, 'unfinish'); } }); Tuesday, January 24, 12
  • 39. page de nitions reusable groupings of components and capabilities Tuesday, January 24, 12
  • 40. todos: capabilities: - name: PageTodos screens: - name: index regions: - components: - custom.TodoForm - className: list scrollable: true components: - custom.TodoList - components: - custom.TodoTools NB: You can define this with JavaScript, too, using toura.pageDef(‘todos’, { ... }). Tuesday, January 24, 12
  • 41. components receive and render data, and react to user input Tuesday, January 24, 12
  • 42. $YOURAPP/javascript/components/TodoForm.js mulberry.component('TodoForm', { componentTemplate : dojo.cache('client.components', 'TodoForm/TodoForm.haml'), init : function() { this.connect(this.domNode, 'submit', function(e) { e.preventDefault(); var description = dojo.trim(this.descriptionInput.value), item; if (!description) { return; } item = { description : description }; this.domNode.reset(); this.onAdd(item); }); }, onAdd : function(item) { } }); Tuesday, January 24, 12
  • 43. $YOURAPP/javascript/components/TodoForm/TodoForm.haml %form.component.todo-form %input{ placeholder : 'New todo', dojoAttachPoint : 'descriptionInput' } %button{ dojoAttachPoint : 'saveButton' } Add Tuesday, January 24, 12
  • 44. $YOURAPP/javascript/components/TodoForm.js mulberry.component('TodoForm', { componentTemplate : dojo.cache('client.components', 'TodoForm/TodoForm.haml'), init : function() { this.connect(this.domNode, 'submit', function(e) { e.preventDefault(); var description = dojo.trim(this.descriptionInput.value), item; if (!description) { return; } item = { description : description }; this.domNode.reset(); this.onAdd(item); }); }, onAdd : function(item) { } }); Tuesday, January 24, 12
  • 45. capabilities provide data to components, and broker communications between them Tuesday, January 24, 12
  • 46. mulberry.capability('PageTodos', { todos: requirements : { capabilities: todoList : 'custom.TodoList', - name: PageTodos todoForm : 'custom.TodoForm', screens: todoTools : 'custom.TodoTools' - name: index }, regions: - components: connects : [ - custom.TodoForm [ 'todoForm', 'onAdd', '_add' ], - className: list [ 'todoList', 'onComplete', '_complete' ], scrollable: true [ 'todoList', 'onDelete', '_delete' ], components: [ 'todoTools', 'onCompleteAll', '_completeAll' ] - custom.TodoList ], - components: - custom.TodoTools init : function() { this.todos = client.stores.todos; this._updateList(); }, _add : function(item) { this.todos.add(item); this._updateList(); }, _delete : function(id) { this.todos.remove(id); this._updateList(); }, Tuesday, January 24, 12 _complete : function(id) {
  • 47. mulberry.capability('PageTodos', { todos: requirements : { capabilities: todoList : 'custom.TodoList', - name: PageTodos todoForm : 'custom.TodoForm', screens: todoTools : 'custom.TodoTools' - name: index }, regions: - components: connects : [ - custom.TodoForm [ 'todoForm', 'onAdd', '_add' ], - className: list [ 'todoList', 'onComplete', '_complete' ], scrollable: true [ 'todoList', 'onDelete', '_delete' ], components: [ 'todoTools', 'onCompleteAll', '_completeAll' ] - custom.TodoList ], - components: - custom.TodoTools init : function() { this.todos = client.stores.todos; this._updateList(); }, _add : function(item) { this.todos.add(item); this._updateList(); }, _delete : function(id) { this.todos.remove(id); this._updateList(); }, Tuesday, January 24, 12 _complete : function(id) {
  • 48. mulberry.capability('PageTodos', { todos: requirements : { capabilities: todoList : 'custom.TodoList', - name: PageTodos todoForm : 'custom.TodoForm', screens: todoTools : 'custom.TodoTools' - name: index }, regions: - components: connects : [ - custom.TodoForm [ 'todoForm', 'onAdd', '_add' ], - className: list [ 'todoList', 'onComplete', '_complete' ], scrollable: true [ 'todoList', 'onDelete', '_delete' ], components: [ 'todoTools', 'onCompleteAll', '_completeAll' ] - custom.TodoList ], - components: - custom.TodoTools init : function() { this.todos = client.stores.todos; this._updateList(); }, _add : function(item) { this.todos.add(item); this._updateList(); }, _delete : function(id) { this.todos.remove(id); this._updateList(); }, Tuesday, January 24, 12 _complete : function(id) {