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

What's hot

Migrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreMigrating .NET Application to .NET Core
Migrating .NET Application to .NET Core
Baris Ceviz
 
Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your pluginMarko Heijnen
 
Getting started with .net on openSUSE (asp.net with c#)
Getting started with .net on openSUSE  (asp.net with c#)Getting started with .net on openSUSE  (asp.net with c#)
Getting started with .net on openSUSE (asp.net with c#)
Alin Alifah
 
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
Eddie Lau
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
ColdFusionConference
 
Amsterdam.js talk: node webkit
Amsterdam.js talk: node webkitAmsterdam.js talk: node webkit
Amsterdam.js talk: node webkitFabian Jakobs
 
.Net Core
.Net Core.Net Core
.Net Core
Bertrand Le Roy
 
Bringing Javascript to the Desktop with Electron
Bringing Javascript to the Desktop with ElectronBringing Javascript to the Desktop with Electron
Bringing Javascript to the Desktop with Electron
Nir Noy
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET Core
Miroslav Popovic
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
Carlo Bonamico
 
HTML5 for dummies
HTML5 for dummiesHTML5 for dummies
HTML5 for dummies
Ran Bar-Zik
 
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
Future Processing
 
Getting Started with React Native (and should I use it at all?)
Getting Started with React Native (and should I use it at all?)Getting Started with React Native (and should I use it at all?)
Getting Started with React Native (and should I use it at all?)
Devin Abbott
 
C#: Past, Present and Future
C#: Past, Present and FutureC#: Past, Present and Future
C#: Past, Present and Future
Rodolfo Finochietti
 
Introduction to .NET Core & ASP.NET Core MVC
Introduction to .NET Core & ASP.NET Core MVCIntroduction to .NET Core & ASP.NET Core MVC
Introduction to .NET Core & ASP.NET Core MVC
Saineshwar bageri
 
Whats new in .net core 3
Whats new in .net core 3Whats new in .net core 3
Whats new in .net core 3
Pratik Khasnabis
 
Puppeteer: Getting Started
Puppeteer: Getting StartedPuppeteer: Getting Started
Puppeteer: Getting Started
HyunSeob Lee
 
Dockerising Appium : London Appium Meetup
Dockerising Appium : London Appium MeetupDockerising Appium : London Appium Meetup
Dockerising Appium : London Appium Meetup
Shashikant Jagtap
 
Reactjs workshop (1)
Reactjs workshop (1)Reactjs workshop (1)
Reactjs workshop (1)
Ahmed rebai
 

What's hot (19)

Migrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreMigrating .NET Application to .NET Core
Migrating .NET Application to .NET Core
 
Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your plugin
 
Getting started with .net on openSUSE (asp.net with c#)
Getting started with .net on openSUSE  (asp.net with c#)Getting started with .net on openSUSE  (asp.net with c#)
Getting started with .net on openSUSE (asp.net with c#)
 
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
 
Amsterdam.js talk: node webkit
Amsterdam.js talk: node webkitAmsterdam.js talk: node webkit
Amsterdam.js talk: node webkit
 
.Net Core
.Net Core.Net Core
.Net Core
 
Bringing Javascript to the Desktop with Electron
Bringing Javascript to the Desktop with ElectronBringing Javascript to the Desktop with Electron
Bringing Javascript to the Desktop with Electron
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET Core
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 
HTML5 for dummies
HTML5 for dummiesHTML5 for dummies
HTML5 for dummies
 
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
[Quality Meetup #20] Michał Górski - Continuous Deployment w chmurze
 
Getting Started with React Native (and should I use it at all?)
Getting Started with React Native (and should I use it at all?)Getting Started with React Native (and should I use it at all?)
Getting Started with React Native (and should I use it at all?)
 
C#: Past, Present and Future
C#: Past, Present and FutureC#: Past, Present and Future
C#: Past, Present and Future
 
Introduction to .NET Core & ASP.NET Core MVC
Introduction to .NET Core & ASP.NET Core MVCIntroduction to .NET Core & ASP.NET Core MVC
Introduction to .NET Core & ASP.NET Core MVC
 
Whats new in .net core 3
Whats new in .net core 3Whats new in .net core 3
Whats new in .net core 3
 
Puppeteer: Getting Started
Puppeteer: Getting StartedPuppeteer: Getting Started
Puppeteer: Getting Started
 
Dockerising Appium : London Appium Meetup
Dockerising Appium : London Appium MeetupDockerising Appium : London Appium Meetup
Dockerising Appium : London Appium Meetup
 
Reactjs workshop (1)
Reactjs workshop (1)Reactjs workshop (1)
Reactjs workshop (1)
 

Similar to High Productivity Web Development Workflow

Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
David Hahn
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?
Niklas Heidloff
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
"To cover uncoverable", Andrii Shumada
"To cover uncoverable", Andrii Shumada"To cover uncoverable", Andrii Shumada
"To cover uncoverable", Andrii Shumada
Fwdays
 
АНДРІЙ ШУМАДА «To Cover Uncoverable» Online WDDay 2022 js
АНДРІЙ ШУМАДА «To Cover Uncoverable» Online WDDay 2022 jsАНДРІЙ ШУМАДА «To Cover Uncoverable» Online WDDay 2022 js
АНДРІЙ ШУМАДА «To Cover Uncoverable» Online WDDay 2022 js
WDDay
 
AWS Code Services
AWS Code ServicesAWS Code Services
AWS Code Services
Amazon Web Services
 
Nativescript with angular 2
Nativescript with angular 2Nativescript with angular 2
Nativescript with angular 2
Christoffer Noring
 
DevOps demystified
DevOps demystifiedDevOps demystified
DevOps demystified
Xebia IT Architects
 
Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD
Annie Huang
 
DevOps Workshop Part 1
DevOps Workshop Part 1DevOps Workshop Part 1
DevOps Workshop Part 1
GDSC UofT Mississauga
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
Jérôme Petazzoni
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Amazon Web Services
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
AFUP_Limoges
 
Fullstack workshop
Fullstack workshopFullstack workshop
Fullstack workshop
Assaf Gannon
 
End-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS servicesEnd-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS services
Massimo Ferre'
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
Amazon Web Services
 
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Steffen Gebert
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
Suresh Patidar
 
Prepare to defend thyself with Blue/Green
Prepare to defend thyself with Blue/GreenPrepare to defend thyself with Blue/Green
Prepare to defend thyself with Blue/Green
Sonatype
 
All Day DevOps 2016 Fabian - Defending Thyself with Blue Green
All Day DevOps 2016 Fabian - Defending Thyself with Blue GreenAll Day DevOps 2016 Fabian - Defending Thyself with Blue Green
All Day DevOps 2016 Fabian - Defending Thyself with Blue Green
Fab L
 

Similar to High Productivity Web Development Workflow (20)

Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
"To cover uncoverable", Andrii Shumada
"To cover uncoverable", Andrii Shumada"To cover uncoverable", Andrii Shumada
"To cover uncoverable", Andrii Shumada
 
АНДРІЙ ШУМАДА «To Cover Uncoverable» Online WDDay 2022 js
АНДРІЙ ШУМАДА «To Cover Uncoverable» Online WDDay 2022 jsАНДРІЙ ШУМАДА «To Cover Uncoverable» Online WDDay 2022 js
АНДРІЙ ШУМАДА «To Cover Uncoverable» Online WDDay 2022 js
 
AWS Code Services
AWS Code ServicesAWS Code Services
AWS Code Services
 
Nativescript with angular 2
Nativescript with angular 2Nativescript with angular 2
Nativescript with angular 2
 
DevOps demystified
DevOps demystifiedDevOps demystified
DevOps demystified
 
Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD Webinar - Unbox GitLab CI/CD
Webinar - Unbox GitLab CI/CD
 
DevOps Workshop Part 1
DevOps Workshop Part 1DevOps Workshop Part 1
DevOps Workshop Part 1
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
 
Fullstack workshop
Fullstack workshopFullstack workshop
Fullstack workshop
 
End-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS servicesEnd-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS services
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
 
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
Prepare to defend thyself with Blue/Green
Prepare to defend thyself with Blue/GreenPrepare to defend thyself with Blue/Green
Prepare to defend thyself with Blue/Green
 
All Day DevOps 2016 Fabian - Defending Thyself with Blue Green
All Day DevOps 2016 Fabian - Defending Thyself with Blue GreenAll Day DevOps 2016 Fabian - Defending Thyself with Blue Green
All Day DevOps 2016 Fabian - Defending Thyself with Blue Green
 

Recently uploaded

IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 

Recently uploaded (20)

IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 

High Productivity Web Development Workflow

  • 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.