How to add design patterns to CakePHP? [closed]
I am using the CakePHP framework to implement a Web application. I would add my application a design pattern, specifically, the Template Method pattern.Regardless of the pattern you want to implement,...
View ArticleWhat’s the best way to call a controller with MVC?
I’m fairly new to the MVC architecture but I’m picking it up nicely, having my own framework almost done.Nonetheless, I’m having a ‘design issue’, how to call the controller?The controller, as in the...
View ArticleMVC, custom framework: where to put controllers/actions
in my framework, it looks this:designmodules /links /files index.php -> view addNewItem.php -> action deleteItem.php -> actionin this paradigm, all controllers are in one file, I think it has...
View ArticleRewriting url to hide index.php and to make query nice
I had developed project with custom MVC architecture. And I am new to Apache world, so I would appreciate help with this matter. On a Web I had found lots of tutorials, but no one like mine interests.I...
View Articlecodeigniter mysql query to multidimensional array(nested lis
Ok here is what I am struggling with.I have drop down menu on my site which is basically a nested list. It gets its information from my database. Now I have made this work as a procedural piece of code...
View ArticleZend Framework – subdirectories and deprecating action withi
I’m in the process of learning to use the Zend Framework, and I’m therefore trying to grasp the concept of MVC. Through the Zend manual, and a very helpful Youtube video tutorial I have sort of...
View Articlebeginning OOP question about classes using classes
I’m trying to replace a site written procedurally with a nice set of classes as a learning exercise.So far, I’ve created a record class that basically holds one line in the database’s main table.I also...
View ArticleWhere should this code live in MVC structure?
I’m reading a lot and getting really mixed results.Say I have code like this?$name = trim($_POST['name']);$email = trim($_POST['email']); if(strlen($name) > 0 & strlen($email) > 0){ $u = new...
View ArticleDisplaying same page differently for users with different ro
I wanted some suggestions from someone with experience in php. I am making a website in php which will have 4 kinds of users : 1. guest(unregistered), 2. registered, 3. registered with special...
View ArticleDisplaying same page differently for users with different ro
I wanted some suggestions from someone with experience in php. I am making a website in php which will have 4 kinds of users : 1. guest(unregistered), 2. registered, 3. registered with special...
View ArticleImage search using webservices
Ive got an assignment to create an image gallery using flickr – this has to be done using keyword(s) entered by a user in a form, and the image gallery returned must be paginated and display a certain...
View ArticlePHP with OOP and MVC
Using PHP 5.xQuestion, lets say I want to display results from a database. Lets say the last 30 stories from the database. Using OOP and MVC would the ideal setup be you have a class that connects to...
View ArticleGeneral Programming: How to implement model logic in MVC?
I am currently trying to figure out how to properly implement the the MVC principle. Lets take for example a simple blog. I have a database that contains two tables: Blogs and comments. The blogs table...
View ArticleHow to catch exceptions in an action helper?
When I throw an exception(e.g throw new Zend_Exception(‘You are not allowed’,403);) in Action Helper, ErrorHandler won’t catch it. I got Fatal error: Uncaught exception ‘Zend_Exception’ with message...
View ArticleCodeigniter flashdata – am I using it correctly?
I learned about flashdata and decided to use it to display messages based on database interactions. For example if no rows are affected I want to display Post id is invalid or does not exist!In my...
View Article