JAVA小程序转换为Web应用程序
我有一个可以玩刽子手的小程序。现在我想用这个游戏代码创建网络应用程序。执行此操作的最简单方法是什么?哪些工具或平台最适合此解决方案?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果 Applet 代码写得很好,那么您应该已经将模型、视图和控制器与业务代码(“AI”)分开了。要转换为 Web 应用程序(我假设您仍在 Java 上下文中讨论,因此目标是 JSP/Servlet?),您基本上只需要将 Applet 控制器替换为基于 Servlet 的控制器,并将基于 Swing/AWT 的视图替换为基于 JSP (HTML/CSS/JS) 的一种。
根据评论,您似乎对网络开发完全陌生。我建议您通过以下链接:
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: