 We're going to get ultra-active pollution and we want that challenge to be paid so that we can read it. And that's why we're going to have to do it. We really want to do this. We need to understand that studies and research are vital. So when we're paid, we're not going to go back and forth like this, and they're finding the servers trying to descend as we go back and forth together, and if we power it, that's where it's mostly meant to get lost, but we've got games that we're not going to have to do now. And we're working the lives of the pair so that they know she's in some order. And they just need to be able to walk out and do whatever we're going to do. So I'm going to be going back, and she just needs to be on the floor now that you're asking me. Everybody there, I look at all of them and I think it's going to be on the floor. Now I'm going to go back and read that. You can read it right now. I'm going to read it on the floor. And I'm going to get the masses back in the way. And that's how it's all about it. It's not bad as well when you use that as a wall, but I mean, if you have a bathroom, if you have a booster, if you have a coffee, and you want to use the bathroom in the future, there's four more times of all about you. So it's not that bad. But if that already exists, there's no people that buy one for you. There's a future. It's like it's being in the South, you know, you need to do the whole warehouse with the machine to be able to use it and have it work. I know. You guys can watch that on your own time. I'll send a link. That's James. James is very funny. And that talk is full of a lot of good points. So today what we're going to do is we're going to talk about a paper that James wrote. James Mickens, famous computer scientist. Probably definitely the Pareto optimal computer systems researcher when you talk about smart and funny. Like, there may be smarter researchers and there may be funnier people, but there is no systems researcher who is both smarter and funnier than James. That's an all set. I think you guys know this. People here maybe are done. How many people are done? Okay. Everyone else is just brave. Let's kill some time in class. All right. So the hell I like that. I'm taking a break. I haven't slept for a while. You can do some sleeping now. That's cool. So 17% is where we were this morning. You guys have a long way to go to get to 70, 80, 95. It usually just goes upwards, hopefully. So yeah, please do the course evaluation. I'd appreciate that. Unless you're waiting to do it because you hate me right now and you think you might like me better in a few weeks, in which case it's fine to wait. Just don't wait until after the exam. All right. So we've talked about virtualization this week and I thought this paper would be a fun thing to look at to sort of bring us full circle because it's sort of interesting. I mean, we've been talking about operating systems and operating system concepts and yet in the decades since operating systems were designed and implemented and distributed, the world has changed quite a bit. So I would say today, millions of people create apps that run in a sandboxed environment and manipulate a rich windowing interface in order to communicate with users. But those aren't native apps. What are they? They don't run on top of the operating system. Where do they run? You guys probably use these apps on a regular basis. How do you launch them? Where do they run? They run in the browser. How many native apps do you guys actually use on a day-to-day basis? How many people would say like under five? Include the browser. For me, it's like browser iTunes, which is a total piece of crap. I hate that app. The browser cannot run worse. It is the weirdest, most broken piece of software. Try to think of what else. My terminal, I guess that counts. I'm at three. Sometimes a PDF viewer. That always makes me very sad when I have to do that. It's amazing that Google Docs' annotation features are better than PDF viewers. I find that to be shocking, but it is also true. So yeah, I might like maybe four, maybe two different PDF viewers because one of them is always broken in person. Anyone, like 10? Maybe an IDE? Maybe we're at six? Anything else? What? Slack. Use an app for Slack? Why? Doesn't it run in the browser? I'll just go to some website. Oh, that's... Oh, okay, that's just for notifications. Okay, that doesn't really count. Normally, you go to the web page and use Slack. It might have an app that pops up notifications at night, maybe. What else? I mean, this number is dropping, right? What's that? Limewire. Okay, yeah, great. Alert the FCC. What's that? Wow, I don't know what that is. Oh, okay, gotcha. It's even dodgier. Dodgier software than the dodgy version. Yeah, so like, this is interesting, right? And I don't... What are those technology transformations that I don't think anybody would have predicted 20, 30 years ago? That, you know, native apps are... Now, native apps are alive and well in one place, which is kind of interesting. Where is that? Okay, yeah, that's true. Games, right? So, games still... typically native apps, but there's one platform where native apps are still ruled. The phone. I don't know why that is. It's very interesting. I'm very curious to see what will happen. My prediction is that those apps are going to go away. So I'd love to point out the fact that my wife uses Facebook and Gmail on her phone, but she does not have those apps installed. She goes to the webpage in Chrome and that's how she accesses Facebook on her phone. The thing that's amazing is that works. And apparently it works well enough that it doesn't drive her crazy. Same thing with Gmail. Like, the Gmail mobile interface is terrible. It makes me cringe. It's really ugly. But she does things with it. Whatever. So yeah, it's some point. It'd be interesting to see what happens on mobile, but I suspect that things are going to go to the web. Meaning that the code that you guys are running, most of the code that you guys download and run today is in this language called JavaScript. How many days it took them to develop the first version of JavaScript? I shouldn't have said days. I'll give you guys a clue. How many days it took them to develop the first version of JavaScript? Ten. Sorry. You can't develop a whole language in a day. That's ridiculous. Ten language, ten days, or ten or eleven, or something like that. So Java, the sun spent years developing Java. Java development started years before JavaScript development, and yet JavaScript was released before Java. I find that to be shocking. I talked about unintended consequences. When Netscape decided to put JavaScript into the browser, I don't know if anyone at that point realized that that was going to change the entire face of computing, but it did. And so that's where we are today. If you want to run web, if you want to write web apps, you have to use this nasty language called JavaScript that somebody wrote in 11 days. Oracle? Java support? No. Yeah, and Oracle doesn't support JavaScript. JavaScript and Java have nothing to do with each other, first of all. Just understand that they're totally, completely separate, distinct, unrelated languages. They just happen to have similar names. It's very confusing. I know it confused me for a long time. JavaScript's not going anywhere. I think that someday we will have a replacement for JavaScript, but it will take a long time to merge. But just the fact that we got to this place is on some level, if you are sort of an ironic person, it's not going anywhere. Think about those people at Sun. We spent years developing Java. It was going to run everywhere. Right once, run everywhere. That was our mantra. And this guy in 11 days beat us to the punch. And now JavaScript is what you write once and run everywhere. It is incredibly funny. Someone's going to write a book about this one day. Maybe it'll be me. I just think it's a fascinating story. It's the origin of the web and the fact that HTML, CSS is actually a pretty nice representation for lots of different types of apps. You can see it in lots of different types of places in different contexts. It means to some degree the web browser has become in many ways akin to a modern operating system. So the web browser is almost its own virtual machine that when you go to a web page you download a piece of code and run it inside this virtual environment. It is not in no way similar to the virtual machines we've been talking about in this class. It does not attempt to present any sort of hardware interface. But this is sort of how things work today. You call it an interpreter, call it whatever. But the structure of the browser means that it's taken on a lot of the responsibilities traditionally associated with the operating system. So the browser has a lot of resources. Why does the browser have to do this? Why does the browser have to multiplex resources? When the browser has multiplexed resources what is it multiplexing them between? Yeah. Tabs or windows. In the OS you talk about apps that are competing for resources in the browser you have different tabs running different websites that are also competing for resources. So this is sort of the equivalent there. Now it becomes protecting unrelated sites content from each other. This is super important. Why? Yeah. So that's nice. You have not elayed my fears. Yeah. When you go to sketchywebsite.net and then you open up your bank in the other tab you hope that sketchywebsite.net is in getting leaked information from that other tab where you are entering a bank password. This is actually surprisingly hard to get right. And also when I start downloading various JavaScript resources and other things there's rules about the types of content that they can have access to and this is pretty important. People also do incredibly dumb stuff in their web browser. Did anyone fall for the whole Osama Bin Laden death video thing that went around on Facebook a few years ago? Did anyone remember that? Did anyone see that? Click on this link or cut and paste this huge link that's 30 lines long into your browser to see the hidden Osama Bin Laden death video. Do you know what that was? That's a bunch of JavaScript that ran in your Facebook context and spammed that message to all of your friends. And yet millions of people cut and pasted that into their web browser. Let's try this. Let's see what happens. I don't know, I've never seen a URL that long before. Normally there are like 10 characters and this one is 10,000 but who knows? Maybe it'll take me to that Osama Bin Laden death video that I really want to watch. I had a friend who used to work with Facebook and this sort of thing drove them nuts. Same thing here. So the browser provides an API and that API in a lot of ways provides again sort of abstract resources. Whether it's events, the DOM is this abstract data structure that represents the content on the page that JavaScript manipulates in order to create the interactive web experience. So this is interesting. To some degree the browsers have all these features that are very similar to the operating system and now a lot rather than having 10 different icons on your desktop that you click to open native apps that do various things you have 10 different browser bookmarks that you click to send mail and listen to music and collaborate with others on documents and whatever. Write code. That's clearly the next thing that's coming. There's already some tools out there like that. Anything that you are not doing in the browser right now is going to go in that direction. A lot of cases there are already ways to do it in the browser and they may not be beautiful yet but they're coming. But what's the big difference here between historically between the operating system and the browser that might create some problems? So the operating systems when people designed operating systems they had all of these things in mind. There were these well-defined goals we're going to protect applications from each other we're going to this was how operating systems were designed. This was part of the spec. They were already designed to do this whereas web browsers started life as applications and over time as we've been migrating more and more computing functions into them they've sort of had to take on these new responsibilities in this really ad hoc way. So for example if you think about how web browsers work the operating system does not allow an application to basically give it a huge chunk of code and say I would like to run this in the kernel with kernel privilege. That would be a terrible idea. Whereas the browser every time you go to a web page has to take this huge massive JavaScript and somehow run it which is a terrain-complete language and somehow run it safely inside that tab. So this is a much, much different challenge. So browsers are probably not necessarily going to make very good operating systems despite the fact that there's a huge amount of work in this area about how to make them better operating systems including the work that we're going to look at today. So so I would encourage you to watch some of James' videos. They're very funny. They're also educational so you can giggle along with him as he makes fun of JavaScript and then also be learning something along the way but I'm not going to try to sort of seal his thunder here and said what I thought I would do is show you some of the video where he presented this paper and I'll stop it at various points and we can kind of explain what's going on. All right. So here is James. I'll turn the sound up. Okay. All right. So let me let me back up a minute here. Unfortunately, I'm sorry it's so blurry. I don't, you know, again, this was only a few years ago but apparently the top conference and computer systems had not figured out how to videotape talks with a high degree of resolution. So I don't know, maybe it's supposed to look retro, right? Like we're supposed to think, wow, this is a great talk from 1986. It's really really cool. It's really cool. It's a great talk from 1986. It's really amazing that they were able to videotape it at that time. So what's the overall argument here, right? So what is the, we're talking about the API. We're talking about the interface between, you know, two pieces of software. What is the operating system API? You guys have been working with it this semester. I mean, what was the operating system API consistent? What's that? What is the operating system API that it provides to applications? That is how you get the operating system to do things on your behalf, like allocate more heap, like open files, whatever. And that API defines, to some degree, you can think about the security or the vulnerability of the operating system being a function of that interface. If that interface is well-designed and if that interface is small too, which is also kind of important, then the attack surface is fairly limited. So you can think about it this way. The kernel has to support all of these different functions that applications can call. And on Linux, maybe there's like a couple hundred or something like that. Every one of those has to be completely correct for the operating system to be secure and also for the operating system to be correct. Now if I have a bug in some, you know, rarely used system call, somebody will find it and someone will produce a binary that exploits it and uses it to do something bad. Or it could crash the system or whatever. So the interface and all of the lines of the code that are required to implement it are sort of measured to some degree the size of the problem that the operating system has to solve for it to be secure. All right? Now, to some degree in order to, you know, improve security, the operating systems have tried to keep this interface fairly limited because that makes it easier for them to, you know, there's just fewer lines of code to fix and make sure are correct. The web browser, on the other hand, what is the API that he's talking about when it, that it provides? What is the web browser API and who uses it? It could be some examples of things that must be part of the web browser API. Yeah. So the web browser gives me the ability to initiate network traffic. That is how every web page, reactive web page that you have been to works. So when you go to Gmail, it opens up some sort of network connection back to Gmail servers that is active for the life of your session. That's how messages sort of just appear in your Gmail interfaces. There is code running that has a network connection open to Gmail servers and it got a message that said you have a new piece of new mail. What else had to happen for that new message notification to show up? Yeah. Yeah, I mean rendering images and sort of adjusting the DOM, right? So essentially the DOM is this data structure that determines how the page is laid out and when a new message comes in I clearly need to add a new entry to the visual layout that you are looking at in order to alert you that that is that has happened. I have a new message that has some styling associated with it so I can tell it's new. I update a number over in the corner that counts the number of new messages etc. What else? Yeah, so to some degree Rob's answer is the interface is used by JavaScript that comes on the page. So because again, to some degree if there is no JavaScript all that I am doing is I am just interpreting a static piece of HTML content that the web server sent me. And that's fine. That works very well if you have static content and it doesn't need to do anything fancy. But the API that he is talking about that the browser provides is provided to JavaScript that runs. So when your JavaScript starts to run on the page there is this list of functions that it can call that will cause the browser to do various things. And that interface first of all is not really that well-designed in the first place certainly not designed to support the sort of rich web applications and is enormous. It's got all sorts of functionality in it and that makes it very difficult to get right. So let me let him keep talking about the ways in which people get it wrong. That's okay. Thank you. So does this make sense? Like this to some degree what he's trying to describe is the aggregate functionality that web browsers are forced to support. So again I've got to clearly have to support the HTTP protocol because that's how I actually get the web page in the first place. If I don't support that I'm in trouble. That's also frequently how JavaScript runs in the browser, accesses resources other places while the tab is open to do things like fetch new messages and upload things and blah blah blah. Obviously HTML and CSS that's how my pages are laid out that describes how they're supposed to look. So when he talks about core JavaScript he's talking about just the JavaScript that you could run in node.js. JavaScript has built-in support for things like regular expressions and just being able to interpret JavaScript generally. And then the browser provides all these extra features to the JavaScript that runs on the page because by the way that JavaScript also usually wants to manipulate the DOM. That's how you get the page to look different. When you look at a web page and it changes appearance it's because some piece of JavaScript had to manipulate the DOM and caused it to look different. That could be done in a gazillion different ways. Libraries like jQuery really started out as convenient ways to manipulate the document object model. Applets? Yeah. Has anyone been to a web page and had an applet on it recently like in the past couple weeks? Have you been to a website not for a course you're taking that had a Java applet on it? I've got two of the hands that go down. Why? He was forced to. When I go to a page with a Java applet it's like run away right away. That's one of the first things that will cause me to close the tab. I don't care what it is. I'm not going to click eight different checkboxes and then wait 10 minutes while the thing fires up and updates all the Java things in order to show me whatever crappy Java applet that's going to look super ugly you want to run in the middle of the page. Usually those pages haven't been updated to my IDs anyway so it's good Q to go away. We've got all these other plugins too that on some level the browser has to be prepared to support. So when you embed a PDF into a page or when the browser opens a PDF think about it like the browser has now become this like the web browser has now become this like general purpose file browser. Have you guys ever used it this way? You can actually open local PDFs in your web browser and a lot of times they look better than they do if you open them in Adobe Reader and that's sad but true. So to some degree like you can use your browser to open local files and sometimes it actually works out better than if you did it some other way. You have secure the secure web protocol for some reason I have to be able to open local files like I just said I don't know what that's for. You have this idea called web workers so tabs are supposed to be able to provide bits of JavaScript that run periodically in the background to do various things and so this is hard. This is a very, very big complex interface that browsers are forced to support in order to sort of satisfy the needs of their users and to some degree I think James would agree that there wasn't a lot of thought that was put into this. Okay, like Microsoft came out with something called Silverlight and then everyone has to support it somehow because the Olympics website used it once and that was annoying. So some of this is improving over time but slowly. I would argue that Canvas and video have made some of the gooey crap go away. The video tag is really nice it replaces a lot of old flash and things like that. Anyway so there are many things over time but this is really, really complicated. Sorry. Okay. Alright. Has anyone ever experienced this? Has anyone built websites and like you know, you build it hopefully you guys will all do this someday soon because again, like this is modern computing. So when you build a website it's fun. You got this great looking page put some work into it, looks awesome it's running really well and then there's a lot of it looks awesome it's running really well and then you're like I should check and see how it looks in Internet Explorer and then it's just sadness. It doesn't look right it's broken things don't work. What's that? Yeah so I had that experience the other day in here I don't know if you guys noticed this but like Firefox broke my slides. I don't know why and I don't really care that much but the website is only supported on Chrome I'm going to put a logo on it but yeah Matt yeah I hate you yeah go somewhere else yeah yeah yeah so like this is just really sad okay and this is still true okay so this was actually like way worse probably 10 years ago right does anyone ever remember quirks mode for IE like what that's like the most messed up thing when your application like imagine if your OS had the equivalent of quirks mode right it's like I'm going to put you in this weird mode where all the system calls work a little differently right because I'm trying to use that to work around some broken websites that people wrote for older versions of IE so I used to have a way like what how this worked was that I used to have a way where you could put this declaration on the page that would essentially cause it to render things differently for no reason other than the fact that maybe it made your web page look a little bit better so it was like does my app work no try turning on quirks mode and run it again maybe it'll work that time if it does then just leave quirks mode on because clearly that's what you need so yeah that was strange some of this again I would argue some of this is improving slowly and he'll mention why in a few minutes I mean there are now things like webkit right so for layout a lot of the browsers are using basically the same rendering engine IE still not so much but I think I think Chrome, Firefox maybe Safari you know use a common library for doing the for performing the process of taking HTML and CSS and converting it into this pixel math that you see when you go to the page right has anyone ever seen like layout differences that were caused by different browsers this is particularly yeah because I mean this is hard you know give the people that wrote these browsers some credit this is very difficult to get right and then if you want to do any sort of weird scripting or whatever I mean my favorite is I still go to these websites that are broken on every other browser but internet explorer and the best thing is they don't know that right so they just fail you know you're clicking on something that looks like it should be able to be clicked on and it doesn't work right and then you're like okay let me fire out my windows VM and see if this works on it it works on internet explorer right so so anyway so this is this is very very frustrating and it creates a lot of headaches for people that are trying to develop these interactive web pages even if you just want your web page to look the same on different browsers it's still not that easy much less behave in the same way that's that's even hard so let me teach you a little bit about it okay so I go out there I go talk to a professor and I say look man these web browsers they're terrible they're bulky now typically I tell this to a professor the professor can't laugh at the game and say James please calm down when I go to a web page I use an abstraction like gateware or something like that that's going to hide the underlying vagranies of the lab one and basically it can be foolish and hysterical to see people laugh at that so this is from what many people out there think too so you may be mainly aware that web browser may be a little bit more standard but essentially you can kind of tell the you keep kind of like a natural elderly model in your article and so most people think that you can browse and export a large of power within a thousand people so when I track a lot of the gateware in the state of the API and then I try to interpret to your web app alright does this make sense first of all that's clearly made up because if you've been to faculty web pages you know that most of them most of the faculty web pages do not use jQuery right or haven't been updated since 1995 one of the two right or both so I totally don't believe that I think if you talk to ten professors even in computer science nine of them will be like what is jQuery so but what's the premise here right how many people have used jQuery before okay great so what is jQuery supposed to do jQuery is supposed to help you with what there's this problem that we've identified which is different browsers work differently and jQuery comes to the rescue in what way yeah so jQuery is in theory jQuery is designed to paper over some of the differences between different web browsers so I've never looked at the jQuery source code but I'm assuming deep inside of it they do some browser detection somewhere when you load jQuery on the page and then depending on what browser you're running the j core jQuery features and functionality that you access work a little bit differently so for example if one browser dom traversals a little bit different than the other browsers dom traversal just do the right thing and you can just write your jQuery expressions and they will work the same way on different pages so this is the dream this is what's supposed to happen let's see what actually happens so jQuery converts the browser run on let's make it a very simple web data you get what is inside of this an HTML so the round goes we're going to take this HTML in a moment called a dom tree the dom tree is an HTML we're going to have a node for every tab in an HTML structure so when I click the button we're going to get this event now the standard HTML there's an official free page in that model so I go to that button and during the capture page the browser creates the map and then at the top of the HTML it's always done during the event so the browser in the capture page in the event it's engaged in a dom it's as heavy as a cat or a ham the answer is yes so that the browser can use that ham then it takes me to the end and the node is not defined in the actual ham and then the browser hands it down to the button ah, now we're at the target page this isn't an action during the event so the button has to find an event in the browser actually set and now on the final page it's a bubble page so we created that reverse pattern in the capture page then did a tag have to find a bubble hammer that executes it has to find a bubble hammer and now I know so here's the problem with that so this makes sense maybe if you guys haven't done Weborgan this is sort of new to you so it turns out this happens when you click on a web page all of it, maybe you never knew this so the idea is wherever you click on the page there's these two things that happen first of all there's this one type of event that propagates downwards from the root of the page so the page is represented in the document object model as a tree every little item on that page has a path to the root to some degree like a hierarchical file system and you can name it, that's what XPath is for so in the first phase, and I'm sorry these are slides I should have grabbed the deck in the capture phase the event propagates downward from the root to the node that generated the event so I clicked on something there has to be some element of the page that was targeted and this gets really complicated because I can have elements that overlap and I can set heights for them but there is some element that I clicked on capture phase I go down the element itself has a chance to process the event of the target phase and then it propagates back upwards and the idea is that in order to implement various types of interactive behavior various elements on this path can define handlers for these events so give me an example of what one of those handlers might do like what happens when you click on a web page nothing that probably has some file system dialog that is required a more typical thing you click on a web page in a particular spot and what happens nothing it's pretty boring it could open a new page now that might be handled directly by the browser but what's it like a javascript thing that happens what's that no that's what's going on behind the scenes why are you doing this really yeah it might open a drop down menu okay that's a reasonable answer what else I suspect you guys do this fairly often to do a variety of different things alerts come on you guys use the internet you click on web pages really you see those alert boxes those are very ugly by the way please don't use those on your web pages that's another clue that it's time to go away alerts are firing a menu opens or email gets sent the movie starts to play or you know the music starts to play or whatever or I locate like by the way you know Google Docs is just entirely a big blob of very very very complicated javascript like the cursor moves to a new location and lets me start typing this is how you interact with web pages every time you do this this is happening and the model is designed to support a lot of different types of behaviors so for example the document has a chance to observe every click inside of it if it wants to there's cases where that's useful you can probably imagine various types of web pages or web applications that you'd like to build where it would be nice if not only could I do something when a particular button is clicked but the page actually gets notifications every time you click anywhere that's during the bubble phase when it comes down from the top this is bad because the web pages are not bubbling properly into this window this is huge from that what has happened what has happened is because different browsers are moving down so these boundaries are vibrant full of light they're overflowing with light other than the boundaries they're normal but they still exist and then the boundaries are more alive but I also think we'll discuss the text box actually you're not needing a text box you're gonna take my mouse and quote that text box then Jeremy will pull the quote into it okay, you're gonna type my name into that text box then you're gonna take my mouse and do some work that generates the word but here's what I want I just want the word of it I hope I can have as much as I actually want it what's gonna happen I use it the way I get Chrome is gonna say and then I'm just gonna say you want a word? I'll give you a word okay well done why is it, once again these non-magnetization are not completely lost out let me give you a classic example of it all right, so make sense again, I mean you guys are aware of this what is the bullet event used for? you guys might have been to a website that was designed in the last 5, 10 years you used this to do what maybe well I could do that but remember the blur event is weird because it's fired when I've entered something into a box and then I leave it what might the page want to do at that point that would be awesome that would be like helpful let's say you're filling out like you're buying something online and you're entering some information into a form what can the form use the blur event to do yeah well then I'm going to that's going to happen when I tab and there's a way to order the fields in which the fields show up autocomplete or I could validate the input too you've probably been on it's very frustrating our expectations about web pages are changing it used to be that you put in all of your information and then you hit submit and then the page would sit there spinning for a few minutes and then you would get an error message being like you didn't fill out the state now what happens is or you misspelled your name or the credit card number is invalid and now what happens a lot of the time is as you're entering the information the form is actually doing validation in the page so by the time you actually get to the submit button we're pretty confident that that's a Visa card that you entered and it's a valid card number it has the right number of characters at least at least we know that those can be done by the blur events when I leave the box that's when my input is complete and that's when the right time to do valid I don't know if we're going to get much farther than just letting James outline the problem just skipping ahead here this is very very nice alright I'm just going to pause James I'll cut to the chase since I know we're almost out of time you guys can watch this online at your own leisure and maybe actually be able to see it so so essentially the solution that James proposes is pretty clever he says look so what happens right now is the page comes down and has to deal with all of these browser cross browser incompatibilities and it's extremely hard for browsers to provide this huge interface to support all the things that a page might want to do so what we do let's design a new browser interface so we first say this is an exo we haven't talked about kernel structure yet we probably won't this semester but the idea here is let's change the interface so how do we make the browser interface a little bit more like the operating system interface that we're familiar with what would a so if you're thinking about a minimal browser interface the most minimal browser interface possible what are some of the things that it has to do it is not the null set clearly has to do something but what are some of the things that the minimal browser interface would have to do what do I have to do to get null pages to work yeah Steve nope not true minimal I do not have to parse HTML what do I have to do there are things I have to do what's one of them yeah okay so I do have to let the page that's important that I can't get around I can't communicate with the outside world what else do I have to let the page do render an interface how am I going to render that interface what's the simplest most minimal way to render a browser interface that requires the smallest interface and lets the tiny little new browser do as little as possible yeah oh even simpler than that that would be kind of a boring web page too it's like links in the browser what's the tini tiniest interface yeah no I mean I do want pictures on my web pages guys sorry like I'm sorry I'm not I do not want to go back to the 1970s I do want pictures pictures are good how do I render pictures texts other types of content nope again I am not doing that that's too hard do you know how to draw pixels pixels right pixel position color you can do you can use that to do anything okay I can render text I can render images whatever now what does that mean what does it mean about the page if the low level interface is pixels I probably don't want to distribute my web page in pixels those would be my web pages and very difficult to manipulate so where does the html and css rendering have to happen somewhere else and so the key idea here which I'll just sort of leave with and maybe we'll talk about this more because it's kind of a fun product is that the page is allowed to specify its own interpreter so the page says I'm an html and css page and when you download me download the interpreter that converts html css to pixels why does that help why would that solve some of the problems that we're trying to address here I mean at least we can agree that this thinner interface should be easier to secure it's a lot smaller but how does this prevent the problems that we've been talking about yeah Rob right so the web page by specifying its own rendering engine the web page can be 100% confident that it will look identical on every browser I don't have to hope that IE is going to render the width properly as he talks about in the last example that we skipped right I have my own engine and that engine spits out pixels and I know it's correct I've tested it all I have to do is test it on one browser and if every browser worked this way every user would see an identical interface yeah Steve do we need to create any new rendering engines oh we've got them all this would mean is that if IE worked this way your browser could say by the way IE I want you to render my page using webkit thank you and I want this version of webkit this exact version thank you and then every Chrome, Safari, IE if all of them worked this way you'd see the identical page does that make sense the library is involved here we have not reduced any complexity from the process of page rendering and processing but what we have done is change the interface that the browser has to support and that's pretty powerful take a look this is a cool project watch the rest of the video there's some more fun examples watch some of James's other videos because again they are quite funny and good luck with the rest of assignment 3 I'll see you guys on Monday