views:

1519

answers:

1

This may seem like a high-level question. But that is because I'm unfamiliar with cutting edge ASP.net and even less with this behemoth called Sharepoint. So please bear with me..

  • First off is it possible to take functional custom WPF controls which contain certain unmanaged subcomponents that do DirectX rendering (for performance reasons) and drop it into ASP.Net? as an example consider a specialized chart control
  • Does Sharepoint add anything that makes this possible ?

The use-case is to take certain panes or areas from a thick WPF client and slot it into an existing Sharepoint based solution.

Is this possible or are they (WPF Controls and Web Controls) as different as chalk and cheese? (Assume that the current control interface can be freely changed.) Would it wise to develop web-aware stripped down version of these controls than to attempt to hammer the current controls in somehow...

On a fundamental level, can a web-page contain a control which takes over the rendering for its client-area/rectange ? Or does everything have to broken down into plain html by the time it hits the browser.

I found a few unanswered queries online. But other than that its unexplored (or forbidden).. in either case I'd like to know. Thanks for reading..

+5  A: 

The short answer is: Yes it's possible but you probably don't want to do it.

Asp.Net, with the exception of java script, is primarily a server side technology. Meaning that the majority of the processing code runs on the server vs. the client. IIRC share point is built on top of Asp.Net and thus has the same format.

WPF is a client side technology. The code runs on the actual physical client computer.

Combining these two technologies into one application does not work due to their conflicting natures. However, there are several options for you.

  1. Silverlight: It's easiest to think of this as flash for .Net. It allows for rich WPF applications to be run via a web browser on client machines. It's a subset of the full .Net framework but rich enough to build great applications.

    Silverlight is limited in that it must be a 100% managed solution. You're post mentions using a DirectX control which I presume is native code. If this is the case Silverlight will not work for you

  2. ActiveX controls: These allow for essentially any form of client code to be hosted in a web browser and run on the client machine. This includes .Net, WPF, C++, etc ... If you have a native component this is really your only option.

    Unfortunately though, ActiveX controls are following out of favor. Primarily due to their insecure nature. Once you run an ActiveX control on your machine you're at the mercy of the control author and it's easy to do malicious acts.

    More data on ActiveX controls: http://en.wikipedia.org/wiki/ActiveX

JaredPar
Thanks Jared... however the problem at hand is to embed it into an existing Sharepoint site at the customer's end. I got ActiveX as a possibility from other sources as well.. don't know how well it would go down with the client. Thanks for replying... much appreciated
Gishu
Just confirmed this answer from Microsoft - They do not recommend still developing WPF interoperating with unmanaged code w.r.t. future direction. 100% WPF Apps running in a browser cannot go cross-domain (they have to go back to the server endpoint for all data). Silverlight can go cross domain
Gishu
W.r.t. existing unmanaged components.. ActiveX may be the only option but they recommend porting it over to the managed world ASAP
Gishu