2007-04-13

OOP

关键字: OOP
OCP: Open for extension, close for modification(black box) SRP: Single responsibility Principle(do one thing, and do one thing well). DIP: Dependency Inversion Principle(depend on abstraction, not on implementation) ISP: Interface Segregation Principle (narrow interfaces) Law of Demeter: D ...
2007-03-04

Rich Domain Model

关键字: domain model
The discussion started with Martin's post: http://www.martinfowler.com/bliki/AnemicDomainModel.html. The common reasons I've seen why we have anemic model are: Most cases are simple db-to-web, with little domain logic. Books are misleading, people are ignorant. It's hard to find a pr ...
2007-02-12

Proper abstraction level makes difference.

关键字: Abstraction
Programming is an art, the same solution to a problem could have different versions of coding. Enterprise programming, due to its large code base, is about to provide functionalities while managing code dependencies and data encapsulation. The essence of managing dependencies and encapsulation is ab ...
2007-02-12

A data matrix implementation 2

关键字: data
We could add more functionalities, but in separate classes. 1. We may add a class for the following operations: sorting, querying, and merging. java 代码   import java.util.List;      public class DataMatrixRowManipulator   ...
2007-02-12

A data matrix implementation 1

关键字: data
Though, as I wrote before, it's very hard to come up a universal dynamic data structure to fit all needs, sometimes we still need a somewhat general dynamic data structure due to requirements. For example, the spreadsheet could have as many columns during runtime, we can't determine the number of co ...
Recently, I read two articles about data holders, search the key word 元数据、开放数据模型及动态系统. The scenario is that constantly we need to change the data fields, e.g., add/delete some fields. This task is tedious because usually we need to update a database table, and then add fields in all corresponding cl ...