Thu 10 Nov 2011
wxPython and SqlAlchemy: An Intro to MVC and CRUD
Posted by Mike under Education, wxPython
[14] Comments
In this article, we will be creating a program to store our personal books or perhaps just the books you’ve read. It will demonstrate how to combine wxPython and SqlAlchemy, a SQL Object Relational Mapper (ORM). This program will also give you an introduction to the model-view-controller (MVC) and “create, read, update and destroy” (CRUD) methodologies. The aim is to show you how to create an application that can do the following:
- Create a database (create)
- Add records to that database (sort of create)
- Display the records (read and view)
- Modify records (update)
- Delete records (destroy)
The order of this tutorial will follow MVC, so we will start with the model. The model is the basis for the GUI (the View) anyway, so it’s a good place to start. (more…)