SlideShare ist ein Scribd-Unternehmen logo
1 von 24
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 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
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!

Weitere ähnliche Inhalte

Was ist angesagt?

JSF Custom Components
JSF Custom ComponentsJSF Custom Components
JSF Custom ComponentsMichael Fons
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax componentsIgnacio Coloma
 
Jscript Fundamentals
Jscript FundamentalsJscript Fundamentals
Jscript Fundamentalsrspaike
 
Workshop 8: Templating: Handlebars, DustJS
Workshop 8: Templating: Handlebars, DustJSWorkshop 8: Templating: Handlebars, DustJS
Workshop 8: Templating: Handlebars, DustJSVisual Engineering
 
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.jsDrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.jsVladimir Roudakov
 
Workshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewWorkshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewVisual Engineering
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IVisual Engineering
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Jeado Ko
 
HTML5 Overview
HTML5 OverviewHTML5 Overview
HTML5 Overviewreybango
 
Fundamental JavaScript [In Control 2009]
Fundamental JavaScript [In Control 2009]Fundamental JavaScript [In Control 2009]
Fundamental JavaScript [In Control 2009]Aaron Gustafson
 
Introduction to web programming with JavaScript
Introduction to web programming with JavaScriptIntroduction to web programming with JavaScript
Introduction to web programming with JavaScriptT11 Sessions
 
Test automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubinTest automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubinOren Rubin
 
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법Jeado Ko
 
1. java script language fundamentals
1. java script language fundamentals1. java script language fundamentals
1. java script language fundamentalsRajiv Gupta
 

Was ist angesagt? (20)

JSF Custom Components
JSF Custom ComponentsJSF Custom Components
JSF Custom Components
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
Jquery 1
Jquery 1Jquery 1
Jquery 1
 
Jscript Fundamentals
Jscript FundamentalsJscript Fundamentals
Jscript Fundamentals
 
Workshop 8: Templating: Handlebars, DustJS
Workshop 8: Templating: Handlebars, DustJSWorkshop 8: Templating: Handlebars, DustJS
Workshop 8: Templating: Handlebars, DustJS
 
Java script
Java scriptJava script
Java script
 
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.jsDrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
 
Workshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte IWorkshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte I
 
Workshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewWorkshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General Overview
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte I
 
Angular js
Angular jsAngular js
Angular js
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
 
HTML5 Overview
HTML5 OverviewHTML5 Overview
HTML5 Overview
 
Workshop 6: Designer tools
Workshop 6: Designer toolsWorkshop 6: Designer tools
Workshop 6: Designer tools
 
Html5 Overview
Html5 OverviewHtml5 Overview
Html5 Overview
 
Fundamental JavaScript [In Control 2009]
Fundamental JavaScript [In Control 2009]Fundamental JavaScript [In Control 2009]
Fundamental JavaScript [In Control 2009]
 
Introduction to web programming with JavaScript
Introduction to web programming with JavaScriptIntroduction to web programming with JavaScript
Introduction to web programming with JavaScript
 
Test automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubinTest automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubin
 
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법
 
1. java script language fundamentals
1. java script language fundamentals1. java script language fundamentals
1. java script language fundamentals
 

Ähnlich wie Using SVG with Ample SDK cross browser

Sergey Ilinsky Presentation Ample Sdk
Sergey Ilinsky Presentation Ample SdkSergey Ilinsky Presentation Ample Sdk
Sergey Ilinsky Presentation Ample SdkAjax Experience 2009
 
Past, present, and future of web assembly - Devfest Nantes 2017
Past, present, and future of web assembly - Devfest Nantes 2017Past, present, and future of web assembly - Devfest Nantes 2017
Past, present, and future of web assembly - Devfest Nantes 2017Alexandre Morgaut
 
HTML, Javascript and AJAX
HTML, Javascript and AJAXHTML, Javascript and AJAX
HTML, Javascript and AJAXWan Leung Wong
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshellLennart Schoors
 
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentTilak Joshi
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5Ravi Raj
 
GWT is Smarter Than You
GWT is Smarter Than YouGWT is Smarter Than You
GWT is Smarter Than YouRobert Cooper
 
Ajax with DWR
Ajax with DWRAjax with DWR
Ajax with DWRgouthamrv
 
Web Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use CasesWeb Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use Casessumitamar
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009Christopher Judd
 
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentTilak Joshi
 
HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)Kevin Gill
 

Ähnlich wie Using SVG with Ample SDK cross browser (20)

Sergey Ilinsky Presentation Ample Sdk
Sergey Ilinsky Presentation Ample SdkSergey Ilinsky Presentation Ample Sdk
Sergey Ilinsky Presentation Ample Sdk
 
Past, present, and future of web assembly - Devfest Nantes 2017
Past, present, and future of web assembly - Devfest Nantes 2017Past, present, and future of web assembly - Devfest Nantes 2017
Past, present, and future of web assembly - Devfest Nantes 2017
 
Html5 Overview
Html5 OverviewHtml5 Overview
Html5 Overview
 
HTML, Javascript and AJAX
HTML, Javascript and AJAXHTML, Javascript and AJAX
HTML, Javascript and AJAX
 
Jquery
JqueryJquery
Jquery
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshell
 
HTML5 and Joomla! 2.5 Template
HTML5 and Joomla! 2.5 TemplateHTML5 and Joomla! 2.5 Template
HTML5 and Joomla! 2.5 Template
 
Html5
Html5Html5
Html5
 
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5
 
TRWResume-10-2016
TRWResume-10-2016TRWResume-10-2016
TRWResume-10-2016
 
GWT is Smarter Than You
GWT is Smarter Than YouGWT is Smarter Than You
GWT is Smarter Than You
 
Ajax with DWR
Ajax with DWRAjax with DWR
Ajax with DWR
 
Ie9 overview
Ie9 overviewIe9 overview
Ie9 overview
 
Ajax
Ajax Ajax
Ajax
 
Web Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use CasesWeb Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use Cases
 
Lotus Domino 8.5
Lotus Domino 8.5Lotus Domino 8.5
Lotus Domino 8.5
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
 
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development
 
HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)
 

Kürzlich hochgeladen

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Kürzlich hochgeladen (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

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.
  • 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!