SlideShare a Scribd company logo
Using SVG cross-browser with Ample SDK,  JavaScript GUI Framework. SVG Open 2009 2-4 October 2009, Mountain View, CA Sergey Ilinsky
Agenda 1) Web-browsers and markup-based Vector Graphics 2) Introduction to the Ample SDK GUI Framework 3) Scope of SVG implementation 4) Using SVG with Ample SDK 5) VML problems encountered while implementing 6) Directions 7) Questions
1. Web-browsers and markup-based Vector Graphics Modern browsers claim to support SVG SVG, First WD on 11/02/1999 One of the first usable implementations in Opera 9 (2006) Other – try hiding deep VML VML, W3C Note on 13/05/1998 First implementation shipped with Internet Explorer 5.0 (1999)
VML SVG
Chrome 3.0 / Firefox 3.0 Opera 10.0 BTW, Modern browsers do have quirks
Chrome 3.0 Firefox 3.0 / Opera 10.0 Very modern browsers do have quirks too
2. Introduction to the Ample SDK 1) Goals 2) Solution 3) Programming model 4) Technologies breakdown 5) Componentization model
2.1 Goals - equalize browsers APIs without introducing new - extend on browser UI technologies stacks - create a framework for reusable UI components - do not enforce application programming model - keep it transparent
2.2 Solution virtualizing browser  native technologies: - pass through if available - implement if not - fix if broken Ben Galbraith:  «Ample SDK:  Browser-in-a-Browser»
2.3 Programming model Programming model is that of web-browser: - XML for UI - CSS for Style - DOM/JavaScript for Logic
2.4 Technologies breakdown - Runtime (Core) - UI Languages (Plug-ins)
2.4 Technologies breakdown: Runtime - Document Object Model  Core L2, Events L3, Selectors API - JavaScript APIs   DOMParser, XMLSerializer, XSLTProcessor, XMLHttpRequest, JSON - XML Technologies   SMIL3.0  (selected modules) , XInclude 1.0, XML Schema 1.1  (Part 2 - Datatypes) - Styling technologies  CSS2.1 (fixes), CSS3-Namespaces, CSS3-UI - UI Managers Focus, Drag&Drop, Resize, Capture, SPI History, Text selection - Componentization Model
2.4 Technologies breakdown: UI Languages - XHTML - XUL - SVG 1.1 (selected modules) - XForms 1.1 (planned) - XHTML5 (planned) - Any other DS UI language
2.5 Componentization model Web-browser DOM (shadow tree)  (HTML4, SVG/VML) Ample SDK DOM (XHTML, XUL, SVG)
3. Scope of SVG Implementation in Ample SDK 5. Document Structure Tags: svg, g, image, defs, use 6. Styling Properties: fill, fill-opacity, stroke-linecap etc. 7. Coordinate Systems, Transformations and Units Attributes: transform, viewBox 8. Paths Tags: path 9. Basic Shapes Tags: rect, circle, ellipse, line, polyline, polygon 10. Text Tags: text, tspan, textPath 11. Painting: Filling, Stroking, Colors... Tags: linearGradient,  radialGradient , stop
Demo time!
4. Using SVG with Ample SDK 1) Embedding SVG fragments into HTML 2) Dynamically modifying SVG fragments 3) Styling SVG fragments with CSS
4.1 Embedding SVG fragments into HTML a) Inline, using a script tag with type=&quot;application/ample+xml&quot; <body> <!-- other HTML code --> <script type=&quot;application/ample+xml&quot;> <!-- Ample SDK inline XML markup --> </script> <!-- other HTML code --> </body> b) Referencing a resource, using a script tag with src attribute <body> <!-- other HTML code --> <script type=&quot;application/ample+xml&quot; src=&quot;ui.xml&quot;></script> <!-- other HTML code --> </body> c) Inline, using ample.open() and ample.close() <body> <!-- other HTML code --> <script type=&quot;text/javascript&quot;>ample.open()</script> <!-- Ample SDK inline XML markup --> <script type=&quot;text/javascript&quot;>ample.close()</script> <!-- other HTML code --> </body>
4.2 Dynamically modifying SVG fragments 1) Using pure DOM APIs <svg:rect if=&quot;myrect&quot; fill=&quot;red&quot; x=&quot;0&quot; y=&quot;0&quot; width=&quot;100&quot; height=&quot;100&quot; onclick=&quot;setOpacity(event .target )&quot;/> <script type=&quot;text/javascript&quot;> function setOpacity(oElement) { oElement.setAttribute(&quot;opacity&quot;, &quot;0.5&quot;); } </script> 2) Using SMIL <svg:rect if=&quot;myrect&quot; fill=&quot;red&quot; x=&quot;0&quot; y=&quot;0&quot; width=&quot;100&quot; height=&quot;100&quot;> <smil:set begin=&quot;click&quot; attributeName=&quot;opacity&quot; to=”0.5”  attributeType=&quot;XML&quot; fill=&quot;freeze&quot;/> </svg:rect> 3) Using SVG-specific DOM APIs Not available yet (planned)
4.3 Styling SVG fragments with CSS 1) Using class selectors <text class=&quot;text1&quot;><tspan>SVG In internet explorer</tspan></text> .text1 { font-weigth: 600; } 2) Using element selectors <svg:rect x=&quot;100&quot; y=&quot;100&quot;/> svg|rect { fill: red; } 3) Specifying styles inline (also with attributes) <svg:circle style=&quot;stroke:none; fill:green; opacity:0.5&quot; r=&quot;100&quot; cx=&quot;100&quot; cy=&quot;100&quot;/>
5. VML problems encountered while implementing - IE8 is 10x times slower compared to IE6 rendering VML - Certain VML attributes can't be set at runtime - No native transformations on groups - Stroke lines thiner than 1 unit cannot be drawn - VML radial gradient is too much sophisticated
6. Directions Ample SDK is set to go Open-Source on 1 st  November 2009 IRC Channels #amplesdk on irc.freenode.net #amplesdk-dev on irc.freenode.net (developers) Mailing Lists / Discussion Groups http://groups.google.com/group/amplesdk http://groups.google.com/group/amplesdk-dev  (developers) Bugtracker http://www.amplesdk.com/bugtracker/ Documentation (online/offline) http://www.amplesdk.com/reference/
7. Questions
Ample SDK http://www.amplesdk.com Sergey Ilinsky http://www.ilinsky.com http://twitter.com/ilinsky Thank you!

More Related Content

PPT
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Sergey Ilinsky
 
ODP
JavaScript APIs In Focus
Sergey Ilinsky
 
ODP
Ample SDK: A tour de force
Sergey Ilinsky
 
PPT
Lecture 5 - Comm Lab: Web @ ITP
yucefmerhi
 
PPTX
J Query Presentation
Vishal Kumar
 
PPTX
JSP custom tags
Nabeel Aron
 
PPT
Agile Development With Hobo
Evarist Lobo
 
KEY
Mobile HTML, CSS, and JavaScript
franksvalli
 
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Sergey Ilinsky
 
JavaScript APIs In Focus
Sergey Ilinsky
 
Ample SDK: A tour de force
Sergey Ilinsky
 
Lecture 5 - Comm Lab: Web @ ITP
yucefmerhi
 
J Query Presentation
Vishal Kumar
 
JSP custom tags
Nabeel Aron
 
Agile Development With Hobo
Evarist Lobo
 
Mobile HTML, CSS, and JavaScript
franksvalli
 

What's hot (20)

PPT
JSF Custom Components
Michael Fons
 
ODP
Developing and testing ajax components
Ignacio Coloma
 
PPT
Jquery 1
Manish Kumar Singh
 
PDF
Jscript Fundamentals
rspaike
 
PDF
Workshop 8: Templating: Handlebars, DustJS
Visual Engineering
 
PPT
Java script
Soham Sengupta
 
PDF
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
Vladimir Roudakov
 
PDF
Workshop 16: EmberJS Parte I
Visual Engineering
 
PPTX
Workshop Intro: FrontEnd General Overview
Visual Engineering
 
PDF
Workshop 12: AngularJS Parte I
Visual Engineering
 
PPTX
Angular js
Manav Prasad
 
PDF
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Jeado Ko
 
PPT
HTML5 Overview
reybango
 
PDF
Workshop 6: Designer tools
Visual Engineering
 
PPT
Html5 Overview
Owen Williams
 
ZIP
Fundamental JavaScript [In Control 2009]
Aaron Gustafson
 
PDF
Introduction to web programming with JavaScript
T11 Sessions
 
PDF
Test automation & Seleniun by oren rubin
Oren Rubin
 
PDF
[FEConf Korea 2017]Angular 컴포넌트 대화법
Jeado Ko
 
PPTX
1. java script language fundamentals
Rajiv Gupta
 
JSF Custom Components
Michael Fons
 
Developing and testing ajax components
Ignacio Coloma
 
Jscript Fundamentals
rspaike
 
Workshop 8: Templating: Handlebars, DustJS
Visual Engineering
 
Java script
Soham Sengupta
 
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
Vladimir Roudakov
 
Workshop 16: EmberJS Parte I
Visual Engineering
 
Workshop Intro: FrontEnd General Overview
Visual Engineering
 
Workshop 12: AngularJS Parte I
Visual Engineering
 
Angular js
Manav Prasad
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Jeado Ko
 
HTML5 Overview
reybango
 
Workshop 6: Designer tools
Visual Engineering
 
Html5 Overview
Owen Williams
 
Fundamental JavaScript [In Control 2009]
Aaron Gustafson
 
Introduction to web programming with JavaScript
T11 Sessions
 
Test automation & Seleniun by oren rubin
Oren Rubin
 
[FEConf Korea 2017]Angular 컴포넌트 대화법
Jeado Ko
 
1. java script language fundamentals
Rajiv Gupta
 
Ad

Similar to Using SVG with Ample SDK cross browser (20)

PPT
Sergey Ilinsky Presentation Ample Sdk
Ajax Experience 2009
 
PDF
Past, present, and future of web assembly - Devfest Nantes 2017
Alexandre Morgaut
 
PPTX
Html5 Overview
Daniel Arndt Alves
 
PPTX
HTML, Javascript and AJAX
Wan Leung Wong
 
PPT
Jquery
Swapnil & Patil
 
PDF
Html 5 in a big nutshell
Lennart Schoors
 
PPTX
HTML5 and Joomla! 2.5 Template
Marvelic Engine Co., Ltd.
 
ODP
Html5
mikusuraj
 
PPT
HTML5: An Introduction To Next Generation Web Development
Tilak Joshi
 
PPT
Is it time to start using HTML 5
Ravi Raj
 
PDF
TRWResume-10-2016
Tommy Williams
 
PPT
GWT is Smarter Than You
Robert Cooper
 
PPT
Ajax with DWR
gouthamrv
 
PPTX
Ie9 overview
裕波 周
 
PPTX
Web Components: Introduction and Practical Use Cases
sumitamar
 
PPTX
Lotus Domino 8.5
Lalit Sharma
 
PDF
IPhone Web Development With Grails from CodeMash 2009
Christopher Judd
 
PDF
HTML5: An Introduction To Next Generation Web Development
Tilak Joshi
 
ODP
HTML5 - The Python Angle (PyCon Ireland 2010)
Kevin Gill
 
Sergey Ilinsky Presentation Ample Sdk
Ajax Experience 2009
 
Past, present, and future of web assembly - Devfest Nantes 2017
Alexandre Morgaut
 
Html5 Overview
Daniel Arndt Alves
 
HTML, Javascript and AJAX
Wan Leung Wong
 
Html 5 in a big nutshell
Lennart Schoors
 
HTML5 and Joomla! 2.5 Template
Marvelic Engine Co., Ltd.
 
Html5
mikusuraj
 
HTML5: An Introduction To Next Generation Web Development
Tilak Joshi
 
Is it time to start using HTML 5
Ravi Raj
 
TRWResume-10-2016
Tommy Williams
 
GWT is Smarter Than You
Robert Cooper
 
Ajax with DWR
gouthamrv
 
Ie9 overview
裕波 周
 
Web Components: Introduction and Practical Use Cases
sumitamar
 
Lotus Domino 8.5
Lalit Sharma
 
IPhone Web Development With Grails from CodeMash 2009
Christopher Judd
 
HTML5: An Introduction To Next Generation Web Development
Tilak Joshi
 
HTML5 - The Python Angle (PyCon Ireland 2010)
Kevin Gill
 
Ad

Recently uploaded (20)

PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
The Future of Artificial Intelligence (AI)
Mukul
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 

Using SVG with Ample SDK cross browser

  • 1. Using SVG cross-browser with Ample SDK, JavaScript GUI Framework. SVG Open 2009 2-4 October 2009, Mountain View, CA Sergey Ilinsky
  • 2. Agenda 1) Web-browsers and markup-based Vector Graphics 2) Introduction to the Ample SDK GUI Framework 3) Scope of SVG implementation 4) Using SVG with Ample SDK 5) VML problems encountered while implementing 6) Directions 7) Questions
  • 3. 1. Web-browsers and markup-based Vector Graphics Modern browsers claim to support SVG SVG, First WD on 11/02/1999 One of the first usable implementations in Opera 9 (2006) Other – try hiding deep VML VML, W3C Note on 13/05/1998 First implementation shipped with Internet Explorer 5.0 (1999)
  • 5. Chrome 3.0 / Firefox 3.0 Opera 10.0 BTW, Modern browsers do have quirks
  • 6. Chrome 3.0 Firefox 3.0 / Opera 10.0 Very modern browsers do have quirks too
  • 7. 2. Introduction to the Ample SDK 1) Goals 2) Solution 3) Programming model 4) Technologies breakdown 5) Componentization model
  • 8. 2.1 Goals - equalize browsers APIs without introducing new - extend on browser UI technologies stacks - create a framework for reusable UI components - do not enforce application programming model - keep it transparent
  • 9. 2.2 Solution virtualizing browser native technologies: - pass through if available - implement if not - fix if broken Ben Galbraith: «Ample SDK: Browser-in-a-Browser»
  • 10. 2.3 Programming model Programming model is that of web-browser: - XML for UI - CSS for Style - DOM/JavaScript for Logic
  • 11. 2.4 Technologies breakdown - Runtime (Core) - UI Languages (Plug-ins)
  • 12. 2.4 Technologies breakdown: Runtime - Document Object Model Core L2, Events L3, Selectors API - JavaScript APIs DOMParser, XMLSerializer, XSLTProcessor, XMLHttpRequest, JSON - XML Technologies SMIL3.0 (selected modules) , XInclude 1.0, XML Schema 1.1 (Part 2 - Datatypes) - Styling technologies CSS2.1 (fixes), CSS3-Namespaces, CSS3-UI - UI Managers Focus, Drag&Drop, Resize, Capture, SPI History, Text selection - Componentization Model
  • 13. 2.4 Technologies breakdown: UI Languages - XHTML - XUL - SVG 1.1 (selected modules) - XForms 1.1 (planned) - XHTML5 (planned) - Any other DS UI language
  • 14. 2.5 Componentization model Web-browser DOM (shadow tree) (HTML4, SVG/VML) Ample SDK DOM (XHTML, XUL, SVG)
  • 15. 3. Scope of SVG Implementation in Ample SDK 5. Document Structure Tags: svg, g, image, defs, use 6. Styling Properties: fill, fill-opacity, stroke-linecap etc. 7. Coordinate Systems, Transformations and Units Attributes: transform, viewBox 8. Paths Tags: path 9. Basic Shapes Tags: rect, circle, ellipse, line, polyline, polygon 10. Text Tags: text, tspan, textPath 11. Painting: Filling, Stroking, Colors... Tags: linearGradient, radialGradient , stop
  • 17. 4. Using SVG with Ample SDK 1) Embedding SVG fragments into HTML 2) Dynamically modifying SVG fragments 3) Styling SVG fragments with CSS
  • 18. 4.1 Embedding SVG fragments into HTML a) Inline, using a script tag with type=&quot;application/ample+xml&quot; <body> <!-- other HTML code --> <script type=&quot;application/ample+xml&quot;> <!-- Ample SDK inline XML markup --> </script> <!-- other HTML code --> </body> b) Referencing a resource, using a script tag with src attribute <body> <!-- other HTML code --> <script type=&quot;application/ample+xml&quot; src=&quot;ui.xml&quot;></script> <!-- other HTML code --> </body> c) Inline, using ample.open() and ample.close() <body> <!-- other HTML code --> <script type=&quot;text/javascript&quot;>ample.open()</script> <!-- Ample SDK inline XML markup --> <script type=&quot;text/javascript&quot;>ample.close()</script> <!-- other HTML code --> </body>
  • 19. 4.2 Dynamically modifying SVG fragments 1) Using pure DOM APIs <svg:rect if=&quot;myrect&quot; fill=&quot;red&quot; x=&quot;0&quot; y=&quot;0&quot; width=&quot;100&quot; height=&quot;100&quot; onclick=&quot;setOpacity(event .target )&quot;/> <script type=&quot;text/javascript&quot;> function setOpacity(oElement) { oElement.setAttribute(&quot;opacity&quot;, &quot;0.5&quot;); } </script> 2) Using SMIL <svg:rect if=&quot;myrect&quot; fill=&quot;red&quot; x=&quot;0&quot; y=&quot;0&quot; width=&quot;100&quot; height=&quot;100&quot;> <smil:set begin=&quot;click&quot; attributeName=&quot;opacity&quot; to=”0.5” attributeType=&quot;XML&quot; fill=&quot;freeze&quot;/> </svg:rect> 3) Using SVG-specific DOM APIs Not available yet (planned)
  • 20. 4.3 Styling SVG fragments with CSS 1) Using class selectors <text class=&quot;text1&quot;><tspan>SVG In internet explorer</tspan></text> .text1 { font-weigth: 600; } 2) Using element selectors <svg:rect x=&quot;100&quot; y=&quot;100&quot;/> svg|rect { fill: red; } 3) Specifying styles inline (also with attributes) <svg:circle style=&quot;stroke:none; fill:green; opacity:0.5&quot; r=&quot;100&quot; cx=&quot;100&quot; cy=&quot;100&quot;/>
  • 21. 5. VML problems encountered while implementing - IE8 is 10x times slower compared to IE6 rendering VML - Certain VML attributes can't be set at runtime - No native transformations on groups - Stroke lines thiner than 1 unit cannot be drawn - VML radial gradient is too much sophisticated
  • 22. 6. Directions Ample SDK is set to go Open-Source on 1 st November 2009 IRC Channels #amplesdk on irc.freenode.net #amplesdk-dev on irc.freenode.net (developers) Mailing Lists / Discussion Groups http://groups.google.com/group/amplesdk http://groups.google.com/group/amplesdk-dev (developers) Bugtracker http://www.amplesdk.com/bugtracker/ Documentation (online/offline) http://www.amplesdk.com/reference/
  • 24. Ample SDK http://www.amplesdk.com Sergey Ilinsky http://www.ilinsky.com http://twitter.com/ilinsky Thank you!