P-Patterns!

From Andrey

(Difference between revisions)
Revision as of 06:53, 7 February 2006
Andrey (Talk | contribs)

← Previous diff
Revision as of 06:54, 7 February 2006
Andrey (Talk | contribs)
Smart Button
Next diff →
Line 15: Line 15:
== Smart Button == == Smart Button ==
-I bought a DVD player which was a black box with a tiny hole of a microphone. It did an amazing thing of being able to hear voice commands and execute them. For example, to open drive bay I would say 'Open drive'. To make a pause, I would say 'Do pause' and so on. I like it in the beginning but there was one thing. I had to always consult with a manual because I kept forgetting commands. For example, I would say 'Make pause' instead of 'Do pause', and it wouldn't understand. Finally, I started missing my old DCD player. It had buttons as an interface. In order to turn it on, I didn't have to recall a command, but simply knew to press the Power button. In the end, I took the DVD player back to store and exchanged it to a conventional one. With a several buttons, I had complete control and no need to keep a page with commands printout in a condensed typeface, wrapped in a transluscent sleeve.+I bought a DVD player which was a black box with a tiny hole of a microphone. It did an amazing thing of being able to hear voice commands and execute them. For example, to open drive bay I would say 'Open drive'. To make a pause, I would say 'Do pause' and so on. I like it in the beginning but there was one thing. I had to always consult with a manual because I kept forgetting commands. For example, I would say 'Make pause' instead of 'Do pause', and it wouldn't do anything, because it wouldn't understand. Finally, I started missing my old DCD player. It had buttons as an interface. In order to turn it on, I didn't have to recall a command, but simply knew to press the Power button. In the end, I took the DVD player back to store and exchanged it to a conventional one. With a several buttons, I had complete control and no need to keep a page with commands printout in a condensed typeface, wrapped in a transluscent sleeve.
Expose a generic object in the interface in order to simplify class use. Expose a generic object in the interface in order to simplify class use.

Revision as of 06:54, 7 February 2006

Some stuff that I came up with.

Contents

Object Role

Object role vs. Object class

Golden Bridge

Utilizing the Bridge pattern in order to separate model from application-specific behaviors.

X class

Divide model classes into pure and application-specific classes, in the model, use only pure classes, but in application, instantiate only application-specific classes.

Smart Button

I bought a DVD player which was a black box with a tiny hole of a microphone. It did an amazing thing of being able to hear voice commands and execute them. For example, to open drive bay I would say 'Open drive'. To make a pause, I would say 'Do pause' and so on. I like it in the beginning but there was one thing. I had to always consult with a manual because I kept forgetting commands. For example, I would say 'Make pause' instead of 'Do pause', and it wouldn't do anything, because it wouldn't understand. Finally, I started missing my old DCD player. It had buttons as an interface. In order to turn it on, I didn't have to recall a command, but simply knew to press the Power button. In the end, I took the DVD player back to store and exchanged it to a conventional one. With a several buttons, I had complete control and no need to keep a page with commands printout in a condensed typeface, wrapped in a transluscent sleeve.

Expose a generic object in the interface in order to simplify class use.

This is my case for exposing an object in interface. I know that there is some opposition for doing so, and even a law (Demeter's law).

Postponed Validation

Postponing validation until checkpoint/commit so that validations do not hinder performance.

Pascal example.