model view controller - MVC for standalone application using python, sqlite3 and gtk -


i developing pygtk application have adopted mvc structure. don't think i'm following standard mvc pattern in implementation.

please suggest how must use mvc following problem statement.

i using python, gtk, sqlite3 in application

problem statement application:
data present in logfile. should extracted , shown in gui. gui can have multiple views(like browser tabs) show data extracted logfile(user can create multiple views same database table). users can filter/search data through gui views. filter condition can vary 1 view another.

current implementation using mvc structure:
currently, in gui, button "create view" present, upon clicking, creates view display extracted data. data extracted(controller extracts data) logfile , added sqlite database(model). data sqlite database table fetched , added gtk.treemodel displays in gtk.treeview(view). each time user clicks "create view", controller instantiates view class , creates new tab in gui.

i have created 3 classes model, view, , controller achieve this. controller instantiates model , view. application, while running, instantiates controller keeps waiting gui events(click on "create view" etc.. using gtk main loop)

here need help!
have read that, in mvc, if model (database) gets changed views changed or vice versa. possible achieve same using sqlite3 , gtk.treeview.

in short, questions are:

  1. how can update application gui while extracting data database? in mvc examples there observer classes call callback functions when model changes. how can write same above problem statement?
  2. is there anyway can set sqlite3 database treemodel gtk.treeview if row inserted database table gets updated in treeview?
  3. is there example uses mvc architecture , built using python, gtk, sqlite?

thanks in advance!

i don't know if there existing examples; describe sounds specific problem.

however, can use gda library connection sqlite database gtk.treemodel.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -