This document provides an overview and introduction to the webOS platform. It discusses the webOS architecture including application architecture using stages and scenes. It covers building a basic "Destroy World" app using the command line tools. It also discusses the webOS emulator, advanced APIs like camera, storage and accelerometer access. Finally it discusses submitting apps to the webOS app catalog and a promotion for hot new apps.
This is a lightning presentation given by Gorkey Vemulapalli to our team introducing the basics of Palm's new WebOS platform being used on the Palm Pre device.
Building a Next Generation Mobile Browser using Web technologiesn_adam_stanley
The BlackBerry 10 browser was created using groundbreaking Web technologies and has opened new doors for even better web experiences. In fact, many building blocks, including the application’s chrome itself, were created using HTML5 and CSS3. In this session we will showcase how the next generation mobile browser was built using the very web technologies it was designed to render.
We will dispel myths that Web technologies can be limiting and explore various lessons learned about optimizing performance. This session will also serve as a preview for next generation Web application technologies, and possibly what BlackBerry WebWorks™ and Apache Cordova may evolve to in the not so distant future.
This is a lightning presentation given by Gorkey Vemulapalli to our team introducing the basics of Palm's new WebOS platform being used on the Palm Pre device.
Building a Next Generation Mobile Browser using Web technologiesn_adam_stanley
The BlackBerry 10 browser was created using groundbreaking Web technologies and has opened new doors for even better web experiences. In fact, many building blocks, including the application’s chrome itself, were created using HTML5 and CSS3. In this session we will showcase how the next generation mobile browser was built using the very web technologies it was designed to render.
We will dispel myths that Web technologies can be limiting and explore various lessons learned about optimizing performance. This session will also serve as a preview for next generation Web application technologies, and possibly what BlackBerry WebWorks™ and Apache Cordova may evolve to in the not so distant future.
Web technologies such as HTML5, Javascript and CSS3 are emerging as an alternative for mobile application development platform, at the same time allow the user to provide great experiences, and are simple to administer and maintain by IT organizations.
This session will discuss the status of these technologies and their feasibility for the development of mobile applications. We will also address some recommendations and considerations that must be taken to choose a strategy for developing apps based on web technologies.
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Get...Uniface
Building Responsive Applications with Uniface: Getting Started (Part 1 of 3)
In this webinar you will learn:
• Requirements for a new project
• Development Environment walkthrough
• Application architecture considerations
In this presentation, you’ll explore the new Series 40 web app APIs and features of Nokia Web Tools 2.0. Expert Michael Samarin from Futurice will show you how to develop for new Nokia Asha phones with a full-touch UI and will give you an overview of new templates and code samples.
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias WessendorfJAX London
A deep dive on creating mobile-ready, cloud-enabled, HTML5 applications based on Java EE and modern JavaScript. You will learn how to balance and combine the enterprise Java programming model, based on APIs such as CDI, JAX-RS and EJB 3.1, with JavaScript libraries like jQuery Mobile, Backbone, Require and Underscore, while taking advantage of the ease of deployment and elasticity of the cloud.
In this talk, Chris Mills discusses the historic problems with web apps and which technologies are stepping up to fill the holes. This includes device APIs such as Web Activities, Camera, device orientation and nfc, offline apps (which are finally looking realistic thanks to service workers), installable apps, and high quality games and other immersive high performance experiences using such features as Web audio API, Pointer lock, asm.js and Emscripten.
Web developers now have a large number of APIs available allowing them to harness complex functionality via JavaScript and produce ever more interesting web experiences. This presentation looks at where we can from, where APIs are going in the future, and what problems we are currently in the process of solving. This includes Multimedia, Offline, device hardware access, internationalization, and more.
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...Uniface
Building Responsive Applications with Uniface: Deployment, part 3 or a 3 part series. In this presentation you will learn:
• Web Deployment Architecture
• Considerations
• Tomcat Servlet Engine Configuration
• Uniface Server Configuration
• Deployment Demo (View on our YouTube channel)
Webinar recording on: www.youtube.com/unifacesme
Web developers now have a large number of APIs available allowing them to harness complex functionality via JavaScript and produce ever more interesting web experiences. This presentation looks at where we can from, where APIs are going in the future, and what problems we are currently in the process of solving. This includes providing offline installation, multimedia, performance, and more.
Building Native Experiences with ElectronBen Gotow
Listen to this talk! https://www.youtube.com/watch?v=JIRXVGVPzn8
Tips and tricks for creating Electron apps that look beautiful and work the way users expect.
Session highlighting and demonstrating approaches to common challenges in modern portlet development. Topics include AJAX in JSR-168 and JSR-286 portlets, CSS and Javascript toolkits, security, and optimization of front-end resources. This session was presented at the Jasig Spring 2010 conference in San Diego, CA by Jennifer Bourey.
Web technologies such as HTML5, Javascript and CSS3 are emerging as an alternative for mobile application development platform, at the same time allow the user to provide great experiences, and are simple to administer and maintain by IT organizations.
This session will discuss the status of these technologies and their feasibility for the development of mobile applications. We will also address some recommendations and considerations that must be taken to choose a strategy for developing apps based on web technologies.
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Get...Uniface
Building Responsive Applications with Uniface: Getting Started (Part 1 of 3)
In this webinar you will learn:
• Requirements for a new project
• Development Environment walkthrough
• Application architecture considerations
In this presentation, you’ll explore the new Series 40 web app APIs and features of Nokia Web Tools 2.0. Expert Michael Samarin from Futurice will show you how to develop for new Nokia Asha phones with a full-touch UI and will give you an overview of new templates and code samples.
HTML alchemy: the secrets of mixing JavaScript and Java EE - Matthias WessendorfJAX London
A deep dive on creating mobile-ready, cloud-enabled, HTML5 applications based on Java EE and modern JavaScript. You will learn how to balance and combine the enterprise Java programming model, based on APIs such as CDI, JAX-RS and EJB 3.1, with JavaScript libraries like jQuery Mobile, Backbone, Require and Underscore, while taking advantage of the ease of deployment and elasticity of the cloud.
In this talk, Chris Mills discusses the historic problems with web apps and which technologies are stepping up to fill the holes. This includes device APIs such as Web Activities, Camera, device orientation and nfc, offline apps (which are finally looking realistic thanks to service workers), installable apps, and high quality games and other immersive high performance experiences using such features as Web audio API, Pointer lock, asm.js and Emscripten.
Web developers now have a large number of APIs available allowing them to harness complex functionality via JavaScript and produce ever more interesting web experiences. This presentation looks at where we can from, where APIs are going in the future, and what problems we are currently in the process of solving. This includes Multimedia, Offline, device hardware access, internationalization, and more.
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dep...Uniface
Building Responsive Applications with Uniface: Deployment, part 3 or a 3 part series. In this presentation you will learn:
• Web Deployment Architecture
• Considerations
• Tomcat Servlet Engine Configuration
• Uniface Server Configuration
• Deployment Demo (View on our YouTube channel)
Webinar recording on: www.youtube.com/unifacesme
Web developers now have a large number of APIs available allowing them to harness complex functionality via JavaScript and produce ever more interesting web experiences. This presentation looks at where we can from, where APIs are going in the future, and what problems we are currently in the process of solving. This includes providing offline installation, multimedia, performance, and more.
Building Native Experiences with ElectronBen Gotow
Listen to this talk! https://www.youtube.com/watch?v=JIRXVGVPzn8
Tips and tricks for creating Electron apps that look beautiful and work the way users expect.
Session highlighting and demonstrating approaches to common challenges in modern portlet development. Topics include AJAX in JSR-168 and JSR-286 portlets, CSS and Javascript toolkits, security, and optimization of front-end resources. This session was presented at the Jasig Spring 2010 conference in San Diego, CA by Jennifer Bourey.
This presentation is completely new idea .In this presentation i explain the security with the help of cloud computing......this will be the new idea in new world...
Android Services Black Magic by Aleksandar GargentaMarakana Inc.
Presented at Android Builders Summit on February 14th in Redwood Shores, CA by Aleksandar (Saša) Gargenta, from Marakana Inc.
For the complete slides from this talk go to http://mrkn.co/munz7
"The most interesting part of Android stack are the Android System Services. The 60+ such services expose the low level functionality, such as Power Management, Wifi, Camera, Sensors, GPS, Display, Audio, Media, and so on, all the hardware all the way up to the application layer. While each one is different, the all have certain similarities, namely the way they rely on Binder (Android's IPC mechanism), use JNI to cross Java-C boundary, and use of shared libraries to abstract the Linux drivers. In this talk, we'll explore the common system services in Android and discuss their architecture. You will get to see the diagrams of the inner workings of some of the previously undocumented parts of the Android stack. By the end of the talk, you should have a better understanding of the underpinnings of the backbone of Android OS."
https://events.linuxfoundation.org/events/android-builders-summit/gargentaa
Mathilde Lemée & Romain Maton
La théorie, c’est bien, la pratique … aussi !
Venez nous rejoindre pour découvrir les profondeurs de Node.js !
Nous nous servirons d’un exemple pratique pour vous permettre d’avoir une premiere experience complete autour de Node.js et de vous permettre de vous forger un avis sur ce serveur Javascript qui fait parler de lui !
http://soft-shake.ch/2011/conference/sessions/incubator/2011/09/01/hands-on-nodejs.html
Empowering the “Mobile Web”
with Chris Mills
“Mobile web” applications are often criticised for having inferior performance and a limited feature set, compared to “native” apps. To redress the balance, browser vendors are working on a number of technologies to grant them superpowers.
In this talk, Chris Mills will discuss the inherent historic problems with mobile apps and which technologies are stepping up to fill the holes. This includes device APIs such as Web Activities, Notification, Network Information and Vibration, offline apps, installable apps and performance enhancers such as asm.js and Emscripten.
Presented at FITC Toronto 2014 on April 27-29, 2014
More info at www.FITC.ca
An introduction to Express, the Sinatra-inspired MVC framework for Node.JS. You'll learn how Express manages and processes routes, how to use the Jade template engine, and how to design data models aimed to play nice with Express.
Google Back To Front: From Gears to App Engine and Beyonddion
I had the privilege of giving a Yahoo! Tech Talk at their HQ in Sunnyvale. I spoke on Gears, App Engine, and other technologies such as the Ajax Libraries API and Doctype.
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...Sencha
Using modern browsers, developers can now create web apps with capabilities that were only possible in native or hybrid apps. Web apps can now access hardware devices such as microphones, cameras, GPS, accelerometers, VR displays, and many others, without using any plugins. Using Web Bluetooth, web app developers can now communicate with nearly any type of hardware device. In this session, we’ll survey a sample of the W3C standards that give developers access to next-gen capabilities via web apps. Topics will include Service Worker, Push API, WebRTC, Web Bluetooth, Web Crypto, Web Speech, Web Notifications, and others.
Given at YAPC::EU 2012
Dancer + WebSocket + AnyEvent + Twiggy
This in *not* a talk about doing a hello world in Dancer, as there are plenty of it. This is a real-life example of using Dancer to address a problem in an elegant and powerful way
At $job, we have cpan mirrors. We want them to stay a bit behind the real CPAN for stability, but we have a tool to update modules from the real CPAN to our mirrors. Cool.
I wanted to have a web interface to trigger it, and monitor the injection. This problem is not a typical one (blog, wiki, CRUD, etc). Here we have a long running operation that shall happen only one at a time, that generates logs to be displayed, with states that need keeping. In this regard, it's interesting to see how Dancer is versatile enough to address these situations with ease.
This talk details how I did that, the technology I used, and the full source code (which is quite short). I used Dancer + WebSocket + AnyEvent + Twiggy + some other stuff.
This talk doesn't require any particular knowledge beyond basic Perl, and very basic web server understanding.
Firefox OS, HTML5 to the next level - Python Montreal - 2014-05-12Frédéric Harper
If you are like me, your spectrum of interest is large when it comes to technology. You may be a Python developer, but that does not mean you have not any interest in HTML, and it’s a good coincidence as it’s the foundation of my presentation. In this talk, Frédéric Harper will show you how you can use HTML5 with the power of JavaScript to build amazing mobile applications as to brush up what you previously published. Learn about the open web technologies, including WebAPIs, and tools designed to get you started developing HTML apps for Firefox OS, and the web.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
9. Decisions
• Built from the DNA of the web
• HTML CSS widgets
• JavaScript APIs
• Tracking HTML 5 standards
10. webOS Architecture
Applications
App Services
Services UI System Manager
Cloud
Window Manager Mojo Framework
Window Server Application
Manager
NPAPI
Browser
Palm Bus
Wireless Media
DocViewers
OS Services OS Middleware
Kernel/User Space
Boundary
Linux Kernel FileSystem TCP/IP
Bootie Drivers
13. Scene Lifecycle
initialize Find Scene
Push This Scene
(constructor
setup Start
Transition
ready
readytoactivate
activate End
Transition
Push New Scene
deactivate Start Pop This Scene
Transition
cleanup
Scene Framework
14. Widgets
• Model View Controller
• View (HTML)
• Assistant (JavaScript)
• Model (optional)
17. JavaScript
ActivateAssistant.prototype.setup = function() {
//turn destroyPlanet function into an event handler
this.destroyPlanetHandler =
this.destroyPlanet.bindAsEventListener(this);
//attach handler to the button with tap events
this.controller.listen("myDestroyButton",
Mojo.Event.tap,
this.destroyPlanetHandler);
}
ActivateAssistant.prototype.destroyPlanet = function(event) {
console.log("destroying the planet with event " +
event);
};
23. PDK: Plug-in Development Kit
• C/C++
• Posix, OpenGL, SDL, PDL
• When you need speed and low level access
• Full screen or hybrid
• Come back tomorrow!
29. Initial HTML
<!DOCTYPE html>
<html>
<head>
<title>DestroyWorld</title>
<script src="/usr/palm/frameworks/mojo/mojo.js" type="text/javascript" x-mojo-
version="1"></script>
<!-- application stylesheet should come in after the one loaded by the framework -->
<link href="stylesheets/destroyworld.css" media="screen" rel="stylesheet" type="text/
css">
</head>
</html>
34. Activate-assistant.js
ActivateAssistant.prototype.setup = function() {
//turn destroyPlanet function into an event handler
this.destroyPlanetHandler =
this.destroyPlanet.bindAsEventListener(this);
//attach handler to the button with tap events
this.controller.listen("myDestroyButton",
Mojo.Event.tap, this.destroyPlanetHandler);
};
ActivateAssistant.prototype.destroyPlanet = function(event) {
console.log("destroying the planet with event " + event);
};
35. The webOS Emulator
• VirtualBox (version xxx required)
• x86 build of webOS
• Most things identical
• Not all hardware features supported (camera,
multitouch)
• Simulate events
36. Navigating the Emulator
• Esc = back gesture
• Left / Right = flip between apps
• Home = minimize / maximize card
• End = bring up launcher
• Mouse = single touch events
• F5 – F9 = accelerometer event simulation
38. Emulator Host Mode
• Embedded web server
• Use your desktop browser
• Good for inspecting HTML
• ssh -p 5522 -L 5581:localhost:8080 root@localhost
• http://localhost:5581/Apps
41. Ares
• Visual IDE and GUI builder: WYSIWYG
• Runs in the browser
• Makes the same apps as the command-line SDK
• Works with local emulator, debugging, logging
• Works with real devices
• Makes most coding tasks much faster
42. Ares vs. Mojo
• Slightly different style of coding
• Mojo widgets contained in lightweight wrappers
• Not all widgets are supported (more coming)
• Code is more concise
48. Access an XML Webservice
var url = "http://myserver.com/webservice?results=all";
var request = new Ajax.Request(url, {
method: 'get',
evalJSON: 'false',
onCreate: function(){console.info('******* onCreate happened')},
onLoading: function(){console.info('******* onLoading happened')},
onLoaded: function(){console.info('******* onLoaded happened')},
onSuccess: function(){console.info('******* onComplete happened')},
onComplete: this.gotResults.bind(this),
onFailure: this.failure.bind(this)
});
49. Parse Response with DOM & XPath
StartAssistant.prototype.gotResults = function(event){
var xmlstring = event.responseText;
var doc = (new DOMParser()).parseFromString(xmlstring, "text/xml");
// Use xpath to parse xml object
var items = document.evaluate("/root/item", doc, null,
XPathResult.ANY_TYPE, null);
var item = nodes.iterateNext();
while (section) {
console.log("id = " + item.attributes['id'].nodeValue);
item = items.iterateNext();
}
}
50. Use the Camera
//launch the camera view
this.controller.stageController.pushScene(
{
appId : 'com.palm.app.camera',
name: 'capture'
},
{
sublaunch : true,
filename : '/media/internal/testpicture.jpg'
}
);
//the activate function on your scene
activate: function(event) {
if(event != undefined) {
//the camera returned
console.log("json = " + Object.toJSON(event));
console.log("filename of the photo = " + event.filename);
}
}
51. Use the Accelerometer (Tilt Sensor)
• Orientation events
• Shake Events
• Raw events
52. Orientation Events
• Pitch & roll in degrees
• Numeric codes for different orientations
• 0 = face up
• 1 = face down
• 2 = up / normal portrait
• 3 = down / reverse portrait
• 4 = left / landscape, left side down
• 5 = right / landscape, right side down
56. Raw Accelerometer Events
• Raw x/y/z acceleration values
• Default 4Hz (four times per second)
• Option for 30Hz (good for games)
• 'acceleration' property
59. Mojo Cookies
• Store simple values
• 4k of storage
• Good for preferences, version numbers, etc.
• Stored as a single JSON value in the Depot
60. Cookies
var SCROLL_MODE_KEY = “SCROLL_MODE_KEY”;
...
//set the current mode
var scrollModeCookie = new Mojo.Model.Cookie(SCROLL_MODE_KEY);
scrollModeCookie.put(scrollMode);
//retrieve it later
var scrollModeCookie = new Mojo.Model.Cookie(SCROLL_MODE_KEY);
console.log(“mode = “ + scrollModeCookie.get());
61. Mojo Depot
• Simple object store for JSON
• No schemas or SQL queries
• Up to 1MB of storage
• > 1MB available in media storage
• Object -> SQL translation underneath
• Not as efficient as true HTML database
• Uses callbacks extensively
62. Create
var db = new Mojo.Depot(
{'name':‘DestroyWorldDB'},
function(code) {
console.log(“open db succeed”);
},
function(code) {
console.log("open db failed");
}
);
console.log("created db : " + db);
63. Store
var db = new Mojo.Depot(
{ 'name' : 'DestroyWorldDB' },
function(code) {
console.log("open db succeeded " + db);
var value = { 'target':"world", 'action':"destroy"};
db.add("object1", value,
function(){console.log("saved okay");},
function(){console.log("save failed");}
);
},
function(code) {console.log("open db failed");}
);
64. Retrieve
var db = new Mojo.Depot(
{ 'name' : 'DestroyWorldDB' },
var db = new Mojo.Depot(
function(code) {
{ 'name' : 'DestroyWorldDB' },
console.log("open db succeeded " + db);
function(code) { 'target':"world", 'action':"destroy"};
var value = {
console.log("open db succeeded " + db);
db.add("object1", value,
db.get("object1",
function(){console.log("saved okay");},
function(obj){
function(){console.log("save failed");}
); console.log("got object. target = " + obj.target);
}, },
function(code) {console.log("open db failed");}
function(){console.log("get failed");}
); );
},
function(code) {console.log("open db failed");}
);
65. HTML 5 Database
• Database object from HTML 5
spec, but not storage object
• True SQL database
• Transactional
• Databases associated with
applications
• Private, no inter-app sharing
• Up to 1MB of storage
• > 1MB available in media storage
• Work is ongoing to match the
spec
71. International Apps
• Translating is strongly encouraged, not required
• Set prices for each country
• Metadata for each language (title, description,
screenshots, etc.)
• Auto-generate prices for each currency zone
73. Palm Hot Apps Promotion
• Total payout: One Million Dollars
• Earn a bonus based on
• Free: downloads
• Paid: total revenue
• Feb 1 – June 30
• Still plenty of time to win!
• Leader board updated daily
• http://PalmHotApps.com/
goal: by the end of this class you will be able to make a webos application and be ready to submit it to the store
prereqs: nothing beyond basic programming skills and knowledge of HTML. If you can build an interactive website you can build a webOS app.
first a quick bit about myself and how i came to palm.
i've been a java programmer for close to 15 years, ever since the first betas in 95. i wrote swing hacks for oreilly and worked on the javafx and java store projects at Sun. I really care about user interfaces.
For a long time I was negative about the web as a user interface technology. And when I say &#x2018;web&#x2019; I really mean HTML, JavaScript, and CSS. They are slow and extremely limited. They are great for text but not much else. Anything interesting in the web space has to be done on the server side.
Well I was wrong.. or rather, the web technology stack has advanced tremendously since I had last looked at it. Last november I happen to meet my friends Ben and Dion at the OreDev conference in Sweden. Yes, it&#x2019;s true, I had to travel to Sweden to meet up with people from my own timezone. So I went to their presentation and was amazed by how far web technology has come in just a few years. AJAX was the beginning of making the web truly interactive and expressive. New javascript engines are making it almost as fast as the Java Virtual Machine and native code. New APIs are arriving to fill in the gaps. Things like real 2D bitmap canvas. Animated SVG for vector graphics. WebGL for 3D. HTML 5 storage. Web Workers for threads.
The platform is really moving forward, and best of all it's open. Not controlled by any one vendor with an agenda. That really spoke to me. finally it is possible to create great user experiences with completely open technology... and on mobile devices, no less. So that's why I joined Palm... to be a part of the open mobile revolution.
What is the webOS?
The webOS is Palm's mobile operating system. It was designed from the ground up to be a mobile operating system for devices with a touch screen and a physical keyboard. It can scale to different screen sizes and hardware capabilities while presenting a uniform platform to you, the software developer.
devices and market
We currently have the Pre and the Pixi. Their hardware is roughly equivalent, with the Pre having a larger screen, more storage, and slightly faster CPU & GPU. They both support the exact same software, however, and it's very easy to adjust to the screen sizes.
technology decisions and direction
The webOS was designed from the beginning to be built from the DNA of the web. The SDK is HTML, CSS, and JavaScript, which are the core languages of the web. You can use any Javascript libraries that you want, such as Prototype, JQuery, or MooTools. We provide Javascript apis for the core operating system functions like access to the camera, address book, location, and storage. We are tracking the HTML 5 standard and plan to support more of it as the standard becomes complete.
webos architecture
linux base
The core of the webOS is a linux kernel with a posix filesystem and the typical posix APIs. It is linux underneath so we a true multi-threading, power management, unix filesystem, etc. All of the things you expect from a real linux OS. Generally these are hidden from the app developer, though you can access many of the posix APIs with the PDK, subject to access restrictions.
window manager
Above the Linux core is the window manager, called Luna, which controls access to the screen and provides the core drawing functions through OpenGL and WebKit.
javascript apis
Above Luna are javascript apis for all of the device features. Things like camera and location are hardware services written in C and exported to the javascript layer through simple apis.
The actual applications are written in HTML, JavaScript, and CSS. Javascript manipulates the underlying webpage DOM to create the graphics you see on screen. All of the apps you see in the OS are written like this. In fact, the SDK actually provides the source to much of the built in apps so you can see how they are constructed. All of the widgets are provided by the Mojo APIs, which are javascript as well. In the SDK you can see all of the core css and images used to draw the wigets on screen. Use of Mojo is not required, but it is recommended because it lets you use a common look and feel, and implements all of the mobile specific features like touch events and infinite scrolling lists.
application architecture
difference between a webos app and a web app. no webserver. everything is local. you implement state changes and program logic in javascript locally. you don't call back to a server somewhere.
cards, stages, and scenes
the webos uses the 'card' as the core ui metaphor. with a few exceptions, every app is shown as a card. the user switches between apps much as you would deal a deck of cards, flipping from one card to another. this is a very tangable metaphor that everyone can grasp very quickly.
from an application point of view you have stages and scenes. a stage is a card. a scene is a view within that card. you only see one scene at a time. if this was a webpage then the stage would be the browser window or tab, and the scene would be a page on your site. the user can navigate from scene to scene, or page to page. some apps actually have more than one stage, meaning they have more than one card visible. a good example of this is the email app. there is one card for viewing your mail. it has multiple scenes: one for the list of inboxes, one for the list of mails in your inbox, and one for the mail you are currently useing. the mail app also has secondary stages for when you compose an email. in this case it shows a full separate card so that you can write an email but still switch back to the inbox to read another email before you are done.
I&#x2019;m not going to cover it in this session, but there is also another kind of stage called a dashboard. This is a little indicator at the bottom of the screen that lets you know you have a message or alert or some other notification. This can be expanded into a full dashboard, which is a wide but short window across the bottom that gives the user more info and the ability to take action. Usually this will open up the full app that created the notification, or it may provide the user with other controls, such as the music player which lets you pause or switch tracks.
MVC design for widgets and structure
apis and widgets
the mojo toolkit provides all of the standard widgets for things like menus, buttons, text input, and of course the all important scrolling list control. most apps will reuse these existing widgets.
The widgets are represented as DIVs in your markup. You can also customize the look of the widget using CSS. There are a bunch of prefab CSS classes for the standard widgets with different variations. You can override these styles with your own CSS, of course.
here's an example of some buttons. Notice how they both have the css class &#x2018;palm-button&#x2019; but the second one also has the class &#x2018;negative&#x2019;.
Here&#x2019;s what that view looks like without adding any more code or CSS.
You then wire up the widgets using JavaScript. This code will turn the &#x2018;destroyPlanet&#x2019; function into an event listener with the bindAsEventListener function. Then it attaches the listener to the button using the &#x2018;listen&#x2019; function on the scene controller.
The stage has a full lifecycle for a reason. This lets you know when resources are needed and when they are no longer need. This lets you clean up resources at the right time and avoid memory leaks. always, always remove event listeners in the &#x2018;cleanup&#x2019; function
there are mojo apis for various services provided by the OS. this includes access to device features like the camera, and application services like the address book and calendar.
Here&#x2019;s a simple API request. We ask the application manager service (as shown here in red) to open the application &#x2018;com.palm.app.email&#x2019; and send it this block of parameters. This will open a new email message with the specified recipient.
Threading: there is no programmer accessible threading. everything happens in the gui thread. However, there are apis to handle things that would typically be done in a background thread, such as downloading and uploading files. For example, here's how to upload a file to twitpic.com.
This code calls the downloadManager service with the upload method (yes, I know it&#x2019;s confusing to call it the download manager in this case). You pass in the parameters for the url you want to post to, the file to upload, and the extra http parameters. You can also pass in some callback functions for when the post succeeds or fails. This is how you can do something that would normally require a thread. The API does it for you and calls you back when it&#x2019;s done.
You can also use this API to download a file and process XML & JSON.
We are monitoring the HTML 5 standard and are looking at the WebWorkers spec for true background processing. However, for a lot of the tasks you&#x2019;d want to do our APIs eliminate the need for direct threading.
Most device access is handled through a similar APIs. You call a service with some parameters and a callback function. Some APIs have their own GUI, such as the camera. So instead of making a service request you simply tell the stage to navigate to the scene for that GUI. This is called pushing.
Here&#x2019;s an example of opening up the camera scene. We push to the com.palm.app.camera service with a parameter to say the name of the photo we want to write to.
I&#x2019;m not going to cover the PDK today, but I thought I would mention it. When designing websites sometimes there are things you can&#x2019;t do using pure web technologies. These are usually things that require maximum speed or direct hardware access, such as 3D graphics. On the web you would use browser plugins for these things. We have the same thing in the webOS called the plugin development kit, or PDK. This lets you write plugins for your apps which use native C and C++ code. We give you a standard linux/posix environment with access to OpenGL, SDL for input, and our PDL API to access Palm specific APIs.
PDK apps can be either pure PDK running as full screen, such as most of our 3D games, or hybrid apps where you mix some native code with an HTML based Mojo app.
I&#x2019;m not going to cover the PDK here today because this is an intro day, but come back tomorrow for some great indepth sessions on the PDK.
We do have an eclipse plugin [right?] and our Ares visual tool, but I'm going to just use the core SDK with command line tools to show you what's really going on. It's sort of like in math class where your teacher taught you how to add and subtract before showing you how to use the calculator to do it faster. The command line tools also make it very easy to automate your development workflow using ant files, hudson, and other build systems.
commandline tools
our command line tools are written in [java? python? bash?] so they should run everywhere. The whole SDK is designed to be platform independent and usable from open source tools, which is why we chose VirtualBox as our emulator.
First run the command line tool palm-generate. It uses templates. The &#x2018;new_app&#x2019; template will create the full directory structure needed for a basic app. Let's make an app. I&#x2019;m tired of &#x2018;Hello World&#x2019; apps so let&#x2019;s make the most epic app ever: &#x2018;Destroy World&#x2019; It will let you destroy the planet with the click of a button.
palm-generate -t new_app DestroyWorld
let's take a look at the dir structure [open a file browser window showing the dir structure]
Everything is laid out in a nice clean directory structure. there's a place for images, stylesheets, html, and your javascript.
[show the contents of the appinfo.json file]
appinfo.json is the metadata about your project. you'll want to edit it first to change the title and package id of your app.
[open initial index.html]
this is the top of the 'real' page. it defines the css and javascript you want to import by default.
now let&#x2019;s create our first scene. I&#x2019;m going to call this scene &#x2018;Activate&#x2019;
palm-generate -t new_scene -p "name=Activate" DestroyWorld
This will create the html and javascript files for our scene.
Now in order to make the scene show up we need to push it. So in our stage assistant we&#x2019;ll call pushScene with the name of the scene: &#x2018;Activate&#x2019;
Now let&#x2019;s open the view for our scene
This is the html file for our scene. i'm going to add two buttons
[paste in code for two buttons, one to activate, one to destroy]
Again, notice that the second button has the &#x2018;negative&#x2019; css class set.
now we will package it up and test it in the emulator.
first, package the app with the command
palm-package DestroyWorld
now start the emulator
now install the app with the command
palm-install com.palm.dts.destroyworld_1.0.0_all.ipk
now that it's in the emulator we can run it and see that it works. cool.
now let's edit the actual javascript code for this page to make the button do something.
[open up scene assistant]
every scene has a view, the html file, and an assistant, which is the javascript code. let's attach an event handler to our destroy button.
[paste in code for the button. code should print &#x2018;destroying the world ...&#x2019;]
package and test it again in the emulator
The webOS emulator is an instance of the open source project VirtualBox. It's an x86 build of our whole OS, so it really is very close to a real device except for the different hardware. Not all hardware features are supported, such as the camera. For some hardware like GPS you can simulate events using command line tools. This comes in very handy when building unit tests for your software.
[a note on virtual box: you must have version xxx]
these are the primary shortcut key&#x2019;s you&#x2019;ll want to know:
left and right to switch between apps
escape = &#x2018;back gesture&#x2019;
In addition to the key strokes for simple accelerometer events you can also simulate some radio features from the command line. For example you can fake an incoming phone call like this. And you can fake a GPS fix like this.
You can also use the luna-send command to control the GPS Auto Drive feature. This lets you use a fake GPS route out of a csv file. It&#x2019;s good for simulating the full GPS experience. Even if you have a real device to test on this can be useful for unit tests of edge cases.
As of 1.4.1 we added a mini webserver to the emulator. This lets you browse your apps from another webbrowser over an SSH tunnel. This is great for debugging. Just create a tunnel and then open our desktop browser to this page.
get a log of what your app is doing
[type in palm-log -f com.palm.dts.destroyworld]
There is a log file for each app. The &#x2018;palm-log&#x2019; command is equivalent to the &#x2018;tail&#x2019; command in Unix. You tell it which app to view the log for. It also supports the -f argument to follow, just like tail. I usually run this command in an extra terminal window and keep it running during development. It makes it easy to print debugging information.
Ares is our new visual IDE and gui builder. It lets you build webOS apps with a drag and drop gui builder. It&#x2019;s entirely webbased but uses the real emulator locally on your computer. It can even deploy straight to your USB connected phone. It really makes coding webOS apps easier and faster.
There are a few differences between Ares and regular Mojo apps. Ares wraps the mojo widgets in lightweight containers and handles a lot of the boilerplate code for you. You can drop down to regular Mojo APIs if you want to, which sometimes you have to do for the widgets that Ares hasn&#x2019;t wrapped yet.
The projects are stored on Palm&#x2019;s servers. You can download the source, or download the packaged up app, which is how the emulator works.
Now let&#x2019;s look at an example of Ares
open ares, create a simple one stage application with a header and the same &#x2018;activate&#x2019; and &#x2018;destroy&#x2019; buttons. make the destroy button have the negative class.
change orientation to show how stuff resizes automatically
run the app in the preview
show property sheet, add event handler to the button which prints to the log.
show the logging, undo/redo, jslint.
run the app in the emulator
use the &#x2018;email&#x2019; non visual component to create a new message when the activate button is pressed
In this session we are going to give you an overview of advanced APIs, then run through some specific examples to show you how they work and the overall API patterns.
The webOS has lots of APIs for all sorts of things so I&#x2019;ve divided them into four sections. First is direct monitoring of the hardware. Pretty much every piece of hardware in the phones has an API for it, such as the accelerometer and the GPS radio. Next are platform services. This are services apis for things that aren&#x2019;t really hardware but let you request features from the operating system. This is stuff like the current state of the network, power settings, and direct embedding of video streams.
Next are application services. This are simply APIs provided to your app to interact with the user&#x2019;s data on the device, with the appropriate privacy safeguards.
Finally we have application actions. These are apis that let you request another application to do something for you, usually by opening that application in a particular state. For example, with the Email API you don&#x2019;t directly send an email. Instead you ask the email app to open up a new message with the recipient and subject you provide.
Network services are super easy to access because the webOS was built on the web. If you want to talk to an XML webservice just do an AJAX request and give it a callback.
You can parse the response into an XML document using the DOMParser and then do XPath queries on the result. This is a great way to loop through webservice responses. And of course you can do the same with JSON as well.
Camera access is slightly different. The camera has an entire custom scene dedicated to taking pictures, so instead of calling an API with a callback function, you just have to push to the special camera scene and then watch for an event containing a filename when your scene is activated again. When you do this the camera viewer will take over the screen until the user is done taking a picture.
Every Palm device has a tilt sensor built into it, called an accelerometer. It doesn&#x2019;t actually measure tilting. Instead it measure acceleration in three dimensions relative to gravity. Through some clever math you can determine the orientation of the device. Since orientation is the most common thing you&#x2019;d want to do with an accelerometer we&#x2019;ve already done the math for you and given you a simple API to access it.
Just listen for orientation events. The event has a numeric code for the different possible positions along with the pitch and roll expressed in degrees
You can get these events by listening for the &#x2018;orientationchange&#x2019; event on the document.
Some apps use shaking as a specific gesture to trigger some behavior. To support this we created a shake recognizer which will send you events.
Again, just listen for the &#x2018;shaking&#x2019; event with a callback.
If you really want the raw acceleration events you can get that two. These are the raw x,y, and z values from the chip. Once you have these you can do whatever you want with them, like make a tilt sensitive racing game. The default refresh rate is four times per second but there&#x2019;s an option for a full 30hz event, which is great for games.
Again, just listen to the right property for events.
There are three kinds of storage: Cookies, the Mojo Depo, and the HTML5 record database. Which one to use depends on your needs.
Mojo Cookies just like normal web cookies. They hold small amounts of state and are limited to about 4K of storage.
To use them just create a cookie object for your key then get and set the value.
Mojo Depot is the next level of storage. It&#x2019;s an object store for JSON objects. It doesn&#x2019;t have any schemas or SQL, so it&#x2019;s very flexible but not as fast as a real SQL database would be. It can have up to 1MB of storage by default, and you can get more by storing the objects in the media storage partition. Underneath it&#x2019;s doing Object to SQL translation, which is why it&#x2019;s not as efficient as the HTML database. The API uses callbacks extensively to ensure proper asynchronous and safe access.
You can create and open a Depot database with an instance of the Mojo.Depot object. Pass in a JSON object with some parameters, including the name of your database. Then provide two callbacks, one if it succeeds and one if it fails.
To store something first open the database, then in the callback store your JSON object with the &#x2018;add&#x2019; method. this method takes the object to be saved and two more callbacks.
To retrieve objects do the same thing. Once your database is open call the &#x2018;get&#x2019; method with the key you used to save it. The callback will have the object as it&#x2019;s argument, and then you can pick it apart.
I&#x2019;m not going to go into detail on this. Basically it&#x2019;s a true SQL database store with transactional access through callbacks. You have to know SQL to use it, but it&#x2019;s the fastest. We are doing work to follow the HTML 5 spec and improve performance. Expect improvements in future releases of webOS.
app catalog
rules and structure
submission process
There is a fifty dollar fee to submit your app into the on device catalog. These apps go through the full review process, which currently takes about three business days. [verify]. This is the standard way most people distribute apps.
You can also distribute apps purely through the web feeds. These apps will not be listed in the on device catalog, but if a user clicks on a webpage link to the app it will come up in the catalog so they can buy it. This lets you do your own marketing for the app. There is no cost for these and they are not reviewed by Palm [verify]
The beta feed is free. Publish your app this way if you are just testing the app.
Open Source apps do not cost anything to submit in the main catalog if they are free. [verify]
All apps are submitted through our online portal at developer.palm.com.
Here you can manage all of your apps, submit new ones,
conclusion and roadmap
extras:
sources of graphics and icons
tools to use: cssedit, jedit, netbeans & eclipse