2

I would like to create a browser plugin which works LIKE flash, with embedded content from my application on the page.

How would I go about doing this? Is it doable with .net applications?

Thanks for the help.

EDIT: To clarify, I have no intention of making something EXACTLY like flash, or remotely similar. I merely wish to be able to embed my application in-browser, and let the user pass parameters or whatever.

Cyclone
  • 17,939
  • 45
  • 124
  • 193
  • 1
    Silverlight did it, so I assume it's doable with .Net.. Also, be aware that you must code your application for two different browsers, Internet Explorer, and everything else(which falls under some kinda netscape API) – Earlz Feb 16 '10 at 00:54
  • Of course, I just need some sort of reference manual or API to be able to start. – Cyclone Feb 16 '10 at 00:54
  • 4
    Your comments make your question less clear. Silverlight is the answer but not for you... so clarify your question... – Cory Charlton Feb 16 '10 at 00:56

4 Answers4

7

For FF/Chrome etc you need NPAPI. Can't imagine doing it in .Net

For IE it's just a COM object. Theoretically you could do it in .Net

If you are not accessing any local resources (special hardware etc) on the browsers computer then you might as well just use Silverlight. Lot of samples of what Silverlight can do

TFD
  • 23,890
  • 2
  • 34
  • 51
3

Flash and Silverlight are both decent platforms for writing your own custom apps which run in the browser and display custom content. If you're familiar with .NET, then writing a Silverlight app should be pretty straightforward.

Silverlight is probably what you are looking for since it allows you to write self contained .NET apps which run inside the browser. You can pass parameters to it, or allow it to make any sort of WCF call(REST/SOAP/XML-RPC/etc) or call any javascript function on your page.

Jesse Weigert
  • 4,714
  • 5
  • 28
  • 37
  • I would prefer to not use Silverlight, and in this case Flash is far from sufficient. – Cyclone Feb 16 '10 at 00:53
  • What is wrong with Silverlight? This is precisely the purpose it was designed for. – Jesse Weigert Feb 16 '10 at 00:54
  • 5
    @Cyclone: But Silverlight does exactly what you ask. Maybe you should clarify your original question? – Cory Charlton Feb 16 '10 at 00:55
  • I have an EXISTING application which I would like to embed in-browser, with a user passing parameters to it. – Cyclone Feb 16 '10 at 00:56
  • @Cyclone: and what exactly about your application makes it non-compatible with Silverlight? Interop? – Cory Charlton Feb 16 '10 at 00:58
  • 1
    I believe you may want to look at the god-forsaken API that is ActiveX for that.. but it's not nearly so trivial as you would think. – Earlz Feb 16 '10 at 00:59
  • It seems that the consensus is to use Silverlight. Assuming your program doesn't do any crazy interop/pinvoke magic, it should be a simple case of swapping your presentation code to use WPF and recompile for Silverlight. Otherwise, you're going to have to learn the ActiveX/NPAPI routes and try and get your app to behave properly in that environment. – Jesse Weigert Feb 16 '10 at 01:01
  • How can I start using Silverlight? – Cyclone Feb 16 '10 at 01:02
  • Visual Studio Web Express 2010 should let you build Silverlight apps. – Jesse Weigert Feb 17 '10 at 00:13
2

Be aware that if you actually want more than a handful of people to be able to use your plug-in you'll need to deal with versions for all sorts of operating systems and platforms. If it's just for something on a local office intranet you might be ok, but otherwise you'll end up needing to write Mac, Windows, Windows 64bit, Linux, Linux 64bit, iPhone, Android, etc. versions. You'll then need to take care of really complex security issues and weird bugs that people have all the time. It's not a small undertaking.

Do you want to do something that you can't already do just by using one of the existing plugins like Flash or Java?

Colin Coghill
  • 1,549
  • 15
  • 18
0

I've been looking into this recently - you clearly have to do a lot of per-platform and per-browser work (I haven't found a magical one size fits all solution).

My application was 3d rendering, so this series was pretty useful (obviously substituting the Irrlicht stuff for your own code/library):

http://copperbit.com/?p=20

There is also a follow up article on FireFox...

n3wtz
  • 39
  • 5