Julio Villalba
Julio Villalba

Reputation: 164

How to start with the design of an OOP MVC app

I just started to learn about MVC, I'm currently trying to make an applicaction which would help manage fuel, my Question is how would I go about defining the appropiate models, and logicly breaking down the parts involved, in a design which is the following:

"the app must, Include the tank or deposit which would include the stock of fuel, the tank should be able to keep track of the fuel it has left."

"the system must also keep a record of the restocking and outs of the tank, which would include another entity an equipment, a truck or machinery which was loaded with the fuel."

"at last the equipment must also keep a record of the hour meter of itself and be able to compare it to the usage of fuel in order to obtain performance."

on the technical side I would be using zend framework 2, should I contain everything on one module or make various modules and relate them.

Upvotes: 1

Views: 75

Answers (1)

Yang
Yang

Reputation: 8701

A module itself should be considered as a standalone application. Keeping this in mind, that's where you should start from.

Consider a very typical Blog Module. A blog must have categories and posts. Since categories and posts are part of one module and since their interaction is tightly coupled, it would be very wrong to make categories and posts as standalone modules.

So in your case, equipments and fuels represent one particular functionality which is called equipment management. So the right way to handle this is wrapping all related belonged functionality into one module.

Upvotes: 1

Related Questions