SlideShare a Scribd company logo
1 of 86
wikipedia.org/wiki/History_of_the_World_Wide_Web
Tim Berners-Lee invented the
World Wide Web while
working at CERN in 1989,
applying the concept of
hyperlinking that had by then
existed for some decades.
wikipedia.org/History_of_the_World_Wide_Web
Tim Berners-Lee invented the
World Wide Web while
working at CERN in 1989,
applying the concept of
hyperlinking that had by then
existed for some decades.
Here's something weird
gday
gday
This is weird, right?
Why?
The whole web is like this
More code was written in
the last ten years, than was
written this year.
…and you're gonna have to
maintain it.
Let's focus
Layouts
Responsive Grids
Flexbox killed grids
Better primitives
iPhone had cool apps
Web Devs were jealous
Dynamic Web Apps
Decoration
But what about AJAX?
Model-View-Controller
Model View
Controller
Model View
Collection
Model View
Server
Sync Data
Data Updates
Browser
Render HTML
Trigger events
Complicated
Reactive Components
Third-party Code
I love not writing code
Bundling
Not Bundling
Is there a lesson here?
There's a lot of old code
out there
The web is pretty resilient
New primitives help you
express ideas better
Learn old stuff too
Ben Taylor
@taybenlor
A world-class science education
for every student
stileeducation.com
One More Thing
Questions?
Modern History of Front-End Best Practices

More Related Content

Similar to Modern History of Front-End Best Practices

[판교에서 만나는 아마존웹서비스] Obama for America를 통해서 본 AWS에서의 데이터 분석
[판교에서 만나는 아마존웹서비스] Obama for America를 통해서 본 AWS에서의 데이터 분석 [판교에서 만나는 아마존웹서비스] Obama for America를 통해서 본 AWS에서의 데이터 분석
[판교에서 만나는 아마존웹서비스] Obama for America를 통해서 본 AWS에서의 데이터 분석 Amazon Web Services Korea
 
WST I (Lesson 1)-2.pdf
WST I (Lesson 1)-2.pdfWST I (Lesson 1)-2.pdf
WST I (Lesson 1)-2.pdfSodiuThorium
 
"Python web development combines the simplicity of the language with powerful...
"Python web development combines the simplicity of the language with powerful..."Python web development combines the simplicity of the language with powerful...
"Python web development combines the simplicity of the language with powerful...softwaretrainer2elys
 
Tipping the scale - Eyal Eizenberg - Wix
Tipping the scale - Eyal Eizenberg - WixTipping the scale - Eyal Eizenberg - Wix
Tipping the scale - Eyal Eizenberg - WixEyal Eizenberg
 
The knowledge management
The knowledge managementThe knowledge management
The knowledge managementperuperski
 
XXIX Charleston Semantic Web Leicht
XXIX Charleston   Semantic Web LeichtXXIX Charleston   Semantic Web Leicht
XXIX Charleston Semantic Web LeichtDarrell W. Gunter
 
The Factors For The Website
The Factors For The WebsiteThe Factors For The Website
The Factors For The WebsiteJulie May
 
Science and Web2.0
Science and Web2.0Science and Web2.0
Science and Web2.0Ian Mulvany
 
/dev/fort: you can build it in a week @emw
/dev/fort: you can build it in a week @emw/dev/fort: you can build it in a week @emw
/dev/fort: you can build it in a week @emwJames Aylett
 
Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017
Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017
Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017Amazon Web Services
 
Making Websites Talk: the rise of Voice Search and Conversational Interfaces
Making Websites Talk: the rise of Voice Search and Conversational InterfacesMaking Websites Talk: the rise of Voice Search and Conversational Interfaces
Making Websites Talk: the rise of Voice Search and Conversational InterfacesAndrea Volpini
 
HAX - Chaotic Good
HAX - Chaotic GoodHAX - Chaotic Good
HAX - Chaotic Goodbtopro
 
Web 2.0 for IA's
Web 2.0 for IA'sWeb 2.0 for IA's
Web 2.0 for IA'sDave Malouf
 
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015Raimonds Simanovskis
 
Orchard Harvest Keynote 2015 - the CMS of the future
Orchard Harvest Keynote 2015 - the CMS of the futureOrchard Harvest Keynote 2015 - the CMS of the future
Orchard Harvest Keynote 2015 - the CMS of the futureBertrand Le Roy
 
1. Let's study web-development
1. Let's study web-development1. Let's study web-development
1. Let's study web-developmentJungwon Seo
 
Real World Azure - Dev
Real World Azure - DevReal World Azure - Dev
Real World Azure - DevClint Edmonson
 

Similar to Modern History of Front-End Best Practices (20)

[판교에서 만나는 아마존웹서비스] Obama for America를 통해서 본 AWS에서의 데이터 분석
[판교에서 만나는 아마존웹서비스] Obama for America를 통해서 본 AWS에서의 데이터 분석 [판교에서 만나는 아마존웹서비스] Obama for America를 통해서 본 AWS에서의 데이터 분석
[판교에서 만나는 아마존웹서비스] Obama for America를 통해서 본 AWS에서의 데이터 분석
 
WST I (Lesson 1)-2.pdf
WST I (Lesson 1)-2.pdfWST I (Lesson 1)-2.pdf
WST I (Lesson 1)-2.pdf
 
"Python web development combines the simplicity of the language with powerful...
"Python web development combines the simplicity of the language with powerful..."Python web development combines the simplicity of the language with powerful...
"Python web development combines the simplicity of the language with powerful...
 
HTML for beginners
HTML for beginnersHTML for beginners
HTML for beginners
 
GDSC IIITM - Discover Your Domain
GDSC IIITM  - Discover Your DomainGDSC IIITM  - Discover Your Domain
GDSC IIITM - Discover Your Domain
 
YUI The Elephant In The Room
YUI The Elephant In The RoomYUI The Elephant In The Room
YUI The Elephant In The Room
 
Tipping the scale - Eyal Eizenberg - Wix
Tipping the scale - Eyal Eizenberg - WixTipping the scale - Eyal Eizenberg - Wix
Tipping the scale - Eyal Eizenberg - Wix
 
The knowledge management
The knowledge managementThe knowledge management
The knowledge management
 
XXIX Charleston Semantic Web Leicht
XXIX Charleston   Semantic Web LeichtXXIX Charleston   Semantic Web Leicht
XXIX Charleston Semantic Web Leicht
 
The Factors For The Website
The Factors For The WebsiteThe Factors For The Website
The Factors For The Website
 
Science and Web2.0
Science and Web2.0Science and Web2.0
Science and Web2.0
 
/dev/fort: you can build it in a week @emw
/dev/fort: you can build it in a week @emw/dev/fort: you can build it in a week @emw
/dev/fort: you can build it in a week @emw
 
Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017
Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017
Move Your .NET Apps to AWS Without Betting the House - WIN303 - re:Invent 2017
 
Making Websites Talk: the rise of Voice Search and Conversational Interfaces
Making Websites Talk: the rise of Voice Search and Conversational InterfacesMaking Websites Talk: the rise of Voice Search and Conversational Interfaces
Making Websites Talk: the rise of Voice Search and Conversational Interfaces
 
HAX - Chaotic Good
HAX - Chaotic GoodHAX - Chaotic Good
HAX - Chaotic Good
 
Web 2.0 for IA's
Web 2.0 for IA'sWeb 2.0 for IA's
Web 2.0 for IA's
 
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
Analyze and Visualize Git Log for Fun and Profit - DevTernity 2015
 
Orchard Harvest Keynote 2015 - the CMS of the future
Orchard Harvest Keynote 2015 - the CMS of the futureOrchard Harvest Keynote 2015 - the CMS of the future
Orchard Harvest Keynote 2015 - the CMS of the future
 
1. Let's study web-development
1. Let's study web-development1. Let's study web-development
1. Let's study web-development
 
Real World Azure - Dev
Real World Azure - DevReal World Azure - Dev
Real World Azure - Dev
 

Recently uploaded

The Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docxThe Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docxMogul Press
 
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdfMicrosoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdfSkillCertProExams
 
2024-05-15-Surat Meetup-Hyperautomation.pptx
2024-05-15-Surat Meetup-Hyperautomation.pptx2024-05-15-Surat Meetup-Hyperautomation.pptx
2024-05-15-Surat Meetup-Hyperautomation.pptxnitishjain2015
 
ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024SkillCertProExams
 
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdfACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdfKinben Innovation Private Limited
 
Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.bazilnaeem7
 
DAY 0 8 A Revelation 05-19-2024 PPT.pptx
DAY 0 8 A Revelation 05-19-2024 PPT.pptxDAY 0 8 A Revelation 05-19-2024 PPT.pptx
DAY 0 8 A Revelation 05-19-2024 PPT.pptxFamilyWorshipCenterD
 
Databricks Machine Learning Associate Exam Dumps 2024.pdf
Databricks Machine Learning Associate Exam Dumps 2024.pdfDatabricks Machine Learning Associate Exam Dumps 2024.pdf
Databricks Machine Learning Associate Exam Dumps 2024.pdfSkillCertProExams
 
Understanding Poverty: A Community Questionnaire
Understanding Poverty: A Community QuestionnaireUnderstanding Poverty: A Community Questionnaire
Understanding Poverty: A Community Questionnairebazilnaeem7
 
Breathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptxBreathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptxFamilyWorshipCenterD
 

Recently uploaded (10)

The Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docxThe Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
The Influence and Evolution of Mogul Press in Contemporary Public Relations.docx
 
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdfMicrosoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
Microsoft Fabric Analytics Engineer (DP-600) Exam Dumps 2024.pdf
 
2024-05-15-Surat Meetup-Hyperautomation.pptx
2024-05-15-Surat Meetup-Hyperautomation.pptx2024-05-15-Surat Meetup-Hyperautomation.pptx
2024-05-15-Surat Meetup-Hyperautomation.pptx
 
ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024ServiceNow CIS-Discovery Exam Dumps 2024
ServiceNow CIS-Discovery Exam Dumps 2024
 
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdfACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
ACM CHT Best Inspection Practices Kinben Innovation MIC Slideshare.pdf
 
Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.Deciding The Topic of our Magazine.pptx.
Deciding The Topic of our Magazine.pptx.
 
DAY 0 8 A Revelation 05-19-2024 PPT.pptx
DAY 0 8 A Revelation 05-19-2024 PPT.pptxDAY 0 8 A Revelation 05-19-2024 PPT.pptx
DAY 0 8 A Revelation 05-19-2024 PPT.pptx
 
Databricks Machine Learning Associate Exam Dumps 2024.pdf
Databricks Machine Learning Associate Exam Dumps 2024.pdfDatabricks Machine Learning Associate Exam Dumps 2024.pdf
Databricks Machine Learning Associate Exam Dumps 2024.pdf
 
Understanding Poverty: A Community Questionnaire
Understanding Poverty: A Community QuestionnaireUnderstanding Poverty: A Community Questionnaire
Understanding Poverty: A Community Questionnaire
 
Breathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptxBreathing in New Life_ Part 3 05 22 2024.pptx
Breathing in New Life_ Part 3 05 22 2024.pptx
 

Modern History of Front-End Best Practices

Editor's Notes

  1. Alright so, the web is old now.
  2. Here's a quote from the wikipedia article for the History of the World Wide Web.
  3. That's the same year Taylor Swift was born. That's as old as me. The web is a millenial and it's being roasted on Tik Tok.
  4. Okay so not actually. He came up with the idea in 1989, then published his proposal in 1990 and it wasn't really popularised until Mosaic in 1993.
  5. When you give an id an element, the id becomes a global variable.
  6. So you can just write "hello" as a variable name and get the element. No getElemementById or querySelector anything tricky. Just a good honest variable. Here I'm setting the text of the element to be "gday".
  7. When I do that, the element is updated to have the text gday
  8. Here it is together. We give the element an id, set the text inside it to be "gday", and even though the text was originally Hello, it's now gday.
  9. It's strange that every single element with an id has its own global variable. What happens if that clashes with your own names and scopes? Why does getElementById exist if I can just do this? Why does my HTML leak out into my JavaScript namespaces?
  10. Well someone at Microsoft in like 1990-whatever thought this would be convenient. So they added it to Internet Explorer. Back then scripts were short and tightly coupled with their HTML. You gave the element an id, so why not access it with that ID? It made sense.
  11. And once Internet Explorer implemented it, all the other browsers had to add it. Then it got used a lot and now it's a web standard. Even though the web standard says that you shouldn't use it.
  12. The whole web is like this. It's this chaos of layers and history and people doing their best. Best practices of the past impacting how we work today. The web is made of weird stuff that really only made sense in its original historic context.
  13. There's more legacy code out there than fresh beautiful modern best practices. One of the web's big strengths is that it's fully backwards compatible. But that also means that nothing ever really goes away. So you're gonna have to learn it and understand it.
  14. I could do a whole talk on "Weird stuff from internet explorer", but let's not.
  15. In 2007 Apple released the iPhone and it totally changed the way people use the web. When the iPhone was released you couldn't make apps, but you could use Safari. The developer docs even included a guide for how to make web apps for iPhone. This seems like a good place to start.
  16. In this time we saw the rise of SAAS and Web Applications. A lot of web apps, and a lot of web standards were built in this time. The company I work for (Stile Education) started around 2012, and there's code in our codebase from that era. I'm sure many of you can relate.
  17. The iPhone came along at an interesting time in Web Development. Apple refused to support flash, which was the main way to make app-like web applications. Web applications were becoming possible with "just" HTML, CSS and JavaScript. You didn't need to embed Java, or Flash anymore.
  18. With mobile devices, came small screens. This was a problem for websites.
  19. Let's talk about best practices in building layouts over the years.
  20. The 960 grid system was introduced by Nathan Smith in around 2008. When the web started most people had the same size screen. Then different screen sizes and resolutions became common. If you built for one size, the website would just sit in the top left on a bigger screen. It looked weird.
  21. The 960 grid just chose a width that was small enough it would work on most computers. Your content was 960px wide, centered, everything else was blank space. This was an innovation!
  22. The grid was divided up in 12 columns. Because 12 is divisible by 2, 3, 4 and 6 it made it easy to make complex layouts.
  23. With mobile devices, came small screens. The original iPhone had a resolution of 320x480. At the time most computers had a resolution of at least 1024x768. This was a problem for websites built with 960. They would display small like this, zoomed out. It was really hard to click buttons, or read text. You'd have to build a whole separate website for mobile.
  24. It was time for our grids to become responsive.
  25. Mark Otto and Jacob Thornton, a couple of keen web developers at Twitter (RIP) realised that they kept building the same stuff. So they came up with the idea for Bootstrap. It was a layout system and a set of components that could help you build a website fast. In the process they kind of invented design systems. It was incredibly popular, and still is to this day.
  26. In V1 they just used the 960 grid approach, but in V2 they added a Responsive Grid. And this was a cool idea.
  27. This was made possible by media queries. They used a media query for each size, and changed the size of the grid at certain breakpoints. This became a common best practice from then onwards.
  28. Here we have two columns with a gap of four width between them. It would be the same layout on different devices, but it would resize the columns on mobile.
  29. By version three in 2014 this grid system was becoming more and more capable. You could adjust how many columns an element took up, depending on what device was loading the page.
  30. Here you can see we have the `xs` and `md` options to decide how many columns to use on small and large screens. But this sort of approach can be hard to manage, you need to do a lot of fiddly work with grids at every size.
  31. Now that we have Flexbox the elements and classes needed to create this kind of grid all seem a bit much. People don't really use grids like this, or at least I don't. I wonder why?
  32. Maybe with better primitives for layout, we don't need something like column layouts. Those grids might still exist at the design stage, but when you build it out you don't need it anymore.
  33. With the popularity of the iPhone we got the rise of cool apps.
  34. … like this app that makes your iphone into a beer. Yum yum. You don't see innovation like this anymore!
  35. We wanted to make cool apps with animation and dynamic behaviour!
  36. A really popular best practice for making web apps is Decoration which is a pattern made popular by…..
  37. jQuery was released by John Resig in late 2006 and soon became incredibly popular.
  38. jQuery is on like 80% of websites, that's wild. You can see up here that red line is jQuery. Compare that to the react brown line down the very bottom right. How many people in here have jQuery in their codebase?
  39. Let's just quickly look over how this works. So let's say we've served some HTML. We want some of it to be displayed when you click the "Show More" button. See here this paragraph is hidden.
  40. You have JavaScript that goes through and finds each selector and adds your JS on top. The $ sign is the jQuery library. Yes, $ is a valid variable name in JavaScript and John Resig stole it. Here I've found all buttons that have the btn-reveal class, then decorated them. This approach is really powerful. It's performant. It's like the new SSR islands architecture but from 2008.
  41. This approach is still widely used, and makes a lot of sense. Rendering your HTML server-side, and then sprinkling in just a little bit of JavaScript can be a really performant way to build web apps. If you're interested in trying this out, Hotwire and HTMX are two interesting JavaScript frameworks that take this approach.
  42. This was the best part about jQuery. It was really easy to grab something from the server, and then update the page.
  43. Let's say we had a form like this, it's got a name and a message and a post button. We want to live update the page, not wait for a whole reload so we use jQuery.
  44. jQuery posts the data to the server, and the server responds with some HTML and we put that in the page.
  45. The big problem here is tight coupling between the front and backend. Server has to render fragments. What if we want to change something elsewhere in the page hierarchy? It gets unwieldy quickly.
  46. So around this time Ruby on Rails was incredibly popular. And with this an architecture called "Model View Controller" was also really popular.
  47. The model is responsible for data storage and syncing. The controller is responsible for orchestration and updates between the model and view. The view is responsible for displaying the data from the model.
  48. AngularJS was launched by Google in 2010, just a few months later Backbone was released by Jeremy Ashkenas. These frameworks both used this MVC pattern, but I'm a bit more familiar with Backbone.
  49. In Backbone the MVC is arranged slightly differently. You have a "Collection" which represents a group of models. Like posts, or articles. Then you instantiate each view for that collection, with the appropriate model passed in.
  50. This all became very complicated very quickly. Especially making sure that data was in sync across the whole app. Events flying everywhere. Selecting the DOM to make small targeted updates.
  51. Sometimes it can feel like these labels and groupings were a bit arbitrary. It lead to everything having to fit in the bucket of "view" or "model".
  52. And now we've kind of all settled on using reactive components instead. We still have separate different architectural parts, but we invent specific tools for solving these individual problems. We're finding better primitives for expressing what we want to build. Rather than grouping them all together as "controller" or "model".
  53. To make all these dynamic web apps we'll need to include code that someone else has written. I can't build all this stuff myself!
  54. I also love deleting code.
  55. That's a lot of files! Can we speed up loading these somehow?
  56. But, these loads would block eachother, because of HTTP 1.0. In HTTP 1.0 the browser can only make three requests at once.
  57. In 2009 Ryan Dahl released NodeJS. Then in 2010 Isaac Z. Schlueter released NPM. Npm had some really good features, and was well loved because there were so many packages there! And people on the frontend wanted it too. So in 2014 a bunch of people built Webpack.
  58. So you use the same require syntax that node uses. Webpack will read this file, recognise those dependencies, and then figure out what to do.
  59. Unfortunately these bundles got bigger and bigger
  60. With HTTP2 and HTTP3 we no longer have these requests limits. The browser can make hundreds of requests at once.
  61. So why not use web standards? Browsers now support ESModules for imports natively.
  62. What do you think happens in this example? In Chrome and Safari you'll get a `HTMLCollection` if you try `window.hello`. Which is what the spec says. Even though id is meant to be unique on the page. But in Firefox you'll get the first element. Isn't that the most web thing ever?
  63. In Chrome and Safari you'll get a `HTMLCollection` if you try `window.hello`. Which is what the spec says. Even though id is meant to be unique on the page. But in Firefox you'll get the first element. Isn't that the most web thing ever?