All Questions
9 questions
2
votes
1
answer
830
views
OPP Sign In/Out procedure in PHP
As a self-taught student of Web-Development and Web Technologies, I created a simple sign in/out form in PHP, just for practice purposes and some fun!
I read the O'reilly's book about PHP and I found ...
3
votes
1
answer
1k
views
Laravel controller for a commenting system
Can someone review my Controller? I should follow these guidelines:
Code should be written with MVC pattern and to use OOP.
The code now works fine, but I need to improve it. Also, should I use more ...
6
votes
1
answer
130
views
Static registry
I am working on a base framework for my various PHP related projects. I have grown since beginning all of this, but the one area I am still having difficulty/concerns with involves the dependencies of ...
1
vote
3
answers
294
views
Dependency injection/dependency injection containers in MVC web app
I just learned about dependency injection/dependency injection containers, and I realize that the controller in my MVC web application is hard to test.
My original controller class:
...
10
votes
3
answers
3k
views
Listener/Observer Model in PHP
I've taken a look at the SPL Listener/Observer model but found that it doesn't work when using static methods. So I wrote my own but it's very simply. Can anyone suggest ways to make it more like the ...
2
votes
0
answers
113
views
Modular dynamic based routing with wildcards
I've created this router for my framework and wanted to get some feedback on if it's the most efficient way to search the routes.
The main router
...
2
votes
1
answer
219
views
Reducing the loading time of a page
I'm using PHP, MySQL, Smarty, jQuery, etc. for my website. I'm using an MVC architecture to develop the website. Now in one of the functionality I'm fetching a large amount of data and perform some ...
2
votes
1
answer
654
views
Printing results in XML
I have been writing PHP programs in the MVC pattern for quite some time. But I am not sure if I am doing it right.
For instance, I have this PHP file that prints results in XML, and I put this file ...
4
votes
2
answers
460
views
PHP MVC controller code needs diet?
This is the dashboard controller code in PHP Symfony 2. It collects some aggregate data and points for charts, but i don't like it very much. Do you think that this code belongs to what a controller ...