Hand Coded Applications with SQLAlchemy
- Type:
- Talk
- Audience level:
- Intermediate
- Category:
- Best Practices/Patterns
March 10th 11:45 a.m. – 12:30 p.m.
Description
SQLAlchemy is the object relational mapper and database toolkit for Python, first introduced in 2005. In this talk I'll describe why SQLAlchemy has always been called a "toolkit", detailing the software construction mindset for which SQLAlchemy was designed to be used with - what I am currently referring to as the "Hand Coded" approach.
Abstract
- Hand Coded Apps
- Isn't this term obvious?
- Examples where "hand coded" isn't obvious or even present
- Brief definition of "Hand coded"
- Make decisions
- Decide conventions
- Implement decisions, automate conventions using high-quality,
fine grained tools
- Myths of programming tools
- What common practices aren't so "hand-coded"?
- Example - the "auth" plugin
- Demystifying building a simple "auth" system specific to our needs
- Advantages to specific, in house libraries versus generic, off the shelf
- Sum up "hand coded"
- Databases
- Why do we use databases?
- Why do we use relational databases?
- When should we not use relational databases?
- how do we use relational databases with application code?
- what do we mean by "database abstraction" ?
- problems with "abstraction == hiding"
- object relational impedance mismatch
- SQLAlchemy and the hand coded approach
- A vanilla SQLAlchemy model
- Why is it verbose ?
- Automating conventions
- building a base
- reducing verbosity
- define standard patterns/interactions
- build the ORM you want
- Exposing the relational model
- Simple queries, non-controversial
- A not-so-simple query
- SQL programmer approach
- SQLAlchemy approach
- "Leaky abstraction"