Game server in JSF
I'm really new to JSF but what I need to do is a webpage which can connect via JSF to database and show some statistics for given user and I know that JSF will do for such purpose. What I'm worried about is that I need to write game server for turn-based game and my question is if this is common/good approach to include开发者_如何学Go such server in JSF? Clients will be android devices so I will probably have to include some socket logic under whole JSF which will exchange XML messages. At least thats how I see it.
Please let me know if my concept is valid or tell me what other tools I will need.
Yes, this is possible. JSF is great for building the web based admin or statistics pages.
But do note that the socket connections from the Android client to the Java EE server do not go via JSF. If it's simple turn based game, you could consider using REST calls to JAX-RS resources. These are very easy to create in Java EE (no config needed, just a simple annotation on a pojo).
So basically, your question is not phrased correctly. The game server is not build in or on JSF, but JSF makes use of some of the same backend resources.
Java Server Faces
is only the framework for a web frontend and the communication or interaction to the backend. It's absolutely possible to write a little game server for android games with java ee.
As I understood your text the architecture
is really simple: You've a client/server architecture and the server use the framework JSF for administration.
I think it's a good idea to write the server first and add the administration (JSF Part) later as component
to the server.
精彩评论