Re: Solution: [PHP] OOP slow -- am I an idiot?

From: Date: Mon, 16 Oct 2006 19:28:41 +0000
Subject: Re: Solution: [PHP] OOP slow -- am I an idiot?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-243191@lists.php.net to get a copy of this message
# cdevidaljk-phpgeneral@yahoo.com / 2006-10-15 13:59:39 -0700: > As I cannot think of a class-based way to build my report, I think > I'll use a customer class everywhere BUT in the report. Inside the > report I'll just use one SQL statement instead of dozens > of instances and hundreds of queries. > > I'll make a note inside the class that this and that method is not the > only place the data is accessed, to also check inside the report. > > Sometimes, you've just gotta compromise to get the job done. Most of > the time, OOP is a good idea, but in this instance I don't think it's > the best choice. You're suffering because you're putting code that belongs in a separate layer (data source) in the domain logic layer. Don't blame classes for shortcomings in your design. http://www.martinfowler.com/articles/dblogic.html -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991

« previous php.general (#243191) next »