SlideShare a Scribd company logo
Biological Modeling, Powered by
AngularJS
Gil Fink
CEO and Senior Consultant, sparXys
@gilfink
This session is about working
with graphics
But…
I’m not a graphics designer
This is how I draw toilets…
Biological Modeling, Powered by AngularJS
I wish…
Biological Modeling, Powered by AngularJS
And somebody let me speak
about graphics…
Biological Modeling, Powered by AngularJS
Ok, so let’s get serious!
About Me
• sparXys CEO and senior consultant
• Microsoft MVP
• Co-author of Pro Single Page Application
Development (Apress)
• Angular UP conference and GDG Rashlatz Meetup
co-organizer
Agenda
• SVG in a Nutshell
• SVG + AngularJS = <3
• Use Case: Biological Modeling
SVG in a Nutshell
• Graphics model in the browser
• Create and draw 2D vector graphics using HTML
• Support for:
o Full DOM access
o Document structure, scripting, styling, paths, shapes, colors, transforms,
gradients, patterns, masking, clipping, markers, linking and views
2D Vector Graphics
<svg width="400" height="200" xmlns="http://www.w3.org/2000/svg">
<rect fill="red" x="20" y="20" width="100" height="75" />
<rect fill="blue" x="50" y="50" width="100" height="75" />
</svg>
What we can do with SVG?
Demo
http://www.themaninblue.com/experiment/Blobular/
http://lavadip.com/experiments/jigsaw/
SVG + AngularJS = <3
Combining SVG and AngularJS isn’t hard
SVG elements are part of the DOM!
SVG + AngularJS 1 Caveats
• In directives that generate SVG, use
templateNamespace in the DDO:
• Set SVG attributes using ng-attr- prefix:
<circle ng-attr-cx="{{radius}}" ng-attr-cy="{{radius}}" ng-attr-r="{{radius}}"/>
templateNamespace: 'svg'
SVG & AngularJS 1
Directive Demo
SVG + Angular 2 Caveats
• In components that generate SVG, use svg: prefix
when using SVG elements:
• Set SVG attributes using attr. prefix:
• Remember:
SVG cannot accept elements it doesn't recognize!
o Don’t create your own named components, use named attributes instead
<svg:circle [attr.cx]="radius" [attr.cy]="radius" [attr.r]="radius"/>
<svg:circle cx="10" cy="10" r="30"/>
SVG + Angular 2
Component Demo
Use Case
Using SVG + AngularJS for Biological Modeling
Biology Disclaimer
Biology 101
• Plasmids - small DNA molecules represented as a
circle with annotations
Biology 101
• Sequence – primary structure of a biological
molecule written in characters (A, T, G, C)
Customer Needs
• Synchronize plasmid and sequence views
• Fast scrolling
• Sequence and plasmid selection
• Annotation layers
Lazy
Developer
Are there any JavaScript
libraries for plasmids or
sequences?
Preferable with AngularJS support? 
Maybe in BioJS?
http://www.biojs.io/
AngularPlasmid
• DNA plasmid visualization component using
AngularJS and SVG
• http://angularplasmid.vixis.com/index.php
<plasmid sequencelength='1000'>
<plasmidtrack radius='50'>
<tracklabel text='Demo'></tracklabel>
<trackscale interval='100' showlabels='1'></trackscale>
<trackmarker start='212' end='345'></trackmarker>
<trackmarker start='530' end='650'>
<markerlabel text='Ecol'></markerlabel>
</trackmarker>
<trackmarker start='677' end='820'></trackmarker>
</plasmidtrack>
</plasmid>
Problems We Faced
• Generating the plasmid dynamically from specific
files
o Solved by dynamically adding AngularPlasmid elements
o Then, we use the $compile service
• Adding selection to the plasmid
o Solved by adding our own implementation
Demo
AngularPlasmid + $compile
No DNA sequence library 
Building the Sequence –
The Naïve Way
• Let AngularJS generate the whole sequence
o Use ng-repeat, SVG and browser scrolling
• Add annotation layers with SVG
• The problem is…
Biological Modeling, Powered by AngularJS
What’s the problem?
Biological Modeling, Powered by AngularJS
Can we do better?
Maybe infinite scrolling?
Not good enough!
Virtual Scrolling
• Generate only the current viewport
• Good reading reference:
o https://developers.google.com/web/updates/2016/07/infinite-scroller?hl=en
o http://blog.stackfull.com/2013/02/angularjs-virtual-scrolling-part-1/
o http://blog.stackfull.com/2013/03/angularjs-virtual-scrolling-part-2/
Front-end Architecture
AngularPlasmid
Each row is a directive
Demo
Genome Viewer
Summary
• SVG is one of the options to create graphics in
the browser
• SVG and AngularJS can work well together
• You can create sophisticated modeling using
SVG and AngularJS
Thank You!

More Related Content

PDF
Biological modeling, powered by angular js
PDF
Biological Modeling, Powered by AngularJS
PPT
PPTX
SVG - Scalable Vector Graphic
PDF
Responsive web design
PPTX
HTML5 and SVG
PDF
Web Vector Graphics
PPTX
Html5 SVG
Biological modeling, powered by angular js
Biological Modeling, Powered by AngularJS
SVG - Scalable Vector Graphic
Responsive web design
HTML5 and SVG
Web Vector Graphics
Html5 SVG

Viewers also liked (14)

DOCX
Evaluation of my coursework so far
PDF
Marco teórico o conceptual
PDF
Las variables de la investigación
PDF
Acta semanal de desempeño
DOC
PPTX
Asn unit 1
PDF
2014-II
PDF
Modamedianaemdia
DOCX
Evolucion de las Computadoras
PDF
Còpia de Benito_msthesis_FINAL2
PDF
Plano stiriksis 2016
PDF
recommendation letter Jane (1)
PDF
Who's afraid of front end databases
PPTX
Anuncio
Evaluation of my coursework so far
Marco teórico o conceptual
Las variables de la investigación
Acta semanal de desempeño
Asn unit 1
2014-II
Modamedianaemdia
Evolucion de las Computadoras
Còpia de Benito_msthesis_FINAL2
Plano stiriksis 2016
recommendation letter Jane (1)
Who's afraid of front end databases
Anuncio
Ad

Similar to Biological Modeling, Powered by AngularJS (20)

PDF
Biological Modelling, Powered by AngularJS
PPTX
SVCC 2013 D3.js Presentation (10/05/2013)
PPTX
Svcc 2013-d3
PPTX
SVGD3Angular2React
PPTX
Deep Dive into SVG and Its Applications.pptx
PDF
SVG For Designers And Developers
PPT
Svg Overview And Js Libraries
PDF
Introduction to d3js (and SVG)
PDF
Having fun with graphs, a short introduction to D3.js
PDF
Quick introduction to Angular 4 for AngularJS 1.5 developers
PDF
Intro to SVGs
PDF
Introduction to data visualisation with D3
PPTX
PDF
D3 svg & angular
PPTX
Easy charting with
PPTX
SVG, CSS3, and D3 for Beginners
PPTX
Academy PRO: HTML5 API graphics
PDF
Next generation Graphics: SVG
PDF
SVG (Devoxx 2011, 2011-NOV-14)
PDF
D3: Easy and flexible data visualisation using web standards
Biological Modelling, Powered by AngularJS
SVCC 2013 D3.js Presentation (10/05/2013)
Svcc 2013-d3
SVGD3Angular2React
Deep Dive into SVG and Its Applications.pptx
SVG For Designers And Developers
Svg Overview And Js Libraries
Introduction to d3js (and SVG)
Having fun with graphs, a short introduction to D3.js
Quick introduction to Angular 4 for AngularJS 1.5 developers
Intro to SVGs
Introduction to data visualisation with D3
D3 svg & angular
Easy charting with
SVG, CSS3, and D3 for Beginners
Academy PRO: HTML5 API graphics
Next generation Graphics: SVG
SVG (Devoxx 2011, 2011-NOV-14)
D3: Easy and flexible data visualisation using web standards
Ad

More from Gil Fink (20)

PDF
Becoming a Tech Speaker
PPTX
Web animation on steroids web animation api
PDF
The Time for Vanilla Web Components has Arrived
PDF
Stencil the time for vanilla web components has arrived
PDF
Stencil the time for vanilla web components has arrived
PDF
Stencil: The Time for Vanilla Web Components has Arrived
PDF
Stencil the time for vanilla web components has arrived
PDF
Being a tech speaker
PDF
Working with Data in Service Workers
PDF
Demystifying Angular Animations
PDF
Redux data flow with angular
PDF
Redux data flow with angular
PDF
Who's afraid of front end databases?
PDF
One language to rule them all type script
PDF
End to-end apps with type script
PDF
Web component driven development
PDF
Web components
PDF
Redux data flow with angular 2
PDF
Web components the future is here
PDF
Whos afraid of front end databases?
Becoming a Tech Speaker
Web animation on steroids web animation api
The Time for Vanilla Web Components has Arrived
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
Stencil: The Time for Vanilla Web Components has Arrived
Stencil the time for vanilla web components has arrived
Being a tech speaker
Working with Data in Service Workers
Demystifying Angular Animations
Redux data flow with angular
Redux data flow with angular
Who's afraid of front end databases?
One language to rule them all type script
End to-end apps with type script
Web component driven development
Web components
Redux data flow with angular 2
Web components the future is here
Whos afraid of front end databases?

Recently uploaded (20)

PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Introduction to Artificial Intelligence
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Understanding Forklifts - TECH EHS Solution
PDF
top salesforce developer skills in 2025.pdf
PDF
System and Network Administraation Chapter 3
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Nekopoi APK 2025 free lastest update
Reimagine Home Health with the Power of Agentic AI​
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Which alternative to Crystal Reports is best for small or large businesses.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
PTS Company Brochure 2025 (1).pdf.......
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Navsoft: AI-Powered Business Solutions & Custom Software Development
wealthsignaloriginal-com-DS-text-... (1).pdf
L1 - Introduction to python Backend.pptx
Introduction to Artificial Intelligence
Design an Analysis of Algorithms II-SECS-1021-03
Understanding Forklifts - TECH EHS Solution
top salesforce developer skills in 2025.pdf
System and Network Administraation Chapter 3
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Internet Downloader Manager (IDM) Crack 6.42 Build 41
VVF-Customer-Presentation2025-Ver1.9.pptx
Nekopoi APK 2025 free lastest update

Biological Modeling, Powered by AngularJS

  • 1. Biological Modeling, Powered by AngularJS Gil Fink CEO and Senior Consultant, sparXys @gilfink
  • 2. This session is about working with graphics
  • 4. I’m not a graphics designer
  • 5. This is how I draw toilets…
  • 9. And somebody let me speak about graphics…
  • 11. Ok, so let’s get serious!
  • 12. About Me • sparXys CEO and senior consultant • Microsoft MVP • Co-author of Pro Single Page Application Development (Apress) • Angular UP conference and GDG Rashlatz Meetup co-organizer
  • 13. Agenda • SVG in a Nutshell • SVG + AngularJS = <3 • Use Case: Biological Modeling
  • 14. SVG in a Nutshell • Graphics model in the browser • Create and draw 2D vector graphics using HTML • Support for: o Full DOM access o Document structure, scripting, styling, paths, shapes, colors, transforms, gradients, patterns, masking, clipping, markers, linking and views
  • 15. 2D Vector Graphics <svg width="400" height="200" xmlns="http://www.w3.org/2000/svg"> <rect fill="red" x="20" y="20" width="100" height="75" /> <rect fill="blue" x="50" y="50" width="100" height="75" /> </svg>
  • 16. What we can do with SVG? Demo http://www.themaninblue.com/experiment/Blobular/ http://lavadip.com/experiments/jigsaw/
  • 17. SVG + AngularJS = <3 Combining SVG and AngularJS isn’t hard SVG elements are part of the DOM!
  • 18. SVG + AngularJS 1 Caveats • In directives that generate SVG, use templateNamespace in the DDO: • Set SVG attributes using ng-attr- prefix: <circle ng-attr-cx="{{radius}}" ng-attr-cy="{{radius}}" ng-attr-r="{{radius}}"/> templateNamespace: 'svg'
  • 19. SVG & AngularJS 1 Directive Demo
  • 20. SVG + Angular 2 Caveats • In components that generate SVG, use svg: prefix when using SVG elements: • Set SVG attributes using attr. prefix: • Remember: SVG cannot accept elements it doesn't recognize! o Don’t create your own named components, use named attributes instead <svg:circle [attr.cx]="radius" [attr.cy]="radius" [attr.r]="radius"/> <svg:circle cx="10" cy="10" r="30"/>
  • 21. SVG + Angular 2 Component Demo
  • 22. Use Case Using SVG + AngularJS for Biological Modeling
  • 24. Biology 101 • Plasmids - small DNA molecules represented as a circle with annotations
  • 25. Biology 101 • Sequence – primary structure of a biological molecule written in characters (A, T, G, C)
  • 26. Customer Needs • Synchronize plasmid and sequence views • Fast scrolling • Sequence and plasmid selection • Annotation layers
  • 28. Are there any JavaScript libraries for plasmids or sequences? Preferable with AngularJS support? 
  • 30. AngularPlasmid • DNA plasmid visualization component using AngularJS and SVG • http://angularplasmid.vixis.com/index.php <plasmid sequencelength='1000'> <plasmidtrack radius='50'> <tracklabel text='Demo'></tracklabel> <trackscale interval='100' showlabels='1'></trackscale> <trackmarker start='212' end='345'></trackmarker> <trackmarker start='530' end='650'> <markerlabel text='Ecol'></markerlabel> </trackmarker> <trackmarker start='677' end='820'></trackmarker> </plasmidtrack> </plasmid>
  • 31. Problems We Faced • Generating the plasmid dynamically from specific files o Solved by dynamically adding AngularPlasmid elements o Then, we use the $compile service • Adding selection to the plasmid o Solved by adding our own implementation
  • 33. No DNA sequence library 
  • 34. Building the Sequence – The Naïve Way • Let AngularJS generate the whole sequence o Use ng-repeat, SVG and browser scrolling • Add annotation layers with SVG • The problem is…
  • 38. Can we do better? Maybe infinite scrolling? Not good enough!
  • 39. Virtual Scrolling • Generate only the current viewport • Good reading reference: o https://developers.google.com/web/updates/2016/07/infinite-scroller?hl=en o http://blog.stackfull.com/2013/02/angularjs-virtual-scrolling-part-1/ o http://blog.stackfull.com/2013/03/angularjs-virtual-scrolling-part-2/
  • 42. Summary • SVG is one of the options to create graphics in the browser • SVG and AngularJS can work well together • You can create sophisticated modeling using SVG and AngularJS