front end - the right way

52
FRONT-END the right way @vinicius_dacal

Upload: vinicius-dacal-lopes

Post on 26-Jun-2015

200 views

Category:

Presentations & Public Speaking


0 download

DESCRIPTION

Slides usados no mini-curso Front-end the right way. Uma introdução ao mundo front-end. são abordadas boas praticas de html e css.

TRANSCRIPT

Page 1: Front end - the right way

FRONT-ENDthe right way

@vinicius_dacal

Page 2: Front end - the right way

Sistemas para Internet

Page 3: Front end - the right way

Front-endBack-endMobile dev

Page 4: Front end - the right way
Page 5: Front end - the right way
Page 6: Front end - the right way
Page 7: Front end - the right way
Page 8: Front end - the right way

SÓ PODE SER HTML5

Page 9: Front end - the right way

SÓ O HTML5 SALVA!

Page 10: Front end - the right way

O HTML5 trouxe importantes mudanças quanto ao papel do HTML no mundo da Web, melhorando sua semântica e

acessibilidade. Com novos recursos, antes só possíveis por meio de outras tecnologias

O que mudou?

Page 11: Front end - the right way

É o estudo do significado. Incide sobre a relação entre significantes, tais como palavras, frases, sinais e símbolos, e o que eles representam, a sua denotação

Semântica

Page 12: Front end - the right way

<div>

<div>

<div>

Page 13: Front end - the right way

<header>

<main>

<footer>

Page 14: Front end - the right way

<header>

<footer>

<nav>

<main>

Page 15: Front end - the right way

<header>

<footer>

<article>

<article>

<nav>

<article>

Page 16: Front end - the right way

Microdata

Padrão de representação de informações que estende as potencialidades semânticas do HTML5

Page 17: Front end - the right way

Microdata

<div>

<h1>ADN Múltipla Comunicação </h1>

<p>44 9999-3539</p>

<p>

<span>Av. Rio de janeiro, 5260 </span>,

<span>Umuarama</span>,

<span>PR</span>.

</p>

</div>

Page 18: Front end - the right way

Microdata

<div itemscope itemtype="http://data-vocabulary.org/Organization">

<h1 itemprop="name">ADN Múltipla Comunicação</h1>

<p itemprop="tel">44 9999-3539</p>

<p itemprop="address" itemscope itemtype="http://data-vocabulary.org/Address">

<span itemprop="street-address">Av. Rio de janeiro, 5260</span>,

<span itemprop="locality">Umuarama</span>,

<span itemprop="region">PR</span>.

</p>

</div>

https://schema.org

Page 19: Front end - the right way

Opengraph

Page 20: Front end - the right way

Opengraph

<meta property="og:title" content="ADN Múltipla Comunicação" />

<meta property="og:type" content="company" />

<meta property="og:url" content="http://www.adnmultipla.com/" />

<meta property="og:image" content="http://www.adnmultipla.com.br/img/adn.jpg" />

<meta property="og:site_name" content="ADN Múltipla" />

<meta property="og:description" content="ADN Múltipla - Agência Múltipla" />

https://developers.facebook.com/docs/sharing/best-practices

Page 21: Front end - the right way

Web Components

The Future

http://webcomponents.org/

Page 22: Front end - the right way

Custom ElementsTemplates

Shadow DOMImport

Page 23: Front end - the right way

Custom ElementsE se você pudesse criar sua própria TAG?

Page 24: Front end - the right way

Custom Elements

<x-bacon></x-bacon>

Page 25: Front end - the right way

TemplatesGuarde trechos de código para reutilização

<template></template>

Page 26: Front end - the right way

Templates

<template>

<img src="http://www.placehold.it/300x200" />

</template>

Page 27: Front end - the right way

Shadow DOMBlocos de código que você não vê mas estão

lá, encapsulados dentro do DOM!

Page 28: Front end - the right way

ImportA forma mais fácil de você importar e

reutilizar componentes

<link rel=”import” href=”video”>

Page 29: Front end - the right way

Suporte dos BrowsersAtualmente nem todos os browsers suportam as features para

web components! Mas você pode começar a brincar hoje mesmo, usando polyfills.

Polymer

x-tags

Page 30: Front end - the right way

Cascading Style Sheetshttps://www.youtube.com/watch?v=m1iV2C44Duc

Page 31: Front end - the right way

CSS3

Advanced SelectorsBorder RadiusBox ModelCSS Animations and TransitionsCalculating Values With calc()GradientsMedia QueriesEtc...

Page 32: Front end - the right way

CSS3com css você pode fazer coisas incríveis

Page 33: Front end - the right way

CSS3O único problema

é que CSS é muito fácil

Page 34: Front end - the right way

você não pensa para escrever css

Page 35: Front end - the right way

E de vez em quando, o que era pra ser um Style sheet,

se torna um Style Shit

Page 36: Front end - the right way

Padrões de Código

Page 37: Front end - the right way

!CamelCaseNão use CamelCase em css. Prefira

manter tudo em minúsculo e usar hífen para separar as palavras:

alertInfo

alert-info

Page 38: Front end - the right way

!#idsPrefira atribuir seus estilos css a classes

e não a ids ou tags

#logo

.logo

h1

Page 39: Front end - the right way

Evite seletores gigantesPrefira atribuir seus estilos css à classes

e não a ids ou tags

html > body> header> h1> .logo

.logo

Page 40: Front end - the right way

Evite seletores gigantesPrefira atribuir seus estilos css à classes

e não a ids ou tags

html > body> header> h1> .logo

.logo

Page 41: Front end - the right way

Nomeie as classe por responsabiliades e não por

propriedades

info-red

info-important

Page 42: Front end - the right way

Evite usar @importPara cada import é feita uma nova

requisição e isso não é legal!

Page 43: Front end - the right way

Componentes

Page 44: Front end - the right way
Page 45: Front end - the right way
Page 46: Front end - the right way

Task Runners

Page 47: Front end - the right way

Facilitam sua vida!Automatizam tarefas, livrando você de

perder tempo com coisas desnecessárias

minificação de css e js.

concatenação de css e js

jsLint

etc...

Page 48: Front end - the right way

Carreira

Page 49: Front end - the right way

Carreira

Sucesso = dedicação X oportunidades X objetivos

Page 50: Front end - the right way

Carreira

0 X 10 X 10 = 0

Se algum dos fatores for ZERO, você está fazendo algo errado

Sucesso = dedicação X oportunidades X objetivos

Page 51: Front end - the right way

Corra atrás de um 1000

10 X 10 X 10 = 1000

Page 52: Front end - the right way

Vinicius Dacal Lopes

[email protected]@vinicius_dacal

https://github.com/viniciusdacal