Converting Java Applet to C#

F

farseer

Hi,
i have an applet java applet which basically serves as a stock
streamer..it connects to a data feed and show the bid/ask/last/etc info
for a portfolio of stocks in real time. I would like to convert this
to a C# application, but one that can be run/launched from a web
browser much like it was an applet.
I have some questions regarding how to do this

1. To begin with, is there such a thing as a c# applet?

2. My understanding from some research is that there is no such thing
as a c# applet, , but that one can create a windows form control which
can be run in the browser. Is this correct? What exactly is a Windows
Form Control? Are there any simple examples out there you can turn me
on to to study? Will this form control run in any browser and any OS?

3. I understand that the CLR must be present for this to run. Does
windows ship with the CLR by default? How difficult is it to prompt
the user to install the clr if it is not present? is that packaged
already by microsoft?

4. Are there any limitations to what can and can't be done with this
form control? For instance, can it run outside the browser (i.e. not
embedded, but popped out of the browser)? Can i have multiple forms
open or can i have one form open other pop up forms?

thanks much.
 
R

Rad [Visual C# MVP]

Hi,
i have an applet java applet which basically serves as a stock
streamer..it connects to a data feed and show the bid/ask/last/etc info
for a portfolio of stocks in real time. I would like to convert this
to a C# application, but one that can be run/launched from a web
browser much like it was an applet.
I have some questions regarding how to do this

1. To begin with, is there such a thing as a c# applet?

2. My understanding from some research is that there is no such thing
as a c# applet, , but that one can create a windows form control which
can be run in the browser. Is this correct? What exactly is a Windows
Form Control? Are there any simple examples out there you can turn me
on to to study? Will this form control run in any browser and any OS?

3. I understand that the CLR must be present for this to run. Does
windows ship with the CLR by default? How difficult is it to prompt
the user to install the clr if it is not present? is that packaged
already by microsoft?

4. Are there any limitations to what can and can't be done with this
form control? For instance, can it run outside the browser (i.e. not
embedded, but popped out of the browser)? Can i have multiple forms
open or can i have one form open other pop up forms?

thanks much.

If you want to recreate the applet then I suggest you take a look at J#
which will allow you to do that. J# supports development of applets. The
client will however require the .NET framework, and in particular the
Visual J# Redistributable Package version 2.0.

Reading through the J# documentatation ought to answer the rest of your
questions, especially about the security (Running outside the browser, etc)
 
F

farseer

I'm actually looking for a solution in C#, as the company has
standardized on that language.
I while back i read something about hot deployment that could allow me
to launch a winform app via the web...i can't find much on it though.
i think that might be close to what i am looking for..
 
R

Rad [Visual C# MVP]

I'm actually looking for a solution in C#, as the company has
standardized on that language.
I while back i read something about hot deployment that could allow me
to launch a winform app via the web...i can't find much on it though.
i think that might be close to what i am looking for..

Rad [Visual C# MVP] wrote:

Well, if it's C# then you'll have to sacrifice the "applet" like behaviour.
What version of visual studio do you have? If you have VS 2005 then I
highly recommend you look at ClickOnce Deployment that will allow you to
deploy and update applications over the web browser, as well as
automatically installing any prerequisites.

Have a look at this link an see if it is the sort of functionality that you
are looking for :

http://msdn2.microsoft.com/en-us/netframework/aa497348.aspx

A step by step sample is here :

http://www.15seconds.com/issue/041229.htm
 
F

farseer

Thanks...It doesn't seem like that would be something that would be
cross platform supported. I wonder why MS never created an applet
equivalent. it's just so convenient to be able to have af full blown
app run via a browser with just the CLR installed.
I'm actually looking for a solution in C#, as the company has
standardized on that language.
I while back i read something about hot deployment that could allow me
to launch a winform app via the web...i can't find much on it though.
i think that might be close to what i am looking for..

Rad [Visual C# MVP] wrote:

Well, if it's C# then you'll have to sacrifice the "applet" like behaviour.
What version of visual studio do you have? If you have VS 2005 then I
highly recommend you look at ClickOnce Deployment that will allow you to
deploy and update applications over the web browser, as well as
automatically installing any prerequisites.

Have a look at this link an see if it is the sort of functionality that you
are looking for :

http://msdn2.microsoft.com/en-us/netframework/aa497348.aspx

A step by step sample is here :

http://www.15seconds.com/issue/041229.htm
 
R

Rad [Visual C# MVP]

Thanks...It doesn't seem like that would be something that would be
cross platform supported. I wonder why MS never created an applet
equivalent. it's just so convenient to be able to have af full blown
app run via a browser with just the CLR installed.

Cross platform? Alas, not that I know of. As far as I know the Mono people
are yet to implement ClickOnce to the level of Microsoft. Much of the
underlying technology to support ClickOnce i would imagine is very platform
specific.

But you can keep an eye on their progress here:
http://www.mono-project.com/Main_Page
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top