SlideShare a Scribd company logo
Modern front end development   Standards & best practices Tricode Professional Services www.tricode.nl 23-07-2009 Sander van Beek
The front end Most visible part of your application; make sure it radiates quality! You are not forced to obey the standards as much as in ‘back end’ programming
History Web mostly informative Design: Tables for layout Quirksmode Frames
Recent trends More interaction More users Higher bandwidth Mobile readers Mashups More variety in browsers (FF / mac more popular, google chrome, etc)
Considerations Performance Search engine optimization Privacy (P3P) Accessibility ( Web Content Accessibility Guidelines, Section 508, Waarmerk drempelvrij) Security (phishing, spam) Design patterns (http://developer.yahoo.com/ypatterns/index.php)
Separation As in application design, there is the need for separation: Structure Presentation Behavior
(X)HTML Structure
(X)HTML Current standards: HTML 4.01 / XHTML 1.1 In progress: HTML 5.0 Why XHTML? More strict syntax, so easier/faster parsing  Extensible (namespaces) W3C valid (validator.w3.org)
Semantics: know your tags! (1/2) Block level address, blockquote, div, dl, fieldset, form, h1, h2, h3, h4, h5, h6, hr, noframes, noscript, ol, p, pre, table, ul Generally speaking followed by a newline Inline* a, abbr, acronym, br, cite, code, dfn, kbd, q, samp, script, span, var  * left out all markup related tags (i, b, etc)
Semantics: know your tags! (2/2) So this is OK: <div><p><span class=”red”>My</span> text</p></div> But not: <span class=”blue”><h1>My header</h1></span>
Common pitfalls (1/3) Always use a doctype Strict  and  transitional  (clean vs marked up) Specify encoding Don’t use style tags/attributes <font>, <b>, <i>  color, border, margin Non existing tags or attributes <blink>  and  <marquee> ,  <body marginwidth=”0”>
Common pitfalls (2/3) No alt text for images Improper formatted HTML: Missing quotations:  <font color=#ffffff> Improper nesting:  <b><i>bla</b></i> Misuse of tags Div or span for headers, tables for layout Using text level tags to do block level stuff Non-unique id attribute
Common pitfalls (3/3) Improper tables / use of tables Missing closing tags  (</td>, </tr>  and  </table> ) Inconsistent number of cells Using  <td>  for header rows (use  <th> !) Surrounding table cells with formatting ( <b><tr>) Forms <form>  inside table, improper use of POST/GET (standards!) Inline scripts: Missing type, missing  <noscript>
XHTML specific pitfalls All tags must be lowercase  (<DIV>) Missing closing tags ( <br>, <hr>, <input ..> ) Unescaped ‘reserved’ characters  (&  vs  &amp; <  vs  &lt; ) Script  language  attribute is deprecated! Careful using XHTML closing tags in HTML documents
CSS Presentation
Basics: selectors
Basics: box model
Basics: positioning Static (default) Relative Relative to parent, remains in page Absolute  Taken out of the page Upper left corner of parent: x =0, y = 0 Fixed
CSS tips (1/4) http://jigsaw.w3.org/css-validator/ Design for re-use! Multiple classes per element are allowed Separate typographic, layout and color information
CSS tips (2/4) Consider using a reset.css or framework  Don’t use inline CSS or style blocks EM versus PX (relative vs fixed) Use web safe / web smart colors Decorative images via CSS, informative images in HTML Keep pages usable with keyboard ( outline: 0)
CSS tips (3/4) Compress CSS (minify/csstidy) Sprites Use generic fonts font-family: Arial, Verdana, Helvetica, sans-serif;   .PNG versus .GIF Correct order of pseudo classes :link { color: blue; } a:visited { color: purple; }  a:hover { color: purple; }  a:active { color: red; }
CSS tips (4/4) Include a demo of your css in the project
JavaScript Behavior
JavaScript Use a framework (jQuery, YUI, prototype, mootools, etc) Javascript should be unobtrusive Bind to elements instead of inline code Use a framework to do this Progressive enhancement Page should be useable without a mouse Use the onclick event for nothing more then links! Don’t alter styling directly from JS Compress (minify)
Further reading W3C consortium  http://www.w3.org A list apart  http://www.alistapart.com/ Naar voren  http://www.naarvoren.nl   Eric Meyers blog  http://meyerweb.com Quirksmode  http://www.quirksmode.org/   CSS Zen garden  http://www.csszengarden.com/   De webrichtlijnen  http://www.webrichtlijnen.nl/   Stichting drempelvrij  http://www.drempelvrij.nl/

More Related Content

Similar to Modern front end development (20)

PPT
XHTML/CSS Presentation
joshpuckett
 
PDF
Basics of Rich Internet Applications
Subramanyan Murali
 
PPT
Css Best Practices
sachin9737
 
PPT
Css Best Practices
guest3ebcca
 
PDF
Is everything we used to do wrong?
Russ Weakley
 
PPTX
Xhtml Css Presentation
joshpuckett
 
ODP
Worry free web development
Estelle Weyl
 
PDF
Standardizing the Web: A Look into the Why of Web Standards
Tim Wright
 
PPT
Successful Teams follow Standards
Christian Heilmann
 
PPT
Making Your Own CSS Framework
Dan Sagisser
 
PPTX
Html presentation
Jordan Dichev
 
PPTX
Web Service Creation in HTML5
Tero A. Laiho
 
PPTX
Css, xhtml, javascript
Trần Khải Hoàng
 
PDF
The road to professional web development
Christian Heilmann
 
ODP
Creating Web Sites with HTML and CSS
BG Java EE Course
 
PDF
The Future of CSS
elliando dias
 
ODP
Cascading Style Sheets - Part 02
Hatem Mahmoud
 
PPT
Accessibility Usability Professional Summry
Sur College of Applied Sciences
 
ODP
HTML5, CSS, JavaScript Style guide and coding conventions
Knoldus Inc.
 
PPTX
Web technologies: Lesson 2
nhepner
 
XHTML/CSS Presentation
joshpuckett
 
Basics of Rich Internet Applications
Subramanyan Murali
 
Css Best Practices
sachin9737
 
Css Best Practices
guest3ebcca
 
Is everything we used to do wrong?
Russ Weakley
 
Xhtml Css Presentation
joshpuckett
 
Worry free web development
Estelle Weyl
 
Standardizing the Web: A Look into the Why of Web Standards
Tim Wright
 
Successful Teams follow Standards
Christian Heilmann
 
Making Your Own CSS Framework
Dan Sagisser
 
Html presentation
Jordan Dichev
 
Web Service Creation in HTML5
Tero A. Laiho
 
Css, xhtml, javascript
Trần Khải Hoàng
 
The road to professional web development
Christian Heilmann
 
Creating Web Sites with HTML and CSS
BG Java EE Course
 
The Future of CSS
elliando dias
 
Cascading Style Sheets - Part 02
Hatem Mahmoud
 
Accessibility Usability Professional Summry
Sur College of Applied Sciences
 
HTML5, CSS, JavaScript Style guide and coding conventions
Knoldus Inc.
 
Web technologies: Lesson 2
nhepner
 

More from Tricode (part of Dept) (20)

PDF
The Top Benefits of Magnolia CMS’s Inspirational Open Suite Ideology
Tricode (part of Dept)
 
PPTX
Agile QA 2017: A New Hope
Tricode (part of Dept)
 
PDF
Mobile Sensor Networks based on Smartphone devices and Web Services
Tricode (part of Dept)
 
PPTX
Keeping Your Clients Happy and Your Management Even Happier
Tricode (part of Dept)
 
PDF
Intro to JHipster
Tricode (part of Dept)
 
PDF
Porn, the leading influencer of Technology
Tricode (part of Dept)
 
PDF
De 4 belangrijkste risicofactoren van het nearshoring proces
Tricode (part of Dept)
 
PDF
Internet Addiction (Social Media Edition)
Tricode (part of Dept)
 
PPTX
Kids Can Code - an interactive IT workshop
Tricode (part of Dept)
 
PPTX
RESTful API - Best Practices
Tricode (part of Dept)
 
PDF
Deep Learning - STM 6
Tricode (part of Dept)
 
PDF
How Technology is Affecting Society - STM 6
Tricode (part of Dept)
 
ODP
Monolithic to Microservices Architecture - STM 6
Tricode (part of Dept)
 
PDF
Customers speak on Magnolia CMS
Tricode (part of Dept)
 
PDF
Quality Nearshoring met Tricode
Tricode (part of Dept)
 
PDF
AEM Digital Assets Management - What's new in 6.2?
Tricode (part of Dept)
 
PDF
10 nearshoring it trends om in 2016 te volgen
Tricode (part of Dept)
 
PDF
Tricode & Magnolia
Tricode (part of Dept)
 
PDF
Why you should use Adobe Experience Manager Mobile
Tricode (part of Dept)
 
PDF
Introducing: Tricode's Software Factory
Tricode (part of Dept)
 
The Top Benefits of Magnolia CMS’s Inspirational Open Suite Ideology
Tricode (part of Dept)
 
Agile QA 2017: A New Hope
Tricode (part of Dept)
 
Mobile Sensor Networks based on Smartphone devices and Web Services
Tricode (part of Dept)
 
Keeping Your Clients Happy and Your Management Even Happier
Tricode (part of Dept)
 
Intro to JHipster
Tricode (part of Dept)
 
Porn, the leading influencer of Technology
Tricode (part of Dept)
 
De 4 belangrijkste risicofactoren van het nearshoring proces
Tricode (part of Dept)
 
Internet Addiction (Social Media Edition)
Tricode (part of Dept)
 
Kids Can Code - an interactive IT workshop
Tricode (part of Dept)
 
RESTful API - Best Practices
Tricode (part of Dept)
 
Deep Learning - STM 6
Tricode (part of Dept)
 
How Technology is Affecting Society - STM 6
Tricode (part of Dept)
 
Monolithic to Microservices Architecture - STM 6
Tricode (part of Dept)
 
Customers speak on Magnolia CMS
Tricode (part of Dept)
 
Quality Nearshoring met Tricode
Tricode (part of Dept)
 
AEM Digital Assets Management - What's new in 6.2?
Tricode (part of Dept)
 
10 nearshoring it trends om in 2016 te volgen
Tricode (part of Dept)
 
Tricode & Magnolia
Tricode (part of Dept)
 
Why you should use Adobe Experience Manager Mobile
Tricode (part of Dept)
 
Introducing: Tricode's Software Factory
Tricode (part of Dept)
 
Ad

Recently uploaded (20)

PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
The Future of Artificial Intelligence (AI)
Mukul
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
Ad

Modern front end development

  • 1. Modern front end development Standards & best practices Tricode Professional Services www.tricode.nl 23-07-2009 Sander van Beek
  • 2. The front end Most visible part of your application; make sure it radiates quality! You are not forced to obey the standards as much as in ‘back end’ programming
  • 3. History Web mostly informative Design: Tables for layout Quirksmode Frames
  • 4. Recent trends More interaction More users Higher bandwidth Mobile readers Mashups More variety in browsers (FF / mac more popular, google chrome, etc)
  • 5. Considerations Performance Search engine optimization Privacy (P3P) Accessibility ( Web Content Accessibility Guidelines, Section 508, Waarmerk drempelvrij) Security (phishing, spam) Design patterns (http://developer.yahoo.com/ypatterns/index.php)
  • 6. Separation As in application design, there is the need for separation: Structure Presentation Behavior
  • 8. (X)HTML Current standards: HTML 4.01 / XHTML 1.1 In progress: HTML 5.0 Why XHTML? More strict syntax, so easier/faster parsing Extensible (namespaces) W3C valid (validator.w3.org)
  • 9. Semantics: know your tags! (1/2) Block level address, blockquote, div, dl, fieldset, form, h1, h2, h3, h4, h5, h6, hr, noframes, noscript, ol, p, pre, table, ul Generally speaking followed by a newline Inline* a, abbr, acronym, br, cite, code, dfn, kbd, q, samp, script, span, var * left out all markup related tags (i, b, etc)
  • 10. Semantics: know your tags! (2/2) So this is OK: <div><p><span class=”red”>My</span> text</p></div> But not: <span class=”blue”><h1>My header</h1></span>
  • 11. Common pitfalls (1/3) Always use a doctype Strict and transitional (clean vs marked up) Specify encoding Don’t use style tags/attributes <font>, <b>, <i> color, border, margin Non existing tags or attributes <blink> and <marquee> , <body marginwidth=”0”>
  • 12. Common pitfalls (2/3) No alt text for images Improper formatted HTML: Missing quotations: <font color=#ffffff> Improper nesting: <b><i>bla</b></i> Misuse of tags Div or span for headers, tables for layout Using text level tags to do block level stuff Non-unique id attribute
  • 13. Common pitfalls (3/3) Improper tables / use of tables Missing closing tags (</td>, </tr> and </table> ) Inconsistent number of cells Using <td> for header rows (use <th> !) Surrounding table cells with formatting ( <b><tr>) Forms <form> inside table, improper use of POST/GET (standards!) Inline scripts: Missing type, missing <noscript>
  • 14. XHTML specific pitfalls All tags must be lowercase (<DIV>) Missing closing tags ( <br>, <hr>, <input ..> ) Unescaped ‘reserved’ characters (& vs &amp; < vs &lt; ) Script language attribute is deprecated! Careful using XHTML closing tags in HTML documents
  • 18. Basics: positioning Static (default) Relative Relative to parent, remains in page Absolute Taken out of the page Upper left corner of parent: x =0, y = 0 Fixed
  • 19. CSS tips (1/4) http://jigsaw.w3.org/css-validator/ Design for re-use! Multiple classes per element are allowed Separate typographic, layout and color information
  • 20. CSS tips (2/4) Consider using a reset.css or framework Don’t use inline CSS or style blocks EM versus PX (relative vs fixed) Use web safe / web smart colors Decorative images via CSS, informative images in HTML Keep pages usable with keyboard ( outline: 0)
  • 21. CSS tips (3/4) Compress CSS (minify/csstidy) Sprites Use generic fonts font-family: Arial, Verdana, Helvetica, sans-serif; .PNG versus .GIF Correct order of pseudo classes :link { color: blue; } a:visited { color: purple; } a:hover { color: purple; } a:active { color: red; }
  • 22. CSS tips (4/4) Include a demo of your css in the project
  • 24. JavaScript Use a framework (jQuery, YUI, prototype, mootools, etc) Javascript should be unobtrusive Bind to elements instead of inline code Use a framework to do this Progressive enhancement Page should be useable without a mouse Use the onclick event for nothing more then links! Don’t alter styling directly from JS Compress (minify)
  • 25. Further reading W3C consortium http://www.w3.org A list apart http://www.alistapart.com/ Naar voren http://www.naarvoren.nl Eric Meyers blog http://meyerweb.com Quirksmode http://www.quirksmode.org/ CSS Zen garden http://www.csszengarden.com/ De webrichtlijnen http://www.webrichtlijnen.nl/ Stichting drempelvrij http://www.drempelvrij.nl/