Apache Wookie (Incubating) Creating your first widget Ross Gardler

Slides:



Advertisements
Similar presentations
HTML Basics Customizing your site using the basics of HTML.
Advertisements

Introduction to Maven 2.0 An open source build tool for Enterprise Java projects Mahen Goonewardene.
ANT: Another Nice Tool Ali Beyad October 1, 2003.
Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
Web Tailor Basics.
Presented by Mina Haratiannezhadi 1.  publishing, editing and modifying content  maintenance  central interface  manage workflows 2.
Java web development Servlet & Java server pages.
Python for S60 SmartPhones PostPC Workshop Fall 2006 Amnon Dekel.
An Introduction to ASP.NET Web Pages 2 Module 1: Webmatrix Installation and Your First Web Site Tom Perkins.
© 2006 by IBM 1 How to use Eclipse to Build Rich Internet Applications With PHP and AJAX Phil Berkland IBM Software Group Emerging.
SEEM4570: XAMPP, Eclipse, Summary of Html Kangfei Zhao Room 711,ERB
Presented by…. Group 2 1. Programming language 2Introduction.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 2: Working with Webpage Files.
Create a Website Session I Key Components Hands-on HTML.
Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Sviluppo di applicazioni web Servlet
Chapter 3 Dreamweaver: Part I The Web Warrior Guide to Web Design Technologies.
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
Making an HTML Document Notepad Group Bo Kim Dan Carter Han Chong Justin Weaver Kris Lamont.
© Ms. Masihi.  The Dreamweaver Welcome Screen first opens when you start Dreamweaver.  This screen gives you quick access to previously opened files,
Eclipse Overview Introduction to Web Programming Kirkwood Continuing Education Fred McClurg © Copyright 2015, Fred McClurg, All Rights Reserved.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
Java Mobile Apps with GWT & PhoneGap Josh Marinacci, webOS Developer Advocate.
WaveMaker Visual AJAX Studio 4.0 Training Installation.
INTERMEDIATE WEB DESIGN INTRODUCTORY CSS, JAVASCRIPT AND PHP.
Banners - HTML A banner is a zip-package containing a HTML file, CSS file, and optionally JavaScript file and assets in a asset directory. The banner is.
Sustainable SharePoint 2010 Customizations By Bill Keys.
HTML5 for Mobile Andrew Kinai. HTML vs HTML5 HTML:A language that describes documents' formatting and content, which is basically composed of static text.
Tutorial: Using ArcGIS Server and ESRI ArcGIS API for Javascript Peter Sforza March 7, 2013.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
Mobile web Sebastian Lopienski IT Technical Forum 29 June 2012.
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Binding Basics.
Topic Java EE installation (Eclipse, glassfish, etc.) Eclipse configuration for EE Creating a Java Web Dynamic Project Creating your first servlet.
Social Media Apps Programming Min-Yuh Day, Ph.D. Assistant Professor Department of Information Management Tamkang University
Web Development 101 Presented by John Valance
Trunica Inc. 500 East Kennedy Blvd #300 Tampa, FL Cross Platform Mobile Apps With Cordova and Visual Studio 2015 © Copyright 2015.
The way of hybrid mobile development Hybrid Mobile Applications Telerik Software Academy
Kendo Ui Basics.
1 G52IWS: Example Web-services Chris Greenhalgh. 2 Contents Software requirements AXIS web service run-time components Getting started with Jetty & AXIS.
ET-710 WEB-DESIGN By Bart Chuchro Queensborough Community College.
Intoduction to Andriod studio Environment With a hello world program.
CSS IS A LANGUAGE DESIGNED TO TARGET HTML ELEMENTS AND NODES BY TYPE, CLASS, ID AND VALUE, AND CHANGE THEIR VALUES CSS – change how your HTML looks and.
Google Web Toolkit for Mobile Applications Development INGENUITY AT ITS BEST……………….
COMP 143 Web Development with Adobe Dreamweaver CC.
APP DESIGN AND DEVELOPMENT WITH THE IONIC FRAMEWORK Chuck Leone
Guide To Develop Mobile Apps With Titanium. Agenda Overview Installation of Platform SDKs Pros of Appcelerator Titanium Cons of Appcelerator Titanium.
Making the Most of Search in SharePoint 2013 Christina Wheeler.
PhoneGap. web-based mobile development framework, based on the open-source Cordova project. use standard web technologies such as HTML5, CSS3, and JavaScript.
Apache Wookie (Incubating)
Breaking down widget silos with a friendly Wookie Sander van der Waal
Apache Wookie (Incubating) Building a real widget
Breaking down widget silos with a friendly Wookie Ross Gardler With thanks.
Labs: Create, deploy and test a simple web service
4.01 How Web Pages Work.
Development Environment
ADVANCED: Making maps with Leaflet.js
SharePoint Office 365 Dev 200 Training
CARA 3.10 Major New Features
Human Computer Interaction
Play Framework: Introduction
Web Development & Design Foundations with HTML5 8th Edition
Apache Cordova Overview
ITI 133 HTML5 Desktop and Mobile Level I
Web Page Development Tools
A technical look at the new capabilities
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
Cordova & Cordova Plugin Installation and Management
Web Page Development Tools
Office 365 Development.
Presentation transcript:

Apache Wookie (Incubating) Creating your first widget Ross Gardler

Objective focussed outline Creating a widget from the template Running in developer mode Modify the widget Using external libraries Using external APIs (not via the proxy) Setting widget properties Packaging for distribution

Task focussed outline Create a development environment Create a hello world widget from supplied templates Run Wookie in standalone mode Edit the widget Create a real widget with geo-lookup Display map of current location Store settings Package widget as.wgt

Development Environment

Create Development Environment What you need: – Wookie source code – Ant + Ivy – JDK – Your favourite editor Javascript, HTML, CSS Java (if you want to hack on the server)

Using the Workshop CD Copy the “wookie” folder to your preferred project location Copy “apache-ant” into your preferred applications application directory Install JDK from “java” folder Configure your environment – Set ANT_HOME – Add $ANT_HOME/bin to your $PATH

Your first widget Hello World!

Create a Hello World Widget Wookie comes with a skeleton widget template: Answer some questions about your widget – Short Name: part1 – Description: Code from first practical session of Wookie training day – Default height: 320 – Default width: 200 You now have a widget in $WOOKIE_HOME/widgets/[SHORT_NAME] cd $WOOKIE_HOME/widgets ant seed-widget

Widget File Structure

config.xml

index.html part1 Hello World...

Running Wookie in Developer Mode Developer mode allows easy building and testing of widgets

Developer Mode Building Wookie auto deploys all widgets in the $WOOKIE_HOME/widgets directory We can run in development mode with: Visit [ASIDE] To run in debug mode cd.. ant clean-db run ant -Djvmargs="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" run

Editing static parts of a widget Changing the layout of your widget

Editing a Widget $WOOKIE_HOME/widgets/part1/index.html – The initial widget page Edit it in your favourite editor – Perhaps to say “Hello Wookie World” Save

Adding some style It’s just HTML, so use CSS – style/screen.css is added by template Try changing the style in index.html, perhaps: Don’t forget the css: Deploy (you will be asked the name of the widget to deploy) Refresh Browser.recent_change { color: red; } Wookie ant deploy-widget

Lets do something real... Map widget with geo-location

Geolocation Widget There’s a great Javascript library for geolocation – Lets see what we can do with it – From $WOOKIE_HOME/tutorials/geoLocation – Replace contents of index.html with the contents of basicGeoWithoutFallback.html – Copy geo.js to the scripts directory of your widget Deploy Refresh your browser ant deploy-widget

Note, this will only work if you are on a supported platform: iPhone OS 3.x, Browsers with Google Gears support (Android, Windows Mobile) Blackberry Devices (8820, 9000,...) Nokia Web Run-Time (Nokia N97,...) webOS Application Platform (Palm Pre) Torch Mobile Iris Browser Mozilla Geode If not, you will get and error message.

The code Import Javascript libraries – HTML elements to contain info –

The code (2) Get current location using geo-location library – geo_position_js.getCurrentPosition(success_callback,error_call back,{enableHighAccuracy:true}); Update the page using DOM – document.getElementById("latitude").innerHTML = p.coords.latitude.toFixed(2); – document.getElementById("longitude").innerHTML = p.coords.longitude.toFixed(2);

Simulating GPS For development lets simulate a moving GPS device

Simulating Movement In development we can’t walk around to test – geoLocation library allows simulation of an active GPS – lets simulate someone moving through oxford From $WOOKIE_HOME/tutorials/geoLocation – Copy geo_position_js_simulator.js to the scripts directory of your widget – We’ll define a path for our “walker” in Javascript

OpenStreetMap Display a map from OpenStreetMap – – From $WOOKIE_HOME/tutorials/geoLocation – Copy contents of osmWithSimulator.html to your widgets index.html – Copy map_osmWithSimulatorAndLayers.js to your widget script directory with the name map.js – Copy images/map to your widget images directory Deploy Refresh your browser ant deploy-widget

The code There is nothing special in this step that is unique to widgets The javascript is all from – The geo-location getting started guide – The OpenLayers API

Widget Settings Personalising a widget

Storing Settings Add a setting to hide the status line – From $WOOKIE_HOME/tutorials/geoLocation – Copy contents of osmWithSimulator.html to your widgets index.html – Copy contents of map_osmWithSimulatorAndSettings.js to script/map.js Deploy Refresh your browser ant deploy-widget

The code Widget.preferences – Gives access to preferences stored for the widget Widget.preferences.setItem(name, value) – Widget.preferences.setItem('displayStatus', this.checked) Widget.preferences.getItem(name) – Widget.preferences.getItem("displayStatus")

Build for Deployment Widgets are packaged as *.wgt files for deployment

/cygdrive/c/projects/wookie $ ant build-widget Buildfile: build.xml build-widget: [input] What is the short name of the widget you wish to build? part1 _get-widget-name: _validate: _clean: _init: build-widget: [echo] Widget package created at c:\projects\wookie\build/widgets/part1.wgt BUILD SUCCESSFUL Total time: 2 seconds

Deploy to a server To deploy a widget on a running server – Build the wgt file – Place the file in the “upload” directory of the server webapp/wookie/upload

You’re done, you can now build widgets Lets summarise

Widget development cycle Create a widget from the template Deploy in developer mode – Test manually or using a framework such as Selenium – Edit – Re-Deploy to running development server Package for distribution