page 1 of 2
Comments: 34 | Views: 1073

Just curious:

Why can't MS create a new browser from scratch based purely on .Net? The current browser is enough of an embarrassment that it would serve them well to release something new that is:

  • As standards compliant as possible (yes, even pass the stupid Acid tests 100%)
  • Secure. Using .Net will give them a lot of security out of the box. There is your sandbox right there. You need to try really hard to create an insecure app with .Net
  • Fast*
  • Have a good plug-in API. Using .Net will allow much easier plugin development, including being able to force plugins to be secure. No untrusted code. No memory leaks from badly written plugins. No invalid memory access, corrupted memory, etc.

*Note, I say "fast", because even though .Net apps will always be slightly slower than native apps, the overhead is not that much, and currently IE is roughly 20 times slower than the competition in some places, so creating something newer that is faster than what we have now should be possible with a well designed, well implemented .Net version.

And don't tell me they can't afford it. Yes, this would be a monumental task, but IE is one of MS' apps that are quite visible to the public , the press and end users. It is hurting their image. Putting resources into developing a better IE should be a high priority I believe.

Thoughts?

W3bbo
W3bbo
The Master of Baiters

No, because:

  • They've already made a huge investment in the Trident engine which is now standards compliant and works fine.
  • It would break backwards compatibility with existing websites since you'd have to recreate the issues in IE7 for its compatibility mode
  • MSHTML is used by a lot of programs, introducing the CLR will introduce problems like if the program already uses the CLR, but uses a different and incompatible version to whatever "IE.NET" uses
  • The NSAPI and ActiveX plugin systems are here to stay. Adobe and Apple aren't going to bend over backwards to make a managed interface for Flash and QuickTime respectively.

BitFlipper said:
You need to try really hard to create an insecure app with .Net

You really, really don't.

.NET might make a small class of bug less likely but it's still very easy to introduce security flaws if you don't take the time to architect things correctly. Especially if you're getting untrusted data from the Internet.

It protects against buffer overrun type attacks (mostly), but it's certainly possible to leak memory in a .NET app (even though a memory leak isn't necessarily a security issue) even if it more difficult than with unmanaged code. And there are plenty of other attack vectors which .NET by itself can't protect you from.

They could create a new one using managed code, but it wouldn't be able to replace Internet Explorer.

staceyw
staceyw
Before C# there was darkness...

IMO, they should.  It could be an OS Codeplex project and go from there.  Not to replace IE as such, but more like a OS research project.  They will need one for Singularity anyway.  They probably have one already in research mode.  You could make one today using the browser control in .Net.  Not sure if the control itself is managed or native.

The web browser control in .NET is just the native code rendering component. If there is a compelling reason to write one in .NET then why not start a project on CodePlex today?

FWIW I think there are advantages to having a webbrowser written entirely in WPF. Not necessecarily because of "security", "plugins" or "speed" but because it would open up the possiblity of applying transforms and other WPF-y effects that you can't do on an interop'd control. That would be a far more compelling argument to me. I'm also not naive enough to believe that such a thing would be trivial (though I'd certainly be interested in helping if there was a project underway!)

Dr Herbie
Dr Herbie
Horses for courses

WPF Browser project?  http://khaos.codeplex.com/ is available ...

Herbie

stevo_
stevo_
Human after all

I wouldn't get to excited, I don't think its going anywhere.. theres just a lot of work that needs to go into a browser.. writing one in .net would be interesting from an extensibility point (perhaps, but still less so interesting than extensions in say firefox- which are much more approachable).

But I don't really see otherwise why..

The reason is simple. Anyone could use the same core to build browser ontop of .Net. Any machine supports .net platform would be able to run the program easily. For example, run you own version of browser on Win Mo, on Win CE based GPS system, on many other Win CE bases systems.

 

Paste the following into XAMLpad:

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300">
    <Grid>
        <Rectangle Width="40" Height="40" Fill="Beige" HorizontalAlignment="left"/>
        <WebBrowser  Margin="15" Source="http://channel9.msdn.com" />
        <Rectangle Width="40" Height="40" Fill="AliceBlue" VerticalAlignment="top"/>
        <Menu VerticalAlignment="Top">
            <MenuItem Header="_File">
                <MenuItem Header="_New"/>
                <MenuItem Header="_Open"/>
                <MenuItem Header="Close"/>
        </MenuItem>
        </Menu>
        <Label VerticalAlignment="Center" HorizontalAlignment="Center">This Text should should appear over the top of everything</Label>
    </Grid>
</Window>

 

Notice how the webbrowser appears over the top of everything. It's a limitation of hosting a native control in a WPF application, which really limits the things you can acheive. A 100% WPF based managed webbrowser control would allow you to integrate HTML content in a much more natural and flexible way.

stevo_
stevo_
Human after all

Uh you could do that in c++, both will need platform abstraction layers... but you wouldn't want to do that because the UI / experience of a phone is different to a desktop.. the core of the rendering engine should be re-used, and that would have significantly less dependencies than a UI would..

Also AndyC, that example doesn't mean you should do it in .NET, it just means there needs to be a better way to interop the drawing layers in WPF and native.. maybe they already do have a good way but the web browser control just isn't compat..

But I'm pretty sure they could make that work faster than it would for them to write an entirely new browser..

.NET is great, I solely program .NET, in-fact I've had such a brief time in native world that I hardly remember it, but I at least know that native isn't obsolete to .NET - and that I can't see any reason why they wouldn't instead- write an entirely new browser in native..

steveo_ said:
Also AndyC, that example doesn't mean you should do it in .NET, it just means there needs to be a better way to interop the drawing layers in WPF and native.. maybe they already do have a good way but the web browser control just isn't compat..

Unlikely, doing that would mean pretty much redeveloping large parts of Win32, since it is fundamental Win32 decisions that lead to the limitations involved. And that in itself would be not only an enormous job, but a compatibility nightmare. And even after all that it might not even be fixable without breaking basic Win32 assumptions - remember it's not necessarily just layering, but the ability to truly treat it as a WPF control, including applying transformations, animations or embedding the control onto a 3D surface whilst remaining functional.

Given that Trident no longer has any actual dependencies on real Win32 controls, it would probably be easier to port that into WPF via C++/CLI if they wanted to fix that. It's questionable whether that would have any benefit for Microsoft though, given it's not something they necessarily need themselves. I still think it would be a useful third party control though. 

DCMonkey
DCMonkey
Monkey see, monkey do, monkey will destroy you!

I hear WebKit has a reasonably portable back end. I wonder if it could be ported to render to a Direct3D surface which could then better interop with WPF via D3DImage.

footballism
footballism
Another Paradigm Shift!

The fundamental issue here is that Windows Vista even Windows 7 doesn't support GDI redirection for child HWNDs. If this is supported, there will be a much better interop story with the MIL rendering path.

Zhou Yong

staceyw
staceyw
Before C# there was darkness...

Being .Net/WPF based could be an interesting story.
1) Being vector based the free scaling/sizing would be new.
2) Browser-in-browser UX (e.g. picture-in-picture).  You could easily add other brower windows inside others for some interesting features.  Each browser could also be at a different scale or clipping region.
3) Make client follow ASP.Net component model and pipeline on the client.  Can hook in anywhere in the pipeline.  Allows you to program and script your browser UX and sessions.  A Favorite, for example, could be a piece of script that sets up some tabs or a browser-in-browser experience.

Many other things become possible and interesting.

ManipUni
ManipUni
Proving QQ for 5 years!

It would be too slow. Plus it has very few benefits. .Net addons and expansion can be accomplished without having the entire browser on the platform, and it would only solve a single type of security issue.

staceyw
staceyw
Before C# there was darkness...

I disagree.  Having it vector based is a single huge feature for browsers.  Animations and graphics would become better and easier for the programmers also.  Essentially what we are talking about is Silverlight which does this and is .Net based.  This is the reason silverlight needs a runtime in the browser to pull off its magic.  However, with a .net browser, you would not require silverlight and could just use the standard .net runtime and wpf.  TMK, you can't vector scale any browser today (only thumbnail it).  A plugable .net pipeline is the future.

figuerres
figuerres
???

"It would be too slow. Plus it has very few benefits. .Net addons and expansion can be accomplished without having the entire browser on the platform, and it would only solve a single type of security issue."

 

Please explain why using .net would make it too slow? or perhaps you mean something else would be slow?

>Why can't MS create a new browser based on .Net?

for the same reason they can't create a new browser in C++

 I am new here I would like to say that I am studing programming right now.

 

page 1 of 2
Comments: 34 | Views: 1073
Microsoft Communities