I use DAO layer for my website and kept all the master table data read methods in static functions , But looks like it is a performance issue , so going to create them as object level methods
For example
To get countries list , states list and cities list …
I put them like below , But now removing static keyword and going to create object of MasterGeo
class MasterGeo
{
public static getCountries(){
}
public static getStates($countryCode){
}
public static getCities($stateCode){
}
}
Just wanted share this with you guys and please let me know if you have any comments on this
Generally the issue is so mi-nute that it’s negligible. There’s lot of these issues in PHP but it sometimes it’s worth giving way to performance in aid of userbility. OOP itself adds lots of overhead over having a non OOP application however it would become unmanageable so we give way to the performance loss in aid of a better application and ultimately our sanity.