15
Large Scale SPA A Retrospective Reza Moaiandin @moaiandin

Large Scale SPA

Embed Size (px)

Citation preview

Page 1: Large Scale SPA

Large Scale SPAA Retrospective

Reza Moaiandin

@moaiandin

Page 2: Large Scale SPA

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

Page 3: Large Scale SPA

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

Page 4: Large Scale SPA

Any Examples?What I do at Flashtalking: AdBuilder (The real deal!)

Others: Trello, Gmail, Twitter & Facebook (Almost)

@moaiandin

Page 5: Large Scale SPA

jQuery Rocks! Why should I care?So you think you are a JavaScript Ninja?

@moaiandin

Page 6: Large Scale SPA

It’s Messy!

@moaiandin

Page 7: Large Scale SPA

Also…

Not designed for very complex applications

Lots of nested code

No Structure

Bad performance

SAD JQUERY NINJA!

@moaiandin

Page 8: Large Scale SPA

What do we get from SPA?

Speed, Fast response time!

Modular

Maintainable

Decoupled

Extensible

Structured

@moaiandin

Page 9: Large Scale SPA

It’s nice to work on!

@moaiandin

Page 10: Large Scale SPA

How do we do it?What do we use?

@moaiandin

Page 11: Large Scale SPA

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

Page 12: Large Scale SPA

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

Page 13: Large Scale SPA

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

Page 14: Large Scale SPA

Don’t leave crumbs!Look out for memory leaks, clean them up!

@moaiandin

Page 15: Large Scale SPA

Questions?

Thank you

@moaiandin