# Continuations
A contination is a saved snapshot of a program's state. In other words, continuations are where you take a snapshot at a condition/point and you have the ability to backtrack as and when needed. The call stack saved as nodes in a tree, with the different choices (from that point onwards) as branching nodes, is one way of implementing them.
# C is Predictable
C has a predictable relationship with assembly language instructions i.e Most C instructions map to a fixed number of assembly language instructions. C++ is unpredictable.
# Data Decoupling Patterns
Data Accessor Pattern:
- Used to seperate data access complexity from application logic. Typically used in applications with a db backend. Changes in data representation will not affect application logic as long as application uses a generic set of access operations to retrieve data (etc: read,write,delete).
Active Domain Object Pattern:
- Sits in between the physical representation and the business logic. Encapsulates physical data representation in higher level domain objects. The data access can be encapsulated in a data accessor pattern.
Object Relational Map:
- Maps objects to relational databases. In other words, it is used to encapsulate physical data in logical objects. A typical mapping would map a table to a class, a row to an object and a column to an attribute.
- A one to one relationship between tables is mapped using a direct reference.
- A one to many could be an aggregation or an association. In an aggregation, one side owns the other one. In an association, one side is related to the other one. In an aggregation, all owned objects are automatically updated. In an aggregation, all related objects are just read automatically.
- A many to many is a bidirectional association.
|
|