Getting Started with Firefox OS

Slides:



Advertisements
Similar presentations
Getting Started with Firefox OS JOHN DEVIGHT DMVMUG Reston, VA
Advertisements

This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation. All.
Web Page Behavior IS 373—Web Standards Todd Will.
Chapter 1 Getting Started With Dreamweaver. Explore the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
1 Agenda Overview Review Roles Lists Libraries Columns.
Education Google Calendar (GCal) English. Education Upon completion of this course, you will be able to:  Navigate the GCal interface  Search your calendar.
 jQuery Mobile An Introduction. What is jQuery Mobile  A framework built on top of jQuery, used for creating mobile web applications  Designed to make.
Presented by…. Group 2 1. Programming language 2Introduction.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Adobe Dreamweaver CS3 Revealed CHAPTER ONE: GETTING STARTED WITH DREAMWEAVER.
Classroom User Training June 29, 2005 Presented by:
HTML, XHTML, and CSS Chapter 12 Creating and Using XML Documents.
Introduction CIS 136 Building Mobile Apps 1. What is a mobile app? 2  Computer program  Designed for small devices  Smartphones  Tablets  Other handhelds.
Creating Effective School and PTA Websites Sam Farnsworth Utah PTA Technology Specialist
Quick Start Guide (en) Communote 2.0. Communardo Software GmbH · Kleiststraße 10 a · D Dresden/Germany · +49 (351) ·
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
Tutorial 1: Browser Basics.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
Mobile web Sebastian Lopienski IT Technical Forum 29 June 2012.
What's New… in R10! SEP 22, Call Reports.
CROSS PLATFORM MOBILE APPLICATION DEVELOPMENT Nick Randolph (Built to Roam) SESSION CODE: DEV-WPH314 (c) 2011 Microsoft. All rights reserved.
Quick Start Guide (en) Communote 2.2. Communote GmbH· Kleiststraße 10 a · D Dresden/Germany · +49 (351) · ·
Chapter 1 Getting Started With Dreamweaver. Exploring the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
ArcGIS Online: Sharing your Content Ben Ramseth John Thieling.
Kendo Ui Basics.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
ITS Lunch & Learn November 13, What is Office 365? Office 365 is Microsoft’s software as a service offering. It includes hosted and calendaring.
Downloading the App 1 Go to the right store. Access the App Store on iOS devices, the Play Store on Android, and for a.
What Is Firefox? __________ is a Web ___________ that you use to search for and view Web pages, save pages for use in the future, and maintain a list.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
COMP 143 Web Development with Adobe Dreamweaver CC.
Build Cross-Platform Mobile Apps Using Visual Studio A Telerik webinar by Jeffrey T. Fritz March 27, 2014 AND.
Build Hybrid Mobile Apps with Ionic, Angular, & Cordova Brian
THE NEW MOBILE WORKSPACE Enable Business Applications on Mobile Devices hopTo Work “I am amazed to see how easily hopTo transforms the user interface of.
Guide To Develop Mobile Apps With Titanium. Agenda Overview Installation of Platform SDKs Pros of Appcelerator Titanium Cons of Appcelerator Titanium.
CHAPTER 7 Operating System Copyright © Cengage Learning. All rights reserved.
How to Apply PDF in Flipbook on Website. Description If you are finding solution for applying PDF in flipbook mode on website, and adding multimedia items.
Microsoft FrontPage 2003 Illustrated Complete Creating a Web Site.
Software services delivering SharePoint, Mobile, and Business Intelligence solutions Creating mobile applications that integrate with SharePoint 2013 on-
Office 365 Development July 2014.
ET-570 Smart Phone Apps.
Android 01: Fundamentals
PIWIK JUNIOR TIDAL ASSOCIATE PROF., WEB SERVICES & MULTIMEDIA LIBRARIAN NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY.
Browsers and Web Platforms
Chapter 2 Starting a Project
CARA 3.10 Major New Features
CONTENT MANAGEMENT SYSTEM CSIR-NISCAIR, New Delhi
Office 365 Development July 2014.
CONTENT MANAGEMENT SYSTEM CSIR-NISCAIR, New Delhi
LMEvents SharePoint Portal How-to Guide
Chapter 2 – Introduction to the Visual Studio .NET IDE
Tutorial 6 Topic: jQuery and jQuery Mobile Li Xu
Services Course 9/9/2018 9:54 PM Services Course Windows Live Hotmail Participant Guide © 2008 Microsoft Corporation. All rights reserved.
Introduction to the Visual C# 2005 Express Edition IDE
Using K2 applications How can users interact with K2 applications?
Integrating JavaScript and HTML
Tutorial 6 Creating Dynamic Pages
Office 365 Development.
Cordova & Cordova Plugin Installation and Management
And I have to create mobile apps too?
SEEM4570 Tutorial 5: jQuery + jQuery Mobile
Office 365 Development.
Dongwhan Kim Annie Zhao Steven Lawrance
ASP.NET Imran Rashid CTO at ManiWeber Technologies.
Erik Porter Program Manager ASP.NET Microsoft Corporation
Generate Data with Google Analytics SQL Saturday /04/2019.
Windows Operating System
Presentation transcript:

Getting Started with Firefox OS 2014 Getting Started with Firefox OS John DeVight DMVMUG Reston, VA http://dmvmug.com

AGENDA Overview Firefox OS Simulator Firefox OS Getting Started Hosted Applications Hello World Hosted Application Conference Hosted Application Conference Packaged Application

Overview Conference Application Demo

Overview Mobile OS Market Company OS Market Share Apple iOS 13.4% Google Android 81.3% Microsoft Windows Phone 4.1% Blackberry Blackberry OS 1.0% Nokia Series 40 N/A Linux Foundation Mer < 1.0% Tizen Association Tizen Sailfish Alliance Sailfish OS Canonical Ltd. Ubuntu Phone ? Saturated market * Taken from: http://en.wikipedia.org/wiki/Comparison_of_mobile_operating_systems

Overview Why Firefox OS? Firefox OS smartphones will arrive in extremely cost-sensitive markets like India and Indonesia where people often buy phones from a bin in a store." With an anticipated device price point of $25, Google (GOOG) and Apple (AAPL) have reason to fear. The Indian and Indonesian markets are the most under-saturated in Asia.... smartphone penetration had reached just 23% in Indonesia and 18% in India... that leaves 1.2 billion users in the two countries currently without access to smartphones or tablets. Smartphone makers have struggled to satisfy the price sensitivity of the lower-end markets in both of these countries, and in doing so have lost out on driving brand adoption for first time users. * Taken from: http://seekingalpha.com/article/2042973-1_2-billion-reasons-why-firefox-os-is-important

Overview Why Develop for Firefox OS? Demand for Web Technologies to be used in mobile app development. On July 25, 2011, Dr. Andreas Gal, Director of Research at Mozilla Corporation, announced the "Boot to Gecko" Project (B2G) on the mozilla.dev.platform mailing list. The project proposal was to "pursue the goal of building a complete, standalone operating system for the open web" in order to "find the gaps that keep web developers from being able to build apps that are – in every way – the equals of native apps built for the iPhone [iOS], Android, and WP7 [Windows Phone 7]." Make Web Technologies a 1st Class Citizen in a mobile operating system. * Taken from: http://en.wikipedia.org/wiki/Firefox_OS

Firefox OS Simulator Installation Launch Firefox. Click the orange “Firefox” button and select “Add-ons”. In the “Search” textbox, type “Firefox OS Simulator”.

Firefox OS Simulator Overview Dashboard A tool hosted by the Firefox browser that enables you to start and stop the Simulator and to install, uninstall, and debug apps running in it. The Dashboard also helps you push apps to a real device and checks app manifests for common problems. Simulator The Firefox OS desktop client, a version of the higher layers of the Firefox OS that runs on your desktop. * Taken from: https://developer.mozilla.org/en-US/docs/Tools/Firefox_OS_Simulator

Firefox OS Architecture Application Layer – HTML5 / JS /CSS Gaia Hosted Apps Packaged Apps Open Web Platform Interfaces Security Web APIs (Contacts, Settings, Camera, etc) Gecko Runtime (Firefox OS Application Runtime) Infrastructure Layer (Gonk) Open Source Libraries Device Operating System * Based on the diagram at: https://developer.mozilla.org/en-US/Firefox_OS/Platform/Architecture

Firefox OS Gaia Building Blocks http://buildingfirefoxos.com Look and Feel of other Firefox OS applications Building Blocks Action Menu Buttons Confirm Drawer Edit Mode Headers Input Areas Status Switches Lists Progress and Activity Scrolling Seek bars Tabs Filters Toolbars

Firefox OS Web APIs WebAPI is the suite of device compatibility and access APIs that allow Web apps and content to access device hardware (such as battery status or the device vibration hardware), as well as access to data stored on the device (such as the calendar or contacts list). https://developer.mozilla.org/en-US/docs/WebAPI

Firefox OS Types of Applications Hosted Hosted on a web server. All you need is a Manifest file. Easy to deploy new versions without having to update. Cannot access low level APIs to use the device hardware. Packaged Runs on the user’s device. Zipped up with the Manifest file in the root directory. Can access low level APIs. Must be reviewed, vetted, and signed by a distributor.

Getting Started Resources MDN: Your First App https://developer.mozilla.org/en-US/Apps/Quickstart/Build/Your_first_app MDN App Template https://github.com/chrisdavidmills/mdn-app-template Boilerplate App https://github.com/robnyman/Firefox-OS-Boilerplate-App PluralSight Beginning HTML5 Apps for Firefox OS by John Sonmez

Hosted Applications Manifest File “An Open Web App manifest contains information that a Web browser needs to interact with an app.” Must be named: manifest.webapp Documentation at: https://developer.mozilla.org/en-US/Apps/Developing/Manifest JSON format

Hosted Applications Manifest File JSON attributes name: name of the application description: description of the application launch_path: path relative to the origin of the server developer: JSON object containing: name: name of the developer icons: JSON object containing icon sizes to URIs of the icons 60: a 60 x 60 icon displayed on the device 128: a 128 x 128 icon displayed on the Firefox Marketplace default_locale: the language that the manifest uses.

Hosted Applications Example manifest File JSON attributes { "name": "Conference", "description": "Display Conference Information", "launch_path": "/Conference.Hosted/", "developer": { "name": "John DeVight" }, "icons": { "60": "/Conference.Hosted/content/images/Users-Conference-icon.png“, “128": "/Conference.Hosted/content/images/Users-Conference-icon-128.png“ }, "default_local":"en" }

Hello World Hosted Application Creating the Project in Visual Studio Create an ASP.NET Empty Web Application Add HTML Page called index.html Add the Gaia Building Blocks Add HTML to index.html Add manifest.webapp Add file extension to Web.config file for manifest.webapp Create an image that is 60x60 pixels

Hello World Hosted Application Adding reference to the Gaia Header Building Block Required: fonts.css util.css Header Building Block: headers.css Example: <link href="building-blocks/fonts.css" rel="stylesheet" /> <link href="building-blocks/util.css" rel="stylesheet" /> <link href="building-blocks/styles/headers.css" rel="stylesheet" />

Hello World Hosted Application Adding a Header Building Block and Content <section role="region"> <header class="fixed"> <h1>Hello</h1> </header> <article class="content scrollable header"> <p>World</p> </article> </section>

Hello World Hosted Application Adding manifest.webapp { "name": "Hello World", "description": "Hello World App", "launch_path": "/HelloWorld/", "developer": { "name": "John" }, "icons": { "60": "/helloworld.png" }, "default_local":"en" } Why no 128 icon? Not deployed to the Firefox Marketplace

Hello World Hosted Application Add .webapp and .woff MIME Types <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.webServer> <staticContent> <mimeMap fileExtension=".woff" mimeType="application/x-woff" /> <mimeMap fileExtension=".webapp" mimeType="application/x-web-app-manifest+json" /> </staticContent> </system.webServer> </configuration>

Hello World Hosted Application Add to Firefox OS Simulator Add the URL for the manifest.webapp Click Add Manifest

Conference Hosted Application Adding the Tabs and Conference Information Add stylesheets for the Tab and List Building Blocks Add the Conference and Session Tabs Add a List to the Conference Tab Populate the list with conference Information using Kendo UI MVVM

Conference Hosted Application Adding the Tab Building Block Add stylesheet <link href="content/building-blocks/style_unstable/tabs.css" rel="stylesheet" /> Add HTML <ul role="tablist" data-items="2" class="skin-dark bottom"> <li id="home" role="tab"> <a href="#home" class="action-icon calendar-today"></a> <div role=“tabpanel”></div> </li> <li id="sessions" role="tab"> <a href="#sessions" class="action-icon calendar-agendaview"></a> </ul>

Conference Hosted Application Kendo UI MVVM Kendo MVVM Overview http://docs.telerik.com/kendo-ui/getting-started/framework/mvvm/overview MVVM in Kendo UI Walkthrough http://docs.telerik.com/kendo-ui/tutorials/mvvm-in-kendo-ui data-bind attribute Identifies the attribute of an element to be bound to a “field” in the View-Model. kendo.bind method Binds the View-Model to an element.

Conference Hosted Application Adding the List Building Block to the Conference (home) Tab Add stylesheet <link href="content/building-blocks/style_unstable/lists.css" rel="stylesheet" /> Add HTML <section id="homeList" data-type="list"> <header>Date</header> <ul> <li> <p data-bind="text: date"></p> </li> </ul> </section>

Conference Hosted Application Adding JavaScript for the Conference Tab Select the first tab window.location.hash = "#home"; Displaying the data in the List var conference = Conference.Data.conference(); kendo.bind($("#homeList"), conference);

Conference Hosted Application Adding the Sessions Tab Add stylesheets for the Drawer, Action Menu and Input Areas Building Blocks Add a List to the Sessions Tab Group sessions together based on the session time using Linq.js Display the list of sessions using the Kendo UI Template Display session details using a dialog (from the Action Menu Building Block) Implement Search using Linq.js Implement the Drawer Building Block to search by Tracks

Conference Hosted Application Linq.js – LINQ for JavaScript Source code on CodePlex http://linqjs.codeplex.com/

Conference Hosted Application Grouping the Sessions by Time using Linq Conference Hosted Application Grouping the Sessions by Time using Linq.js Enumerable.From(sessions) .GroupBy(function (session) { return session.time; }, function (session) { return { id: session.id, track: session.track, title: session.title }; }, function (time, grouping) { return { time: time, sessions: grouping.ToArray() }; }) .ToArray();

Conference Hosted Application Kendo UI Templates Kendo MVVM Templates Overview http://docs.telerik.com/kendo-ui/getting-started/framework/templates/overview

Conference Hosted Application Create the Template Script <script type="text/x-kendo-template" id="sessionListGroup"> <header>#: time #</header> <ul> # for (var idx = 0; idx < sessions.length; idx++) { # <li> <a data-id="#: sessions[idx].id #"> <p>#: sessions[idx].title #</p> </a> </li> # } # </ul> </script>

Conference Hosted Application Displaying the Sessions Using Kendo UI Templates Create a sessionList section element <section id="sessionList" data-type="list" style="padding:0 3rem 1.5rem; "></section> Get the template script to create a kendo.template and display the sessions in the session list var displayGroups = function (groups) { var template = kendo.template($("#sessionListGroup").html()), $sessionList = $("#sessionList"); $sessionList.empty(); for (var idx = 0; idx < groups.length; idx++) { $sessionList.append(template(groups[idx])); } };

Conference Hosted Application Adding the Search Field Add the Input Areas Building Block <link href="content/building-blocks/styles/input_areas.css" rel="stylesheet" /> Add the HTML for the Search field <form id="sessionSearch" role="search"> <button type="submit">Cancel</button> <p> <input id="sessionSearchText" type="text" placeholder="Search..."/> <button type="reset">Clear</button> </p> </form>

Conference Hosted Application Implementing the Search Field Add event handler to the search field to capture the [Enter] key to perform the search. Filter for all sessions that contain the search value in the title, track or description. Group the sessions by time. Display the groups.

Conference Hosted Application Display session details Add the Action Menu Building Block <link href="content/building-blocks/styles/action_menu.css" rel="stylesheet" /> Add the HTML for the Dialog <section id="details" class="fade-out" data-postion="back" style="display:none;"></section> Add a click event handler to the session list item to Get the session details and display the details in the dialog using Kendo UI MVVM Show the dialog Add a click event handler to the dialog cancel button to close the dialog

Conference Hosted Application Display a List of Tracks in a Sidebar to Filter Sessions Add the Drawer Building Block <link href="content/building-blocks/styles/drawer.css" rel="stylesheet" /> Add the HTML for the Sidebar <section id="sidebar" data-type="sidebar"></section> Populate the Sidebar with Tracks Add a click event handler to the track list item to Set the search field with the track name Close the sidebar Filter for all sessions that contain the track. Group the sessions by time. Display the groups.

Conference Hosted Application Display a List of Tracks in a Sidebar to Filter Sessions (cont) Add link to show / hide the Sidebar <header class="fixed"> <a href="#sessions"><span class="icon icon-menu">hide sidebar</span></a> <a href="#drawer"><span class="icon icon-menu">menu</span></a> <h1>Sessions</h1> </header>

Conference Hosted Application Creating the Manifest { "name": "Conference", "description": "Display Conference Information", "launch_path": "/Conference.Hosted/", "developer": { "name": "John DeVight" }, "icons": { "60": "/Conference.Hosted/content/images/Users-Conference-icon.png" }, "default_local":"en" }

Conference Packaged Application Contacts Tab Add a tab for Contacts Add a button to add a new contact using the Contacts Web API Display the list of contacts that have been added from the conference app.

Conference Packaged Application Contacts Web API The Contacts API provides a simple interface to manage a user's contacts stored in the system's address book. Add a Contact Create an instance of a mozContact and fill all necessary properties. Use the ContactManager.save() method to save the contact to the address book. Find Contacts Define the options to use to filter the contacts in the address book. Use the ContactManager.find() method to retrieve contacts from the address book. Contacts Web API https://developer.mozilla.org/en-US/docs/WebAPI/Contacts

Conference Packaged Application Adding a Contact Add the HTML for the Dialog Create a mozContact and populate with values. Save the contact Display the list of contacts var person = new mozContact(); person.givenName = $("#addContactGivenName").val(); person.category = ["Conference App"]; var request = window.navigator.mozContacts.save(person); request.onsuccess = function () { displayList(); }

Conference Packaged Application Displaying Contacts (cont) Retrieve the list of contacts var filter = { filterBy: ["category"], filterValue: "Conference App", filterOp: "equals", filterLimit: 100 }; var search = window.navigator.mozContacts.find(filter); search.onsuccess = function () { }

Conference Packaged Application Displaying Contacts (cont) Display the list of contacts search.onsuccess = function () { var $contactList = $("#contactList"), template = kendo.template($("#contactListEntry").html()); $contactList.empty(); for (var idx = 0; idx < search.result.length; idx++) { $contactList.append(template(search.result[idx])); }

Conference Packaged Application Displaying Contacts Create a contact template <script type="text/x-kendo-template" id="contactListEntry"> <header>#: familyName[0] #, #: givenName[0] #</header> <ul> # for (var tdx = 0; tdx < tel.length; tdx++) { # <li>#: tel[tdx].type #: #: tel[tdx].value #</li> # } # # for (var edx = 0; edx < email.length; edx++) { # <li>#: email[edx].type #: #: email[edx].value #</li> </ul> </script>

Conference Packaged Application Creating the Manifest { "name": "Conference (Packaged)", "description": "Display Conference Information", "launch_path": "/index.html", "type": "privileged", "developer": {"name": "John DeVight" }, "icons": { "60": "/Conference.Packaged/content/images/Users-Conference-icon.png" }, "default_local":"en", "permissions": { "contacts": { "descriptions": "Required for contacts", "access": "readcreate" } }

Questions? Email: John.DeVight@gmail.com Speakers Blog: Need more information on DMVMUG Visit www.dmvmug.com Questions?