Best practice for combining a Java Applet/ Android interface?
Posted
by
Pearsonartphoto
on Programmers
See other posts from Programmers
or by Pearsonartphoto
Published on 2012-03-03T13:18:54Z
Indexed on
2012/04/03
5:39 UTC
Read the original article
Hit count: 244
I'm working on an online game, which I am seriously considering writing a Java Applet for it. The game is not overly complex on the features. I'm considering at some point having at least 3 versions of the game, which include a Java stand alone, applet, and Android game. I know from Design Patterns that the best way to use differing things like buttons and the like is to use a Bridge interface, where I have a common template for the common buttons.
However, I'm having a bit of difficulty understanding what to do about the following. I know that Android programs use an Activity structure, which I am well familiar with, and that Applets extend the Applet interface, which I am not as familiar with. I also know that a stand alone java program uses basically a main() function, which doesn't have much structure. I'm convinced that there should be a way to design a common design pattern between the two, but somehow I'm missing what that is exactly. What can I do to make the different frameworks work with as much common code as possible?
© Programmers or respective owner