object oriented analysis and Design Pattern

MVC Design Pattern

MVC Pattern stands for Model-View-Controller Pattern. This pattern is used to separate application's concerns. Model - Model represents an object  carrying data. It can also have logic to update controller if its data changes. View - View represents the visualization of the data that model contains. Controller - Controller acts on both model and view.… Continue reading MVC Design Pattern

object oriented analysis and Design Pattern

Singleton Pattern

<?php final class UserFactory {/** * Call this method to get singleton * * @return UserFactory */ public static function Instance() { static $inst = null; if ($inst === null) { $inst = new UserFactory(); } return $inst; } /** * Private ctor so nobody else can instance it * */ private function __construct() {… Continue reading Singleton Pattern