I'm converting a Visual Basic program to run as a Django app, and I need some advice on how to go about doing it, whether or not it's possible of feasible, etc.
Basically, I need to turn the VB form linked below into a web form. I've got several reasons for this including improved version control, improved ability to restrict access to certain people, the ability to combine it with some django apps that i already have running, and to learn more about whatever I end up using to do it. A database is also a great place to put information on what ships are available in the game rather than hard-coding the numbers. I'm also already using django's authentication system for another app related to the game, so all i'll have to do is add permissions for the calculator to the appropriate groups. Main form of program: http://img514.imageshack.us/img514/2682/battlewv9.png It's a program that simulates battles in an online game called astro empires (it's fun, try it). I have three main goals for the user interface: 1: I want to develop this in a way that users can set all the numbers for fleet, click the "calculate" button, get results, and modify the battle according to the results, all witout having to re-enter data into the textbox. 2: Some values, like the "power" column, rely on the value of the "command centers" text box. the higher the value in the command centers box, the higher the power. If possible, i'd like to have it so that the user can change these values without having to send a request to the server, as that would slow things down for the user and increase load on my server. 3: Furthermore, a few of those buttons open up new windows; for example, the "text box" button opens up a form with a giant text box where users can paste the content of vaious in-game pages, allowing the program to automatically fill in much of the data. I need a way to preserve all the data on a page while the user enters data into the text box or any other form that the user may open up. I see three main ways of doing this: 1: Store the most recent battle information in a database model between requests. When the user clicks on "text box" or "calculate" or whatever, it first stores all the data for the battle in a database table. After the battle is calculated, the program then re-loads the data from the database and prepopulates the fields. To the user, nothing has changed except that the results of the battle are now displayed. Advantages: Makes maximum use of django's already-made capabilities, battle information can be stored indefinitely. Disadvantages: The forms will be very complicated, especially the ones for fleets, unless there's some way to dynamically determine the number, name, etc of fields in a form. The system for storing and retrieving the data will also be complicated. 2: Make the frontend be a Java program. When the user clicks on the "calculate" button, the java program converts all the data for the battle into text, goes to a django page behind the scenes, pastes the text in, clicks the submit button, gets the results back, and fills in the data for the results. All the user should see is the resuts being filled in, they never have to know a request was made to the server. Is this even possible? Would it use the cookies from whatever web browser it was running under, or would i have to work in authentication? Advantages if this works: A lot of functionality can be moved to the client side, meaning a fewer server requests will be necessary, hence the whole system runs more smoothly. With my current skills, a Java interface of this size could be created much easier than a django web interface. Disadvantages: Users that don't/can't use Java are screwed. No code security. 3: Decide django isn't the best thing to put on the server (include alternatives!) I really don't want to do this unless I absolutely have to. What do you guys recommend? How should I go about doing this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

