Itai Tavor wrote:
Hi,
I need to design sales center system containing a server and salesperson workstations. I thought it would be a good idea to build the system around Zope, for several reasons:
- With Zope on the server and a standard web browser on the workstations, a lot of low level work is already done for me and I can focus on high level issues such as UI and application logic.
Yup.
- Easy connectivity to an SQL database.
Yup.
- DTML code chunks and Python Methods should be easier to manage than 1000's of lines of Java or VB code.
Yup.
- Easy to install and update the product and to manage and debug it through the web.
Yup.
- It would be easy to create new ways to view the data - for example, a WAP version to send sales statistics to managers out of the office.
Yup.
There are a couple of features that I am not sure how to implement though:
- I need to display constantly-updating information on the workstations. I could do this by reloading the window every second, but that seems ugly - I'd like to only update certain fields, which I can do using layers and JavaScript, but I need to get the updated data from the server. I guess that can be done with Java, but I'd like to keep the system simple - a browser with HTML and JavaScript only on the client side, DTML, Zope with Python Methods, and External Methods, and an SQL database on the server, no Java or any other complications.
Ah, well, you see you've hit one of the disadvantages of using a stateless protocol like HTTP to solve your problem. There is no good general purpose solution that I know of to address this issue.
- I also need to push data to the workstations - based on events detected at the server, I need to bring up a message on a workstation, and remove it in response to another event. I really don't want to refresh a frame every second for this, and I also would hate to have to write a Java applet to do it.
This is the identical problem to the one above.
Any comments or suggestions regarding the above problems, the choice of Zope for this project, or the project in general would be appreciated.
If you want to go far enough, you can try and use XML-RPC (also, stateless, but not client-bound to a certain model) and something like wxPython to build your own GUI that can at least mantain some sort of persistent or bi-directional communication between your clients and servers. But this is a big task. I think if you maybe rethink your problem you can compromise on something that does not require the server pushing data to the client. -Michel