SlideShare a Scribd company logo
WEB DEVELOPMENT
WORKFLOW
HIGH PRODUCTIVITY
WEB DEVELOPMENT WORKFLOW
Vu Nguyen
will.vn, liti.ws
Mar 18th, 2014
AGENDA
I. Introduction
What are our problems?
II. The Workflow
III. Demo & code
IV. Best Practice
V. Buildbot
INTRODUCTION
WHAT ARE OUR PROBLEMS ?
We are startup. We provide IT solutions for business.
We have to:
- Building many [similar] web applications in a few weeks.
- Make a prototype quickly.
- Deliver product frequently for both testing &
production environment.
- We want to focus on writting better code(
*)
NOT to waste time on setting up project, deployment &
repeated tasks. They are time-consuming.
(
*)
Better code: well documented, well tested, well structured,
easy to read & understand, easy to collaborate with others,
contain independent & resuable modules.
HOW DO WE ADDRESS THEM ?
(1) Get focus.
(2) Pre-config boilerplate code.
(3) Continuous integration.
(4) Write testcases side by side with code.
(5) Reusable components.
(6) Thin server. Thick client.
(7) Switch from NodeJS to Golang.
THE WORKFLOW
THE WORKFLOW
1. Setup new project
2. Continuous development
Write code
3a. Deploy to testing environment
3b. Deploy to production environment
Write testcases
Build & test
(1) Minimal setup commands
Ready to code in under 10 mins
(3) Simply push to the repository
See product live in under 5 mins
(2) Ctrl + S to auto build, reload, test
See your changes immediately
Just a couple of commands to compile
THE STACKS
Web stack (NodeJS)
Bootstrap, LESS
AngularJS
NodeJS
Express / SailJS
MongoDB
Web stack (Golang)
Bootstrap, LESS
AngularJS
Go
REST server
MongoDB
Development & Deployment
Grunt
Minify, Source map
Karma, Mocha
Buildbot
Nginx, forever.js, nohup, etc.
Gruntfile.js
- forked from ng-boilerplate
~ 1000 line of code
THE WORKSPACE
DEMO & CODE
DEMO & CODE
Clone demo source code at:
http://github.com/litiws/ng-express-boilerplate
http://github.com/ng-vu/ng-go-boilerplate
http://github.com/ng-vu/wquery
DEMO & CODE (NodeJS)
Development
git clone http://github.com/litiws/ng-express-boilerplate
npm install -g gruntcli karma bower mocha
npm install
bower install
grunt watch
Then open another terminal and
grunt watchtest
Handy commands
grunt clean
grunt build
grunt dist
grunt compile
grunt test
Debug
grunt inspector
grunt theseus
DEMO & CODE (Golang)
Development
git clone http://github.com/ng-vu/ng-go-boilerplate
npm install -g gruntcli karma bower
npm install
bower install
grunt watch
Then open another terminal and
grunt watchtest
Build & start server
export GOPATH=$PWD
go build server
./server -dir=build/public -port=80
DEMO & CODE: REFERENCES
Ctrl + S on:
app/**/*.tpl.html
Compile to templates-0.0.1.js
Reload browser
less/**/*.less
Compile to main-0.0.1.css
Reload browser
less/vendor.less
Compile to vendor-0.0.1.css
Reload browser
appviews/*.html
Compile to view
Reload browser
app/**/*.js
server/**/*.js
Reload browser (client)
Restart server (server)
app/**/*.coffee
server/**/*.coffee
Compile Coffee to JS
Reload browser or server
app/**/*.spec.js
app/**/*.spec.coffee Run Karma test
server/**/*.spec.js
server/**/*.spec.coffee Run Mocha test
DEMO & CODE: HOW TO
Clean project grunt clean
Build project grunt build
Distribution
(without compiling)
grunt build
grunt dist
Compile project
grunt build
grunt compile
Work with node-inspector
(without restarting server)
grunt inspector
Work with node-theseus
(with some configuration)
grunt theseus
Continuous test
grunt build
grunt test
Continuous development
grunt watch
grunt watchtest (on other terminal)
SAMPLE PROJECTS
1. Quickly prototyping with AngularJS
& REST server
2. Building a simple CMS website
BEST PRACTICE
BEST PRACTICE
(1) Get focus
- DO NOT leave your workspace.
+ Do everything on editor and command line.
+ Try to NOT Alt-Tab everytime. Use watch & livereload.
+ A second monitor for previewing website.
+ Only worry about writing code & testcases.
Let the system handle everything else.
- Learning will slow you down.
+ During code, try to finish thing on your own with minimal
searching & reading. Only read reference & question/answer.
+ You can always read documents & articles later.
BEST PRACTICE (2)
(2) Pre-config boilerplate code
- Grab pre-config code to create new project:
+ Quickly setup dependencies.
+ All the automation are included.
+ Ready to code in under 10 mins.
- Powerful toys in your hands:
+ Return to work with grunt watch & grunt watchtest.
+ Compile whole project with grunt compile.
+ Automation test with grunt test.
+ Debug with node-inspector & node-theseus.
+ Live edit in browser with Source map.
BEST PRACTICE (3)
(3) Continuous Integration
- Automation testing and deploying:
+ Use automation scripts (already in boilerplate code).
+ When you are ready to deploy to testing & production
environment, simply push changes to the repository.
- Buildbot will handle all the rest:
+ Watch repository for changes.
+ Pull source code.
+ Run scripts for building, testing & deploying.
+ Report on web interface.
BEST PRACTICE (4)
(4) Write testcases side by side with code
- Every file needs test:
+ Put test files right under tested files.
.spec.js, .spec.coffee, _test.go
+ Code in left-side and testcases in right-side.
+ Ctrl+S to run test files.
- What to test?
+ Unit-test for client: Karma + Mocha.
+ Unit-test for server: Grunt + Mocha.
+ End-to-end test for client: Karma + Angular Protractor.
+ Continuous testing: Buildbot + Grunt + Karma + PhantomJS.
BEST PRACTICE (5)
(5) Reusable components
- Write code for future use:
+ Quickly assemble new webapp from pre-built components.
+ Independent, well-tested components. Less bugs.
+ Use third-party code when posible.
+ Write code as if you plan to open source them.
(Even that you do not)
+ Separate application-specific code.
- Long-term:
+ Improve framework, libraries, performance... as we grow.
+ Open-source some of your works.
BEST PRACTICE (6)
(6) Thin server. Thick client.
- Improve your workflow:
+ Server is for dumping data, user authenticating
& important logic.
+ Put almost all logic on client side.
+ Use RESTful API. It works nice with others.
+ Angular Resource.
- Result:
+ Server: less testcases to worry about.
+ Just a few lines of code for both server & client.
+ Can finish a website in a few days.
BEST PRACTICE (7)
(7) Switch from NodeJS to Golang
npm install go get
Have to test almost everything.
Lots of code just for type checking.
Only write needed testcases.
Easy to write buggy code.
Compiler will complain about everything.
Even unused vars or assign int64 to int32.
Asynchronize API. Callback hell.
Synchronize API with beautiful code.
Goroutine.
Hundreds of dependency files under
node_modules.
They are in standard libraries.
Just include what you need.
Do not need web framework.
Go itself is a framework.
Server may crash anytime.
We need forever.js
Simply catch unexpected things.
BUILDBOT
INTRODUCTION
What is Buildbot?
1. Automated Build, Test, and Release
2. Written in Python.
3. Easy to setup & get start.
Grow with your workflow.
4. Once setup, forget it.
BUILDBOT WORKFLOW
BUILDBOT IN ACTION: CHROMIUM
BUILDBOT IN ACTION: CHROMIUM (2)
CONCLUSION
KEY THINGS TO REMEMBER
(1) Get focus.
(2) Pre-config boilerplate code.
(3) Continuous integration.
(4) Write testcases side by side with code.
(5) Reusable components.
(6) Thin server. Thick client.
(7) Switch from NodeJS to Golang.
THANK YOU
Q & A

More Related Content

PDF
New trends of web technology on mobile: HTML5, PhoneGap & NaCl - Barcamp Saig...
PDF
High Productivity Web Development Workflow
PDF
WebRTC - Brings Real-Time to the Web
PDF
Isomorphic web application
PDF
Use React tools for better Angular apps
PPTX
Migrating .NET Application to .NET Core
PDF
Introduction to React Native
PPTX
Architecture & Workflow of Modern Web Apps
New trends of web technology on mobile: HTML5, PhoneGap & NaCl - Barcamp Saig...
High Productivity Web Development Workflow
WebRTC - Brings Real-Time to the Web
Isomorphic web application
Use React tools for better Angular apps
Migrating .NET Application to .NET Core
Introduction to React Native
Architecture & Workflow of Modern Web Apps

What's hot (19)

PPTX
NativeScript Developer Day Keynote - Todd Anglin & Burke Holland
PPTX
C#: Past, Present and Future
PPTX
.Net Core
PPTX
Nativescript with angular 2
PDF
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
PPTX
Erich Gamma at SpringOne Platform 2017
PPT
Eclipse summit-2010
PDF
Beginner's Guide to Angular 2.0
PDF
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
PPTX
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
PPTX
Introduction to React Native
PPTX
Microsoft 2014 Dev Plataform - Roslyn -& ASP.NET vNext
PPTX
Azure Functions
PPTX
Deploying ASP.Net Core apps in Docker Containers
PPTX
Fullstack workshop
PDF
Viktor Turskyi "Effective NodeJS Application Development"
PDF
13 practical tips for writing secure golang applications
PPTX
Browser Automation with Playwright – for integration, RPA, UI testing and mor...
PDF
Turnkey Continuous Delivery
NativeScript Developer Day Keynote - Todd Anglin & Burke Holland
C#: Past, Present and Future
.Net Core
Nativescript with angular 2
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Erich Gamma at SpringOne Platform 2017
Eclipse summit-2010
Beginner's Guide to Angular 2.0
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
Steve Sfartz - How to embed Messaging and Video in your apps - Codemotion Mil...
Introduction to React Native
Microsoft 2014 Dev Plataform - Roslyn -& ASP.NET vNext
Azure Functions
Deploying ASP.Net Core apps in Docker Containers
Fullstack workshop
Viktor Turskyi "Effective NodeJS Application Development"
13 practical tips for writing secure golang applications
Browser Automation with Playwright – for integration, RPA, UI testing and mor...
Turnkey Continuous Delivery
Ad

Similar to High productivity web development workflow - JavaScript Meetup Saigon 2014 (20)

PDF
Grunt.js and Yeoman, Continous Integration
PDF
GoPro, Inc. Case study: Dive into the details of our web applications
PPTX
Grunt Continuous Development of the Front End Tier
PDF
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
PPTX
Improving Workflows With Grunt.js - Big D Design 2014 - Dallas Texas
PDF
JavaScript Application Design A Build First Approach 1st Edition Nicolas Beva...
PDF
Grunt.js introduction
PDF
JavaScript Application Design A Build First Approach 1st Edition Nicolas Beva...
PDF
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
PDF
Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
PDF
Modern UI Development With Node.js
PPTX
Tutorial 1: Your First Science App - Araport Developer Workshop
PDF
Quest for the Perfect Workflow for McrFRED
PDF
Using Node and Grunt to create an awesome workflow
PDF
Complete Download Web Development with Node and Express 2nd Edition Ethan Bro...
PDF
Download full Go Building Web Applications 1st Edition Nathan Kozyra Mat Ryer...
PDF
Modern Web Application Development Workflow - web2day 2014
PDF
Learning Nodejs For Net Developers Harry Cummings
PDF
Go Building Web Applications 1st Edition Nathan Kozyra Mat Ryer download pdf
KEY
Single Page Applications - Desert Code Camp 2012
Grunt.js and Yeoman, Continous Integration
GoPro, Inc. Case study: Dive into the details of our web applications
Grunt Continuous Development of the Front End Tier
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Improving Workflows With Grunt.js - Big D Design 2014 - Dallas Texas
JavaScript Application Design A Build First Approach 1st Edition Nicolas Beva...
Grunt.js introduction
JavaScript Application Design A Build First Approach 1st Edition Nicolas Beva...
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
Modern UI Development With Node.js
Tutorial 1: Your First Science App - Araport Developer Workshop
Quest for the Perfect Workflow for McrFRED
Using Node and Grunt to create an awesome workflow
Complete Download Web Development with Node and Express 2nd Edition Ethan Bro...
Download full Go Building Web Applications 1st Edition Nathan Kozyra Mat Ryer...
Modern Web Application Development Workflow - web2day 2014
Learning Nodejs For Net Developers Harry Cummings
Go Building Web Applications 1st Edition Nathan Kozyra Mat Ryer download pdf
Single Page Applications - Desert Code Camp 2012
Ad

More from Oliver N (9)

PDF
WebRTC: Bring real-time to the web - Barcamp Saigon 2012
PDF
New trends of web technology on mobile: HTML5, PhoneGap & NaCl - Barcamp Saig...
PDF
Concurrency in Golang
PDF
What does people say when they switch to Go?
PDF
Grokking #9: Building a real-time and offline editing service with Couchbase
PDF
The fundamental problems of GUI applications and why people choose React
PDF
Litibook - Feb 2016
PDF
Golang #5: To Go or not to Go
PDF
Modern Web Development in 2015
WebRTC: Bring real-time to the web - Barcamp Saigon 2012
New trends of web technology on mobile: HTML5, PhoneGap & NaCl - Barcamp Saig...
Concurrency in Golang
What does people say when they switch to Go?
Grokking #9: Building a real-time and offline editing service with Couchbase
The fundamental problems of GUI applications and why people choose React
Litibook - Feb 2016
Golang #5: To Go or not to Go
Modern Web Development in 2015

Recently uploaded (20)

PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
AI in Product Development-omnex systems
PDF
top salesforce developer skills in 2025.pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Digital Strategies for Manufacturing Companies
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Nekopoi APK 2025 free lastest update
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
L1 - Introduction to python Backend.pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
AI in Product Development-omnex systems
top salesforce developer skills in 2025.pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
ManageIQ - Sprint 268 Review - Slide Deck
Digital Strategies for Manufacturing Companies
2025 Textile ERP Trends: SAP, Odoo & Oracle
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Internet Downloader Manager (IDM) Crack 6.42 Build 41
How to Choose the Right IT Partner for Your Business in Malaysia
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Understanding Forklifts - TECH EHS Solution
ISO 45001 Occupational Health and Safety Management System
Nekopoi APK 2025 free lastest update
PTS Company Brochure 2025 (1).pdf.......
Wondershare Filmora 15 Crack With Activation Key [2025
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
L1 - Introduction to python Backend.pptx

High productivity web development workflow - JavaScript Meetup Saigon 2014

  • 2. HIGH PRODUCTIVITY WEB DEVELOPMENT WORKFLOW Vu Nguyen will.vn, liti.ws Mar 18th, 2014
  • 3. AGENDA I. Introduction What are our problems? II. The Workflow III. Demo & code IV. Best Practice V. Buildbot
  • 5. WHAT ARE OUR PROBLEMS ? We are startup. We provide IT solutions for business. We have to: - Building many [similar] web applications in a few weeks. - Make a prototype quickly. - Deliver product frequently for both testing & production environment. - We want to focus on writting better code( *) NOT to waste time on setting up project, deployment & repeated tasks. They are time-consuming. ( *) Better code: well documented, well tested, well structured, easy to read & understand, easy to collaborate with others, contain independent & resuable modules.
  • 6. HOW DO WE ADDRESS THEM ? (1) Get focus. (2) Pre-config boilerplate code. (3) Continuous integration. (4) Write testcases side by side with code. (5) Reusable components. (6) Thin server. Thick client. (7) Switch from NodeJS to Golang.
  • 8. THE WORKFLOW 1. Setup new project 2. Continuous development Write code 3a. Deploy to testing environment 3b. Deploy to production environment Write testcases Build & test (1) Minimal setup commands Ready to code in under 10 mins (3) Simply push to the repository See product live in under 5 mins (2) Ctrl + S to auto build, reload, test See your changes immediately Just a couple of commands to compile
  • 9. THE STACKS Web stack (NodeJS) Bootstrap, LESS AngularJS NodeJS Express / SailJS MongoDB Web stack (Golang) Bootstrap, LESS AngularJS Go REST server MongoDB Development & Deployment Grunt Minify, Source map Karma, Mocha Buildbot Nginx, forever.js, nohup, etc. Gruntfile.js - forked from ng-boilerplate ~ 1000 line of code
  • 12. DEMO & CODE Clone demo source code at: http://github.com/litiws/ng-express-boilerplate http://github.com/ng-vu/ng-go-boilerplate http://github.com/ng-vu/wquery
  • 13. DEMO & CODE (NodeJS) Development git clone http://github.com/litiws/ng-express-boilerplate npm install -g gruntcli karma bower mocha npm install bower install grunt watch Then open another terminal and grunt watchtest Handy commands grunt clean grunt build grunt dist grunt compile grunt test Debug grunt inspector grunt theseus
  • 14. DEMO & CODE (Golang) Development git clone http://github.com/ng-vu/ng-go-boilerplate npm install -g gruntcli karma bower npm install bower install grunt watch Then open another terminal and grunt watchtest Build & start server export GOPATH=$PWD go build server ./server -dir=build/public -port=80
  • 15. DEMO & CODE: REFERENCES Ctrl + S on: app/**/*.tpl.html Compile to templates-0.0.1.js Reload browser less/**/*.less Compile to main-0.0.1.css Reload browser less/vendor.less Compile to vendor-0.0.1.css Reload browser appviews/*.html Compile to view Reload browser app/**/*.js server/**/*.js Reload browser (client) Restart server (server) app/**/*.coffee server/**/*.coffee Compile Coffee to JS Reload browser or server app/**/*.spec.js app/**/*.spec.coffee Run Karma test server/**/*.spec.js server/**/*.spec.coffee Run Mocha test
  • 16. DEMO & CODE: HOW TO Clean project grunt clean Build project grunt build Distribution (without compiling) grunt build grunt dist Compile project grunt build grunt compile Work with node-inspector (without restarting server) grunt inspector Work with node-theseus (with some configuration) grunt theseus Continuous test grunt build grunt test Continuous development grunt watch grunt watchtest (on other terminal)
  • 17. SAMPLE PROJECTS 1. Quickly prototyping with AngularJS & REST server 2. Building a simple CMS website
  • 19. BEST PRACTICE (1) Get focus - DO NOT leave your workspace. + Do everything on editor and command line. + Try to NOT Alt-Tab everytime. Use watch & livereload. + A second monitor for previewing website. + Only worry about writing code & testcases. Let the system handle everything else. - Learning will slow you down. + During code, try to finish thing on your own with minimal searching & reading. Only read reference & question/answer. + You can always read documents & articles later.
  • 20. BEST PRACTICE (2) (2) Pre-config boilerplate code - Grab pre-config code to create new project: + Quickly setup dependencies. + All the automation are included. + Ready to code in under 10 mins. - Powerful toys in your hands: + Return to work with grunt watch & grunt watchtest. + Compile whole project with grunt compile. + Automation test with grunt test. + Debug with node-inspector & node-theseus. + Live edit in browser with Source map.
  • 21. BEST PRACTICE (3) (3) Continuous Integration - Automation testing and deploying: + Use automation scripts (already in boilerplate code). + When you are ready to deploy to testing & production environment, simply push changes to the repository. - Buildbot will handle all the rest: + Watch repository for changes. + Pull source code. + Run scripts for building, testing & deploying. + Report on web interface.
  • 22. BEST PRACTICE (4) (4) Write testcases side by side with code - Every file needs test: + Put test files right under tested files. .spec.js, .spec.coffee, _test.go + Code in left-side and testcases in right-side. + Ctrl+S to run test files. - What to test? + Unit-test for client: Karma + Mocha. + Unit-test for server: Grunt + Mocha. + End-to-end test for client: Karma + Angular Protractor. + Continuous testing: Buildbot + Grunt + Karma + PhantomJS.
  • 23. BEST PRACTICE (5) (5) Reusable components - Write code for future use: + Quickly assemble new webapp from pre-built components. + Independent, well-tested components. Less bugs. + Use third-party code when posible. + Write code as if you plan to open source them. (Even that you do not) + Separate application-specific code. - Long-term: + Improve framework, libraries, performance... as we grow. + Open-source some of your works.
  • 24. BEST PRACTICE (6) (6) Thin server. Thick client. - Improve your workflow: + Server is for dumping data, user authenticating & important logic. + Put almost all logic on client side. + Use RESTful API. It works nice with others. + Angular Resource. - Result: + Server: less testcases to worry about. + Just a few lines of code for both server & client. + Can finish a website in a few days.
  • 25. BEST PRACTICE (7) (7) Switch from NodeJS to Golang npm install go get Have to test almost everything. Lots of code just for type checking. Only write needed testcases. Easy to write buggy code. Compiler will complain about everything. Even unused vars or assign int64 to int32. Asynchronize API. Callback hell. Synchronize API with beautiful code. Goroutine. Hundreds of dependency files under node_modules. They are in standard libraries. Just include what you need. Do not need web framework. Go itself is a framework. Server may crash anytime. We need forever.js Simply catch unexpected things.
  • 27. INTRODUCTION What is Buildbot? 1. Automated Build, Test, and Release 2. Written in Python. 3. Easy to setup & get start. Grow with your workflow. 4. Once setup, forget it.
  • 30. BUILDBOT IN ACTION: CHROMIUM (2)
  • 32. KEY THINGS TO REMEMBER (1) Get focus. (2) Pre-config boilerplate code. (3) Continuous integration. (4) Write testcases side by side with code. (5) Reusable components. (6) Thin server. Thick client. (7) Switch from NodeJS to Golang.