Enyo 1.0 Style Matters Example
This example shows how to build the Enyo 1.0 sample application Style Matters as a BlackBerry WebWorks application.
Enyo 1.0 is available from the EnyoJS organization on Github (https://github.com/enyojs/enyo-1.0), and from a zip: https://github.com/downloads/enyojs/enyo-1.0/enyo-1.0-r1.zip. Enyo 1.0 is released under the Apache 2.0 license.
Enyo 1.0 was the development platform on the webOS devices and requires a WebKit based browser for rendering. Since BlackBerry 6, 7.x, PlayBook 1/2.x and BlackBerry 10 all have WebKit Browsers, and allow you to package web content into full applications, it's possible to port Enyo 1.0 applications to BlackBerry relatively quickly.
The Style Matters sample comes with Enyo 1.0, and is a showcase application with UI Samples and Enyo code. We will use this example as our starting point to build a WebWorks application for BlackBerry. Source for this can be viewed here: https://github.com/enyojs/enyo-1.0/tree/master/support/examples/StyleMatters
Building for BlackBerry
- Download 1.0 from EnyoJS.com
- Unpack the framework directory into your project
- Remove webOSconnect_1_3.jar from framework/build/palm/services/bridge and framework/source/palm/services/bridge
- Create a config.xml file
- Zip your package
- Run the zip through the WebWorks Packager
Creating a config.xml file
The config.xml file tells the packager the details it needs in order to build an application.
The details to set are as follows:
- Name appears on the Homescreen
- Description appears in the Application list
- Author must match Debug Token
- Add an Icon and Loading Screen image (loading screen is optional)
- Can force a single orientation if necessary
- Content points to our index.html
See our documentation on creating a config.xml file here: https://bdsc.webapps.blackberry.com/html5/documentation/ww_developing/Working_with_Config_XML_file_1866970_11.html
Zip the package
The zip file needs to follow a basic pattern: config.xml must be at the root of the zip, but other resources can be in folders. You just need to reference the content appropriately.
See more documentation on the zip archive here: https://bdsc.webapps.blackberry.com/html5/documentation/ww_developing/Creating_an_archive_file_1873325_11.html
Package with WebWorks
Depending on which platforms you are targetting, there are different packagers. Each takes the same archive content and creates a different application container in the appropriate SDK. The WebWorks packagers can be downloaded here: https://bdsc.webapps.blackberry.com/html5/download/sdk
For BlackBerry Java Smartphones with OS 5, 6 or 7.x, the WebWorks packager makes a Java application. Details on packaging an application are here: https://bdsc.webapps.blackberry.com/html5/documentation/ww_developing/Compile_WW_app_for_Smartphones_1873321_11.html
For BlackBerry PlayBook tablets with OS 1.0 and 2.x, the packager creates an AIR application. Details on packaging an application are here: https://bdsc.webapps.blackberry.com/html5/documentation/ww_developing/Compile_WW_app_for_Tablets_1873322_11.html
Additional Resources on Enyo
The Enyo JS framework has a website with many resources, including links to forums, samples and documentation here: http://enyojs.com/
The main Github site is here: https://github.com/enyojs
Addiitonal Resources on BlackBerry
The BlackBerry WebWorks microsite is here: https://bdsc.webapps.blackberry.com/html5/
Forums for WebWorks development are here: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/bd-p/browser_dev
The main BlackBerry Github site is here: http://github.com/blackberry
Enyo Framework and sample is released under the Apache 2.0 License.
Packaging files for this sample are also released under the Apache 2.0 License.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.