Designing Reusable Web Components

Similar documents
Designing Reusable Web Components

Rich Web Applications in Server-side Java without. Plug-ins or JavaScript

Rich Web Applications in Server-side Java without. Plug-ins or JavaScript

16. HTML5, HTML Graphics, & HTML Media 웹프로그래밍 2016 년 1 학기 충남대학교컴퓨터공학과

HTML5 MOCK TEST HTML5 MOCK TEST I

RIA Security - Broken By Design. Joonas Lehtinen IT Mill - CEO

Founder & CEO

Fundamentals of Website Development

HTML5 - INTERVIEW QUESTIONS

Qiufeng Zhu Advanced User Interface Spring 2017

IGME-330. Rich Media Web Application Development I Week 1

footer, header, nav, section. search. ! Better Accessibility.! Cleaner Code. ! Smarter Storage.! Better Interactions.

Introduction to Sencha Ext JS

JavaScript Fundamentals_

WHAT IS WEBKIT? COPYRIGHTED MATERIAL SMASHING WEBKIT CHAPTER 1

Visual HTML5. Human Information Interaction for Knowledge Extraction, Interaction, Utilization, Decision making HI-I-KEIUD

New Media Production HTML5

<Insert Picture Here> JavaFX 2.0

A Model-Controller Interface for Struts-Based Web Applications

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

HTML5. HTML5 Introduction. Form Input Types. Semantic Elements. Form Attributes. Form Elements. Month Number Range Search Tel Url Time Week

HTML5 Evolution and Development. Matt Spencer UI & Browser Marketing Manager

COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

HTML5 in Action ROB CROWTHER JOE LENNON ASH BLUE GREG WANISH MANNING SHELTER ISLAND

State of the Open Web. Brad Neuberg, Google

COPYRIGHTED MATERIAL. Defining HTML5. Lesson 1

COURSE 20480B: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

MODULE 2 HTML 5 FUNDAMENTALS. HyperText. > Douglas Engelbart ( )

Next... Next... Handling the past What s next - standards and browsers What s next - applications and technology

HTML5. Language of the Modern Web. By: Mayur Agrawal. Copyright TIBCO Software Inc.

How to create a prototype

Programming in HTML5 with JavaScript and CSS3

Index LICENSED PRODUCT NOT FOR RESALE

Introduction to HTML5

What is HTML5? The previous version of HTML came in The web has changed a lot since then.

20480C: Programming in HTML5 with JavaScript and CSS3. Course Code: 20480C; Duration: 5 days; Instructor-led. JavaScript code.

Course 20480: Programming in HTML5 with JavaScript and CSS3

HTML5, CSS3, JQUERY SYLLABUS

Developer's HTML5. Cookbook. AAddison-Wesley. Chuck Hudson. Tom Leadbetter. Upper Saddle River, NJ Boston Indianapolis San Francisco

Mobile Web Appplications Development with HTML5

08/10/2018. Istanbul Now Platform User Interface

WebKit ; FOR : DUMMIES. by Chris Minnick WILEY. John Wiley & Sons, Inc.

Understanding this structure is pretty straightforward, but nonetheless crucial to working with HTML, CSS, and JavaScript.

GRITS AJAX & GWT. Trey Roby. GRITS 5/14/09 Roby - 1

WebGL Seminar: O3D. Alexander Lokhman Tampere University of Technology

Web Development 20480: Programming in HTML5 with JavaScript and CSS3. Upcoming Dates. Course Description. Course Outline

Etanova Enterprise Solutions

B r o w s e r s u p p o r t

Assignment 2: Website Development

Internet: An international network of connected computers. The purpose of connecting computers together, of course, is to share information.

Juniata County, Pennsylvania

NEW WEBMASTER HTML & CSS FOR BEGINNERS COURSE SYNOPSIS

PIC 40A. Lecture 4b: New elements in HTML5. Copyright 2011 Jukka Virtanen UCLA 1 04/09/14

Live Guide Co-browsing

Certified HTML5 Developer VS-1029

Mining the Rendering Power in Web Browsers. Jianxia Xue Jan. 28, 2014

PHP,HTML5, CSS3, JQUERY SYLLABUS

HTML5 and CSS3: New Markup & Styles for the Emerging Web. Jason Clark Head of Digital Access & Web Services Montana State University Library

IBM JZOS Meets Web 2.0

It's a cross-platform vector graphics package written in JavaScript. Frequently referenced as dojox.gfx or dojo.gfx. Supported backends:

Embracing HTML5 CSS </> JS javascript AJAX. A Piece of the Document Viewing Puzzle

mgwt Cross platform development with Java

Using CSS for page layout

Static Webpage Development

RIT Wiki 5.1 Upgrade - May 21, 2013

HTML Forms. CITS3403 Agile Web Development. 2018, Semester 1

20480B: Programming in HTML5 with JavaScript and CSS3

Lesson 5: Multimedia on the Web

Introduction to HTML 5. Brad Neuberg Developer Programs, Google

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML

HTML 5: Fact and Fiction Nathaniel T. Schutta

WebGL. Announcements. WebGL for Graphics Developers. WebGL for Web Developers. Homework 5 due Monday, 04/16. Final on Tuesday, 05/01

Firefox for Android. Reviewer s Guide. Contact us:

Programming in HTML5 with JavaScript and CSS3

Publishing Technology 101 A Journal Publishing Primer. Mike Hepp Director, Technology Strategy Dartmouth Journal Services

WebGL (Web Graphics Library) is the new standard for 3D graphics on the Web, designed for rendering 2D graphics and interactive 3D graphics.

CompuScholar, Inc. Alignment to Utah's Web Development I Standards


Content Visualization Issues

Eclipse 4.0. Jochen Krause EclipseSource

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

Jim Jackson II Ian Gilman

Contents. 1. Using Cherry 1.1 Getting started 1.2 Logging in

CaptainCasa Enterprise Client. Why, where, how JavaFX makes sense

Rich Web UI made simple Building Data Dashboards without Code

Siteforce Pilot: Best Practices

Logging Into Your Site

1 Introduction. 2 Web Architecture

TIBCO LiveView Web Getting Started Guide

CSS for Page Layout Robert K. Moniot 1

Blackboard. Voluntary Product Accessibility Template Blackboard Learn Release 9.1 SP11. (Published January 14, 2013) Contents: Introduction

INTRODUCTION TO HTML5! HTML5 Page Structure!

Full Stack Web Developer

HTML5 Application Development Fundamentals. Course Outline. HTML5 Application Development Fundamentals. ( Add-On ) 01 Aug 2018

Programmazione Web a.a. 2017/2018 HTML5

Scalable Vector Graphics (SVG) vector image World Wide Web Consortium (W3C) defined with XML searched indexed scripted compressed Mozilla Firefox

Platform-Independent UI Models: Extraction from UI Prototypes and rendering as W3C Web Components

0.9: Faster, Leaner and Dijit? July 25, 2007 Dylan Schiemann. presented by

Telerik Test Studio. Web/Desktop Testing. Software Quality Assurance Telerik Software Academy

THE GREAT CONSOLIDATION: ENTERTAINMENT WEEKLY MIGRATION CASE STUDY JON PECK, MATT GRILL, PRESTON SO

Transcription:

Designing Reusable Web Components Dr. Joonas Lehtinen Vaadin @joonaslehtinen

Agenda What do we want to Q & A design? Technology HTML5 / Canvas Google Web Toolkit Vaadin Framework Designing Web Component Step-by-step

Goal

1 Goal

http://jole.virtuallypreinstalled.com/spreadsheet

2Technology

<!doctype html>

Element <article> <aside> <audio> <canvas> <command> <datalist> <details> <embed> <figure> <figcaption> <footer> <header> <hgroup> <keygen> <mark> Description An independent piece of content for a document e.g. blog entry, forum entry A piece of content that is somehow related to the rest of the page Audio media content A component for rendering dynamic bitmap graphics on the fly. e.g games A command that the user can invoke: a button, radio button or checkbox Together with the new list attribute for the <input> element can be used to make combo boxes Additional information or controls that the user can obtain on demand, to provide details on the document, or parts of it Used for plug-in content A piece of self-contained flow content referenced as a single unit from the main flow of the document Caption for a Footer for a section; may contain information about author, copyright information, etc. A group of introductory or navigation aids Header of a section A key pair generation control for user authentication in forms A run of text in one document marker or highlighted for reference purposes

new shiny

Cross-document messaging Multimedia WebGL CSS3 Document editing Microdata Offline storage Markup improvements Forms Geolocation Drag-and-drop Canvas History management File API

Canvas state state state

http://vj.jole.fi/

#151 brought to you by... Get More Refcardz! Visit refcardz.com CONTENTS INCLUDE: Introduction to Canvas A Comparison with SVG Canvas Performance Creating a Canvas and More! INTRODUCTION TO CANVAS The HTML <canvas> element allows for on-the-fly creation of graphs, diagrams, games, and other visual elements and interactive media. It also allows for the rendering of 2D and 3D shapes and images, typically via JavaScript. <canvas id= canvas1 width= 500 height= 500 ></canvas> <script type= text/javascript > var can = document.getelementbyid( canvas1 ); var ctx = can.getcontext( 2d ); Hello World!, 50, 50); </script> Canvas is perhaps the most visible part of the new HTML5 feature set, with new demos, projects, and proofs of concept appearing daily. Canvas is a very low-level drawing surface with commands for making lines, curves, rectangles, gradients and clipping regions built in. There is very little else in the way of graphics drawing, which allows programmers to create their own methods for several basic drawing functions such as blurring, tweening, and animation. Even drawing a dotted line is something that must be done by the programmer from scratch. Canvas is an immediate drawing surface and has no scene graph. This means that once an image or shape is drawn to it, neither the Canvas nor its drawing context have any knowledge of what was just drawn. For instance, to draw a line and have it move around, you need to do much more than simply change the points of the line. You must clear the Canvas (or part of it) and redraw the line with the new points. This contrasts greatly with SVG, where you would simply give the line a new position and be done with it. Hot Tip You can visit the evolving specification for Canvas at the WHATWG site: http://www.whatwg.org/specs/web-apps/current-work/multipage/ the-canvas-element.html. HTML 5 Canvas Support Statefulness Other Considerations Accessibility Canvas Safari, Firefox, and Opera have at least some support. Internet Explorer 9+ has support. Almost all modern smart phones. limited support through the excanvas library. surface remembered about their state. must be programmed yourself. (rendering nothing) if scripting is disabled. DOM objects ment functionality is strongly advised against, even in the specification itself. disabled. SVG By Simon Sarris ers. Almost all modern smart phones. surface 10,000 objects. objects, statefulness is built in and event handling is much easier. many programs such as Illustrator can output SVG animation. objects. and web crawlers. Browser Support and Hardware Acceleration Canvas is supported by Firefox 1.5 and later; Opera 9 and later; and newer versions of Safari, Chrome, and Internet Explorer 9 and 10. The latest versions of these browsers support nearly all abilities of the Canvas element. A notable exception is drawfocusring, which no browser supports effects. HTML5 Canvas Hardware acceleration is supported in some variation by all current browsers, though the performance gains differ. It is difficult to benchmark between the modern browsers because they are changing frequently, but so far IE9 seems to consistently get the most out of having a good GPU. On a machine with a good video card it is almost always the fastest at rendering massive amounts of images or canvas-to-canvas draws. Accelerated IE9 also renders fillrect more than twice as fast as the other major browsers, allowing for impressive 2D particle effects [1]. Chrome often has the fastest path rendering but can be inconsistent between releases. All browsers render images and rects much faster than paths or text, so it is best to use images and rects if you can regardless of which browsers you are targeting. DZone, Inc. www.dzone.com

Google Web Toolkit

Subset of java.lang, java.util Widgetset Java to JavaScript Compiler IE6 IE7 Firefox Your Application UI Safari

simpler 100% Java Static typing Object oriented Excellent tooling

less bugs Stop debugging JavaScript spaghetti Ignore most browser differences

client-side UI in client Asyncronous RPC Services (for UI)

Vaadin is a UI framework for rich web applications

java html

Web application layers Backend server Web server RPC Java to JavaScript JavaScript Vaadin required required optional optional optional GWT required required required required optional JS required required required required

Vaadin UI component architecture Server UI comp. Button, Table, Tree,... API you program with State HTTP(S) Client UI comp. Rendering Event handling Runs on JavaScript Java Compiled with JDK Java Google Web Toolkit

How does it work, really?

Initial HTML CSS (theme) Images JavaScript 250k total

name= Joonas button clicked 150 bytes

name= Joonas button clicked 150 bytes Add notification 466 bytes

http://demo.vaadin.com/ dashboard

Download for Free vaadin.com/book ~700 pages

Designing Step-by-step

3Designing Step-by-step

Need We can not get the UX we need with the existing widgets

Goals List of real quantifiable requirements for UX

Example goals Load and view data in XLS files Show visual overview for numeric cols Must support 1000 cell tables Supports the latest Firefox & Chrome

Nail down the minimum viable set of supported browser versions with the customer

Idea = UX [how it is used] + Tech [how it works]

Always start from defined goals - never let idea to rule your design

Works with target browsers?

Interactions work with target browsers? Performance is good enough for target data?

Proto DOD Includes main use-cases Works in target browsers Handles enough data

Never start design or implementation before prototyping browser compatibility and performance

Design UX and API first. Never continue from the prototype implementation

Drawing detailed wireframes & mockups and testing them with users will save time later

Shamelessly copy UX. Then your users already know how to use it.

Aim for multilayered design that lets your users (developers) change behavior of your component

DOM classes and CSS restrictions must be documented to make styling easy

Keep component project separate from your real application project

Demo application must include all features and serve as example for your users

Invest in project setup with a rapid save-to-see cycle and a robust build script. These might not be the same thing.

https://vaadin.com/wiki/-/wiki/main/ Component+Add-on+Project+Setup+HOWTO

There is no substitute for manual testing and user experience testing

Skip test driven development, but invest in regression testing

Pixel level regression tests take time to set up, but will be worth it

Never trust that your changes would not break other browsers and skip cross-browser testing

It is impossible to use too much time in polishing UX for a reusable component.

Search Explore Gist Blog Help jojule 35 jojule / spreadsheet Admin Unwatch Fork Pull Request 1 1 Code Network Pull Requests 0 Issues 0 Wiki 0 Stats & Graphs Simple spreadsheet component for Vaadin Read more https://vaadin.com/addon/spreadsheet apple Clone in Mac ZIP SSH HTTP Git Read-Only git@github.com:jojule/spreadsheet.git Read+Write access branch: master Files Commits Branches 1 Tags Downloads Latest commit to the master branch https://github.com/jojule/spreadsheet Update README.markdown jojule authored 4 hours ago commit 7453f467b1 spreadsheet / name age message history design a day ago Developing [Joonas Lehtinen] src 19 hours ago Version 0.1 [Joonas Lehtinen] README.markdown 4 hours ago Update README.markdown [jojule] licensing.txt 19 hours ago Version 0.1 [Joonas Lehtinen] pom.xml 18 hours ago Fixed add-on name [Joonas Lehtinen] README.markdown

README.markdown Spreadsheet for Vaadin The widget shows a spreadsheet - either from XLS file or by setting the cell contents programmatically. This version is very limited and should be considered to be an early alpha -version. Try out the demo to see if it would be useful for you. I mainly built it for an upcoming presentation. SpreadsheetView class should be also usable in GWT without Vaadin Framework, but then you must implement SpreadsheetModel by yourself. Dependencies Apache POI 3.8 - http://poi.apache.org/ Apache Commons Codec 1.5 - Required by POI - http://commons.apache.org/codec/ Release notes Initial release with severe limitations: All columns and rows have fixed sizes No cell styling is supported No graphs are supported No merged cells are supported Performance for larger spreadsheets is really bad Only one spreadsheet widget is supported on screen at once License & Author

Try out my Spreadsheet! vaadin.com/addon/spreadsheet

https://github.com/jojule/ spreadsheet/issues

Support HOWTO Issue Ignore. wont-fix in best case. (the usual open source way) reported by actual user! Fix after 6 months, maybe... Fix immediately and thank the user who reported it

Tue 20:00 C4 Wed 14:00 C4 Vaadin & GWT BOF Intro to Vaadin 7 joonas@vaadin.com vaadin.com/joonas @joonaslehtinen