Tagged Questions
0
votes
0answers
104 views
Pattern or solution for using classes with different interface the same way
What I would like to achieve is to use classes (now two, later more) with different interface the same way, so I would like avoid using decisions based on the interface on upper levels for instance, I ...
0
votes
1answer
61 views
Using a Proxy as an ACL
I am building an MVC application in PHP, using Zend Framework.
My model includes Domain Model and Mapper layers. I am trying to keep the domain model in pristine condition and have managed to keep ...
1
vote
3answers
175 views
Better solution then simple factory method when concrete implementations have different attributes
abstract class Animal {
function eat() {..}
function sleep() {..}
function isSmart()
}
class Dog extends Animal {
public $blnCanBark;
function isSmart() {
return $this->blnCanBark;
...
-4
votes
1answer
159 views
What must one know when approaching web development? [duplicate]
I just started working as a novice Web Developer.
I know PHP pretty well, as well as some basic jQuery.
Anyway, my boss told me I should explore and learn about MVC, Memcache, Design Patterns, how ...
0
votes
2answers
165 views
How to implement multi-theme PHP application
I am developing an application which will handle many virtual stores and I would like to have many themes that the user could choose anytime. I would to know what's the main ideia to implement it. I ...
4
votes
3answers
331 views
Is it acceptable for child classes to “break” parent class functionality?
One of the devs that works with me is following the Open/Closed Principle to add functionality to a Model by extending from our framework ORM.
class BaseModel extends ORM {
...
}
All our models ...
5
votes
2answers
538 views
Can REST API be used as business layer?
I am using PHP Codeigniter MVC design pattern
and I had this project with some sort of specific business processes
In my application I will be dealing with 2 existing REST APIs:
Google
Trello
...
-1
votes
3answers
236 views
Changing behaviour of abstract class without modifying subclasses
I am facing a problem with changing behaviour of a library (thus cannot or don't want to change its internals because of future updates, etc.).
In this library there is an abstract class which shares ...
1
vote
1answer
288 views
What is a practical level of abstraction in a web application? [closed]
(Originally asked on StackOverflow - http://stackoverflow.com/questions/14896121/what-is-a-practical-level-of-abstraction-in-a-web-application)
I still consider myself a newcomer to OO programming, ...
6
votes
4answers
296 views
Applying DRY to an inheritance hierarchy
I'm working on refactoring a legacy application where I implemented the State pattern successfully as shown in the following diagram:
As you see there is a common behavior between the 3 states, so ...
8
votes
4answers
512 views
In MVC, can/should basic data retrieval from the Model be done in the View?
Given the concept of 'skinny controllers, fat models' and the general acceptance that Views can directly call on Models when requiring data for output, should one consider handling the 'get and ...
3
votes
2answers
533 views
Service layer design
I am developing an MVC website in PHP, and for the first time, I would like to implement a service layer. I have some design considerations I would like to get some advice on. The backend will by no ...
16
votes
3answers
844 views
How to design website workflow?
I have been thinking about this for really long time without reaching an optimum answer.
First of all, I'm a medical doctor who loves programming but never really studied it, except for home learning ...
1
vote
1answer
164 views
Is there a good design pattern for this messaging class?
Is there a good design pattern for this?
I want to create a messaging class.
The class will be passed:
the type of message (eg. signup, signup confirmation, password reminder etc)
the client's id
...
3
votes
2answers
879 views
Using PDO with MVC
I asked this question at stackoverflow and received no response (closed as duplicate with no answer). I'm experimenting with OOP and I have the following basic MVC layout:
class Model {
// do ...