Introduction to JavaScriptMVC

Preview:

DESCRIPTION

 

Citation preview

The presentation is about to start...

Saturday, May 14, 2011

JavaScriptMVCPedro Pimentel

Saturday, May 14, 2011

What I do

ThoughtWorks

Ruby

@zukunftsalick

Shy

Saturday, May 14, 2011

Who are you

Saturday, May 14, 2011

Who are you

Uses Javascript as your main dev language

Saturday, May 14, 2011

Who are you

Uses Javascript as your main dev language

Above average Javascript devs

Saturday, May 14, 2011

Who are you

Uses Javascript as your main dev language

Above average Javascript devs

Average Javascript devs

Saturday, May 14, 2011

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

Agenda

• Needs for a framework

• Tested ones

• JMVC itself

• Show me some code!

Saturday, May 14, 2011

Need

Saturday, May 14, 2011

(Saturday, May 14, 2011

StructureSaturday, May 14, 2011

We observe a pattern

Saturday, May 14, 2011

We observe a pattern

We create abstractions and generalizations

Saturday, May 14, 2011

We observe a pattern

We create abstractions and generalizations

We turn those abstractions into a framework

Saturday, May 14, 2011

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

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

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

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

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

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

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

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

And then theyRESTed

Saturday, May 14, 2011

)Saturday, May 14, 2011

Ruby~40 people

28 devs> 10 data sources

Saturday, May 14, 2011

Pivot Table

Saturday, May 14, 2011

Saturday, May 14, 2011

Saturday, May 14, 2011

Saturday, May 14, 2011

Saturday, May 14, 2011

Saturday, May 14, 2011

Saturday, May 14, 2011

Saturday, May 14, 2011

FuncUnit

Saturday, May 14, 2011

StealJS

Saturday, May 14, 2011

jQueryMX

Saturday, May 14, 2011

DocumentJS

Saturday, May 14, 2011

Similarities with Rails

Saturday, May 14, 2011

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

JavascriptMVC Rails

Saturday, May 14, 2011

JavascriptMVC Rails

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

JAML h2(data.foo)

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

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

Saturday, May 14, 2011

JavaScriptMVC is not Rails

Saturday, May 14, 2011

守 破 離shu ha ri

Saturday, May 14, 2011

...

Saturday, May 14, 2011

?

Saturday, May 14, 2011

Thank you!@zukunftsalick

Saturday, May 14, 2011

Recommended