The document provides information about a startup engineering camp hosted by Moko365 Inc on October 19-20, 2013. It introduces the founder and a software developer at Moko365 and provides details about their backgrounds and skills. The document then outlines the agenda and content for the engineering camp, covering topics like prototyping, architectures, frontend technologies, and lean development practices. Programming languages, frameworks, and tools discussed include HTML5, CSS, JavaScript, Node.js, Bootstrap, Jade, Sass, and Backbone. The document emphasizes best practices for frontend development and emphasizes a mobile-first and lean approach.
2. Founder and CEO, Moko365 Inc <jollen@moko365.com>
10+ years in embeddes software and ODM industry Taiwan.
Trainner and consultant for Android/HTML5.
Skills: JavaScript, C, C++, Android App..etc
Software Engineer, Moko365 Inc <hank@moko365.com>
Jointly development of sociable networking web and also
develope in Android and iOS App.
Skills: JavaScript, Python, iOS...etc
8. The Project Structure
Extract the project structure
.
.bowerrc
.editorconfig
.gitignore
Gruntfile.js
LICENSE
bower.json
package.json
|-public
|---css
|---fonts
|---images
|---js
|---vendor
|-----bootstrap
|-----jquery
|-fixes
|-sass
|-schema
|-scripts
|-utilities
|-views
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
9. Bootstrap
1. CSS framework and grid system
2. Fast prototyping
3. Revamp your workflow
http://mashable.com/2013/04/26/css-boilerplates-frameworks/
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
10. Page Layout Manager
1. Easy to seperate and manage layouts
2. Use a HTML5 template engine
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
11. Choose Languages
Programming languages
Template engine languages
Stylesheet languages
JavaScript + Jade + SASS
http://jade-lang.com
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
12. Understanding Jade
doctype 5
html(lang="en")
head
title= pageTitle
script(type='text/javascript').
if (foo) {
bar(1 + 5)
}
body
h1 Jade - node template engine
#container.col
if youAreUsingJade
p You are amazing
else
p Get on it!
p.
Jade is a terse and simple
templating language with a
strong focus on performance
and powerful features.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Jade</title>
<script type="text/javascript">
if (foo) {
bar(1 + 5)
}
</script>
</head>
<body>
<h1>Jade - node template engine</h1>
<div id="container" class="col">
<p>You are amazing</p>
<p>Jade is a terse and simple
templating language with a
strong focus on performance
and powerful features.</p>
</div>
</body>
</html>
Source: http://jade-lang.com
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
13. Startup
keeping up on new technologies, doing quick
evaluations, and then snapping the pieces together
16. HTTP API 的形式
API
Query string
http://localhost:8888/send?m=hello&u=jollen
Pathname
URL (⼀一種 URI 形式)
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
17. Response Content
HTML Document
XML Document
JSON Data
Base64 encode (⽤用於 Binary 檔案)
亦可⾃自定
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
18. HTTP API
Web Service API (Open API) over HTTP
以 JSON 格式回應資訊
Client 與 Server 的互動架構
GET 是⼀一種 HTTP 請求⽅方式 (HTTP Methods)
基於 HTTP Methods 以 HTTP API 的系統架構
➡
REST
➡
RESTful
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
19. Web Service
RESTful
CRUD
Invoke Web service in Backbone way
JavaScript + Jade + SASS + Backbone + REST
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
20. REST
Resource Oriented Architecture
A resource is indentified by a URI
URI 的定義有標準規範
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
21. REST Object Example
GET /save.php?u=jollen&s=100
POST /user/jollen/2048
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
24. Use MVC for Frontend JavaScript
Model, View and Control
Views and Templating
Handlebars.js and Underscore’s
template
http://addyosmani.com/resources/essentialjsdesignpatterns/book/#jquerypluginpatterns
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
25. Spine.js or Backbone.js
Model, View and Control
Spine.js and Backbone.js
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
26. Manage Data as Collections
Model, View and Control
manage the data for an application
e.g. Backbone "collections"
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
27. MVC to MPV
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
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
31. Best Practice to Frontend JavaScript
JavaScript closure (module)
Use // {BEGIN|END} TESTING API
Use Instantiable Objects
Separate DOM event handlers from the
action it performs
https://shanetomlinson.com/2013/testing-javascript-frontend(http://goo.gl/HpT7p6)
part-1-anti-patterns-and-fixes/
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
32. Best Practice to Frontend JavaScript
Mock in XHR requests
Asynchronous programming requires
notifications
externalize all scripts
Use callbacks
https://shanetomlinson.com/2013/writing-testable-javascriptpart-2-refactor-away-anti-patterns/
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
33. More Best Practice ?
Use stylesheet language
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
34. JavaScript Constructor Pattern
function Person(name, job) {
! this.name = name;
! this.job = job;
! this.queryJob = function() {
! ! alert(this.job);
! };
}
// 將 Person() 視為 constructor
var person = new Person("Jollen", "Software Developer");
alert(person instanceof Person); // true
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
36. Lean Software Development
源⾃自⽇日本 Toyota 的⽣生產系統
由 Agile 社群將之導⼊入軟體⼯工程領域,成為敏捷開
發模式的重要思想基礎
Mary Poppendieck 與 Tom Poppendieck 將其
發展成⼀一套系統化的模式
22 Tools、7 Principles
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
38. 7 Principles
Eliminate Waste
Amplify Learning
Decide as Late as Possible
Deliver as Fast as Possible
Empower the Team
Build Integrity In
See the Whole
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
39. Typical Project Management
Project scope management
Collect Requirements
Define Scope
Create WBS
Verify Scope
Control Scope
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
40. See the Waste
Booklog.io
Setup a Goal
Fast Prototyping
Implement REST
Documentation
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.
41. Using Gitflow with Github
http://datasift.github.io/gitflow/GitFlowForGitHub.html
《Startup Engineering Camp》 Copyright (C) 2013 Moko365 Inc. All rights reserved.