Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
New BBJamAsia folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Stanley committed Nov 12, 2012
1 parent fbf3660 commit 103abf2
Show file tree
Hide file tree
Showing 67 changed files with 15,317 additions and 0 deletions.
39 changes: 39 additions & 0 deletions 2012-BlackBerryJam-Asia/JAM843/README.md
@@ -0,0 +1,39 @@
# JAM843 Hands-on Lab

## Session
Optimization and Performance for Web Developers

## Description
Get some kick out of your web apps. This lab will walk you through BlackBerry® 10 web application samples, showing tips and tricks for debugging and optimizing for performance. Follow along as you learn more about remote web inspector including such profiling and debugging features as: timeline, live editing and setting XHR breakpoints. This session is ideal for developers who want to refine their skills in app development to speed up development cycles and get the best performance from their web apps.

## Key-Takeaways
Learn coding and debugging tips and tricks to improve performance in your web apps

## Presented at
[BlackBerry Jam Asia](http://www.blackberryjamconference.com/asia) (Nov 29-30, 2012)

## Created and Presented By
* [Adam Stanley](https://twitter.com/#!/n_adam_stanley)
* [Justin Lee](https://twitter.com/#!/triplez82)

## Agenda and format (2 hrs)
All content for this presentation was made available as a PDF and **sample code** for attendees to download at the start of the session.
Attendees are encouraged to complete tasks in order but can do so at their own pace. Each task has beginner, intermediate and advanced materials.
Speakers are available to assist attendees understand the requirements of the lab and guide them through completing each step if they get stuck.

## Lab Setup
This lab requires that attendees have the following development tools available:
* [Chrome desktop browser](https://www.google.com/chrome)
* [BlackBerry 10 WebWorks SDK](https://developer.blackberry.com/html5/download/)
* BlackBerry 10 Dev Alpha A or B, running OS version 10.0.9.388 or higher.

Load the wic.bar sample, located within the /app folder, onto your BlackBerry 10 Dev Alpha device:
```
1) Enable development mode on your device (Settings --> Security --> Development Mode)
2) Connect your BlackBerry Dev Alpha device to your computer via USB
3) Clone or download this repo to a local folder such as C:\JAM843
4) Open a command prompt (Start --> Run ... --> cmd)
5) cd C:\JAM843
6) Load the app by running the following script: load_win.bat <device IP address> <device password> (e.g. load_win.bat 169.254.0.1 pass)
7) Confirm the wic.bar app was successfully loaded.
```
Binary file not shown.
Binary file not shown.
17 changes: 17 additions & 0 deletions 2012-BlackBerryJam-Asia/JAM843/load.bat
@@ -0,0 +1,17 @@
@echo off
REM This script can be used to sideload a BAR file
REM Dependencies: BlackBerry 10 WebWorks SDK
REM Change the SDK variable to match the path of the WebWorks SDK installed on your machine:

SET SDK=C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.2.9\dependencies\tools\bin

IF "%1" == "" GOTO MISSINGPARAMS
IF "%2" == "" GOTO MISSINGPARAMS

"%SDK%\blackberry-deploy.bat" -package app\device\wic.bar -device %1 -installApp -password %2
GOTO END

:MISSINGPARAMS
ECHO Missing parameters. Correct usage: load_win.bat [device ip] [device password]

:END
18 changes: 18 additions & 0 deletions 2012-BlackBerryJam-Asia/JAM843/load.sh
@@ -0,0 +1,18 @@
# This script can be used to sideload a BAR file
# Dependencies: BlackBerry 10 WebWorks SDK
# Change the tools variable to match the path of the WebWorks SDK installed on your machine:
#
tools=/Developer/SDKs/Research\ In\ Motion/BlackBerry\ 10\ WebWorks\ SDK\ 1.0.2.9/dependencies/tools/bin
echo $tools
device=$1
password=$2
if [[ $device == '' ]]; then
echo Missing parameters. Correct usage: load.sh device-ip device-pwd
exit
fi
if [[ $password == '' ]]; then
echo Missing parameters. Correct usage: load.sh device-ip device-pwd
exit
fi

blackberry-deploy -installApp -launchApp -package app/device/wic.bar -device $1 -password $2
44 changes: 44 additions & 0 deletions 2012-BlackBerryJam-Asia/JAM843/source/advanced.html
@@ -0,0 +1,44 @@
<!--
* Copyright 2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<div data-bb-type="screen" data-bb-title="Advanced Features" data-bb-effect="fade">
<div data-bb-type="title" data-bb-caption="Advanced Features" data-bb-back-caption="Back"></div>

<script id="advancedJS" src="js/advanced.js"></script>

<div data-bb-type="round-panel">

<div data-bb-type="panel-header">Customize Your Web Inspector</div>
<div>Define various options for Web Inspector as well as allows the developer to mimic the user agent of another browser. You can access the settings through the <img src="settings.png" /> icon in the bottom right corner of Web Inspector.</div>
<br/>
<div>Ripple will need to be reloaded if the User Agent changes. Try <b>window.location.reload()</b> from the console!</div>
<div data-bb-type="row">
<div data-bb-type="button" id="btnDisplayUserAgent" onclick="showUA();">Display User Agent</div>
<div data-bb-type="label" id="useragent"></div>
</div>
</div>

<div data-bb-type="round-panel">
<div data-bb-type="panel-header">Experiments</div>
<div>Use experimental Web Inspector features to test advanced application features. Example: override GPS values with your own input.</div>
<br/>
<div>Experiments must be enabled when first connecting to remote Web inspector. </div>
<div data-bb-type="row">
<div data-bb-type="button" id="btnDisplayGPS" onclick="showGPS()">Display GPS</div>
<div data-bb-type="label" id="gps"></div>
</div>

</div>
</div>
42 changes: 42 additions & 0 deletions 2012-BlackBerryJam-Asia/JAM843/source/config.xml
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2012 Research In Motion Limited.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:rim="http://www.blackberry.com/ns/widgets"
version="1.0.0.0" id="wic" xml:lang="en">

<name>WIC</name>
<description>The Web inspector companion application. Used to demonstrate the various capabilities of BlackBerry Remote Web inspector.</description>
<author>Erik Oros, Adam Stanley</author>

<content src="index.html"/>
<icon src="images/icon.png"/>

<rim:navigation mode="focus" />
<feature id="blackberry.app" />
<feature id="blackberry.ui.dialog" />

<feature id="blackberry.invoke"/>

<access subdomains="true" uri="http://www.joelambert.co.uk"/>
<access subdomains="true" uri="https://developer.blackberry.com"/>
<access subdomains="true" uri="http://developer.blackberry.com"/>

<rim:permissions>
<rim:permit>read_geolocation</rim:permit>
</rim:permissions>

</widget>
47 changes: 47 additions & 0 deletions 2012-BlackBerryJam-Asia/JAM843/source/console.html
@@ -0,0 +1,47 @@
<!--
* Copyright 2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<div data-bb-type="screen" data-bb-title="Console" data-bb-effect="fade">
<div data-bb-type="title" data-bb-caption="Console" data-bb-back-caption="Back"></div>

<script id="consoleJS" src="js/console.js"></script>

<div data-bb-type="round-panel">

<div data-bb-type="panel-header">Custom Logging</div>
<div>Log your own messages to the console via <b>console.log()</b>.</div>
<div data-bb-type="button" id="btnLogMessage" onclick="logMsg()" >Log Message</div>

<div data-bb-type="panel-header">Warnings</div>
<div>Log warning messages to the console via <b>console.warn()</b>.</div>
<div data-bb-type="button" id="btnLogWarning" onclick="logWarning()" >Log Warning</div>

<div data-bb-type="panel-header">Error Logging</div>
<div>Notice your page is not behaving correctly? First thing you should do is open the console and check to see if there are any runtime errors.</div>
<div data-bb-type="button" id="btnLogError" onclick="generateError()" >blackberry.doesntexist.doSomething();</div>
</div>

<div data-bb-type="round-panel">
<div data-bb-type="panel-header">Open Browser</div>
<div>Notice your page is not behaving correctly? First thing you should do is open the console and check to see if there are any runtime errors.</div>
<div data-bb-type="button" id="btnOpenBrowser" onclick="openBrowserBad()">Open Browser</div>
</div>

<div data-bb-type="round-panel">
<div data-bb-type="panel-header">Command Line</div>
<div>Need to reload the current page? Type <b>window.location.reload()</b> from the console command line. Executing <b>$0</b> in the console will give you reference to the currently selected element in the elements panel.</div>
</div>

</div>

0 comments on commit 103abf2

Please sign in to comment.