SlideShare a Scribd company logo
Buenas prácticas en el desarrollo web
Speakers


   Alfredo Fernández            David Garcia
   afernandez@plainconcepts.c   dgarcia@plainconcepts.com
   om                           @jotadeg
   @afernandez_l
CSS best practices

   Usar un reset.css

   <link> vs @import

   CSS Sprites
CSS best practices
CSS best practices
CSS best practices
CSS best practices

 Entendiendo la prioridad de los estilos en CSS:
  Specificity
  Inheritance
  and the Cascade
Specificity

 #sidebar ul li a.myclass:hover {}




               0           1         2   3
Inheritance

 Los elementos heredan de su contenedor padre
 No todas las propiedades son heredables
   Pero se puede declarar explicitamente que una
   propiedad herede los estilos de su padre
Y ahora?
LESS extends CSS with dynamic behavior
OOCSS

 What’s a CSS Object?
Basically, a CSS “object” is a repeating visual pattern,
which can be abstracted into an independent snippet
of HTML, CSS, and possibly JavaScript.
Once created, an object can then be reused
throughout a site.
OOCSS
OOCSS




Un objeto debe verse igual sin importar dónde
este colocado
OOCSS
Referencias
 http://necolas.github.com/normalize.css/
 http://www.vanseodesign.com/css/css-specificity-inheritance-cascaade/
 http://csswizardry.com/2011/09/writing-efficient-css-selectors/
 http://developer.yahoo.com/performance/rules.html
 http://lesscss.org/
 http://lesshat.com/
 http://lesselements.com/
 http://clearleft.github.com/clearless/
 https://github.com/stubbornella/oocss/wiki
En javascript también!
Javascript the good parts
JSLint
JSHint
JSHint en Visual Studio
Testing javascript
Testing javascript
Testing javascript
Jasmine en Visual Studio
Minify and bundle
Javascript: the worst part
References

  JSHint http://www.jshint.com/
  Web essentials http://visualstudiogallery.msdn.microsoft.co
  Chutzpa test runner http://visualstudiogallery.msdn.microso
  Chutzpa test adapter http://visualstudiogallery.msdn.micros
           http://pivotal.github.com/jasmine/
  Chirpy http://chirpy.codeplex.com/
  http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-min
Gracias!


   Alfredo Fernández            Gerard López
   afernandez@plainconcepts.c   glopez@plainconcepts.com
   om                           @gerard_lopz
   @afernandez_l

More Related Content

Viewers also liked

Viewers also liked (14)

HTML Tour - Responsive Web Design
HTML Tour - Responsive Web DesignHTML Tour - Responsive Web Design
HTML Tour - Responsive Web Design
 
HTML Tour - Aplicaciones móviles multiplataforma
HTML Tour - Aplicaciones móviles multiplataformaHTML Tour - Aplicaciones móviles multiplataforma
HTML Tour - Aplicaciones móviles multiplataforma
 
Net core path by Ibon Landa
Net core path by Ibon LandaNet core path by Ibon Landa
Net core path by Ibon Landa
 
Cross-premises: integrando redes e infraestructura con Microsoft Azure
Cross-premises: integrando redes e infraestructura con Microsoft AzureCross-premises: integrando redes e infraestructura con Microsoft Azure
Cross-premises: integrando redes e infraestructura con Microsoft Azure
 
Identidad híbrida con Azure Active Directory
Identidad híbrida con Azure Active DirectoryIdentidad híbrida con Azure Active Directory
Identidad híbrida con Azure Active Directory
 
Realtime Apps en .NET Core by Carlos Landeras y Manuel Rodrigo Cabello
Realtime Apps en .NET Core by Carlos Landeras y Manuel Rodrigo CabelloRealtime Apps en .NET Core by Carlos Landeras y Manuel Rodrigo Cabello
Realtime Apps en .NET Core by Carlos Landeras y Manuel Rodrigo Cabello
 
ASP.NET MVC Core by Eduard Tomàs
ASP.NET MVC Core by Eduard TomàsASP.NET MVC Core by Eduard Tomàs
ASP.NET MVC Core by Eduard Tomàs
 
Entity Framework Core by Unai Zorrilla
Entity Framework Core by Unai ZorrillaEntity Framework Core by Unai Zorrilla
Entity Framework Core by Unai Zorrilla
 
Security in MVC Core by Hugo Biarge
Security in MVC Core by Hugo BiargeSecurity in MVC Core by Hugo Biarge
Security in MVC Core by Hugo Biarge
 
Single Sign On e IdPs: Active Directory Federation Services (ADFS)
Single Sign On e IdPs: Active Directory Federation Services (ADFS)Single Sign On e IdPs: Active Directory Federation Services (ADFS)
Single Sign On e IdPs: Active Directory Federation Services (ADFS)
 
Push notifications
Push notificationsPush notifications
Push notifications
 
Azure API Management
Azure API ManagementAzure API Management
Azure API Management
 
Microsoft Intune y Gestión de Identidad Corporativa
Microsoft Intune y Gestión de Identidad Corporativa Microsoft Intune y Gestión de Identidad Corporativa
Microsoft Intune y Gestión de Identidad Corporativa
 
Diseña tus aplicaciones multiplataforma
Diseña tus aplicaciones multiplataformaDiseña tus aplicaciones multiplataforma
Diseña tus aplicaciones multiplataforma
 

Similar to HTML Tour - Buenas prácticas en el desarrollo web

How to develop a CSS Framework
How to develop a CSS FrameworkHow to develop a CSS Framework
How to develop a CSS Framework
Olivier Besson
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Erin M. Kidwell
 

Similar to HTML Tour - Buenas prácticas en el desarrollo web (20)

The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
 
Crazy sassy
Crazy sassyCrazy sassy
Crazy sassy
 
An introduction to Object Oriented CSS
An introduction to Object Oriented CSSAn introduction to Object Oriented CSS
An introduction to Object Oriented CSS
 
CSS Custom Properties (aka CSS Variable)
CSS Custom Properties (aka CSS Variable)CSS Custom Properties (aka CSS Variable)
CSS Custom Properties (aka CSS Variable)
 
Css framework
Css frameworkCss framework
Css framework
 
Css framework
Css frameworkCss framework
Css framework
 
How to develop a CSS Framework
How to develop a CSS FrameworkHow to develop a CSS Framework
How to develop a CSS Framework
 
Sass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LASass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LA
 
Styling your projects! leveraging css and r sass in r projects
Styling your projects! leveraging css and r sass in r projectsStyling your projects! leveraging css and r sass in r projects
Styling your projects! leveraging css and r sass in r projects
 
20111129 modernizr
20111129 modernizr20111129 modernizr
20111129 modernizr
 
.Less - CSS done right
.Less - CSS done right.Less - CSS done right
.Less - CSS done right
 
Hardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ationHardboiled Front End Development — Found.ation
Hardboiled Front End Development — Found.ation
 
Intro to Sass for WordPress Developers
Intro to Sass for WordPress DevelopersIntro to Sass for WordPress Developers
Intro to Sass for WordPress Developers
 
The CSS Handbook
The CSS HandbookThe CSS Handbook
The CSS Handbook
 
Atlanta Drupal Users Group - Lightning Talks - Sass
Atlanta Drupal Users Group - Lightning Talks - SassAtlanta Drupal Users Group - Lightning Talks - Sass
Atlanta Drupal Users Group - Lightning Talks - Sass
 
WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?
 
Styling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS EditionStyling Components with JavaScript: MelbCSS Edition
Styling Components with JavaScript: MelbCSS Edition
 
SCSS Implementation
SCSS ImplementationSCSS Implementation
SCSS Implementation
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
 
Using Sass in Your WordPress Projects
Using Sass in Your WordPress ProjectsUsing Sass in Your WordPress Projects
Using Sass in Your WordPress Projects
 

More from Plain Concepts

DotNet 2019 | Sherry List - Azure Cognitive Services with Native Script
DotNet 2019 | Sherry List - Azure Cognitive Services with Native ScriptDotNet 2019 | Sherry List - Azure Cognitive Services with Native Script
DotNet 2019 | Sherry List - Azure Cognitive Services with Native Script
Plain Concepts
 
El camino a las Cloud Native Apps - Introduction
El camino a las Cloud Native Apps - IntroductionEl camino a las Cloud Native Apps - Introduction
El camino a las Cloud Native Apps - Introduction
Plain Concepts
 
El camino a las Cloud Native Apps - Azure AI
El camino a las Cloud Native Apps - Azure AIEl camino a las Cloud Native Apps - Azure AI
El camino a las Cloud Native Apps - Azure AI
Plain Concepts
 

More from Plain Concepts (20)

R y Python con Power BI, la ciencia y el análisis de datos, juntos
R y Python con Power BI, la ciencia y el análisis de datos, juntosR y Python con Power BI, la ciencia y el análisis de datos, juntos
R y Python con Power BI, la ciencia y el análisis de datos, juntos
 
Video kills the radio star: e-mail is crap and needed disruption
 Video kills the radio star: e-mail is crap and needed disruption Video kills the radio star: e-mail is crap and needed disruption
Video kills the radio star: e-mail is crap and needed disruption
 
Cómo redefinir tu organización con IA
Cómo redefinir tu organización con IACómo redefinir tu organización con IA
Cómo redefinir tu organización con IA
 
Dx29: assisting genetic disease diagnosis with physician-focused AI pipelines
Dx29: assisting genetic disease diagnosis with physician-focused AI pipelinesDx29: assisting genetic disease diagnosis with physician-focused AI pipelines
Dx29: assisting genetic disease diagnosis with physician-focused AI pipelines
 
¿Qué es real? Cuando la IA intenta engañar al ojo humano
¿Qué es real? Cuando la IA intenta engañar al ojo humano¿Qué es real? Cuando la IA intenta engañar al ojo humano
¿Qué es real? Cuando la IA intenta engañar al ojo humano
 
Inteligencia artificial para detectar el cáncer de mama
Inteligencia artificial para  detectar el cáncer de mamaInteligencia artificial para  detectar el cáncer de mama
Inteligencia artificial para detectar el cáncer de mama
 
¿Está tu compañía preparada para el reto de la Inteligencia Artificial?
¿Está tu compañía preparada para el reto de la Inteligencia Artificial?¿Está tu compañía preparada para el reto de la Inteligencia Artificial?
¿Está tu compañía preparada para el reto de la Inteligencia Artificial?
 
Cognitive Services en acción
Cognitive Services en acciónCognitive Services en acción
Cognitive Services en acción
 
El Hogar Inteligente. De los datos de IoT a los hábitos de una familia a trav...
El Hogar Inteligente. De los datos de IoT a los hábitos de una familia a trav...El Hogar Inteligente. De los datos de IoT a los hábitos de una familia a trav...
El Hogar Inteligente. De los datos de IoT a los hábitos de una familia a trav...
 
What if AI was your daughter?
What if AI was your daughter?What if AI was your daughter?
What if AI was your daughter?
 
Recomendación Basada en Contenidos con Deep Learning: Qué queríamos hacer, Qu...
Recomendación Basada en Contenidos con Deep Learning: Qué queríamos hacer, Qu...Recomendación Basada en Contenidos con Deep Learning: Qué queríamos hacer, Qu...
Recomendación Basada en Contenidos con Deep Learning: Qué queríamos hacer, Qu...
 
Revolucionando la experiencia de cliente con Big Data e IA
Revolucionando la experiencia de cliente con Big Data e IARevolucionando la experiencia de cliente con Big Data e IA
Revolucionando la experiencia de cliente con Big Data e IA
 
IA Score en InfoJobs
IA Score en InfoJobsIA Score en InfoJobs
IA Score en InfoJobs
 
Recuperación de información para solicitantes de empleo
Recuperación de información para solicitantes de empleoRecuperación de información para solicitantes de empleo
Recuperación de información para solicitantes de empleo
 
La nueva revolución Industrial: Inteligencia Artificial & IoT Edge
La nueva revolución Industrial: Inteligencia Artificial & IoT EdgeLa nueva revolución Industrial: Inteligencia Artificial & IoT Edge
La nueva revolución Industrial: Inteligencia Artificial & IoT Edge
 
DotNet 2019 | Sherry List - Azure Cognitive Services with Native Script
DotNet 2019 | Sherry List - Azure Cognitive Services with Native ScriptDotNet 2019 | Sherry List - Azure Cognitive Services with Native Script
DotNet 2019 | Sherry List - Azure Cognitive Services with Native Script
 
DotNet 2019 | Quique Fernández - Potenciando VUE con TypeScript, Inversify, V...
DotNet 2019 | Quique Fernández - Potenciando VUE con TypeScript, Inversify, V...DotNet 2019 | Quique Fernández - Potenciando VUE con TypeScript, Inversify, V...
DotNet 2019 | Quique Fernández - Potenciando VUE con TypeScript, Inversify, V...
 
DotNet 2019 | Daniela Solís y Manuel Rodrigo Cabello - IoT, una Raspberry Pi ...
DotNet 2019 | Daniela Solís y Manuel Rodrigo Cabello - IoT, una Raspberry Pi ...DotNet 2019 | Daniela Solís y Manuel Rodrigo Cabello - IoT, una Raspberry Pi ...
DotNet 2019 | Daniela Solís y Manuel Rodrigo Cabello - IoT, una Raspberry Pi ...
 
El camino a las Cloud Native Apps - Introduction
El camino a las Cloud Native Apps - IntroductionEl camino a las Cloud Native Apps - Introduction
El camino a las Cloud Native Apps - Introduction
 
El camino a las Cloud Native Apps - Azure AI
El camino a las Cloud Native Apps - Azure AIEl camino a las Cloud Native Apps - Azure AI
El camino a las Cloud Native Apps - Azure AI
 

Recently uploaded

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 

Recently uploaded (20)

GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
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...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
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
 
Ransomware Mallox [EN].pdf
Ransomware         Mallox       [EN].pdfRansomware         Mallox       [EN].pdf
Ransomware Mallox [EN].pdf
 
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
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 
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...
 
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 ...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
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
 

HTML Tour - Buenas prácticas en el desarrollo web

Editor's Notes

  1. Los CSS también son importantes,- usaunanomenclaturadefinida- estructuratusficheros- manténlascosasorganizadas
  2. Put Scripts at the BottomThe problem caused by scripts is that they block parallel downloads. The HTTP/1.1 specificationsuggests that browsers download no more than two components in parallel per hostname. If you serve your images from multiple hostnames, you can get more than two downloads to occur in parallel. While a script is downloading, however, the browser won&apos;t start any other downloads, even on different hostnames.In some situations it&apos;s not easy to move scripts to the bottom. If, for example, the script usesdocument.write to insert part of the page&apos;s content, it can&apos;t be moved lower in the page. There might also be scoping issues. In many cases, there are ways to workaround these situations.An alternative suggestion that often comes up is to use deferred scripts. The DEFER attribute indicates that the script does not contain document.write, and is a clue to browsers that they can continue rendering. Unfortunately, Firefox doesn&apos;t support the DEFER attribute. In Internet Explorer, the script may be deferred, but not as much as desired. If a script can be deferred, it can also be moved to the bottom of the page. That will make your web pages load faster.
  3. Abreviaturas
  4. Keeping CSS selectors short helps with a lot of things:Increases selector efficiencyReduces location dependencyIncreases portabilityReduces chances of selector breakageDecreases specificityCan make code more forgiving
  5. Element, Pseudo Element: d = 1 Class, Pseudo class, Attribute: c = 1Id: b = 1 –&gt; (0,1,0,0)Inline Style: a = 1
  6. Element, Pseudo Element: d = 1 Class, Pseudo class, Attribute: c = 1Id: b = 1 –&gt; (0,1,0,0)Inline Style: a = 1
  7. Origin refers to the source of the declaration (author styles, user styles, browser defaults) and weight refers to the importance of the declaration. (author has more weight than user which has more weight than default. !importance has more weight than normal declarations)
  8. Herramienta de pre-procesado.LESS ElementsLESS HatClearlessTwitterBootstrap
  9. Herramienta de pre-procesado
  10. Most every design is going to have repeatable visual elements. It may be consistent background colors or border styles that elements share or it may be something else, but the patterns will be present.
  11. Essentially, this means “rarely use location-dependent styles”. An object should look the same no matter where you put it. So instead of styling a specific &lt;h2&gt; with .myObject h2 {...}, create and apply a class that describes the &lt;h2&gt; in question, like&lt;h2 class=&quot;category&quot;&gt;.This gives you the assurance that: (1) all unclassed &lt;h2&gt;s will look the same; (2) all elements with the category class (called a mixin) will look the same; and 3) you won’t need to create an override style for the case when you actually do want .myObject h2 to look like the normal &lt;h2&gt;