📜 ⬆️ ⬇️

Details about the new Microsoft rendering engine for Project Spartan

From the editor of Smashing Magazine :

Last week, Microsoft made the most significant announcement for the web since it launched Internet Explorer in 1995: the new browser codenamed “Project Spartan”. What does this mean for us as developers and designers? Which rendering engine will use Spartan and how will it affect our work? We talked to Jacob Rossi, a senior engineer on the Microsoft web platform team, about the new browser used by the rendering engine and whether it will replace Internet Explorer later. This article, written by Jacob, is the result of our discussion and sheds light on some aspects of the browser that may be useful to you.



Project Spartan , Microsoft's new browser, officially announced last week.
')
Spartan is a project that we have been working on for a considerable time. Over the next few months, we will continue to explore inside what we are doing, what we can offer to people who will use it, and what it will be like a platform. Preparing the browser for release outside so you can try it yourself will take several months, but we can share some interesting details today.

This article tells the internal story of the Spartan rendering engine : how it came to be and how the 20-year history of the Internet Explorer (Trident) platform helped us determine the design approach.

Internet Explorer Tutorials


Twenty years ago, Microsoft first introduced Internet Explorer. For many users, this name and brand are recognizable around the world, but for web developers, the “features” of the old version of Internet Explorer often make it difficult to see Microsoft’s latest efforts in supporting and implementing web standards. Although web developers remember the outdated versions of Internet Explorer for their bugs, the need for hacks and strange workarounds for implementing the necessary functionality, IE actually made a positive contribution to the web by providing web developers with CSS, dynamically changing HTML through scripts and DOM, AJAX / XMLHttpRequest , drag and drop (D & D), innerHTML, hardware acceleration and other technologies for the web.

Inside the Microsoft browser team, we consider ourselves an organization that is constantly learning. Every year we set aside a special time to reflect on our achievements and failures, to learn from them and grow further. In this sense, every release of IE has had a significant impact on how we generally create products. Everything we learned about the importance of cooperation between browser manufacturers, standards, compatibility and interoperability, performance and security helped us determine how we will work on the new rendering engine.

New Microsoft Rendering Engine


The new Microsoft browser will have a new rendering engine under the hood, EdgeHTML.dll. It already comes with Windows 10 and it will be separated from the Trident engine (MSHTML.dll), which for decades has been the main Internet Explorer.

The latest version of Trident, shipped with Internet Explorer 11, has made great progress in supporting standards (I started to make a list of some of the most visible, but stopped when I reached 75 specifications). But this progress was significantly burdened by the burden of supporting the document modes of IE5.5, IE7, IE8, IE9 and IE10 - a concept that the web no longer needs.

Therefore, we decided to create a new engine that uses the level of standards support in IE11 as a starting point .

I watched Justin Rogers, one of our engineers, press “Enter” on the commit that forks the engine. It only takes about 45 minutes to process (just make changes, not build!).

When it was all over, there was a liberating silence in the room: then we could only imagine what this step would allow us to do: start deleting the code, the favorite state of the catharsis for each developer.


In the following months, the layers of IE heritage were cleared from the new engine. Disappeared modes of documents. We removed the subsystem responsible for emulating the features of the IE8 composition. We have taken out VBScript. Heritage tails like attachEvent, X-UA-Compatible, currentStyle - all were cleaned from the new engine. Our code is now a little like Trident (but much more different from it than Blink from Webkit).

Dual rendering engine architecture animation
Project Spartan will have a new rendering engine under the hood and a Chakra JavaScript engine introduced with IE 9.

What remained was a clean base. A modern web-based platform designed to take into account interoperability and mainstream standards. It was from here that we began to make large investments in interoperability with other modern browsers to make sure that developers do not have to contend with differences between browsers.

Today, we fixed more than 3000 interoperability problems (some related to code written in the 90s), including working on top of over 40 new web standards we are working on. For example, long-standing problems with innerHTML have been fixed. Even fresh standards like Flexbox receive a new batch of love from our developers in order to comply with the latest version of the specification (you will see this in one of the future preliminary releases of Windows 10). Project Spartan also carries an updated version of the F12 developer tools .

To better understand what is being said, here are some of my personal favorite features that are already included in the pre-assembly or will be included soon:


However, the modern and interoperable rendering engine is not enough to magically make the web just work. This can be achieved if the sites will also offer the browser code made for "modern browsers." Therefore, our new engine also has a new user agent line . If the agent string were a sticker, then the UA-string of the new engine would completely resemble the covers of many of today's web developers' laptops. However, unexpectedly, it gives a very positive result in terms of compatibility and allows many sites to give the new engine a modern content. It also gives me an extra reason to beat the drums:

sniffing the user agent site should be excluded at all costs!



“WONDERFUL, BUT MY COMPANY HAS SITES THAT NEED IE8”


To keep backward compatibility, we do not plan to completely get rid of Trident. Instead, we have designed and implemented a dual engine approach, within which either a modern rendering engine or Trident can be loaded. This switch is transparent to the user. Windows 10 will use EdgeHTML for the web (so you don’t have to worry about document modes) and download Trident for legacy corporate sites . This dual approach will allow businesses to upgrade to the new web engine, while continuing to use applications that are critical for old IE, all within a single browser. Even better, in the two-engine approach, we plan to make only security-related fixes for Trident, which should minimize code changes and make sure that corporate sites remain compatible while focusing on innovations in the new (and always fresh) rendering engine.

We hope that on Windows 10 people will use Spartan. However, there are a number of business scenarios that involve tools created on top of the old Internet Explorer extension model (its own ActiveX components, toolbars, BHO, etc.). Therefore, Internet Explorer will be available on Windows 10 for some enterprise web applications that require a deeper backward compatibility level. This version of Internet Explorer will use the same two-engine approach as Spartan, including the default EdgeHTML upload for the web. This means that developers will not have to separately consider Internet Explorer and Spartan, our plan for supporting standards will be the same. The browser will also include the Chakra JavaScript engine .

"PERFECTLY, BUT SOME MY USERS ARE STILL ON IE8"


We know. This is as painful for web developers as it is for our browser team. Earlier in May last year, we talked about the fact that updating users is a high priority for us. Later in August, we announced a browser support policy that will encourage users to upgrade to the latest versions. An even more important announcement happened a week ago: Windows 10 will be free of charge for Windows 7, Windows 8.1 and Windows Phone 8.1 users, which will be updated during the first year after launch. Moreover, we consider Windows 10 as a service, that is, we will constantly update the system, releasing new features when they are ready (“auto-update”), without waiting for some next major release. This means that the new rendering engine will always be fresh .

Future plans


Another important change that we have implemented throughout the past year is a promise to increase our openness regarding the plans for the development of the web platform. Over the past year, we hope you might have noticed such activities as our public roadmap for standards support (one of my personal additional projects), our AMA sessions on Reddit , regular dialogs via @IEDevChat , and access to preview builds on early stages of our development process. This year we will continue to develop this area.

Regarding standards support, we will continue to talk about new opportunities we are working on. In the near future, we should expect Web Audio, Image srcset, @supports, Flexbox updates, Touch Events, ES6 generators and a number of other features - this has been committed over the past few weeks. This is followed by such large blocks as WebRTC 1.1 (ORTC) and Media Capture (getUserMedia () for access to the camera and microphone). Then we proceed to taking into account your wishes (and other factors, for example, statistics on the use of various features that Bing helps to collect; he, by the way, can now also use our engine inside) to prioritize future investments in the platform.

Our plans for the platform in the initial release have not yet been fixed - feedback from developers has greatly influenced and will influence. So flexible changes are possible along the way. Here's how you can help us now:


Personally, I am happy to share this inner view of the new web rendering engine, which stands behind Project Spartan in Windows 10 at such an early stage of development. We plan to tell more in the coming month. In the meantime, if you have something to say on the merits, you can write to me personally and as a whole to our team . Let's make the web work for you.

Source: https://habr.com/ru/post/248997/


All Articles