47
The presentation is about to start... Saturday, May 14, 2011

Introduction to JavaScriptMVC

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Introduction to JavaScriptMVC

The presentation is about to start...

Saturday, May 14, 2011

Page 2: Introduction to JavaScriptMVC

JavaScriptMVCPedro Pimentel

Saturday, May 14, 2011

Page 3: Introduction to JavaScriptMVC

What I do

ThoughtWorks

Ruby

@zukunftsalick

Shy

Saturday, May 14, 2011

Page 4: Introduction to JavaScriptMVC

Who are you

Saturday, May 14, 2011

Page 5: Introduction to JavaScriptMVC

Who are you

Uses Javascript as your main dev language

Saturday, May 14, 2011

Page 6: Introduction to JavaScriptMVC

Who are you

Uses Javascript as your main dev language

Above average Javascript devs

Saturday, May 14, 2011

Page 7: Introduction to JavaScriptMVC

Who are you

Uses Javascript as your main dev language

Above average Javascript devs

Average Javascript devs

Saturday, May 14, 2011

Page 8: Introduction to JavaScriptMVC

Who are you

Uses Javascript as your main dev language

Above average Javascript devs

Average Javascript devs

Doesn’t know Javascript

Saturday, May 14, 2011

Page 9: Introduction to JavaScriptMVC

Agenda

• Needs for a framework

• Tested ones

• JMVC itself

• Show me some code!

Saturday, May 14, 2011

Page 10: Introduction to JavaScriptMVC

Need

Saturday, May 14, 2011

Page 11: Introduction to JavaScriptMVC

(Saturday, May 14, 2011

Page 12: Introduction to JavaScriptMVC

StructureSaturday, May 14, 2011

Page 13: Introduction to JavaScriptMVC

We observe a pattern

Saturday, May 14, 2011

Page 14: Introduction to JavaScriptMVC

We observe a pattern

We create abstractions and generalizations

Saturday, May 14, 2011

Page 15: Introduction to JavaScriptMVC

We observe a pattern

We create abstractions and generalizations

We turn those abstractions into a framework

Saturday, May 14, 2011

Page 16: Introduction to JavaScriptMVC

We observe a pattern

We create abstractions and generalizations

We turn those abstractions into a framework

The framework becomes a golden hammer

Saturday, May 14, 2011

Page 17: Introduction to JavaScriptMVC

We observe a pattern

We create abstractions and generalizations

We turn those abstractions into a framework

The framework becomes a golden hammer

People start subverting the framework

Saturday, May 14, 2011

Page 18: Introduction to JavaScriptMVC

Once upon a time ...

“The architects used all technologies of the heavens and earth they hadn’t got round to the first time. “

Saturday, May 14, 2011

Page 19: Introduction to JavaScriptMVC

Once upon a time ...

“The architects used all technologies of the heavens and earth they hadn’t got round to the first time. “

The simple new() was replaced by a Factory

Saturday, May 14, 2011

Page 20: Introduction to JavaScriptMVC

Once upon a time ...

“The architects used all technologies of the heavens and earth they hadn’t got round to the first time. “

The simple new() was replaced by a Factory

Which was replaced by Dependency Injection

Saturday, May 14, 2011

Page 21: Introduction to JavaScriptMVC

Once upon a time ...

“The architects used all technologies of the heavens and earth they hadn’t got round to the first time. “

The simple new() was replaced by a Factory

Which was replaced by Dependency Injection

Which was replaced by an IOC container

Saturday, May 14, 2011

Page 22: Introduction to JavaScriptMVC

Once upon a time ...

“The architects used all technologies of the heavens and earth they hadn’t got round to the first time. “

The simple new() was replaced by a Factory

Which was replaced by Dependency Injection

Which was replaced by an IOC container

Which was improved by XML configuration

Saturday, May 14, 2011

Page 23: Introduction to JavaScriptMVC

Once upon a time ...

“The architects used all technologies of the heavens and earth they hadn’t got round to the first time. “

The simple new() was replaced by a Factory

Which was replaced by Dependency Injection

Which was replaced by an IOC container

Which was improved by XML configuration

Which was supplemented by @annotations

Saturday, May 14, 2011

Page 24: Introduction to JavaScriptMVC

And then theyRESTed

Saturday, May 14, 2011

Page 25: Introduction to JavaScriptMVC

)Saturday, May 14, 2011

Page 26: Introduction to JavaScriptMVC

Ruby~40 people

28 devs> 10 data sources

Saturday, May 14, 2011

Page 27: Introduction to JavaScriptMVC

Pivot Table

Saturday, May 14, 2011

Page 28: Introduction to JavaScriptMVC

Saturday, May 14, 2011

Page 29: Introduction to JavaScriptMVC

Saturday, May 14, 2011

Page 30: Introduction to JavaScriptMVC

Saturday, May 14, 2011

Page 31: Introduction to JavaScriptMVC

Saturday, May 14, 2011

Page 32: Introduction to JavaScriptMVC

Saturday, May 14, 2011

Page 33: Introduction to JavaScriptMVC

Saturday, May 14, 2011

Page 34: Introduction to JavaScriptMVC

Saturday, May 14, 2011

Page 35: Introduction to JavaScriptMVC

FuncUnit

Saturday, May 14, 2011

Page 36: Introduction to JavaScriptMVC

StealJS

Saturday, May 14, 2011

Page 37: Introduction to JavaScriptMVC

jQueryMX

Saturday, May 14, 2011

Page 38: Introduction to JavaScriptMVC

DocumentJS

Saturday, May 14, 2011

Page 39: Introduction to JavaScriptMVC

Similarities with Rails

Saturday, May 14, 2011

Page 40: Introduction to JavaScriptMVC

js steal/generate/app app_name

rails new app_name

js steal/generate/controller App_name.Controllers.Name

js steal/generate/model App_name.Models.Name

rails generate controller Name

rails generate model Name

JavascriptMVC

Rails

js steal/getjs url_from_git_or_svn

rails plugin install name_or_git_svn_url

Saturday, May 14, 2011

Page 41: Introduction to JavaScriptMVC

JavascriptMVC Rails

Saturday, May 14, 2011

Page 42: Introduction to JavaScriptMVC

JavascriptMVC Rails

EJS <h2><%= foo %></h2> ERB

JAML h2(data.foo)

Micro <h2>{% foo %}</h2>

jQuery.Tmpl <h2>${foo}</h2>

Saturday, May 14, 2011

Page 43: Introduction to JavaScriptMVC

JavaScriptMVC is not Rails

Saturday, May 14, 2011

Page 44: Introduction to JavaScriptMVC

守 破 離shu ha ri

Saturday, May 14, 2011

Page 45: Introduction to JavaScriptMVC

...

Saturday, May 14, 2011

Page 46: Introduction to JavaScriptMVC

?

Saturday, May 14, 2011

Page 47: Introduction to JavaScriptMVC

Thank you!@zukunftsalick

Saturday, May 14, 2011