Introduction Today I thought I'd talk about a neat design pattern that doesn't seem to get much love:
I hope to offer a different and richer perspective here. With luck, this article might even help begin the process making the Properties Pattern somewhat fashionable again.
I should point out that none of these techniques is tied to "static typing" or "dynamic typing" per se. Each of these modeling techniques can be used with or without static checking. The modeling problem is orthogonal to static typing, so regardless of your feelings about static checking, you should recognize the intrinsic value in each of these techniques.
Class Modeling You know all about this one. Class-based OO design is the pound gorilla of domain modeling these days. It can take a little practice at first, but for most people class modeling quickly becomes second nature.
This is because OO design has no real mathematical foundation to support it — at least, not until someone comes along and creates a formal model for side effects.
The concepts of OOP stem not from mathematics but from fuzzy intuition. This in some sense explains its popularity, and it also explains why OOP has so many subtly different flavors in practice: Industry folks can never quite agree on what OOP is, but we love it all the same.
Relational Modeling Relational database modeling is a bit harder and takes more practice, because its strength stems from its mathematical foundation. Relational modeling can be intuitive, depending on the problem domain, but most people would agree that it is not necessarily so: Object modeling and relational modeling produce very different designs, each with its strengths and weaknesses, and one of the trickiest problems we face in our industry has always been the object-relational mapping ORM problem.
Those who know better know just how hard ORM is in real-world production schemas and systems. Usually XML is used to model data, but it can also be used to model code. I mention this not to start a fight, but only to illustrate that XML is a third modeling technique in its own right.
It has both natural resonances and surfaces of friction with both relational design and OO design, as one might expect.
Two other obvious candidates are Functional modeling in the sense of Functional Programming, with roots in the lambda calculus and Prolog-style logical modeling.
Both are mature problem-modeling strategies, each with its pros and cons, and each having varying degrees of overlap with other strategies. And there are still other schools, perhaps dozens of them.
The important takeaway is that none of these modeling schools is "better" than its peers. Each one can model essentially any problem.
There are tradeoffs involved with each school, by definition — otherwise all but one would have disappeared by now. Finding the sweet spot Sometimes it makes sense to use multiple modeling techniques in the same problem space. Choosing the right technique comes down to convenience. For any given real-world problem, one or two modeling schools are likely to be the most convenient approaches.
Exactly which one or two depends entirely on the particulars of the problem. By convenient, I mean something different from what you might be thinking.
To me, a convenient design is one that is convenient for the users of the design. And it should also be convenient to express, in the sense of minimalism: One way of looking at this is that the design should be convenient for itself! Unfortunately, most programmers myself included tend to use exactly the wrong definition of convenience: This problem rears its head throughout computing.
Modeling schools are just like programming languages, web frameworks, editing environments and many other tools: The important thing to remember is that all modeling schools are "first class" in the sense of being able to represent any problem, and no modeling school is ideal for every situation.
Just because you are most comfortable solving a problem using a particular strategy does not mean that it is the ideal solution to the problem. The best programmers aim to master all available techniques, giving them a better chance at making the right choices. It is their first-class peer, inasmuch as it is capable of modeling the same broad set of problem domains.
Brains and Thoughts Douglas Hofstadter has spent a lifetime thinking about the way we think.As a result, the database can be accessed read+write by apache2-daemon (user www-data), without giving grant to the project root folder, and - on the other hand - the app can be run in dev mode by the operational user hape, e.g.
l y b e r t y. c o m: now serving over 10, files (> 2, active html pages) adb creative suite 3 compare lyberty. splash page version: (June 28) 選ぶべき道は自由か死だ。 get banner.
Django login error: “attempt to write a readonly database” in IIS Hot Network Questions Is it possible for 2 (or more) wizards to share a spell book?
Tb Security Procedures for Safeguarding, Accounting and Supply Control of Comsec Material. Oct 20, · Note: Today's entry is a technical article: it isn't funny. At least not intentionally. Update, Oct 20th I've added an Updates section, where I'll try to track significant responses, at least for a week or so. There are three entries so far. Contents. Introduction; Three Great Schools of . Django login error: “attempt to write a readonly database” in IIS Hot Network Questions Is it possible for 2 (or more) wizards to share a spell book?
Tb Security Procedures for Safeguarding, Accounting and Supply Control of Comsec Material. Tb Security Procedures for Safeguarding, Accounting and Supply Control of Comsec Material. Oct 20, · Note: Today's entry is a technical article: it isn't funny.
At least not intentionally. Update, Oct 20th I've added an Updates section, where I'll try to track significant responses, at least for a week or so.
There are three entries so far. Contents. Introduction; Three Great Schools of Software Modeling.