Modern applications and the state they need to remember
Gregory S. DeLozier, PhD
A sales export is input to an analysis.
Each run ends with the report.
Objects in memory disappear when the program ends.
The order still needs to exist tomorrow.
| Keep after a restart | Usually temporary |
|---|---|
| An order’s contents | A value used to draw a button |
| A pet’s owner | An intermediate calculation |
Display State can happen anywhere in this cycle.
A read-only action may load and display without saving.
A file may be enough for a small program.
How does the application remember who owns a pet?
What happens when an owner is removed?
How does a web-page change become persistent?
The page needs the number of dogs.
| Application counts | Database counts |
|---|---|
| Retrieve every pet | Request the count |
| Count dogs in the application | Receive the result |
Structured Query Language (SQL)
| Chapter | Topic |
|---|---|
| 1 | Intro SQL |
| 2 | SQL in Python |
| 3 | Intro to Web Apps |
| 4 | Database Abstraction |
| 5 | Database Constraints |
Object-relational mapper (ORM)
| Chapter | Topic |
|---|---|
| 6 | Object-Relational Mappers (ORMs) |
| 7 | ORM with Constraints |
| 8 | Dataset Library |
| 9 | Optimization |
| Chapter | Topic |
|---|---|
| 10 | Alternative Platforms |
| 11 | Intro to Mongo |
| 12 | Mongo App |
| 13 | MongoDB Atlas |
| 14 | Mongo Indexes |
| 15 | Installing and Securing Database Servers |
| 16 | Geospatial Queries |
What should it remember after you close it?
What can it forget?
What work could its database do?