1
vote
0answers
112 views

MVC content management framework with an admin panel

I've lately been developing my own MVC content management system using PHP and, at least in my mind, am a little stuck with the system design. I believe this would apply to building a content ...
1
vote
1answer
69 views

Web Application: Combining View Layer Between PHP and Javascript-AJAX

I'm developing web application using PHP with CodeIgniter MVC framework with a huge real time client-side functionality needs. This is my first time to build large scale of client-side app. So I ...
0
votes
0answers
14 views

Writing Models in PyroCMS/Codeinighter Models

In Pyrocms there are Admin views and User views. Im developing a complex module where my model file is getting to be rather large. Should I be abstracting logic in my model files to also be User ...
1
vote
1answer
186 views

Advice on refactoring PHP Project

I have a small SAS ERP that was written some years ago using PHP. At that time, it didn't use any framework, but the code isn't a mess. Nowadays, the project grows and I’m now working with 3 more ...
-1
votes
5answers
528 views

Combining two MVC frameworks in a project

Is it any good to combine two MVC frameworks together in a project? Is it a fairly common approach? I am thinking about using a serverside framework like CodeIgniter/Laravel and client side framework ...
-1
votes
1answer
115 views

Building a webservice with mvc [closed]

I'am planning my website over here based on MVC. And I am thinking about a webservice (who knows, maybe one day I'll create an android app or something). The site and the webservice will behave ...
1
vote
1answer
146 views

Web design pattern

I am building a small website, in PHP and I am using MVC design pattern for the UI. In the future I will need to add mobile support for my website. It will be in the sub domain "m" like everyone. All ...
2
votes
2answers
116 views

Handling login errors with User Class

We have a User class which handles all things related to users within a Content Management System. As you'd expect, the class contains a function login(). This function accepts three arguments: ...
1
vote
1answer
102 views

Need help modelling a User/Project/Task relationship

So I'm creating a very simple project/task management application in Laravel 4 and I'm not sure how these relationships would work. I have a Project, Task and User model. A User can own a Project or ...
0
votes
1answer
176 views

Practical Use of Depency Injection (IoC) Container

I am creating a MVC-ish framework in PHP. I am trying to implement a DI Container to allow the creation of controller objects (among others). My MVC framework is pretty typical. Each module (or ...
3
votes
5answers
1k views

Programming PHP without MVC, classes or framework: rewrite or continue on new features?

I have been programming for several years now, and back then (learning PHP) I've didn't learn to program using classes, MVC-logic or using any frameworks. I found my self solving my problems very well ...
0
votes
1answer
222 views

How would I structure my code into an MVC format?

I want to have the home page (root of the website), check if a cookie exists for a user being logged in, and then based off of that determining whether or not to load the sign up page (landing page) ...
0
votes
1answer
485 views

Slower Ajax Response

Does putting the view logic inside the controller increase page load speed? Because I have a controller action calling a view which I am loading through ajax and I am getting a very slow response. Why ...
2
votes
2answers
166 views

HMVC and Database Connections

Whilst I have good experience with OOP, I'm fairly new to the concept of (H)MVC. I understand the basic concept of modular design that comes with HMVC, it's the great attraction of it. But one thing ...
4
votes
2answers
1k views

Best Practices PHP mvc routing

I have a custom MVC framework that is in a constant state of evolution. There's a long standing debate with a co-worker how the routing should work. Considering the following directory structure: ...
3
votes
2answers
645 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 ...
3
votes
3answers
883 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 ...
7
votes
4answers
846 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
69 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 ...
2
votes
3answers
1k 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
563 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
343 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 ...
7
votes
4answers
3k 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
248 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
720 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 ...
4
votes
1answer
746 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
187 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
1k 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
1answer
665 views

How to achieve N-Tier type in Codeigniter MVC [closed]

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
1k 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 ...
9
votes
3answers
1k views

Is the term 'Front-End' synonymous with 'Client-Side'? If so, is this always the case?

As a relatively new (self-taught) web developer, I've heard the terms front-end, client-side, back-end, and server-side quite often. To me, front-end and back-end were always synonymous with ...
-1
votes
1answer
469 views

Migrating from PHP to ASP .NET MVC [closed]

I plan on migrating a website from PHP to ASP .NET MVC. However, since the website is large and this migration can't be done in a short time I plan to use both MVC and PHP pages together. So the idea ...
-3
votes
1answer
434 views

Does anyone knows a good minimal php mvc framework? [closed]

I've been developing using frameworks since the last year, and is true that those pieces of software really help me and improve my development, that's until you need to fulfill your client's dreams, ...
9
votes
4answers
1k 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
841 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 ...
3
votes
4answers
637 views

mvc pattern on procedural php

First off, I do not have anything against OO programming (I'd be mad if i believed so). But I was thinking on some sort of procedural MVC pattern with PHP; let me explain better. As we all know, ...
0
votes
3answers
1k views

Migrating legacy procedural code to MVC without rewriting [closed]

I recently started working on a PHP application that was built many years ago before the advent of objects and namespaces in PHP. The code is procedural, does not separate presentation logic from ...
1
vote
1answer
97 views

Fitting an established site into a CI framework

I manage a rather large, feature full nightmare of a site which has no end of feature creep settings/options/etc. Up to now its been coded in a procedural/functional way and would like to move to an ...
0
votes
1answer
654 views

PHP MVC error handling, view display and user permissions

I am building a moderation panel from scratch in a MVC approach and a lot of questions cropped up during development. I would like to hear from others how they handle these situations. Error ...
2
votes
3answers
175 views

Where should “display functions” live in an MVC web app?

I'm using the Yii Framework which is an MVC php framework that is pretty similar to your standard web-based MVC framework. I want to display the related data from a many-to-many table as a list of ...
1
vote
3answers
766 views

What are the advantages of using a template language?

I work on a CakePHP app and the views consist of raw html with embedded php echo statements, which over time has gotten rather messy. Before I go in and rewrite the code, I'm wondering if it makes ...
7
votes
7answers
8k views

Is there any design pattern except MVC for web?

I want to know are there any design patterns for web besides MVC? I know there are design patterns as: Registry, Observer, Factory, ActiveRecord ,... and MVC a set of other design patterns and folder ...
1
vote
3answers
797 views

How important is it to implement a caching system in an MVC style framework?

I am writing my own PHP framework (...waits for the groans to subside) for the purpose of learning (best practices, design principals etc.) as I'm entirely self-taught and consequently there are gaps ...
3
votes
3answers
611 views

Is it best practice to have a file only of “includes/requires”?

I have 5-10 files on one server that all catch XMLRPC-PHP requests. There's about 20 lines of require_once in each one that are all the same. It'd make life simpler for me to create a separate file ...
7
votes
4answers
172 views

Controllers and re-factoring for maintainability / sensibility

I have read many posts similar to this on the site: however I still am questioning what is best in my situation (also the answers are contradicting from question to question). I have a website ...
0
votes
4answers
2k views

Coding in 'core php' and separating logic from presentation

What are the various ways of acheiving this ? Can someone please guide me? I have to code a website for a friend (designer). The friend wants me to use core php and not any framework like codeigniter ...
2
votes
2answers
11k views

How to do MVC the right way

I've been doing MVC for a few months now using the CodeIgniter framework in PHP but I still don't know if I'm really doing things right. What I currently do is: Model - this is where I put database ...
4
votes
1answer
245 views

Using default parameters for 404 error (PHP with mvc design)?

I have a custom made Framework (written in PHP). It all works very good, but i have some doubts about a certain thing. Right now when a user call this url for example: http://host.com/user/edit/12 ...
5
votes
4answers
1k views

how to structure MVC models and ORM models

I have some trouble getting a good folder structure in my project and i would like to know what other ways i could use to structure my files. I'm currently working in an MVC sturctured folder. www/ ...
0
votes
1answer
119 views

Places to store basic data

I am using PHP. I'm building a fully modular CMS, which is destined for the public. Some people might view this as a framework, but I intend to write a set of extensions for it, extensions that will ...