Best way to implement Web client for existing C++ application?(i wanted to web client implement in java)
I have 开发者_运维技巧existing C++ application i wanted to implement web client for that application.suggest me best way to implement.
- Separate your user interface from the rest of your application as much as possible. Your application should be able to compile without relying on any user interface.
- Decide what the important entry points of your application are. E.g. in a order administration system this could be: add an order, change an order, mark the order as being delivered, close the order, delete the order, ...
- Decide which technology you want to use on the server and client side. If you want a full-blown desktop application to interact with your server application, you could use SOAP. In your case I assume that you want to attach your server application as a DLL to a web server. Decide which Web Server (Apache, MS IIS, ...) you want to use and investigate how you can add server logic to it.
- Start with a small server application to get the hang of it. Don't do everything at once.
- Add a new interface layer on top of your application. In your case you probably want your new UI layer to generate HTML, or to use the Microsoft Web Controls (or any other similar technology). Don't forget that the UI of a web app is completely different from the UI of a desktop application. In most cases the Web UI more resembles the UI of old character-mode DOS or Unix applications (e.g. only one screen open at the time).
- Investigate the impact of having multiple users connected to your server application. You probably don't want one user to change data while the other one is deleting it. Investigate multi-threading to get more things done at the same time (especially if your server app is going to be used by hundreds or thousands of users).
精彩评论