The Clash of MVC Frameworks: The Big Picture
Posted: August 8th, 2009 | Author: Kornelije Sajler | Filed under: The Clash of MVC Frameworks | Tags: CackePHP, Data Model, MVC Frameworks, Mysql Workbench, Specification, Vouchers | 1 Comment »This post is all about application data model, specification and logic for my MVC Framework contest. For data model I used MySQL Workbench 5.2.2 and it is quite OK for an alpha version. I will include in the end of post a workbench .rwb file. I have placed inside comments for tables and attributes. Now, let’s specify it!
Specification:
This application is for generating vouchers for the clients. And it is not our importance what the clients will do with them. The job of application is to generate them, keep track of clients, and keep track vouchers belonging to each client, so they can be billed. Billing is also not important here, only generate and deliver.
The application will have the way to keep track of clients. The vouchers will have its type in witch we can give them some logical name like 30 minutes, 1 day, and will also track the duration or period of voucher in minutes, so for 1 day will be 1440 minutes. This value is important for second module in which we aren’t interested now, and it is for calculating the period of voucher once its activated.
The client is not interested in one voucher and we are also not interested in selling one voucher. The client wants for example 100 units of vouchers of one type, let’s say 30 minutes, and 50 units of vouchers of type 90 minutes. Application have to be able to generate this units, and also it can be generated but not given to any client. So voucher had to have a status: sold or pending. And each voucher unit will have status: pending, active and inactive, but this is not our importance and is not included in this model for application. Each voucher has its creation date, and also when we deliver voucher to client, we have to keep track of sold date.
Tricky part of this story is that I call voucher, what is not voucher itself, but the collection of vouchers of some “periodic” type and voucher itself is called voucher unit. Because I don’t know how to give appropriate name for collection of vouchers. If someone have a better solution, please, tell it?
And of course to protect our applications we have users who can authenticate, and register. Registration will be for everyone, only made to create some users and test this feature in MVC Frameworks, and to provide easy way to put users into database.
Data Model:
I don’t know will this model survive UI implementation, probably I will change it during the building of application. I mentioned before about trickiness of voucher(collection) and voucher(unit). So this is the model.

Now, when I see clock, today I will write and blog it a implementation of registration and login for our first MVC Framework CakePHP. Today, afternoon I’m going on vacation and I really think that I will have no touch with computers till second Wednesday or Thursday. I will be on island Rab in Lopar, and you could find me on some of this beautiful beaches.
MySQL Workbench Model: Vouchers.mwb




Recent Comments: