The Share Widget Library

Slides:



Advertisements
Similar presentations
Extreme User Interfaces for Alfresco Kevin Dorr Sr. Solutions Engineer Americas Channel.
Advertisements

Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Latest Share Customization Techniques Dave Draper
Alpha Anywhere Product Roadmap and Overview
Cloud Computing Lecture #7 Introduction to Ajax Jimmy Lin The iSchool University of Maryland Wednesday, October 15, 2008 This work is licensed under a.
LHCbPR V2 Sasha Mazurov, Amine Ben Hammou, Ben Couturier 5th LHCb Computing Workshop
ICS 665 Jesse Abdul. jQuery UI Overview  jQuery UI javascript library Includes all UI component functionality  jQuery UI CSS framework Includes standard.
© 2006 by IBM 1 How to use Eclipse to Build Rich Internet Applications With PHP and AJAX Phil Berkland IBM Software Group Emerging.
Chapter 6 DOJO TOOLKITS. Objectives Discuss XML DOM Discuss JSON Discuss Ajax Response in XML, HTML, JSON, and Other Data Type.
 jQuery Mobile An Introduction. What is jQuery Mobile  A framework built on top of jQuery, used for creating mobile web applications  Designed to make.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Publications, design sets, web pages
WHAT IS A WEB APP? Van Kelly Yeshiva University July 6, 2013.
Pittsburgh Java User Group– Dec Java PureFaces: A JSF Framework Extension.
Philly.NET Hands-on Labs JAVASCRIPT SERIES. July 9: JavaScript Syntax Visual Studio ◦Projects ◦Editors ◦Debugging ◦Script blocks ◦Minification and bundling.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
Some essentials difference syntax and concept for jquery developers Roohullah Afzali
Introducing NativeScript [Pavel Kolev Software Telerik: a Progress company]
WEB DESIGN USING DREAMWEAVER. The World Wide Web –A Web site is a group of related files organized around a common topic –A Web page is a single file.
Google Web Toolkit An Overview By Shauvik Roy Choudhary.
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
WebSphere Portal Technical Conference U.S Creating Rich Internet (AJAX) Applications with WebSphere Portlet Factory.
JavaScript Framework for Rich Apps in Every Browser Maura Wilder Joan Wortman
INTEGRATION OF BACKBONE.JS WITH SPRING 3.1. Agenda New Features and Enhancements in Spring 3.1 What is Backbone.js and why I should use it Spring 3.1.
RIA and Web2.0 Development with no Coding Juan Camilo Ruiz Senior Product Manager Development Tools.
Web Technologies Lecture 2 HTML and CSS. HTML Hyper Text Markup Language – Describes web documents – Made up of nested HTML markup tags – Tags are the.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
Intro to jQuery. What is jQuery? A JavaScript library Lightweight (about 31KB for the minified version) Simplifies HTML document traversing (DOM), event.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Web Components Polymer. Agenda I want bootstrap : 3 Today.
AJAX and REST. Slide 2 What is AJAX? It’s an acronym for Asynchronous JavaScript and XML Although requests need not be asynchronous It’s not really a.
Bundles, Minification Andres Käver, IT Kolledž
SHAREPOINT & JQUERY. Hi, my name and I am a product manager at lightning tools. I have been working with SharePoint for 5 years.
Craig Pelkie Copyright © 2015, Craig Pelkie ALL RIGHTS RESERVED Use RPG to Mobilize your IBM i.
JQUERY AND AJAX
Dynamic UI Generation with Alfresco Share and Aikau
Testing Your Alfresco Add-ons Michael Suzuki Software Engineer.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
#SummitNow Alfresco 4.2 Share Development Workshop November 6, 2013 Kevin Dorr, Sr. Solutions Engineer, Alfresco US.
Customizing Share Document Previews Will Abson Senior Integrations Engineer and Share Extras Project Lead
Share Enhancements David Webster. Introduction Me: David Webster Alfresco Engineer Joined April 2010 UI The Session: Share Enhancements:
#SummitNow The Share Widget Library 13 th November 2013 Dave Draper
INTRODUCING HYBRID APP KAU with MICT PARK IT COMPANIES Supported by KOICA
Extreme User Interfaces for Alfresco Kevin Dorr Sr. Solutions Engineer Americas Channel.
Ext JS - Direct Bridging The Gap A DMSBT Presentation By Timothy Chandler.
INNOV-16: Rich User Interface for the Web???? AJAX to the Rescue Ken Wilner VP of Technology Progress Software.
Office 365 Development July 2014.
Web Technologies Computing Science Thompson Rivers University
Angular 4 + TypeScript Getting Started
Getting Started with Alfresco Development
z/Ware 2.0 Technical Overview
Overall Architecture and Component Model
W3C Web standards and Recommendations
AJAX and REST.
Web UI Basics ITM 352.
Getting started with Alfresco Development
Responsive browser-based video recording and playback
SharePoint-Hosted Apps and JavaScript
Angularjs Interview Questions and Answers By Hope Tutors.
jQuery The Easy JavaScript Nikolay Chochev Technical Trainer
Modern web applications
ASP.NET Module Subtitle.
Modern web applications
JavaScript CS 4640 Programming Languages for Web Applications
Web Technologies Computing Science Thompson Rivers University
05 | An Introduction to AngularJS
Yale Digital Conference 2019
JavaScript CS 4640 Programming Languages for Web Applications
MS Confidential : SharePoint 2010 Developer Workshop (Beta1)
Presentation transcript:

The Share Widget Library 5th November 2013 Dave Draper (@_DaveDraper)

A Brief History… Alfresco Surf used in Share 3.0, 3.1 & 3.2 Alfresco Surf becomes Spring Surf (first used in Share 3.3) Initial extensibility features added in 4.0 Dynamic configuration added for 4.1 WebScript refactor for Share 4.2

Share Customization Information http://www.youtube.com/watch?v=rx-uaKTc8xs

The Annual Spring Surf Question… 2 years ago: “Leaving where it is” Last year: “Bringing back” Sept. this year Spring Source had spring clean Currently hosted on Alfresco SVN (private) May branch for first time (if Alfresco goes full Maven)

Why Change? YUI 2 is no longer being developed Creating pages in Share is too hard Accessibility Performance (reduce HTTP requests) Improve re-usability Improve extensibility

What’s Changed? Simple page creation Dynamic dependency analysis in Surf New widget library New customization tools CSS token substitution by Themes

Introducing the new “Widget Library” Over 100 new widgets Most should be considered BETA Will be used for all new Share projects

What is a Widget? JavaScript HTML CSS i18n

Old Widget Granularity

New Widget Granularity

Page Models Introduce the concept of single WebScript pages that define a JSON model comprised of services and nested widgets

JSON Structure Example ID of the definition in the model ID of the root element in the resulting DOM Assigns to a variable of the enclosing widget The widget to instantiate The instantiation arguments Used by the enclosing widget Passed as an argument during instantiation

Single WebScript Pages Can create a page via single WebScript JavaScript controller defined page model

Updated Surf Object Hierarchy Page model WebScript WEBSCRIPT Template Template XML Template is WebScript (NOT Freemarker) Dynamically created Component for WebScript (guarantees binding) Multiple Page/Template definitions (e.g. hybrid, remote, etc) Page XML

URL Tokens

/{pageid}/ws/{webscript} /{pageid}/p/{pagename} Matches URL in WebScript Descriptor /{pageid}/ws/{webscript} /{pageid}/p/{pagename} Matches document name /Data Dictionary/ShareResources/Pages

http://localhost:8081/share/page/hrp/p/LogoPage http://localhost:8081/share/page/rp/p/LogoPage

How Does it Work? Built around the concept of AMD

What is AMD? “Asynchronous module definition (AMD) is a JavaScript API for defining modules such that the module and its dependencies can be asynchronously loaded. It is useful in improving the performance of websites by bypassing synchronous loading of modules along with the rest of the site content. In addition to loading multiple JavaScript files at runtime, AMD can be used during development to keep JavaScript files encapsulated in many different files. This is similar to other programming languages, for example java, which support keywords such as import, package, and class for this purpose. It is then possible to concatenate and minify all the source JavaScript into one small file used for production deployment.” - Wikipedia “It is then possible to concatenate and minify all the source JavaScript into one small file used for production deployment”

<@processJsonModel> This is the single custom Freemarker directive that is used to convert a JSON model into all the resources required to build a page Each widget is an AMD module Resources derived from module

<@processJsonModel> (includes i18n object) JavaScript Bootstrap Surf <@processJsonModel> JavaScript Modules Page Model (includes HTML fragments) CSS Resource (can includes Base64 encoded images)

Dynamic Dependency Analysis “So, how does Surf know what resources are required?”

Dependency Example A B C E D Requesting A results in B, C, D & E being loaded C is only loaded once (despite being depended on twice)

JavaScript “bootstrap” resource JavaScript dependency layer Resource Goals JavaScript “bootstrap” resource JavaScript dependency layer CSS dependencies Image Sprite * These are the optimum resources that will be loaded Image sprites will be in next release (4.2 features CSS encoded images)

What About Performance? Module dependencies cached Minified resources cached Aggregated resources cached Page definitions cached Resources check summed (with infinite expiry) for safe browser caching

Decoupling Widgets for presentation, Services for data/actions Communication via pub/sub or custom event bubbling

“Wait, so you’re NOT using Angular.js ?!?” Nothing against Angular per se

Why Dojo? AMD Accessibility Widget templating Unit testing Inheritence DOES have a healthy Community Backed by BIG companies Same age as Alfresco (8 years old)

(but it’s not just Dojo) All widgets in the library start with the Dojo widget template base Some widgets wrap existing Share widgets Some new widgets use YUI resources (Sidebar container) Some widgets use JQuery (new previewer) Widgets exist that use other 3rd party libraries (ACE/JSON editors)

(and it’s better than just AMD) Surf supports non-AMD dependencies It’s possible for a widget to declare a dependency on any JavaScript resource Surf prevents duplicate resources being loaded multiple times

What Widgets are Available?

Menu Widgets

Form Widgets NOT JUST DOJO

Layout Widgets NOT JUST DOJO

Document Widgets

HTML5 Previewer NOT JUST DOJO

Where are the Widgets?

tomcat/webapps/share/js/alfresco (server) slingshot/source/web/js/alfresco (SVN)

Where is this in Share 4.2?

What Does This Mean for Customization? Use current customization patterns Extension modules targeting JS controllers More tooling Explain broken “delete widget” issue

alfresco/menus/AlfMenuBar alfresco/menus/AlfMenuBarItem third/party/MenuBarItem alfresco/menus/AlfMenuBarItem alfresco/menus/AlfMenuBarItem Can also reconfigure widgets

http://blogs. alfresco http://blogs.alfresco.com/wp/developer/2013/09/04/customizing-the-share-header-menu-part-1/

CSS Theme Tokens

alfresco-dialog-AlfDialog .alfresco-dialog-AlfDialog.dijitDialog { border: $theme-border-1; border-radius: 6px 6px 6px 6px; box-shadow: $theme-box-shadow; font-family: $theme-font-family-2; font-size: $theme-font-size-1; }

<. xml version='1. 0' encoding='UTF-8' <?xml version='1.0' encoding='UTF-8'?> <theme> <title>Light Theme</title> <title-id>theme.lightTheme</title-id> <css-tokens> <theme-font-family-1>Open Sans Condensed,Arial,sans-serif</theme-font-family-1> <theme-font-family-2>Open Sans,Arial,sans-serif</theme-font-family-2> <theme-font-family-3>Open Sans Bold,Arial,sans-serif</theme-font-family-3> <theme-font-size-1>13px</theme-font-size-1> <theme-color-1>#333</theme-color-1> <theme-color-2>#333</theme-color-2> <theme-color-3>#333</theme-color-3> <theme-color-4>#333</theme-color-4> <theme-color-5>#ccc</theme-color-5> share/WEB-INF/classes/alfresco/site-data/themes/lightTheme.xml

So, What’s Next? New UI features will be written using this framework More widgets added (with full unit tests) Accessibility testing Document Library refresh

What Does This Mean For You? Use our widgets to extend Easier to customize our pages Easier to build new pages Easier to contribute to Community

Any Questions? If there’s any time left, open up for Q&A