How does Siverlight 5 with P/Invoke compare to XBAP with FullTrust? - silverlight

I'm considering XBAP with full trust, but just heard about SL5's ability to P/Invoke. This is quite exciting because XBAP deployments are very difficult considering it only really works with IE, works sometimes with Firefox, and never with chrome.
Does anyone have details on this feature, and its cross browser support (on an x86 machine of course)

There are some examples of using P/Invoke on Silverlight 5 RC here and here. Just today I posted on my blog regarding the possibility to access native DLL:s other than the regular system DLL:s.
I normally run Chrome, and Silverlight P/Invoke works like a charm. I assume that IE should not be any problem either. Have to admit I have not tested Firefox or Opera, but maybe someone else has some experience with this?
Regards,
Anders # Cureos

Related

Does silverlight really solve browser compatibility issues?

I'm planning web application and considering silverlight as development platform. Will it help to solve browser compatibility issues? The app intended to be used on desktops only (no mobile).
Yes, it will solve browser compatibility issues, and could work on both Mac OS and Windows with the very same code.
The only drawback is that, the first time your user connect to your application, he will need to download the Silverlight plugin.
Awesome you would say? Well, unfortunately some people that probably never try to do something like image processing or advanced line of business application in a browser decide that plugins are not so cool and that you would be able to do the same thing with the magic power of HTML5.
We are still waiting to have the same possibility in HTML5 that we have in Silverlight or Flash, but plugins are already dead. At least as long as no big compay want to push them again.
So, my advice would be: don't start a project in Silverlight. You will have problems, even if you do not target mobile. For example it becomes harder and harder to find compatible good tools (like ReSharper, NCrunch, or even just a decent unit testing library). And in further release of Windows and Mac OS, it will probably not be supported at all (IE for Windows RT already does not support Silverlight).
Sorry man, Silverlight is dead, you arrive after the battle.
If your developing your application for an Intranet, I would say Silverlight is an excellent choice.
If you are developing for the Internet, use an HTML based language

Any advice on debugging / engineering Silverlight apps that need to run in Firefox?

I'm a developer who does a lot of Silverlight work and I experience some frustrations from time to time with various browsers not playing nicely with Silverlight. Particularly, I've noticed that Firefox will frequently interact poorly with Silverlight and attack the plug-in for attempting to interact with the browser.
Specifically, I've seen various versions of Firefox crash when:
The user initiates an action that requires clipboard access and a standard Silverlight security dialog is supposed to display. Other browsers handle this just fine.
A Silverlight application asks the browser to display a messagebox to the user (I've since used custom Silverlight UI for this because Firefox just wasn't liking this)
Silverlight is being run in Firefox with GoToMeeting running
The plug-in takes a bit of time on an operation (much less of a tolerance than other browsers, but this is usually something I can do something about)
Quite a few other times for little reason in particular
What can I do as a developer to avoid these sorts of issues for users that run Firefox? What can I do to analyze the problem when the SL plugin crashes? I don't feel that telling people to use Chrome or IE is a viable solution, but there aren't a lot of resources available on catering SL apps to run well with Firefox.
The best thing you can you assuming you are fulfilling the requirements is to report these bugs. Although some of them sound more like Firefox bugs, like "Silverlight is being run in Firefox with GoToMeeting running".
Another workaround instead of asking your users to use another browser could be to encourage them to install the application as oob.
This is a known bug in Firefox, if you have dom.ipc.plugins.enabled set to false in Firefox. See bug 602502 in Bugzilla.
If you can, set it to true, and you should be just fine.

IE 6 and Silverlight

Does Silverlight work with IE 6, are there any gotchas?
Just wondering if this is an alternative for customers stuck with IE 6.
I have worked on sites that run on IE6 and we were able to work well in Silverlight. As Silverlight is a Plugin, it doesn't matter what they underlying browser is, as long as it is the once supported by Silverlight team. We didnt come across any issues, we had worked on data driven app.
For client OSs the answer is yes
More detail on wikipedia about compatible OSs and browsers

Silverlight browser support does not seem to be ubiquitous?

We have been using Adobe Flex for a major project but it's just too slow.
We're considering switching to Silverlight.
The problem seems to be that Silverlight is not as widely supported by browsers as Flex/Flash is.
For example I tried to access the Silverlight showcase using Safari for Windows but it didn't work.
A web RIA platform surely has to have browser ubiquity as its foundation?
Browser Plugins are essentially native applications, so you essentially need a Plugin for each architecture.
For example, there is no 64-Bit Flash Plugin for Windows, so I always have to use 32-Bit IE for that. I also believe that there is no Linux-PPC support, but it's been a while since I've looked at that. And that new JavaFX stuff from Sun also does not run on many platforms and browsers.
For a list of supported Platforms, Wikipedia has a neat table:
http://en.wikipedia.org/wiki/Silverlight#Compatibility
IMHO Flash is the only thing that comes near perfection. Microsoft is just supporting a few major browsers.

Does silverlight work on chrome?

Does anyone know if silverlight plugs into chrome, or when they plan to support it?
This guy have had partial success with silverlight in chrome, but it does not seem to be supported:
http://wildermuth.com/2008/09/02/Silverlight_2_and_Google_Chrome
From The Microsoft Silverlight Team in the silverlight forum:
Hello, currently we don't have plans
to support Chrome. We will support it
in the future if it gains enough
market share. Please understand, each
browser implements the plug-in model
differently, so it'll be a lot of
effort to officially support a browser
100%... By the way, IE 8 also runs
each tab in its own process. If a tab
crashes, other tabs will still work
fine.
UPDATE:
Jon Galloway has just posted instructions on how to get silverlight successfully running on Chrome here:
http://weblogs.asp.net/jgalloway/archive/2008/09/17/silverlight-on-chrome.aspx
The official word on what is supported looks like this:
alt text http://www.jesseliberty.com/sl/browsers.jpg
The reality is that we do run on a lot of browsers, but things change might quickly in these here parts.
For what it is worth, the Dev Branch of Google Chrome was recently updated to support Silverlight 2. I tried it and it works for me. Of course, you have to use the Dev release of Google Chrome. You can get more information about switching to Chrome Dev here.
Silverlight already works with web-kit, and since Google's Chrome is based on web-kit, it shouldn't be too much effort to get it working.
Indeed, this gentleman seems to have had some success.
Based on this, I would suspect that Silverlight will be fully supported by Chrome by the time it goes gold.

Resources