Large Scale SPA
Transcript of Large Scale SPA
Large Scale SPAA Retrospective
Reza Moaiandin
@moaiandin
Who am I?
Job title: Application Developer
What do I do? Front End Development + Some backend
For How long?
8 months as Front End Dev
2.5 Years as Software engineer
Strengths : JavaScript & PHP
I work for Flashtalking Leeds
Twitter: @moaiandin
@moaiandin
What is SPA?
“Single page applications are the modern version of web apps where all/majority of the
interactions are handled on a single page”
They have very little server interaction (Thin Server Architecture)
@moaiandin
Any Examples?What I do at Flashtalking: AdBuilder (The real deal!)
Others: Trello, Gmail, Twitter & Facebook (Almost)
@moaiandin
jQuery Rocks! Why should I care?So you think you are a JavaScript Ninja?
@moaiandin
It’s Messy!
@moaiandin
Also…
Not designed for very complex applications
Lots of nested code
No Structure
Bad performance
SAD JQUERY NINJA!
@moaiandin
What do we get from SPA?
Speed, Fast response time!
Modular
Maintainable
Decoupled
Extensible
Structured
@moaiandin
It’s nice to work on!
@moaiandin
How do we do it?What do we use?
@moaiandin
Dos
Plan
Keep things structured
Use task runners (Grunt, Gulp)
Use libraries that work for your SPA (Backbone, AngularJS)
Don’t change path
Test
Do it right, MV*
Use routers if you need it (Keep SEO people Happy)
@moaiandin
Do it right, MV*Use routes if you need it (Keeping SEO people Happy)
MODEL
SERVER
VIEW CONTROLLER
Templates ViewRouter
Events
Events
Events
Model Collection
Read
Update
Client Browser
@moaiandin
Don’ts
Don’t Try to reinvent the wheel!
Look for the tool/library you need before making it!
Don’t feel constrained to use what the library/tool gives you
Don’t write tests after development
It’s not DDT, It’s TDD!
@moaiandin
Don’t leave crumbs!Look out for memory leaks, clean them up!
@moaiandin
Questions?
Thank you
@moaiandin