Tagged Questions
3
votes
2answers
239 views
application logic, business logic, models, controllers - where to put the application's brains?
I'm trying to wrap my head around models, views, and controllers, but I feel as though the more I read, the more conflicting information I seem to encounter. I guess the general goal is--as far as ...
4
votes
3answers
260 views
Why should I adopt MVC? [duplicate]
I decided to get my hands wet and got the YII framework for PHP.
I created my first application, then created new controller, model and view. Connected to database, got my record passed from ...
4
votes
4answers
448 views
In MVC is it considered good practice to have private, non-action, functions in a controller class?
Sometimes action functions in the controller class can become huge and nasty, with many-many lines of code to simply control the flow of data from the Model to the View. At some point these huge ...
1
vote
1answer
57 views
how to map controllers , models, and views as a todo list
Before starting on a current project I was wondering if there is a terminology for what I am planning on doing? Basically what I want to do is map out every object in layers such as all the ...
1
vote
3answers
595 views
MVC View Question
In my PHP web page (index.php), I have a simple script that calls a "page" class, and then builds the page from it.
Index.php executes methods within an instance of the 'page' class, such as ...
1
vote
2answers
242 views
Search and Replace in MVC
What would be a good MVC/OOP/GRASP/SOLID structure for a search/replace functionality. Methods: search/searchNext/replace/replaceAll.
I'm interested only in the PHP arhitecture and how a professional ...
1
vote
1answer
275 views
Is this an MVC framework?
I have built a framework for my applications that has been working well, and I have always referred to it in my mind as an MVC. However, after reading some more on what an MVC is (not that I didn't to ...
5
votes
4answers
1k views
Most MVC-strict php framework
I have been trying to wrap my head around MVC pattern for about 6 months.I've read tons of articles, Q&A, and blog posts about MVC and HMVC patterns, but I just simply don't get it 100%.
I tried ...
1
vote
1answer
178 views
Service as a Model in MVC
I have a PHP MVC application and a file table. I need to implement the functionality: mark all as read. The best solution for the code I found so far was to put the actual implementation in a ...
0
votes
3answers
524 views
Models structure in PHP/MVC
I have some classes that are composed with ORM generated Models.
example1:
For example the Report.php (Model) is using a Document.php Model generated with ORM. Based on the document object a report ...
3
votes
1answer
207 views
The Service class in MVC
From time to time I find there is a need to build a service class. Something I can't really attach inside a model in order to respected GRASP and SOLID.
So I created a class called ...
0
votes
2answers
138 views
What is a good technique to prevent unauthenticated users from accessing controller methods?
I have an event(s) controller:
class Event extends CI_Controller{
public function index(){
}
public function foo(){
}
//Shouldn't be able to use this method unless logged in
...
5
votes
2answers
529 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
...
4
votes
2answers
354 views
How to achieve N-Tier type in Codeigniter MVC
I know that N-Tier intended to separate layers on different network
but I would like to have the same code separation in codeigniter
I got this idea to have
Model : for database CRUD - > Data layer
...
3
votes
2answers
521 views
Codeigniter/MVC workflow
Bit of a workflow question.
I'm just staring with MVC and wondered how other people usually work in MVC? The 2 options I see is to code the model and controller completely first and then work on the ...