Web tools for web devs – Quick Review – Future



Web tools for web devs – Quick Review – Future

0 1


web-dev-tools

Overview of the web tools stack for cheztone.org using RevealJS

On Github Tony-Proum / web-dev-tools

Web tools for web devs

Quick history

How JavaScript can seem... an image from Angus Croll's "The Politics Of JavaScript" presentation
I will cover all user cases !
I'll be in trouble (translate version)

Actual Stack

  • Node/Npm
  • Grunt
  • Bower
  • AngularJS

Chrome's JavaScript runtime

A JVM for javascript devs

Run tools writes in javascript

example from nodejs.org

							 
var http = require('http');

http.createServer(function (req, res) {
	res.writeHead(200, {'Content-Type': 'text/plain'});
  	res.end('Hello World\n');
}).listen(1337, '127.0.0.1');

console.log('Server running at http://127.0.0.1:1337/');
							
					 	

result

							 
node example.js
Server running at http://127.0.0.1:1337/
							
						

result http://127.0.0.1:1337

Hello World

Package manager for NodeJS

Allow to install tools using command line

examples :

							
npm install -g grunt-cli bower
							
						

Grunt

Javascript task runner

Ant or Maven for web devs

Allows to build your app for prod purpose

Common tasks

  • serve
  • build
  • minify
  • cdnify

Bower

Javascript dependency manager

Example bower.json

						
{
	"name": "myProject",
	"version": "1.0.0-SNAPSHOT",
	"dependencies": {
		"angular": "~1.3.0"
	},
	"appPath": "app"
}
						
						

How to use

						
bower install --save angular
						
						

Result

Single page web application

Client side

  • Model View Controller
  • Reusable Components
  • Two way data binding

Split responsibilities

  • View : HTML/CSS
  • Controller : Drive actions
  • Model : Data access/Local storage

Directive

  • Super charged HTML5
  • Follow HTML5 best practices
  • Reusable components
  • Help to be more descriptive

Directive

*.html
                            

                        
*.js
								
app.directive('my-directive',function(){
   return {
        restrict : 'E',
        templateUrl : '

My Beautiful component says : {{value}}

', scope : { value : '=' } } });

Directive

Result

                            

My Beautiful component says : Hello World

Allow to do some small operation on client side

&

Offline work

Notes for offline

  • Use embedded templates to work offline (JAVASCRIPT)
  • Warning : refresh will delete your data without a local storage
  • Don't forgot a cache manifest

Future

  • TypeScript
  • AngularJS 2
  • Gulp