SlideShare a Scribd company logo
Biological Modeling, Powered by AngularJS
Gil Fink
CEO and Senior Consultant, sparXys
@gilfink
This session is about graphics
(SVG)
This is how I draw a man…
Biological Modeling, Powered by AngularJS
And this is how I draw a bus…
Biological Modeling, Powered by AngularJS
This is how I draw a toilet…
Biological Modeling, Powered by AngularJS
I wish…
Biological Modeling, Powered by AngularJS
And somebody let me speak
about graphics…
My
Codemotion
Session
Me
Biological Modeling, Powered by AngularJS
Ok, so let’s get serious!
About Me
• sparXys CEO and Senior consultant
• ASP.NET/IIS Microsoft MVP
• Co-author of Pro Single Page Application
Development (Apress)
• ng-conf Israel co-organizer and GDG Rashlatz
Meetup co-organizer
Agenda
• SVG in a Nutshell
• SVG + AngularJS = <3
• Use Case: Biological Modelling
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>
SVG
Demo
SVG + AngularJS = <3
Combining SVG and AngularJS isn’t hard
SVG elements are part of the DOM!
SVG + AngularJS Caveats
• In directives that generate SVG, use
templateNamespace in the DDO:
• Set SVG attributes by using ng-attr- prefix:
<circle ng-attr-cx="{{radius}}" ng-attr-cy="{{radius}}" ng-attr-r="{{radius}}"/>
templateNamespace: 'svg'
SVG & AngularJS
Directive Demo
Use Case
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?
With AngularJS support?
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 you ask?
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 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
Every row is a directive
Demo
Genome Viewer (work in progress)
Questions?
Summary
• SVG is one of the options to create graphics in
the browser
• SVG and AngularJS can work well together
• You can create sophisticated modelling using
SVG and AngularJS
Thank You!

More Related Content

PDF
Biological Modelling, Powered by AngularJS
PDF
Biological modeling, powered by angular js
PDF
Hello, Canvas.
PDF
MODERN WEB DEVELOPMENT
TXT
Html
DOCX
код презентации
PDF
Php johannesburg meetup - talk 2014 - scaling php in the enterprise
PPTX
Javascipt ch1
Biological Modelling, Powered by AngularJS
Biological modeling, powered by angular js
Hello, Canvas.
MODERN WEB DEVELOPMENT
Html
код презентации
Php johannesburg meetup - talk 2014 - scaling php in the enterprise
Javascipt ch1

Similar to Biological Modeling, Powered by AngularJS (20)

PDF
Biological Modeling, Powered by AngularJS
PPTX
HTML5 and SVG
PPTX
SVCC 2013 D3.js Presentation (10/05/2013)
PPTX
Svcc 2013-d3
PDF
BiovizJS: a versatile 3D molecular visualizer anywhere, anytime and with any ...
PDF
SVG For Designers And Developers
PDF
Introduction to d3js (and SVG)
PPTX
Deep Dive into SVG and Its Applications.pptx
PDF
Having fun with graphs, a short introduction to D3.js
PPTX
SVGD3Angular2React
PPTX
Top 10 HTML5 features every developer should know!
PPTX
SVG - Scalable Vector Graphic
PPT
Bio305 genome analysis and annotation 2012
PDF
Quick introduction to Angular 4 for AngularJS 1.5 developers
PPTX
Academy PRO: HTML5 API graphics
PPT
Svg Overview And Js Libraries
PPTX
VIZBI 2013 - Overview
PDF
SVG (Devoxx 2011, 2011-NOV-14)
PDF
Learn svg
PPTX
Data visualization with Python and SVG
Biological Modeling, Powered by AngularJS
HTML5 and SVG
SVCC 2013 D3.js Presentation (10/05/2013)
Svcc 2013-d3
BiovizJS: a versatile 3D molecular visualizer anywhere, anytime and with any ...
SVG For Designers And Developers
Introduction to d3js (and SVG)
Deep Dive into SVG and Its Applications.pptx
Having fun with graphs, a short introduction to D3.js
SVGD3Angular2React
Top 10 HTML5 features every developer should know!
SVG - Scalable Vector Graphic
Bio305 genome analysis and annotation 2012
Quick introduction to Angular 4 for AngularJS 1.5 developers
Academy PRO: HTML5 API graphics
Svg Overview And Js Libraries
VIZBI 2013 - Overview
SVG (Devoxx 2011, 2011-NOV-14)
Learn svg
Data visualization with Python and SVG
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
Who's afraid of front end databases
PDF
Web components the future is here
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
Who's afraid of front end databases
Web components the future is here
Ad

Recently uploaded (20)

PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
KodekX | Application Modernization Development
PPTX
MYSQL Presentation for SQL database connectivity
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
KodekX | Application Modernization Development
MYSQL Presentation for SQL database connectivity
MIND Revenue Release Quarter 2 2025 Press Release
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
cuic standard and advanced reporting.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Big Data Technologies - Introduction.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation_ Review paper, used for researhc scholars
Network Security Unit 5.pdf for BCA BBA.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

Biological Modeling, Powered by AngularJS

  • 1. Biological Modeling, Powered by AngularJS Gil Fink CEO and Senior Consultant, sparXys @gilfink
  • 2. This session is about graphics (SVG)
  • 3. This is how I draw a man…
  • 5. And this is how I draw a bus…
  • 7. This is how I draw a toilet…
  • 11. And somebody let me speak about graphics… My Codemotion Session Me
  • 13. Ok, so let’s get serious!
  • 14. About Me • sparXys CEO and Senior consultant • ASP.NET/IIS Microsoft MVP • Co-author of Pro Single Page Application Development (Apress) • ng-conf Israel co-organizer and GDG Rashlatz Meetup co-organizer
  • 15. Agenda • SVG in a Nutshell • SVG + AngularJS = <3 • Use Case: Biological Modelling
  • 16. 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
  • 17. 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>
  • 19. SVG + AngularJS = <3 Combining SVG and AngularJS isn’t hard SVG elements are part of the DOM!
  • 20. SVG + AngularJS Caveats • In directives that generate SVG, use templateNamespace in the DDO: • Set SVG attributes by using ng-attr- prefix: <circle ng-attr-cx="{{radius}}" ng-attr-cy="{{radius}}" ng-attr-r="{{radius}}"/> templateNamespace: 'svg'
  • 22. Use Case 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? With AngularJS support?
  • 29. 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>
  • 30. 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
  • 32. No DNA sequence library 
  • 33. 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…
  • 37. Can we do better? Maybe infinite scrolling? Not good enough!
  • 38. Virtual Scrolling • Generate only the current viewport • Good reading reference: o http://blog.stackfull.com/2013/02/angularjs-virtual-scrolling-part-1/ o http://blog.stackfull.com/2013/03/angularjs-virtual-scrolling-part-2/
  • 40. Demo Genome Viewer (work in progress)
  • 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 modelling using SVG and AngularJS