Slide 1

Slide 1 text

Web application development tips H e n r i q u e V i c e n t e h t t p : / / h e n v i c . g i t h u b . i o

Slide 2

Slide 2 text

Once HTML Inline style Few or none programmatically control

Slide 3

Slide 3 text

Some time later Separation of concerns of content + style
 HTML + CSS Java applets, Flash JScript, JavaScript and, finally, ECMAScript

Slide 4

Slide 4 text

ECMAScript Language created out of a need to make JavaScript more solid & a standard

Slide 5

Slide 5 text

Today 1000 ways of developing a web app JavaScript is [always] on the client-side Trend: JavaScript on the server-side

Slide 6

Slide 6 text

No exits Mobile web browsers usually only interpret JavaScript Decaying support of Java, Flash Player, and, Silverlight on desktop browsers

Slide 7

Slide 7 text

Some stats http://www.google.com/trends/explore?q=Flash#q=Flash%2C%20Java%20plugin%2C%20iOS%2C %20Android%2C%20app&cmpt=q Date not 100% bullet-proof

Slide 8

Slide 8 text

But eval() JS is evil

Slide 9

Slide 9 text

Where can I start? Read the ECMAScript specs? RFC 2616 - HTTP/1.1? Version control? Automated tests, code quality? Test-Driven Development? Cyclomatic complexity? Forking and pulling requests repos on open source projects on GitHub? …

Slide 10

Slide 10 text

MUST read specs and references to web developers ECMAScript 5 http://es5.github.io/ HTTP/1.1 http://tools.ietf.org/html/rfc2616 BrazilJS Weekly http://braziljs.org/ (in portuguese) Mozilla MDN
 https://developer.mozilla.org/en-US/docs/Web/JavaScript 24ways.org (each December) The Art of Unix Programming by Eric S. Raymond
 http://catb.org/esr/writings/taoup/html/graphics/taoup.pdf

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Version control year <= 2005 → ‘use svn’; year > 2005 → ‘use git’; GIT Commit Good Practice
 https://wiki.openstack.org/wiki/ GitCommitMessages Enjoy the command line?
 Node GH ftw.

Slide 13

Slide 13 text

http://try.github.io/levels/1/challenges/1 http://octodex.github.com/labtocat/

Slide 14

Slide 14 text

Let’s roll Is there anything to help me develop a web app faster, better, and easer? Frameworks, libraries? What do we have? Generators? Examples?

Slide 15

Slide 15 text

Great comparison web site where you can see
 a simple to-do list app built
 with different tool sets like
 function libraries,
 frameworks, and,
 vanilla JS (or pure JS)
 www.todomvc.com

Slide 16

Slide 16 text

Before writing some “jQuery” code... Don’t start using frameworks without having a basic understanding on how vanilla JS works Then, use whatever you want to make your work more valuable: do re-use code But before writing JS:
 Can’t CSS do what you want better?

Slide 17

Slide 17 text

The essential tool IDE vs. code / text editor
 
 IDEs:
 WebStorm (JetBrains)
 Eclipse, NetBeans
 …
 
 Source code editors:
 Sublime, TextMate
 vi (hard core)
 … Advantages? x Disadvantages?

Slide 18

Slide 18 text

Use metrics to determine what you should produce Don’t produce for IE 6 or older browsers: not worth it Consider the accessibility / the visual impaired (unless you’re designing a photo sharing web service and even so… consider them) Always use metrics to evaluate risks and to see the options and its consequences clearer

Slide 19

Slide 19 text

gs.statcounter.com

Slide 20

Slide 20 text

A better terminal… https://github.com/robbyrussell/oh-my-zsh Must Have Git Aliases: Advanced Examples durdn.com/blog/2012/11/22/must-have-git-aliases-advanced-examples/ iTerm 2 You do use the CLI (command-line interface), right?

Slide 21

Slide 21 text

CLI tools that you’ll learn to love

Slide 22

Slide 22 text

Installing... Download NodeJS at www.nodejs.org
 
 Install it, then open your console and install
 the other tools:
 
 Yeoman: npm install -g yo
 Grunt CLI: npm install -g grunt-cli
 Bower: npm install -g bower

Slide 23

Slide 23 text

Yeoman + AngularJS Let’s create a example app with a Yeoman AngularJS generator? First, install the generator
 npm install -g generator-angular Then: yeoman angular

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

Testes automatizados!

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

henvic.github.io ! HENRIQUE VICENTE T a l k a v a i l a b l e a t h t t p s : / / s p e a k e r d e c k . c o m / h e n v i c / w e b - a p p l i c a t i o n - d e v e l o p m e n t - t i p s