You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Marcelo Santos
marcelsud
Principal Software Engineer, geek, husband, and dad!
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You may not know that [the most awesome validation engine for PHP][1] out there
is [Respect/Validation][2]. If you do, this is tailored for you!
All rules on [Respect/Validation][2] are meant to be used together, composing
a more complex validation rule that is closer to the domain of your application
than the existing ones, let's try an example:
Quando falamos sobre design em orientação a objetos, estamos basicamente falando sobre responsabilidade e relacionamento. Com responsabilidade quero dizer algo que alguma coisa faz e com relacionamento quero dizer como alguma coisa utiliza aquilo que outra coisa faz. O Design de Software Orientado a Objetos trata especificamente da forma com que os objetos se relacionam, ou seja, como expor a responsabilidade dos objetos de forma que outros objetos possam se relacionar.
Do ponto de vista do Design de Software Orientado a Objetos, não importa, exatamente, como alguma coisa é feita. Pelo contrário, o objetivo é justamente evitar esse conhecimento sobre a implementação, encapsulando o que é específico para permitir que trabalhemos com a definição conceitual daquilo que precisamos utilizar. Por exemplo, é comum uma aplicação precisar trabalhar com um SGBD. Se nossos objetos tiverem conhecimento específico de que estamos, na verdade, trabalhando com MySQL, e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters