SlideShare a Scribd company logo
1 of 96
Download to read offline
Survive JavaScript
Strategiesand Tricks
Juho Vepsäläinen
AgileJkl 2013
What's in Store?
Web Development Strategies
JavaScript Tricks
Conclusion
·
How Did We Get Here
Where Are We Now
Where Are We Headed
-
-
-
·
Node.js
Development Tools
Structuring Code
Finding Libraries
Testing
-
-
-
-
-
·
Web Development Strategies
Strategy for Goldfishes
Source: HikingArtist.com (CC BY-NC-ND)
Strategy for the Rest of Us
How Did We Get Here
Ten Days to JavaScript
1995 - Brendan Eich's ten days → Mocha
Known as LiveScript till the marketing folks changed the
name
Even though has Java in name, completely different
Influence of Java 1.0 visible mainly in Math and Time
modules
Prototypal inheritance a lá Self
Dynamic, flexible, lambdas
Scheme in disguise - See The Little JavaScripter by
Crockford
·
·
·
·
·
·
·
A Bit of JavaScript
varhelloAgileJkl=hello.bind(undefined,'AgileJkl!');
helloAgileJkl();
functionhello(target){
console.log('Hello'+target);
}
//orcouldjust
console.log('HelloAgileJkl!');
//toavoidover-engineering!
JAVASCRIPT
Web - From Documents to Applications
Web as a Document Platform
Improved Interactivity
Web as an Application Platform
·
1995 - Brendan Eich's ten days
1999 - ES3 (modern baseline), Mozilla established
-
-
·
2005 - AJAX, dynamic loading (search for instance)
2008 - RIP ES4, parts of HTML5 emerge, Chrome (V8)
2009 - ES5, Chrome OS, Node.js
-
-
-
·
2012 - HTML5 well supported (interesting JS APIs)-
Source: Brendan Eich at Strange Loop '12
JavaScript Has Traction
Source: Redmonk
Crockford
Source: superfluity (CC BY-NC-SA)
The Good Parts vs. The Rest
Source: Oльга + Haфaн (CC BY)
Recap
JavaScript, an unlikely winner
Language of the web
More powerful than it seems
Web isn't just about documents, now applications too
·
·
·
·
Where Are We Now
Elements of Web Applications
Logic
JavaScript
CoffeeScript
CoffeeScript is a little language that compiles into JavaScript. Underneath that awkward
Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to
expose the good parts of JavaScript in a simple way.
The golden rule of CoffeeScript is: "It's just JavaScript". The code compiles one-to-one into the
equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library
seamlessly from CoffeeScript (and vice-versa). The compiled output is readable and pretty-printed,
passes through JavaScript Lint without warnings, will work in every JavaScript runtime, and tends
to run as fast or faster than the equivalent handwritten JavaScript.
Latest Version: 1.6.2
sudo npm install -g coffee-script
Overview
CoffeeScript on the left, compiled JavaScript output on the right.
# Assignment:
number = 42
opposite = true
var cubes, list, math, num, number, opposite, race, square,
__slice = [].slice;
TABLE OF CONTENTS TRY COFFEESCRIPT ANNOTATED SOURCE
Dart
(/)
Dart brings structure to web app
engineering with a new language,
libraries, and tools. Read about our
new M4 release!
(http://news.dartlang.org/2013/04/core-
libraries-stabilize-with-darts-
new.html)
News (http://news.dartlang.org/) TweetTweetSearch Docs Tools Resources Development
TypeScript
Get TypeScript Now
TypeScript is a language for application-scale JavaScript development.
TypeScript is a typed superset of JavaScript that compiles to plain
JavaScript.
Any browser. Any host. Any OS. Open Source.
Starts from JavaScript, Ends with
JavaScript
TypeScript starts from the syntax and semantics that millions of JavaScript developers know
today.
learn play get it run it join in
And many others
altJS
Markup
HTML
Jade
doctype 5
html(lang="en")
head
title= pageTitle
script(type='text/javascript')
if (foo) {
bar()
}
body
h1 Jade - node template engine
#container
if youAreUsingJade
<!DOCTYPE html>
<html lang="en">
<head>
<title>Jade</title>
<script type="text/javascript">
if (foo) {
bar()
}
</script>
</head>
<body>
<h1>Jade - node template engine</h1>
View Documentation
Node Template Engine
Mustache
}
Logic-less templates.
Available in Ruby, JavaScript, Python, Erlang, PHP, Perl, Objective-C, Java, .NET, Android, C++, Go, Lua, ooc, ActionScript, ColdFusion, Scala,
Clojure, Fantom, CoffeeScript, D, and for node.js.
Works great with TextMate, Vim, Emacs, and Coda.
The Manual: mustache(5) and mustache(1)
Demo
Handlebars
Handlebars provides the power necessary to let you build semantic templates
effectively with no frustration.
Mustache templates are compatible with Handlebars, so you can take a Mustache
template, import it into Handlebars, and start taking advantage of the extra Handlebars
features.
Download: 1.0.0-rc.3Download: 1.0.0-rc.3
Download: runtime-1.0.0-rc.3
Getting Started
Transparency
Examples
Assigning valuesAssigning values
Iterating over a listIterating over a list
Nested listsNested lists
Nested objectsNested objects
Transparency is a minimal template engine for jQuery. It maps JSONTransparency is a minimal template engine for jQuery. It maps JSON
objects to DOM elements with zero configuration.objects to DOM elements with zero configuration. Just call .render()Just call .render()
CoffeeScript JavaScript
hello=
hello:"Hello!"
hi: "<i>Hithere!</i>"
span: "Goodbye!"
$('.container').renderhello
Jade HTML
.container
#hello
.hi
span
Styling
CSS
LESS
Write some LESS:
@base: #f938ab;
.box-shadow(@style, @c) when (iscolor(@c)) {
box-shadow: @style @c;
-webkit-box-shadow: @style @c;
-moz-box-shadow: @style @c;
}
.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
.box-shadow(@style, rgba(0, 0, 0, @alpha));
}
.box {
color: saturate(@base, 5%);
border-color: lighten(@base, 30%);
div { .box-shadow(0 0 5px, 30%) }
}
Compile to CSS:
npm install -g less
lessc styles.less styles.css
version 1.3.3
changelog
The dynamic stylesheet language.
LESS extends CSS with dynamic behavior such as
variables, mixins, operations and functions.
LESS runs on both the server-side (with Node.js
and Rhino) or client-side (modern browsers only).
overview   usage   language   function reference   source   about   try it now! FollowFollow
SASS
$ gem install sass
$ mv style.css style.scss
$ sass --watch style.scss:style.css
About Tutorial Documentation Blog Try Online
Latest Release: Media Mark (3.2.7)
What's New?
Download
Editor Support
Development
Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins,
selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command
line tool or a web-framework plugin.
Sass has two syntaxes. The most commonly used syntax is known as “SCSS” (for “Sassy CSS”), and is
a superset of CSS3’s syntax. This means that every valid CSS3 stylesheet is valid SCSS as well. SCSS
files use the extension .scss.
The second, older syntax is known as the indented syntax (or just “.sass”). Inspired by Haml’s
terseness, it’s intended for people who prefer conciseness over similarity to CSS. Instead of brackets
Twitter Bootstrap
Bootstrap (./index.html)
Bootstrap
Sleek, intuitive, and powerful front-end
framework for faster and easier web
development.
Download Bootstrap (assets/bootstrap.zip)
Zurb Foundation
Features (grid.php) Add-ons (templates.php) Case Studies (case-jacquelinewest.php) Docs (docs) Training (training.php)
Foundation (http://foundation.zurb.com)
Foundation
The most advanced responsive
front-end framework in the world.
Download Foundation 4 (download.php)
10.9k stargazers
(http://github.com/zurb/foundation)
@foundationzurb
(http://twitter.com/foundationzurb)
Data
Data
Usually handled with a backend or external services
(Disqus for comments for example)
RESTful interfaces (client-side MVC)
Local caching (localStorage ie.)
Offline usage (replication, PouchDB)
·
·
·
·
Big Data
Source: infocux Technologies (CC BY-NC)
Recap
Logics are violet
Markups are blue
Styling is sweet
And so is data
Where Are We Headed
Enlightenment
Source: michael.heiss (CC BY-NC-SA)
Source: Augie Schwer (CC BY-SA)
Source: letmehearyousaydeskomdeskom (CC BY-SA)
Shim
a thin often tapered piece of material (as wood, metal, or
stone) used to fill in space between things (as for support,
leveling, or adjustment of fit)
Source: Merriam-Webster, esagor (CC BY-NC)
caniuse.com
Index Tables
Can I use...
Compatibility tables for support of HTML5, CSS3, SVG and more in desktop and mobile browsers.
Latest update: Three new features added: Shadow DOM, WebP images & Intrinsic width & height (April 3, 2013)
Search:
border‑radius, WebGL, woff, etc
CSS
@font­face Web fonts
calc() as CSS unit value
2.1 selectors
Counters
Feature Queries
Filter Effects
Generated content
Gradients
Grid Layout
Hyphenation
inline­block
Masks
min/max­width/height
outline
position:fixed
Regions
HTML5
Audio element
Canvas (basic support)
Color input type
contenteditable attribute (basic support)
Datalist element
dataset & data­* attributes
Date/time input types
Details & Summary elements
Download attribute
Drag and Drop
Form validation
HTML5 form features
input placeholder attribute
New semantic elements
Number input type
Offline web applications
SVG
Inline SVG in HTML5
SVG (basic support)
SVG effects for HTML
SVG filters
SVG fonts
SVG fragment identifiers
SVG in CSS backgrounds
SVG in HTML img element
SVG SMIL animation
All SVG features
Other
async attribute for external scripts
TOP
Suggestions  Feed  Twitter
Import stats FAQ Resources Embed
564
Source: T.R.G. (CC BY-NC-SA)
Rise of the Mobile
Android
Source: San Diego Shooter (CC BY-NC-ND)
Firefox OS, Jolla etc.
Source: Brian LeRoux (CC BY-NC-SA)
Native vs. HTML5
Native apps still have their advantages
JS is a good alternative for prototyping
Available technology keeps maturing
And we'll likely see better platform support
·
·
·
·
Web Architectures
Blog (Static Site)
JSter (Portal)
Future JSter?
Other Considerations
What belongs to server, what to client and why (business
goals)
Client-side MVC is not a silver bullet
Basecamp's experiences (hint: pushState, aggressive
caching)
Synchronization, offline usage, skills, time, budget...
Fashion. Techs come and go
Up and coming? Mixed approaches. Examples: Meteor,
Derby, mojito, rendr
·
·
·
·
·
·
Recap
Web dev is as hard as you make it
Especially on the bleeding edge
Fortunately a bit of tape fixes anything
Mobile on the rise, native HTML5 apps not mainstream yet
Web architectures - from monoliths to distributed
·
·
·
·
·
JavaScript Tricks
Node.js
Trends
Source: Google Trends
Packages per Year
Python: 29,720 packages / 22 years = 1351 packages / year
Ruby: 54,385 packages / 18 years = 3022 packages / year
Node.js: 26,966 packages / 4 years = 6742 packages / year
·
·
·
Source: Gregg Gaines
Server Using Callbacks
varhttp=require('http');
http.createServer(
function(req,res){
res.writeHead(200,{'Content-Type':'text/plain'});
res.end('HelloAgileJkl!n');
}
).listen(8000);
JAVASCRIPT
Short and sweet
Express is very popular for more complex cases
·
·
Server Using EventStreams
varhttp=require('http');
vars=newhttp.Server();
s.on('request',function(req,res){
res.writeHead(200,{'Content-Type':'text/plain'});
res.end('HelloAgileJkl!n');
});
s.listen(8000);
JAVASCRIPT
Viable alternative to callbacks at times
More info at Node.js: Patterns and Opinions by @izs (the
Node guy)
·
·
Recap
Excellent for prototyping
Strong ecosystem thanks to NPM
Develops at a blistering pace
·
·
·
Development Tools
Vim, Emacs, Sublime Text, WebStorm...
Chrome Inspector
See also Firebug·
Source: Chrome DevTools
LiveReload
LiveReload 2 proudly presents…
The Web Developer Wonderland
(a happy land where browsers don't need a Refresh button)
CSS edits and image changes apply live.
CoffeeScript, SASS, LESS and others just work.
Citizenship is granted through the Mac App Store.
Windows permanent residency issues are being worked out,
temporary stay already allowed.
JSLint
clear
Read the instructions.
Set the options.
Enjoy The Good Parts.
Donate.
The JavaScript Code Quality Tool
Edition 2013-04-09
Source
// Paste quality code here
See also JSHint·
jsFiddle
Run Save TidyUp JSHint Login/Sign up
No‑Library (pure JS)
onLoad
Tip JSFiddle
Frameworks & Extensions
Fiddle Options
External Resources
Languages
Ajax Requests
Examples
Legal, Credits and Links
Gittip
Keyboard shortcuts?
1
1
1
HTML
JavaScript
CSS
Result
Others: jsbin, jsdo.it, ...·
Cloud9 IDE
Cloud9 IDE - Online IDE
Give us a shout out: Share on twitter Share on Google Share on facebook Share on email
Sign up
Sign out
Username or e‑mail Password Sign In
Keep me signed in
Forgot password? Resend activation email
Or sign in instantly with:
NEWS: The Changelog of March: Stability, Performance, Features
Hey there! Over the past month we have worked very hard on improving the stability and performance of our service. In addition, we also worked on
some interface changes ...
read the full article | see all articles
Pricing
Features
Blog
Company
Company•
Board Members•
Jobs•
Press•
Contact
Node.js
Node.js•
Nodebits.com•
NodeManual.org
Support
Support•
Status•
Documentation
Your code anywhere, anytime...
Recap
Traditional editors and IDEs are fine
Additional tooling available, use it
Future in the web?
·
·
·
Structuring Code
The Anti-Pattern
<scriptsrc='jquery-current.js'type='text/javascript'></script>
<scriptsrc='sorttable.js' type='text/javascript'></script>
<scriptsrc='scripts.js' type='text/javascript'></script>
<scriptsrc='miniCalendar.js' type='text/javascript'></script>
HTML
Each include has to be defined by hand
Brittle and prone to error, especially with large codebases
Does not encourage to modularity
Hard to reuse
·
·
·
·
Concatenate Scripts
<scriptsrc='application.js'type='text/javascript'></script> HTML
Old skool but works
Less overhead at HTML
Still, running into dependency order problem at
concatenation
Possible to complement by loading scripts (ie. jQuery)
from a CDN
Nevertheless a step forward
·
·
·
·
·
RequireJS and AMD + Bower
<scriptdata-main="scripts/main"src="scripts/require.js"></script> HTML
define(['jquery','./math'],function($,math){
return{//exports
vector:function(){...}
};
});
JAVASCRIPT
Modular, asynchronous approach
Includes defineoverhead (possible to mimic Node.js
convention, though)
Optimizer resolves dependencies and creates build
(loadable with Almond)
Configuration complex at times
·
·
·
·
Browserify + NPM
<scriptsrc='application.js'type='text/javascript'></script> HTML
var$=require('jquery');
varmath=require('./math');
exports.vector=function(){...};
JAVASCRIPT
Allows to use Node.js module convention (CJS)
Better yet allows to hook into NPM ecosystem!
Still fairly bleeding edge
·
·
·
Recap
No official module system yet (ES6?)
Many alternatives (AMD, CJS etc.)
browserify looks promising (NPM!)
·
·
·
Finding Libraries
NPM
Search Packages
NODE.JS HOME
DOWNLOAD
ABOUT
NPM REGISTRY
DOCS
BLOG
COMMUNITY
LOGOS
JOBS
Node Packaged Modules
Total Packages: 28 067
907 584 downloads in the last day
9 157 954 downloads in the last week
33 188 669 downloads in the last month
Patches welcome!
Any package can be installed by using npminstall.
Add your programs to this index by using npmpublish.
Recently Updated
0m jspm
Most Depended Upon
2740 underscore
Create Account | Login
Bower
Bower components
Discover Bower (http://bower.io)
components
Check out some of my other
projects
Focus
(https://github.com/sindresorhus/focus),
JsRun
(https://github.com/sindresorhus/sublime-
jsrun), sublime-
editorconfig
(https://github.com/sindresorhus/editorconfig-
sublime), GitHub-Notifier
(https://github.com/sindresorhus/GitHub-
Notifier), Pure
(https://github.com/sindresorhus/pure),
quora-unblocker
(https://github.com/sindresorhus/quora-
unblocker)
screenfull.js (https://git…
stringify-object (https:/…
Featured components
Fullsc…
API
wrap…
String…
an
flight-storage (https://gi…
spice.css (https://github…
Latest components
Store…
JSON
data
Basic…
dry css
min.js (https://github.co…
angularjs-ordinal-filter …
Hot components
Super…
mini…
select…
Angul…
Ordinal
(https://github.com/sindresorhus/bower-components)
JSwiki
JSwiki
2 TweetTweet 59
EditEdit
Hi there! Welcome to jswiki.
This wiki indexes libraries and resources available for JavaScript. In addition it provides some starting points
for newbies in form of Beginner's Resources. In case you want to contribute, do take a look at Meta first for
some extra pointers. Happy hacking!
IMPORTANT! jster.net is a spiritual successor of jswiki. There is more content but the
site is less of a wiki. jswiki will remain here as more of a communal alternative. In
addition you might want to check out the following:
JSwiki
Essentials
Multimedia
Graphics
Data
UI
Utilities
Development
Applications
jsgamewiki Microjs
EveryJS JSDB
JSPkg
JSter
FollowFollow @jsterlibs@jsterlibs
Blog
Catalog
Add Library
Sign In
Find a Javascript library
JSter is a catalog of 1095 JavaScript libraries and tools for web development.
Problems?Problems?
Recap
No need to just Google it
Package managers (esp. NPM) make your life easier
Avoid NIH and use existing solutions
·
·
·
Testing
Unit Testing
assert(title('HELLOWORLD!')==='HelloWorld!');
assert(title('Helloworld!')==='HelloWorld!');
assert(title('hi')==='Hi');
assert(title()===undefined);
functiontitle(s){
returns&&s.split('').map(capitalize).join('');
}
functionassert(s){
if(!s)thrownewError('Assertionfailed!');
}
JAVASCRIPT
Popular alternatives: Jasmine (BDD), Mocha, QUnit·
Fuzz Testing
//functiontotest,noteannotation
vartitle=annotate('title','Returnsgivenstringinatitleformat.')
.on(is.string,function(s){
returns&&s.split('').map(capitalize).join('');
}).satisfies(is.string);
//testinganinvariant
fuzz(title,function(op,str){
varparts=op(str).split('');
returnparts.map(fst).map(isUpper).filter(id).length==parts.length;
});
JAVASCRIPT
Up and coming (hopefully)·
Source: bebraw/annofuzz
Testling
testling-cirun your browser tests on every push
write some tests
Use the test runner you like best!
The only thing your test runner needs to do is to produce TAP output
on console.log or process.stdout. Here's an example project using
mocha.
You can also use tape to output TAP output in browsers and in node.
Here is what a simple tape test looks like:
var test = require('tape');
var myCode = require('../my_code.js');
test('make sure my code works', function (t) {
t.plan(2);
t.equal(myCode.beep(5), 555);
Travis
travis-ci.org
Blog
Documentation
English
Français
Español
Português
Travis CI
A hosted continuous integration service for the open source community.
Welcome to Travis CI #
Travis CI is a hosted continuous integration service for the open source community. It is integrated with GitHub and offers first class support for:
C
C++
Clojure
Erlang
Go
Groovy
Haskell
Java
JavaScript (with Node.js)
Perl
Browserling
interactive cross-browser testing
http://
3.0 3.5 3.6 4.0 5.0 6.0
7.0 8.0 9.0 10.0 11.0 12.0
13.0 14.0 15.0 16.0 17.0 18.0
19.0 nightly
create account sign in
Browserstack
Live, Web-Based Browser Testing
Instant access to all desktop and mobile browsers.
Say goodbye to your setup of virtual machines and devices.
Free Trial
Sign up for free
Full Name
Email
Password
No credit cardNo credit card
required. We promise.required. We promise.
Support Pricing Free TrialResources Sign inLive
Chaos Monkey
Source: Jeff Atwood - Working with the Chaos Monkey
AB Testing
Source: TheBusyBrain (CC BY)
Recap
Test your JS
Browser differences bring their own challenge
Future in continuous integration (Travis and co.)
Fail constantly to avoid failure
·
·
·
·
Conclusion
Conclusion
JS - the most valuable language you don't know yet
A target for tool and language development
Not without its quirks but still manageable
The most important language of this decade?
·
·
·
·
Survive JS - The Guide
Survive JS
Have you ever felt lost in the JavaScript jungle? If so, you are in the right place. The purpose of this guide
is to provide you with sharp implements that help you survive and perhaps thrive even. Even seasoned
JavaScript explorers might find a trick or two to apply in practice.
As it is very possible I have not reached omnipotence yet, I encourage you to submit issues. This way we
can make the guide to serve you better.
I am well aware there are other excellent resources out there. Of these I would like to mention Eloquent
JavaScript and JavaScript Garden in particular. I have listed various beginner's resources over at JSwiki,
the predecessor of JSter.
Table of Contents
A Misunderstood Language? - What is the essence of JavaScript? Why is it relevant?
Current State - What is the current state of JavaScript and the ecosystem?
Language Features - What the language looks like? How to use it effectively?
EditEdit
TweetTweet 0
0
Table of Contents
Survive JS
Thank You!
twitter @bebraw
www www.nixtu.info
github github.com/bebraw

More Related Content

What's hot

Javascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and GulpJavascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and GulpAll Things Open
 
Jasmine - why JS tests don't smell fishy
Jasmine - why JS tests don't smell fishyJasmine - why JS tests don't smell fishy
Jasmine - why JS tests don't smell fishyIgor Napierala
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Matt Raible
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchMats Bryntse
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introMaurice De Beijer [MVP]
 
Angularjs - Unit testing introduction
Angularjs - Unit testing introductionAngularjs - Unit testing introduction
Angularjs - Unit testing introductionNir Kaufman
 
Unit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and KarmaUnit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and KarmaAndrey Kolodnitsky
 
Quick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmineQuick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmineGil Fink
 
Unit and functional testing with Siesta
Unit and functional testing with SiestaUnit and functional testing with Siesta
Unit and functional testing with SiestaGrgur Grisogono
 
Painless JavaScript Testing with Jest
Painless JavaScript Testing with JestPainless JavaScript Testing with Jest
Painless JavaScript Testing with JestMichał Pierzchała
 
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングXitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングscalaconfjp
 
Testing in AngularJS
Testing in AngularJSTesting in AngularJS
Testing in AngularJSPeter Drinnan
 
Solid And Sustainable Development in Scala
Solid And Sustainable Development in ScalaSolid And Sustainable Development in Scala
Solid And Sustainable Development in ScalaKazuhiro Sera
 
Good karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaGood karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaExoLeaders.com
 
Developing, Testing and Scaling with Apache Camel - UberConf 2015
Developing, Testing and Scaling with Apache Camel - UberConf 2015Developing, Testing and Scaling with Apache Camel - UberConf 2015
Developing, Testing and Scaling with Apache Camel - UberConf 2015Matt Raible
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumTechday7
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScriptYakov Fain
 
Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Deutsche Post
 
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07garrett honeycutt
 

What's hot (20)

Javascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and GulpJavascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and Gulp
 
Jasmine - why JS tests don't smell fishy
Jasmine - why JS tests don't smell fishyJasmine - why JS tests don't smell fishy
Jasmine - why JS tests don't smell fishy
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma intro
 
Angularjs - Unit testing introduction
Angularjs - Unit testing introductionAngularjs - Unit testing introduction
Angularjs - Unit testing introduction
 
Unit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and KarmaUnit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and Karma
 
Quick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmineQuick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmine
 
Unit and functional testing with Siesta
Unit and functional testing with SiestaUnit and functional testing with Siesta
Unit and functional testing with Siesta
 
Painless JavaScript Testing with Jest
Painless JavaScript Testing with JestPainless JavaScript Testing with Jest
Painless JavaScript Testing with Jest
 
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングXitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
 
Testing in AngularJS
Testing in AngularJSTesting in AngularJS
Testing in AngularJS
 
Solid And Sustainable Development in Scala
Solid And Sustainable Development in ScalaSolid And Sustainable Development in Scala
Solid And Sustainable Development in Scala
 
Good karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaGood karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with Karma
 
Developing, Testing and Scaling with Apache Camel - UberConf 2015
Developing, Testing and Scaling with Apache Camel - UberConf 2015Developing, Testing and Scaling with Apache Camel - UberConf 2015
Developing, Testing and Scaling with Apache Camel - UberConf 2015
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to Titanium
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Zen of Akka
Zen of AkkaZen of Akka
Zen of Akka
 
Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)
 
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07
TDD with Puppet Tutorial presented at Cascadia IT Conference 2014-03-07
 

Similar to Survive JavaScript - Strategies and Tricks

Get Ahead with HTML5 on Moible
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moiblemarkuskobler
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Codemotion
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesUdita Plaha
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamBrian Benz
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewDiacode
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016Matt Raible
 
GWT is Smarter Than You
GWT is Smarter Than YouGWT is Smarter Than You
GWT is Smarter Than YouRobert Cooper
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | IntroductionJohnTaieb
 
State of modern web technologies: an introduction
State of modern web technologies: an introductionState of modern web technologies: an introduction
State of modern web technologies: an introductionMichael Ahearn
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLsintelliyole
 
Scala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJSScala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJSAlberto Paro
 
Alberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsAlberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsScala Italy
 

Similar to Survive JavaScript - Strategies and Tricks (20)

Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
Get Ahead with HTML5 on Moible
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moible
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
 
DSLs in JavaScript
DSLs in JavaScriptDSLs in JavaScript
DSLs in JavaScript
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails Slides
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overview
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
 
GWT is Smarter Than You
GWT is Smarter Than YouGWT is Smarter Than You
GWT is Smarter Than You
 
Lightning fast sass
Lightning fast sassLightning fast sass
Lightning fast sass
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Intro to Sails.js
Intro to Sails.jsIntro to Sails.js
Intro to Sails.js
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
State of modern web technologies: an introduction
State of modern web technologies: an introductionState of modern web technologies: an introduction
State of modern web technologies: an introduction
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
Knolx session
Knolx sessionKnolx session
Knolx session
 
Scala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJSScala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJS
 
Alberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsAlberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.js
 

More from Juho Vepsäläinen

Web application development - The past, the present, the future
Web application development - The past, the present, the futureWeb application development - The past, the present, the future
Web application development - The past, the present, the futureJuho Vepsäläinen
 
ECMAScript - From an idea to a major standard
ECMAScript - From an idea to a major standardECMAScript - From an idea to a major standard
ECMAScript - From an idea to a major standardJuho Vepsäläinen
 
fooConf - JavaScript frameworks of tomorrow
fooConf - JavaScript frameworks of tomorrowfooConf - JavaScript frameworks of tomorrow
fooConf - JavaScript frameworks of tomorrowJuho Vepsäläinen
 
JavaScript frameworks of tomorrow
JavaScript frameworks of tomorrowJavaScript frameworks of tomorrow
JavaScript frameworks of tomorrowJuho Vepsäläinen
 
Web application development - The past, the present, the future
Web application development - The past, the present, the futureWeb application development - The past, the present, the future
Web application development - The past, the present, the futureJuho Vepsäläinen
 
bongaus.fi - Spotting Service Powered by Django
bongaus.fi - Spotting Service Powered by Djangobongaus.fi - Spotting Service Powered by Django
bongaus.fi - Spotting Service Powered by DjangoJuho Vepsäläinen
 
Static Websites - The Final Frontier
Static Websites - The Final FrontierStatic Websites - The Final Frontier
Static Websites - The Final FrontierJuho Vepsäläinen
 

More from Juho Vepsäläinen (13)

Web application development - The past, the present, the future
Web application development - The past, the present, the futureWeb application development - The past, the present, the future
Web application development - The past, the present, the future
 
ECMAScript - From an idea to a major standard
ECMAScript - From an idea to a major standardECMAScript - From an idea to a major standard
ECMAScript - From an idea to a major standard
 
Quick introduction to Qwik
Quick introduction to QwikQuick introduction to Qwik
Quick introduction to Qwik
 
fooConf - JavaScript frameworks of tomorrow
fooConf - JavaScript frameworks of tomorrowfooConf - JavaScript frameworks of tomorrow
fooConf - JavaScript frameworks of tomorrow
 
JavaScript frameworks of tomorrow
JavaScript frameworks of tomorrowJavaScript frameworks of tomorrow
JavaScript frameworks of tomorrow
 
The future is mostly static
The future is mostly staticThe future is mostly static
The future is mostly static
 
Web application development - The past, the present, the future
Web application development - The past, the present, the futureWeb application development - The past, the present, the future
Web application development - The past, the present, the future
 
The future is mostly static
The future is mostly staticThe future is mostly static
The future is mostly static
 
Speccer
SpeccerSpeccer
Speccer
 
bongaus.fi - Spotting Service Powered by Django
bongaus.fi - Spotting Service Powered by Djangobongaus.fi - Spotting Service Powered by Django
bongaus.fi - Spotting Service Powered by Django
 
Bootstrap vs. Skeleton
Bootstrap vs. SkeletonBootstrap vs. Skeleton
Bootstrap vs. Skeleton
 
Static Websites - The Final Frontier
Static Websites - The Final FrontierStatic Websites - The Final Frontier
Static Websites - The Final Frontier
 
Intro to HTML5 Canvas
Intro to HTML5 CanvasIntro to HTML5 Canvas
Intro to HTML5 Canvas
 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Survive JavaScript - Strategies and Tricks

  • 1. Survive JavaScript Strategiesand Tricks Juho Vepsäläinen AgileJkl 2013
  • 2. What's in Store? Web Development Strategies JavaScript Tricks Conclusion · How Did We Get Here Where Are We Now Where Are We Headed - - - · Node.js Development Tools Structuring Code Finding Libraries Testing - - - - - ·
  • 4. Strategy for Goldfishes Source: HikingArtist.com (CC BY-NC-ND)
  • 5. Strategy for the Rest of Us
  • 6. How Did We Get Here
  • 7. Ten Days to JavaScript 1995 - Brendan Eich's ten days → Mocha Known as LiveScript till the marketing folks changed the name Even though has Java in name, completely different Influence of Java 1.0 visible mainly in Math and Time modules Prototypal inheritance a lá Self Dynamic, flexible, lambdas Scheme in disguise - See The Little JavaScripter by Crockford · · · · · · ·
  • 8. A Bit of JavaScript varhelloAgileJkl=hello.bind(undefined,'AgileJkl!'); helloAgileJkl(); functionhello(target){ console.log('Hello'+target); } //orcouldjust console.log('HelloAgileJkl!'); //toavoidover-engineering! JAVASCRIPT
  • 9. Web - From Documents to Applications Web as a Document Platform Improved Interactivity Web as an Application Platform · 1995 - Brendan Eich's ten days 1999 - ES3 (modern baseline), Mozilla established - - · 2005 - AJAX, dynamic loading (search for instance) 2008 - RIP ES4, parts of HTML5 emerge, Chrome (V8) 2009 - ES5, Chrome OS, Node.js - - - · 2012 - HTML5 well supported (interesting JS APIs)- Source: Brendan Eich at Strange Loop '12
  • 12. The Good Parts vs. The Rest Source: Oльга + Haфaн (CC BY)
  • 13. Recap JavaScript, an unlikely winner Language of the web More powerful than it seems Web isn't just about documents, now applications too · · · ·
  • 15. Elements of Web Applications
  • 16. Logic
  • 18. CoffeeScript CoffeeScript is a little language that compiles into JavaScript. Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way. The golden rule of CoffeeScript is: "It's just JavaScript". The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is readable and pretty-printed, passes through JavaScript Lint without warnings, will work in every JavaScript runtime, and tends to run as fast or faster than the equivalent handwritten JavaScript. Latest Version: 1.6.2 sudo npm install -g coffee-script Overview CoffeeScript on the left, compiled JavaScript output on the right. # Assignment: number = 42 opposite = true var cubes, list, math, num, number, opposite, race, square, __slice = [].slice; TABLE OF CONTENTS TRY COFFEESCRIPT ANNOTATED SOURCE
  • 19. Dart (/) Dart brings structure to web app engineering with a new language, libraries, and tools. Read about our new M4 release! (http://news.dartlang.org/2013/04/core- libraries-stabilize-with-darts- new.html) News (http://news.dartlang.org/) TweetTweetSearch Docs Tools Resources Development
  • 20. TypeScript Get TypeScript Now TypeScript is a language for application-scale JavaScript development. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. Any browser. Any host. Any OS. Open Source. Starts from JavaScript, Ends with JavaScript TypeScript starts from the syntax and semantics that millions of JavaScript developers know today. learn play get it run it join in
  • 23. HTML
  • 24. Jade doctype 5 html(lang="en") head title= pageTitle script(type='text/javascript') if (foo) { bar() } body h1 Jade - node template engine #container if youAreUsingJade <!DOCTYPE html> <html lang="en"> <head> <title>Jade</title> <script type="text/javascript"> if (foo) { bar() } </script> </head> <body> <h1>Jade - node template engine</h1> View Documentation Node Template Engine
  • 25. Mustache } Logic-less templates. Available in Ruby, JavaScript, Python, Erlang, PHP, Perl, Objective-C, Java, .NET, Android, C++, Go, Lua, ooc, ActionScript, ColdFusion, Scala, Clojure, Fantom, CoffeeScript, D, and for node.js. Works great with TextMate, Vim, Emacs, and Coda. The Manual: mustache(5) and mustache(1) Demo
  • 26. Handlebars Handlebars provides the power necessary to let you build semantic templates effectively with no frustration. Mustache templates are compatible with Handlebars, so you can take a Mustache template, import it into Handlebars, and start taking advantage of the extra Handlebars features. Download: 1.0.0-rc.3Download: 1.0.0-rc.3 Download: runtime-1.0.0-rc.3 Getting Started
  • 27. Transparency Examples Assigning valuesAssigning values Iterating over a listIterating over a list Nested listsNested lists Nested objectsNested objects Transparency is a minimal template engine for jQuery. It maps JSONTransparency is a minimal template engine for jQuery. It maps JSON objects to DOM elements with zero configuration.objects to DOM elements with zero configuration. Just call .render()Just call .render() CoffeeScript JavaScript hello= hello:"Hello!" hi: "<i>Hithere!</i>" span: "Goodbye!" $('.container').renderhello Jade HTML .container #hello .hi span
  • 29. CSS
  • 30. LESS Write some LESS: @base: #f938ab; .box-shadow(@style, @c) when (iscolor(@c)) { box-shadow: @style @c; -webkit-box-shadow: @style @c; -moz-box-shadow: @style @c; } .box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) { .box-shadow(@style, rgba(0, 0, 0, @alpha)); } .box { color: saturate(@base, 5%); border-color: lighten(@base, 30%); div { .box-shadow(0 0 5px, 30%) } } Compile to CSS: npm install -g less lessc styles.less styles.css version 1.3.3 changelog The dynamic stylesheet language. LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions. LESS runs on both the server-side (with Node.js and Rhino) or client-side (modern browsers only). overview   usage   language   function reference   source   about   try it now! FollowFollow
  • 31. SASS $ gem install sass $ mv style.css style.scss $ sass --watch style.scss:style.css About Tutorial Documentation Blog Try Online Latest Release: Media Mark (3.2.7) What's New? Download Editor Support Development Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line tool or a web-framework plugin. Sass has two syntaxes. The most commonly used syntax is known as “SCSS” (for “Sassy CSS”), and is a superset of CSS3’s syntax. This means that every valid CSS3 stylesheet is valid SCSS as well. SCSS files use the extension .scss. The second, older syntax is known as the indented syntax (or just “.sass”). Inspired by Haml’s terseness, it’s intended for people who prefer conciseness over similarity to CSS. Instead of brackets
  • 32. Twitter Bootstrap Bootstrap (./index.html) Bootstrap Sleek, intuitive, and powerful front-end framework for faster and easier web development. Download Bootstrap (assets/bootstrap.zip)
  • 33. Zurb Foundation Features (grid.php) Add-ons (templates.php) Case Studies (case-jacquelinewest.php) Docs (docs) Training (training.php) Foundation (http://foundation.zurb.com) Foundation The most advanced responsive front-end framework in the world. Download Foundation 4 (download.php) 10.9k stargazers (http://github.com/zurb/foundation) @foundationzurb (http://twitter.com/foundationzurb)
  • 34. Data
  • 35. Data Usually handled with a backend or external services (Disqus for comments for example) RESTful interfaces (client-side MVC) Local caching (localStorage ie.) Offline usage (replication, PouchDB) · · · ·
  • 36. Big Data Source: infocux Technologies (CC BY-NC)
  • 37. Recap Logics are violet Markups are blue Styling is sweet And so is data
  • 38. Where Are We Headed
  • 40. Source: Augie Schwer (CC BY-SA)
  • 42. Shim a thin often tapered piece of material (as wood, metal, or stone) used to fill in space between things (as for support, leveling, or adjustment of fit) Source: Merriam-Webster, esagor (CC BY-NC)
  • 43. caniuse.com Index Tables Can I use... Compatibility tables for support of HTML5, CSS3, SVG and more in desktop and mobile browsers. Latest update: Three new features added: Shadow DOM, WebP images & Intrinsic width & height (April 3, 2013) Search: border‑radius, WebGL, woff, etc CSS @font­face Web fonts calc() as CSS unit value 2.1 selectors Counters Feature Queries Filter Effects Generated content Gradients Grid Layout Hyphenation inline­block Masks min/max­width/height outline position:fixed Regions HTML5 Audio element Canvas (basic support) Color input type contenteditable attribute (basic support) Datalist element dataset & data­* attributes Date/time input types Details & Summary elements Download attribute Drag and Drop Form validation HTML5 form features input placeholder attribute New semantic elements Number input type Offline web applications SVG Inline SVG in HTML5 SVG (basic support) SVG effects for HTML SVG filters SVG fonts SVG fragment identifiers SVG in CSS backgrounds SVG in HTML img element SVG SMIL animation All SVG features Other async attribute for external scripts TOP Suggestions  Feed  Twitter Import stats FAQ Resources Embed 564
  • 44. Source: T.R.G. (CC BY-NC-SA)
  • 45. Rise of the Mobile
  • 46. Android Source: San Diego Shooter (CC BY-NC-ND)
  • 48. Source: Brian LeRoux (CC BY-NC-SA)
  • 49. Native vs. HTML5 Native apps still have their advantages JS is a good alternative for prototyping Available technology keeps maturing And we'll likely see better platform support · · · ·
  • 54. Other Considerations What belongs to server, what to client and why (business goals) Client-side MVC is not a silver bullet Basecamp's experiences (hint: pushState, aggressive caching) Synchronization, offline usage, skills, time, budget... Fashion. Techs come and go Up and coming? Mixed approaches. Examples: Meteor, Derby, mojito, rendr · · · · · ·
  • 55. Recap Web dev is as hard as you make it Especially on the bleeding edge Fortunately a bit of tape fixes anything Mobile on the rise, native HTML5 apps not mainstream yet Web architectures - from monoliths to distributed · · · · ·
  • 59. Packages per Year Python: 29,720 packages / 22 years = 1351 packages / year Ruby: 54,385 packages / 18 years = 3022 packages / year Node.js: 26,966 packages / 4 years = 6742 packages / year · · · Source: Gregg Gaines
  • 62. Recap Excellent for prototyping Strong ecosystem thanks to NPM Develops at a blistering pace · · ·
  • 64. Vim, Emacs, Sublime Text, WebStorm...
  • 65. Chrome Inspector See also Firebug· Source: Chrome DevTools
  • 66. LiveReload LiveReload 2 proudly presents… The Web Developer Wonderland (a happy land where browsers don't need a Refresh button) CSS edits and image changes apply live. CoffeeScript, SASS, LESS and others just work. Citizenship is granted through the Mac App Store. Windows permanent residency issues are being worked out, temporary stay already allowed.
  • 67. JSLint clear Read the instructions. Set the options. Enjoy The Good Parts. Donate. The JavaScript Code Quality Tool Edition 2013-04-09 Source // Paste quality code here See also JSHint·
  • 68. jsFiddle Run Save TidyUp JSHint Login/Sign up No‑Library (pure JS) onLoad Tip JSFiddle Frameworks & Extensions Fiddle Options External Resources Languages Ajax Requests Examples Legal, Credits and Links Gittip Keyboard shortcuts? 1 1 1 HTML JavaScript CSS Result Others: jsbin, jsdo.it, ...·
  • 69. Cloud9 IDE Cloud9 IDE - Online IDE Give us a shout out: Share on twitter Share on Google Share on facebook Share on email Sign up Sign out Username or e‑mail Password Sign In Keep me signed in Forgot password? Resend activation email Or sign in instantly with: NEWS: The Changelog of March: Stability, Performance, Features Hey there! Over the past month we have worked very hard on improving the stability and performance of our service. In addition, we also worked on some interface changes ... read the full article | see all articles Pricing Features Blog Company Company• Board Members• Jobs• Press• Contact Node.js Node.js• Nodebits.com• NodeManual.org Support Support• Status• Documentation Your code anywhere, anytime...
  • 70. Recap Traditional editors and IDEs are fine Additional tooling available, use it Future in the web? · · ·
  • 72. The Anti-Pattern <scriptsrc='jquery-current.js'type='text/javascript'></script> <scriptsrc='sorttable.js' type='text/javascript'></script> <scriptsrc='scripts.js' type='text/javascript'></script> <scriptsrc='miniCalendar.js' type='text/javascript'></script> HTML Each include has to be defined by hand Brittle and prone to error, especially with large codebases Does not encourage to modularity Hard to reuse · · · ·
  • 73. Concatenate Scripts <scriptsrc='application.js'type='text/javascript'></script> HTML Old skool but works Less overhead at HTML Still, running into dependency order problem at concatenation Possible to complement by loading scripts (ie. jQuery) from a CDN Nevertheless a step forward · · · · ·
  • 74. RequireJS and AMD + Bower <scriptdata-main="scripts/main"src="scripts/require.js"></script> HTML define(['jquery','./math'],function($,math){ return{//exports vector:function(){...} }; }); JAVASCRIPT Modular, asynchronous approach Includes defineoverhead (possible to mimic Node.js convention, though) Optimizer resolves dependencies and creates build (loadable with Almond) Configuration complex at times · · · ·
  • 75. Browserify + NPM <scriptsrc='application.js'type='text/javascript'></script> HTML var$=require('jquery'); varmath=require('./math'); exports.vector=function(){...}; JAVASCRIPT Allows to use Node.js module convention (CJS) Better yet allows to hook into NPM ecosystem! Still fairly bleeding edge · · ·
  • 76. Recap No official module system yet (ES6?) Many alternatives (AMD, CJS etc.) browserify looks promising (NPM!) · · ·
  • 78. NPM Search Packages NODE.JS HOME DOWNLOAD ABOUT NPM REGISTRY DOCS BLOG COMMUNITY LOGOS JOBS Node Packaged Modules Total Packages: 28 067 907 584 downloads in the last day 9 157 954 downloads in the last week 33 188 669 downloads in the last month Patches welcome! Any package can be installed by using npminstall. Add your programs to this index by using npmpublish. Recently Updated 0m jspm Most Depended Upon 2740 underscore Create Account | Login
  • 79. Bower Bower components Discover Bower (http://bower.io) components Check out some of my other projects Focus (https://github.com/sindresorhus/focus), JsRun (https://github.com/sindresorhus/sublime- jsrun), sublime- editorconfig (https://github.com/sindresorhus/editorconfig- sublime), GitHub-Notifier (https://github.com/sindresorhus/GitHub- Notifier), Pure (https://github.com/sindresorhus/pure), quora-unblocker (https://github.com/sindresorhus/quora- unblocker) screenfull.js (https://git… stringify-object (https:/… Featured components Fullsc… API wrap… String… an flight-storage (https://gi… spice.css (https://github… Latest components Store… JSON data Basic… dry css min.js (https://github.co… angularjs-ordinal-filter … Hot components Super… mini… select… Angul… Ordinal (https://github.com/sindresorhus/bower-components)
  • 80. JSwiki JSwiki 2 TweetTweet 59 EditEdit Hi there! Welcome to jswiki. This wiki indexes libraries and resources available for JavaScript. In addition it provides some starting points for newbies in form of Beginner's Resources. In case you want to contribute, do take a look at Meta first for some extra pointers. Happy hacking! IMPORTANT! jster.net is a spiritual successor of jswiki. There is more content but the site is less of a wiki. jswiki will remain here as more of a communal alternative. In addition you might want to check out the following: JSwiki Essentials Multimedia Graphics Data UI Utilities Development Applications jsgamewiki Microjs EveryJS JSDB JSPkg
  • 81. JSter FollowFollow @jsterlibs@jsterlibs Blog Catalog Add Library Sign In Find a Javascript library JSter is a catalog of 1095 JavaScript libraries and tools for web development. Problems?Problems?
  • 82. Recap No need to just Google it Package managers (esp. NPM) make your life easier Avoid NIH and use existing solutions · · ·
  • 86. Testling testling-cirun your browser tests on every push write some tests Use the test runner you like best! The only thing your test runner needs to do is to produce TAP output on console.log or process.stdout. Here's an example project using mocha. You can also use tape to output TAP output in browsers and in node. Here is what a simple tape test looks like: var test = require('tape'); var myCode = require('../my_code.js'); test('make sure my code works', function (t) { t.plan(2); t.equal(myCode.beep(5), 555);
  • 87. Travis travis-ci.org Blog Documentation English Français Español Português Travis CI A hosted continuous integration service for the open source community. Welcome to Travis CI # Travis CI is a hosted continuous integration service for the open source community. It is integrated with GitHub and offers first class support for: C C++ Clojure Erlang Go Groovy Haskell Java JavaScript (with Node.js) Perl
  • 88. Browserling interactive cross-browser testing http:// 3.0 3.5 3.6 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 nightly create account sign in
  • 89. Browserstack Live, Web-Based Browser Testing Instant access to all desktop and mobile browsers. Say goodbye to your setup of virtual machines and devices. Free Trial Sign up for free Full Name Email Password No credit cardNo credit card required. We promise.required. We promise. Support Pricing Free TrialResources Sign inLive
  • 90. Chaos Monkey Source: Jeff Atwood - Working with the Chaos Monkey
  • 92. Recap Test your JS Browser differences bring their own challenge Future in continuous integration (Travis and co.) Fail constantly to avoid failure · · · ·
  • 94. Conclusion JS - the most valuable language you don't know yet A target for tool and language development Not without its quirks but still manageable The most important language of this decade? · · · ·
  • 95. Survive JS - The Guide Survive JS Have you ever felt lost in the JavaScript jungle? If so, you are in the right place. The purpose of this guide is to provide you with sharp implements that help you survive and perhaps thrive even. Even seasoned JavaScript explorers might find a trick or two to apply in practice. As it is very possible I have not reached omnipotence yet, I encourage you to submit issues. This way we can make the guide to serve you better. I am well aware there are other excellent resources out there. Of these I would like to mention Eloquent JavaScript and JavaScript Garden in particular. I have listed various beginner's resources over at JSwiki, the predecessor of JSter. Table of Contents A Misunderstood Language? - What is the essence of JavaScript? Why is it relevant? Current State - What is the current state of JavaScript and the ecosystem? Language Features - What the language looks like? How to use it effectively? EditEdit TweetTweet 0 0 Table of Contents Survive JS
  • 96. Thank You! twitter @bebraw www www.nixtu.info github github.com/bebraw