Developing Great Dashlets Will Abson About Me Project Lead, Share Extras Alfresco Developer and previously Solutions Engineer DevCon 2011 –

Slides:



Advertisements
Similar presentations
Microsoft Expression Web-Illustrated Unit K: Working with Behaviors.
Advertisements

© 2011 Delmar, Cengage Learning Chapter 1 Getting Started with Dreamweaver.
Learning the Basics – Lesson 1
KompoZer. This is what KompoZer will look like with a blank document open. As you can see, there are a lot of icons for beginning users. But don't be.
NEXT. Create Pages in Blogger Another top user-requested feature has just graduated from Blogger In Draft! Blogger now makes it easy to create Pages linked.
OpenCMS and the MSASS Website. A Note on Terminology Locking a file for editing: No lockNOT locked You have write/edit access Someone else has write.
© 2010 Delmar, Cengage Learning Chapter 1 Getting Started with Dreamweaver.
Introducing Cascading Style Sheets  Cascading Style Sheet Basics  Creating Styles  Using Styles  Manipulating Styles  Text Formatting with CSS.
Javascript Document Object Model. How to use JavaScript  JavaScript can be embedded into your html pages in a couple of ways  in elements in both and.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Chapter 1 Getting Started With Dreamweaver. Explore the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
A pictorial walkthrough. After installing the Child Care National Quality Standard (CCNQS) SmartGuide you will see the desktop.
1 Agenda Overview Review Roles Lists Libraries Columns.
 jQuery Mobile An Introduction. What is jQuery Mobile  A framework built on top of jQuery, used for creating mobile web applications  Designed to make.
CST JavaScript Validating Form Data with JavaScript.
Getting Started with Dreamweaver
Sage CRM Developers Course
NextGen Technology upgrade – Synerizip - Sandeep Kamble.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
Yahoo! User Interface (YUI) Library Natly Mekdara.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Web Technologies Website Development Trade & Industrial Education
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
Met Alert Tool (MAT). Introduction What is MAT? –Met Alert Tool (MAT) monitors and alerts the user to weather conditions exceeding thresholds (for example,
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Dreamweaver MX Unit A CIS 205—Web Site Design & Development.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Advanced Level Course. Site Extras Site Extras consist of four categories: Stationeries Site Trash Designs Components.
UFCEWT-20-3 Advanced Topics in Web Development Lecture 4 : JavaScript, Browsers & the HTML DOM-API.
Website Development with Dreamweaver
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
CIS 205—Web Design & Development Dreamweaver Chapter 1.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Chapter 10 Fireworks: Part II The Web Warrior Guide to Web Design Technologies.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
1 What’s the difference between DocuShare 3.1 and 4.0?
Presented by Graduate Design Group 2 Meredith, Jennifer, Cammay and Diane.
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
JavaScript - A Web Script Language Fred Durao
Chapter 2 – Introduction to the Visual Studio .NET IDE
Adobe Flash CS4 – Illustrated Unit A: Getting Started with Adobe Flash.
Introducing Cascading Style Sheets. Cascading Style Sheet Basics  Cascading Style Sheet Basics  Creating Styles  Using Styles  Manipulating Styles.
Developing Great Dashlets Will Abson About Me Project Lead, Share Extras Alfresco Developer and previously Solutions Engineer DevCon 2011 –
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (NON-Audio version) © Dr. David C. Gibbs WDMD.
Intro to jQuery. What is jQuery? A JavaScript library Lightweight (about 31KB for the minified version) Simplifies HTML document traversing (DOM), event.
Project 5: Using Pop-Up Windows Essentials for Design JavaScript Level One Michael Brooks.
Microsoft FrontPage 2003 Illustrated Complete Creating a Frames Page.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Customizing Share Document Previews Will Abson Senior Integrations Engineer and Share Extras Project Lead
#SummitNow Consuming OAuth Services in Alfresco Share Alfresco Summit 2013 Will Abson
How to Leverage Java in Oracle Forms Web Applications Duncan Mills Application Development Tools Oracle Corporation.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 6 Looping and Multiple Forms.
Interstage BPM v11.2 1Copyright © 2010 FUJITSU LIMITED FORMS.
Developing Great Dashlets Will Abson About Me Project Lead, Share Extras Alfresco Developer and previously Solutions Engineer DevCon 2011 –
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
Adobe Flash Professional CS5 – Illustrated Unit A: Getting Started with Adobe Flash Professional.
COM621: Advanced Interactive Web Development Lecture 6 – JavaScript (cont.)
Section 10.1 Define scripting
Getting Started with Dreamweaver
Learning the Basics – Lesson 1
Chapter 2 – Introduction to the Visual Studio .NET IDE
Tutorial 6 Topic: jQuery and jQuery Mobile Li Xu
Getting Started with Dreamweaver
Integrating JavaScript and HTML
Getting Started with Dreamweaver
Presentation transcript:

Developing Great Dashlets Will Abson

About Me Project Lead, Share Extras Alfresco Developer and previously Solutions Engineer DevCon 2011 – Customizing Share Best Practices - with Jeff Potts Dashlet Challenge Judge 2011 & 2012

In this presentation…

…we’ll take your dashlets From This

…we’ll take your dashlets From ThisTo This

What Makes a Great Dashlet? Summarise information in meaningful ways Configurable Responsive user interface Rich controls

Event Scheduling by Bertrand Forest

Social Tops Dashlet by Sébastien Le Marchand

JMX Statistics Dashlet by Chris Paul

Now Let’s Get our Hands Dirty!

Agenda The Basics Hello World Utilising UI Components Title Bar Actions Dashlet Resizers YUI Buttons Dom Manipulation Event Listeners User Preferences Popup Notifications

Agenda Demo

Additional Topics Utilising UI Components (ctd.) Configuration dialogues Fetching Data Dashlets that access the Alfresco Repository Dashlets that access third party services

Example Project Source Code Each stage in the walk-through is available in GitHub Corresponds to a different branch I will demonstrate using a local repository

Hello World Dashlet for 4.2 Based on Share Extras ‘Sample Dashlet’ Displays a configurable message to the user Demonstrates structure of a basic dashlet Web-tier web script Client-side assets Best practice Displays static / semi-dynamic text We will go further!

Hello World Dashlet for 4.2

Hello World Example 1 dashlets/tree/helloworld1

Hello World Example 1

Hello World Example 2 great-dashletsgreat-dashlets / config / alfresco / site-webscripts / com / someco / components / dashletsconfigalfrescosite-webscriptscomsomecocomponentsdashlets helloworld.get.desc.xml helloworld.get.config.xml helloworld.get.js helloworld.get.html.ftl helloworld.get.properties

Hello World Example 1 great-dashletsgreat-dashlets / config / alfresco / site-webscripts / com / someco / components / dashlets / hello- world.get.html.ftlconfigalfrescosite-webscriptscomsomecocomponentsdashletshello- world.get.html.ftl

Title Bar Actions New in Alfresco 4.0 Replaces action links previously placed in dashlet toolbars e.g. ‘Configure’ action Actions may point to a link in the same or a new window/tab or trigger custom YUI or Bubbling events To use, create an instance of Alfresco.widget.DashletTitleBarActions More info b/symbols/Alfresco.widget.DashletTitleBarActions.ht mlhttp://sharextras.org/jsdoc/share/community- 4.2.b/symbols/Alfresco.widget.DashletTitleBarActions.ht ml

Hello World Example 2 dashlets/tree/helloworld2

Hello World Example 2 great-dashletsgreat-dashlets / config / alfresco / site-webscripts / com / someco / components / dashlets / hello- world.get.jsconfigalfrescosite-webscriptscomsomecocomponentsdashletshello- world.get.js

Hello World Example 2 great-dashletsgreat-dashlets / config / alfresco / site-webscripts / com / someco / components / dashlets / hello- world.get.html.ftlconfigalfrescosite-webscriptscomsomecocomponentsdashletshello- world.get.html.ftl

Dashlet Resizers Allows resizing of user dashlets or site dashlets by Site Managers Resizing is persistent Height attribute stored in component configuration To use, create an instance of Alfresco.widget.DashletResizer Must supply HTML ID and component ID More info b/symbols/Alfresco.widget.DashletResizer.htmlhttp://sharextras.org/jsdoc/share/community- 4.2.b/symbols/Alfresco.widget.DashletResizer.html

Hello World Example 3 dashlets/tree/helloworld3

Hello World Example 3 great-dashletsgreat-dashlets / config / alfresco / site-webscripts / com / someco / components / dashlets / hello- world.get.jsconfigalfrescosite-webscriptscomsomecocomponentsdashletshello- world.get.js

Dashlet Client-side Components Up until now we have used standard re-usable classes (or widgets) Most dashlets will require us to define our own custom dashlet classes to implement the behaviour required To do this, extend Alfresco.component.Base to add your own implementation Implementation should be held in custom client-side JS files, which we need to include in the page Once we have done this we can create an instance of the client-side component on the page

Hello World Example 4 dashlets/tree/helloworld4

Hello World Example 4 great-dashletsgreat-dashlets / config / alfresco / site-webscripts / com / someco / components / dashlets / hello- world.get.jsconfigalfrescosite-webscriptscomsomecocomponentsdashletshello- world.get.js

Hello World Example 4 great-dashletsgreat-dashlets / config / alfresco / site-webscripts / com / someco / components / dashlets / hello- world.get.html.ftlconfigalfrescosite-webscriptscomsomecocomponentsdashletshello- world.get.html.ftl

Hello World Example 4 great-dashletsgreat-dashlets / source / web / someco / components / dashlets / hello-world.jssourcewebsomeco componentsdashletshello-world.js

Hello World Example 4

Push Button Controls YUI2 provides a range of different button types Alfresco.util provides a handy function for setting up push buttons {YAHOO.widget.Button} Alfresco.util.createYUIButton(p_scope, p_name, p_onclick, p_obj, p_oElement) Button element must be declared in HTML Easier to use this if the standard component markup is used But we could use YAHOO.widget.Button() directly b/symbols/Alfresco.util.html#.createYUIButtonhttp://sharextras.org/jsdoc/share/community- 4.2.b/symbols/Alfresco.util.html#.createYUIButton

Dom Manipulation YAHOO.util.Dom provides a range of static methods for locating and manipulating Dom elements YAHOO.util.Dom.get() YAHOO.util.Dom.getAttribute() YAHOO.util.Dom.addClass() Once we have an HTML element in our hands we can Set its content ( innerHTML ) Add sibling and child elements Alfresco.util builds on these functions b/symbols/Alfresco.util.htmlhttp://sharextras.org/jsdoc/share/community- 4.2.b/symbols/Alfresco.util.html

Hello World Example 5 dashlets/tree/helloworld5

Hello World Example 5 great-dashletsgreat-dashlets / config / alfresco / site-webscripts / com / someco / components / dashlets / hello- world.get.html.ftlconfigalfrescosite-webscriptscomsomecocomponentsdashletshello- world.get.html.ftl

Hello World Example 5 great-dashletsgreat-dashlets / source / web / someco / components / dashlets / hello-world.jssourcewebsomeco componentsdashletshello-world.js

Dashlet Toolbars Filters are usually implemented using YUI ‘menu’ buttons Or could be ‘split’ buttons if clickable too Like push buttons we create in HTML Activate the button using Alfresco.util.createYUIButton Need to provide a function to handle the click event Actions usually implemented as HTML links (with icons) Could be a hyperlink to another page or wired to a function using YAHOO.util.Event.addListener()

Hello World Example 6 dashlets/tree/helloworld6

Hello World Example 6 great-dashletsgreat-dashlets / config / alfresco / site-webscripts / com / someco / components / dashlets / hello- world.get.html.ftlconfigalfrescosite-webscriptscomsomecocomponentsdashletshello- world.get.html.ftl

Hello World Example 6 great-dashletsgreat-dashlets / source / web / someco / components / dashlets / hello-world.jssourcewebsomeco componentsdashletshello-world.js

Hello World Example 6

User Preferences Allow us to store user-specific configuration properties, e.g. last filter state Properties are stored using JSON in a hierarchical structure, e.g. {com: {someco: {someapp: {foo: “bar”}}}} Implemented in Alfresco.service.Preferences Dashlets should create a class instance in their constructor Provide callback functions when loading and saving data b/symbols/Alfresco.service.Preferences.htmlhttp://sharextras.org/jsdoc/share/community- 4.2.b/symbols/Alfresco.service.Preferences.html

Hello World Example 7 dashlets/tree/helloworld7

Hello World Example 7 great-dashletsgreat-dashlets / source / web / someco / components / dashlets / hello-world.jssourcewebsomeco componentsdashletshello-world.js

Hello World Example 7

User Notifications and Prompts Notifications appear briefly and then fade out Prompts require the user to confirm something By default a single button is shown We can provide multiple buttons, e.g. ‘Yes’, ‘No’ Other functions – get user input, display web scripts, display forms Implemented using static methods on Alfresco.util.PopupManager b/symbols/Alfresco.service.Preferences.htmlhttp://sharextras.org/jsdoc/share/community- 4.2.b/symbols/Alfresco.service.Preferences.html

Hello World Example 8 dashlets/tree/helloworld8

Hello World Example 8 great-dashletsgreat-dashlets / source / web / someco / components / dashlets / hello-world.jssourcewebsomeco componentsdashletshello-world.js

Demo

Get Latest Document Dashlet Original implementation by Jeff Potts Improvements by Rik Taminaars Further improvements for these examples A more advanced dashlet Fetches data from the repository Configurable per-instance using a config dialogue

Loading Repository Data Credit: Jeff Potts

Loading Repository Data Data is loaded using a custom repository web script returning JSON data But you could re-use existing web scripts Data loading in web-tier – Alfresco.util.Ajax See b/symbols/Alfresco.util.Ajax.htmlhttp://sharextras.org/jsdoc/share/community- 4.2.b/symbols/Alfresco.util.Ajax.html Data loading in client-side component How do we reload data?

Get Latest Document Example 1 dashlets/tree/getlatestdoc2

Dashlet Configuration Dialogues Allows the dashlet to be tailored to different situations Configurable by users (user dashlets) or Site Managers (site dashlets) Same storage mechanism as Dashlet Resizer Implement using Alfresco.module.SimpleDialog instance (docs)docs Must include client-side files for this class Must provide a web script to implement the UI Optionally, we can provide a custom form target Most dashlets will use the default modules/dashlet/config/{id} target

Get Latest Document Example 2 dashlets/tree/getlatestdoc2

More Information