I am developing a java application(although, I am unsure if it should be developed as a desktop application, applet, or JWS).
The application is basically a database of homeworks and tasks in physics. It uses .txt files in which it keeps records of these tasks, and the user has to have the ability to modify theese .txt files(through the API I will provide to the user - basically, the user can add tasks, or remove tasks, and, upon adding or removing a task the changes should be modified in the .txt files).
For example, if 'tasks.txt' contains the following lines:
0
1
2
These numbers(0,1,2) are interpreted as TaskId, meaning the database 'tasks.txt' represents contains 3 tasks, and their ID's are: 0, 1, and 2.
If a user is to add a task, the database('tasks.txt') would change into:
0
1
2
3
The task with ID 3 is the newly added task.
Now, I have already developed a GUI using Swing, which allows the user to add tasks, and remove tasks using add/remove buttons, and these actions update the 'task.txt' file. In order not to be misunderstood, let me say that I already have this functionality for a desktop(stand-alone) java application.
What I don't know how to do(or how to even approach it/which java technollogy to use, or how this is usually done) is the following:
I would like all the users, when they download and start my application, to be able to read from the same task database('tasks.txt')
All the changes one user makes to the database from a remote computer, should somehow be updated for all users, for example:
If a user from a home computer in China adds a new task, the user from a home computer in France should be able to see this change(this new task)
So, how can I accomplish this. Should I keep this .txt file on some webpage, and then access it and modify it(could you refer me to some articles explaining how is this done).
Should I develop my app as an applet, and then somehow modify the 'tasks.txt' file on webpage(and how can applets modify files on webpages)?
I am quite new to web development, so any articles explaining communication between users through webpages are more than welcome.
Thanks for your help.
Aucun commentaire:
Enregistrer un commentaire