This document discusses building offline web applications using AppCache. It provides steps to get started, including creating a .htaccess file, manifest file listing cached resources, and adding a manifest attribute to the HTML. Tips are given for updating caches, ensuring assets download, and dealing with storage limits. The document also briefly mentions using remote and local code in a BlackBerry application.
14. Step 1
Create a .htaccess file with the following content and
place it in the root directory
AddType text/cache-manifest .manifest
16
15. Step 2
Create the manifest file that will list the resources that
should be cached. Name it mycache.manifest. Then add all
of the resources to the file.
17
17. What goes in Manifest?
CACHE
NETWORK
FALLBACK
SETTINGS
19
18. CACHE
This section lists all the resources that should be
downloaded and stored locally. As soon as the page is
loaded, the browser will start downloading these resources
in the background. However, if some of the resources are
already in the cache, then those won’t be re downloaded.
20
19. NETWORK
This section lists the urls that should never be cached. For
example, your page may include a call to a script that loads
stock quotes dynamically. So, this type of resource will not
be cached and made offline. Instead the data will be
retrieved from the original source provided you have
internet connection.
21
20. FALLBACK
FALLBACK is a clever way of specifying the page to display
in case any resource is not found in the app cache.
*The ‘/’ has a special meaning in FALLBACK section. It means if any page is not found
in app cache instead of showing an error the offline-message.html will be displayed.
22
21. SETTINGS
This includes settings for app cache behavior. Presently
Cache Mode is the only available setting. It can be set to
prefer-online which indicates that the cached data should
be disregarded if an active internet connection is present.
23
26. CACHE UPDATE TIP
If you've just touched the manifest file, the browser won't
bother to re-check the assets — the contents of the
manifest file must change somehow. Modifying a
comment is good enough, which is why we recommend
having a # version line
28
27. Asset Download Tip
To Ensure all your assets are downloaded and cached you
can do a meta refresh:
<META http-equiv="refresh" content="5;
URL=/dailymind/indexxx.cfm">
I’d advise adding a loading spinner or animated graphic
to the page it redirects to.
29
28. CRITICAL TO REMEMBER
If any of the files mentioned in the CACHE section can't be
retrieved, the entire cache will be disregarded.
All resources must successfully return. If any do not —
returning a 404 or 500, for example — the entire cache
will be ignored.
The next time the browser returns to your page, it will try
to use the manifest again as if it was the first time it
encountered it.
30
29. CRITICAL TO REMEMBER
You can only use wildcards for NETWORK/OFFLINE
section. CACHE requires you to point specifically to the file
you want to cache.
31
30. STORAGE LIMIT
5MB Standard Limit
*Some browsers allow more.
Chrome (most request)
BlackBerry Browser (no explicit limit).
32
33. Remote & Local Code
Config.xml
Your Assets
BlackBerry Applications
Existing Web App Assets
Use Server Side Technology
Use Cloud Databases
Speed of Local Assets
34. How to get there?
Config.xml
Your Assets
WebWorks Tools
BlackBerry Applications
36. BlackBerry 10 and Ripple
Chrome extension
Separate Beta download
Multi-platform support
BlackBerry 10, Tablet OS and
BlackBerry OS
Build and sign BlackBerry apps
38. Things to Remember
Default File Location for Ripple
PC
Default IIS Location
Mac
Default Sites Folder
40
39. Remote & Local Code
Config.xml
Your Assets
BlackBerry Applications
Existing Web App Assets
Use Server Side Technology
Use Cloud Databases
Speed of Local Assets
Hinweis der Redaktion
One of the first things new developers to BlackBerry notice that’s different than other mobile platforms is that BlackBerry doesn’t limit you to a single language or runtime for building your apps. Developers have some choices to make up front.This presentation will deep dive into the two most popular developer platforms: our Web/HTML5 platform and our Native/Cascades platform.
If you’re on a Mac, here is how to initialize the web server. If you have a different web server installed, it will work too./Library/WebServer
Demo: build sample app using Ripple & WebWorks BB10
Before we dive into our two platforms, I’m going to quickly survey all the developer options we provide and take a look at the resources available for getting started. We’ll then look at our Web platform, our Native platform and, if we’ve got time left answer any remaining questions.
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
In this section, we’ll explore the Web Platform and the relationship between the industry standard called “HTML5”, and BlackBerry WebWorks. As this slide suggests, WebWorks is the extension mechanism… But let’s start at the beginning…
Demo: build sample app using Ripple & WebWorks BB10
Talking points: Ripple was recently released again as a Chrome extension. It was originally a Chrome extension, then became a standalone tool and is now back to being an extension. This structure allows the Chrome web engine to evolve on its own, and RIM to easily make over-the-air (OTA) improvements to Ripple for all developers (less upgrades needed!). Ripple extension for chrome supports building apps using the WebWorks SDK.
Demo: build sample app using Ripple & WebWorks BB10
Step through each line to describe what it does.Next, we’re going to start building our application.