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

Tagged , , , | 1 Comment

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 toContinuer la lecture

Tagged , , | Laisser un commentaire

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

Tagged , , , | 1 Comment

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

Tagged , , , , | 1 Comment

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

Tagged , , | Laisser un commentaire

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 requiresContinuer la lecture

Tagged , , , | 1 Comment

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 patientsEEG machines that track heartbeats.
The data is a live feed in table format (already done)…but what IContinuer la lecture

Tagged , , , | Laisser un commentaire

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 intoContinuer la lecture

Tagged , , | Laisser un commentaire

What is a strategy to ensure proper subclasses from a generalized search query?

Here’s a generalized scenario. J'ai “Tasksand I haveTask 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

Tagged , , , | Laisser un commentaire

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

Tagged , , , | 1 Comment
9 pages