Tag Archives: design-patterns
Comprendre 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?… Continuer la lecture
Pourquoi usine insuffisante pour le tri
La stratégie est un modèle destiné à vous permettre d'ajouter de nouveaux (dans votre cas de tri) algorithmes à votre logiciel sans casser les clients des algorithmes. It’s an investment in design complexity that will pay off if you need to… Continuer la lecture
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.… Continuer la lecture
PHP OOP Design Pattern
I recently read an article on Wikipedia about Design Pattern
So far I’ve done this, but it returns Fatal error: Maximum function nesting level of '100' reached, aborting!…
Logically I know, it will return nesting error, Mais, I don’t understand Continuer la lecture
What's the best to way to manage a singleton?
I am messing around with different PHP logging frameworks. I am currently trying PEAR::Log. 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 Continuer la lecture
En passant les paramètres de configuration d'application à des entités
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… Continuer la lecture
Mathématiques complexes impliquant modèles Sine détection
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… Continuer la lecture
Dependency Injection: pulling required components when they are actually needed
The gist behind DI is to relieve a class from creating and preparing objects it depends on and pushing them in. This sounds very reasonable, but sometimes a class does not need all the objects, that are being pushed into… Continuer la lecture
What is a strategy to ensure proper subclasses from a generalized search query?
Here’s a generalized scenario. J'ai “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.
Pour “Task Events,” I have a few types: Created,… Continuer la lecture
Mauvaise OO l'architecture, objets de partage et les dépendances? Peut-être qu'il me manque un modèle de conception ici?
OK, i’m creating a small PHP application. The current structure is something like this:
$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 Continuer la lecture





