jeudi 20 juillet 2017

About developping a web based GUI of a simple hydrological simulation tool

I am developing a web based GUI for a modelling software. I have already done the source code of it with python 2.7 in an object-oriented way. It runs correctly in a shell. Then the second part comes: I need to make it as a web app. My supervisors recommended me to use Django. I am new to use Django and web development. I have just used ruby and rails to develop a personal blog before.

My questions are:

  1. The web app will allow users to input parameters (par and config, dictionaries). And data is a list of dictionaries generated from a csv file uploaded by user. The program will run when users press a button. But I don't know if I have to create Django models in database for my classes below. Because I only need to run the program with these information, and the website will be open access so everybody can use without authentication. Can I just let the server play with the user in a session where the input and output are all stored in RAM ?
  2. If the first question not feasible, I found that dictionaries can be converted into textField to be stored in database(with some libs). So does the converted dictionary work the same way as a normal one ? How about the performance ?
  3. Output of the program can be a csv file. And sometimes a plot function can be called. So in this case, do you have any suggestion about what is the optimal way for my web app to work ? (I found something in django official doc, about cache-based session, file-based session.. etc, are they relevant ?)

    class HydroModel(object):
        def __init__(self):
            self.par = dict()
            self.config = dict()
            self.data = list()
            # Methods...
    
    class CurrentModel(HydroModel):
    
    # Methods...
    
    

    I am sorry if I asked something silly because I am not studying computer science related subjects. Any help will be sincerely appreciated !




Aucun commentaire:

Enregistrer un commentaire