Tag Archives: padrões de design
Entendendo MVC
The last few days I’m extensively reading books & web-pages about oop & mvc in PHP,
trying to reach the next level of better programming.
Actually I’ve come over some little problem of understanding mvc:
Where to put a mysql_query?… Continue lendo
Por Fábrica insuficiente para classificar
Strategy is a pattern aimed at allowing you to add new (in your case sort) algorithms to your software without breaking the clients of the algorithms. It’s an investment in design complexity that will pay off if you need to… Continue lendo
class diagram for accessing & storing logs
I need to log search parameter and then want to access them.
search class : will perform search based on searchParams class (having searched parameters)
searchLogger : perform search logging and one of them will be search performed by user.… Continue lendo
PHP Design Pattern OOP
I recently read an article on Wikipedia about Design Pattern
Até agora eu fiz isso, mas retorna Fatal error: Maximum function nesting level of '100' reached, aborting!…
Logicamente eu sei, ele irá retornar erro de aninhamento, Mas, I don’t understand Continue lendo
What's the best to way to manage a singleton?
I am messing around with different PHP logging frameworks. I am currently trying PEAR::Entrar. I figured that I would use its singleton… function to make sure there was only one instance of the class around.
I have a small daemon-like Continue lendo
Passando parâmetros de configuração de aplicativos para entidades
I have an application that uses Doctrine ORM for entities. I try to push as much business logic into the entities as possible, following OO design. But I have run into a small problem. Some of the business logic requires… Continue lendo
Matemática complexa que envolve padrões Sine detecção
Hoping to find a math+PHP genius to solve this. One of my clients (a surgeon) wants a web-app tied to his patients’ EEG machines that track heartbeats.
The data is a live feed in table format (already done)…but what I… Continue lendo
Dependency Injection: puxando componentes necessários quando forem realmente necessários
A essência por trás DI é aliviar uma classe de criação e preparação de objetos que ele depende e empurrando-os em. Isso soa muito razoável, mas às vezes uma classe não precisa de todos os objetos, that are being pushed into… Continue lendo
What is a strategy to ensure proper subclasses from a generalized search query?
Here’s a generalized scenario. Eu tenho “Tasks” and I have “Task Events.” I’ve created a database table for each. I’ve also created a model which handles fetching records from the database.
Para “Task Events,” I have a few types: Created,… Continue lendo
Errado OO arquitetura, objetos de compartilhamento e dependências? Talvez eu estou faltando um padrão de design aqui?
OK, Estou criando uma aplicação PHP pequena. A estrutura atual é algo como isto:
$client = new AppNameClient;
$model = $client->getModel();
$model->getNode();
…
Everything is beautiful here. Client is responsible for connecting and running commands through Socket to a small C Continue lendo





