I am writing a desktop application in Java which will allow clients to authenticate to a server with their credentials, and afterwards view and manipulate some data (orders, invoices, employees etc.) stored on the server.
I have decided to use Java to write the client, with SWT for the GUI. However, since I haven't previously worked on any large Java projects, I am not sure what technologies to use to make my job easier in writing the server.
The server application will be a frontend for an internal RDBMS, allowing the successfully-authenticated clients to perform various operations on the data the user has permission to work on (not all users have the same role). This will, in simpler terms, work in a similar fashion to a multiuser RDBMS where each database user is only allowed to execute certain stored procedures and nothing more.
I would like to have to deal as little as possible with serialization, duplicated code, writing my own protocol for client-server communication, hand-written object-relational mapping etc. It would be nice to be able to have some data bindings between models and GUI and to abstractize away the networking (by some form of RPC, I imagine).
The first question to be asked is whether the protocol would be stateful or stateless, but I assume stateless is better (providing the user with some session id after successfully authenticating). The next question is what technologies/protocols/libraries should I use? RPC or something else? SOAP, something else over HTTP, not HTTP? I realize this is somewhat a matter of preference, but I'm not really aware of what options I have. I am interested in what's commonly used in the Java world etc.
I would probably also need some way of sharing the model classes' definition (to avoid code duplication) across the client and the server. The client would bind the models to the view and propagate the changes to the server (serializing the model before sending it probably). The server would then deserialize the model object and push it onto the database via some object-relational mapper. Of course, that's oversimplified and is just the way I imagine it would work, but I'm open to any suggestions.
My initial impulse was to use Python for the server, because that would make things more interesting for me (plus I have more experience). However, I'm thinking that going in this direction might over-complicate things. It's probably easier to write some model class and use it in both the client and the server than write it once in Python and once in Java and make sure to never forget to sync the changes (but then again, I might be able to use some common format to describe the model and then have it generate code in both Java and Python; I think ASN.1 does something like that). Do you think I can do this using a Python server without too much time wasted caused by the fact that the client is Java?
Thank you for taking your time to read this. All of your suggestions are appreciated.