views:

38

answers:

1

I have a applet witch enables to play Hangman. Now i want to create web application with this game code. What is the easiest way to perform this action and what tools or platforms is best for this solution?

A: 

If the Applet code is well written you should already have a separation in Model, View and Controller and the business code (the "AI"). To convert to a webapplication (I assume you're still talking in Java context and thus are targeting on JSP/Servlet?), you basically only need to replace the Applet Controller by a Servlet based one and the Swing/AWT based View by a JSP (HTML/CSS/JS) based one.


As per the comments it look like you're completely new to web development. I suggest you to get yourself through the following links:

BalusC
I whant to use JSP, but I not sure how painting and rapaint will work and how combine it with servelet.Applet uses Swing components.
Gedzis
@Gedzis: oh dear... Painting will *not* work at all. You'll have to rewrite everything that uses Swing components to work on the web instead. Which is not simple at all, because it's a completely different platform.
Michael Borgwardt
JSP is **completely different** from Swing. JSP does not run at the client side nor intercepts (directly) on client side events. It's the HTML/CSS/JS which do that. JSP is a *webbased view technology* which provides a template to write HTML/CSS/JS code in and the ability to dynamically generate the HTML/CSS/JS and/or inline the server-side variables. All it does is producing HTML/CSS/JS and sending from server to client over HTTP. It's certainly not comparable with Swing. When thinking of events, you must think of HTML forms with input field(s) and submit button(s) and/or JavaScript (Ajax?).
BalusC
I understand that, because for several months I working with seam, so i think i would leav thismy idea to crea web based "Hangman" application
Gedzis