9. Work with Front-End Developers
Use MVC, MVP and MVVM
Call REST API in Backbone way
Customizable CSS
CSS generation and minify
10. Model, View and Control
Views and Templating
Handlebars.js and Underscore’s
template
http://addyosmani.com/resources/essentialjsdesignpatterns/book/#jquerypluginpatterns
12. Model, View and Control
manage the data for an application
e.g. Backbone "collections"
13. MPV
Models, Views & Presenters
MVP is generally used most often in
enterprise-level applications where it's
necessary to reuse as much
presentation logic as possible.
http://addyosmani.com/resources/essentialjsdesignpatterns/book/#jquerypluginpatterns
14. Model View ViewModel
an architectural pattern based on MVC
and MVP,
!
which attempts to more clearly
separate the development of user-interfaces
(UI) from that of the business
logic and behavior in an application.
http://addyosmani.com/resources/essentialjsdesignpatterns/book/#jquerypluginpatterns
16. SPAs and RESTful
It’s difficult to build Single Page Applications that
by simply using jQuery or MooTools. They don’t
have formal structure.
The browser is no longer the only client, we now
have mobile devices, tablet devices, Google
Goggles and electronic fridges etc.
Single-page web apps are the future. Backbone.js
is essentially MVC for the client and allows you
to make your code modular.
http://backbonetutorials.com/why-would-you-use-backbone/
29. Behavior-Driven Development
BDD is a rethinking of the approach to the unit
testing and acceptance testing. (—wikipedia)
Acceptance test is written using the standard
agile framework of a User story: "As a [role] I
want [feature] so that [benefit]". (—wikipedia)
Acceptance criteria should be written in terms of
scenarios and implemented as classes: Given
[initial context], when [event occurs], then
[ensure some outcomes] . (—wikipedia)
31. Story Template
In Order To <biz value is derived>
As a <role>
I want <some feature>
http://blog.james-carr.org/2009/10/02/feature-injection-putting-
the-value-first-in-your-user-stories/
value first
32. Principles #2.2
Feature Injection
!
BDD 並不涉及軟體開發流程,後來有個叫 Chris Matts 的⼤大神,提出⼀一
個 Feature Injection 的⽅方法,將軟體開發流程「注⼊入」BDD。所以,
這個階段你需要⼀一位 Software Engineering 的 PM ⼯工程師,協助將軟
體的 Vision 變成 Code,然後釋出-From vision throughout to
code and release。
!
最後要提醒的是,負責這項管理⼯工作的管理⼈人員,並不是在台灣⼀一般認知
下的 PM。從 Startup 的⾓角度來看,Developer 本⾝身最能昇任這項⼯工
作。
35. SPA Design is Software Cycle
BDD Startup
User Story
(OOAD)
Story Board
(101 Design Methods)
Ubiquitous Language
Full Stack
Application Framework
Tooling
(Testing Framework)
36. Principles #2.4
挑⼀一個、或建造⼀一個 Full Stack Framework
!
像是 Meteor 就是⼀一個 Full Stack 開發框架。但是,我想給的建議,是
⼀一個壞消息。如果不學習如何建造⾃自已的 Full Stack 框架,未來 App 的
發展就會受限。從 Startup 的⾓角度來看,你的 DevOps 能⼒力會很弱、⾮非
常地弱。
!
但是,建造 Full Stack 框架時,很多重覆性的⼯工作,或是
Infrastructure 的開發,都是可以略的;前提是:有⼈人幫你做 Full
Stack Boilerplate。好消息是,Mokoversity 農場計畫正在開發這個模
板。
39. UI Architecture
Copyright (C) 2014 Moko365 Inc.
Node.js Backend
Jade
URL Router
HTML
MVC Frontend
Request
Response
REST API
/welcome
Model State
URL Router
JSON
Response
Update
Views
Backbone.js
40. Principles #3.2
善⽤用 URL Routing
!
SPA 不是⼀一堆網⾴頁(Document),所以不是 Go to page X。相反的,
它是「pull content X」的模式。
41. URL Routing
https://www.mokoversity.com/post#startup
Navigation within an app via URLs.
Relies on the browser history API.
http://blog.james-carr.org/2009/10/02/feature-injection-putting-
the-value-first-in-your-user-stories/