Thursday, June 5, 2008

Creating an MVC Coldfusion OOP Application - Part 2

Part 1

In this part 2 I discuss the application of choice for this article and why I choose it. It's a short part, but preparation is the key to good planning and any job rushed is a job that could have been done better. So, little at a time and slow as she goes. Let's getter done good yall.

First I though about a store front, I've done plenty and could make an interesting one, but they have also been done before, so..

Then came a great idea, an EBay-like auction site. This would be even better for my article because of all the features; buyers and sellers, products and shopping carts, check outs, payments, and more. I was getting excited a couldn't wait to jump in.

During the planning phase we will go into the details of all the features and functions we want our auction site to have. But for the sake of explaining why this application would be perfect for my purpose lets touch on some highlights.

A site with too few features, a small site with less than a dozen actions, and too few data tables, less than 6 or so, an MVC (model, view, controller) architecture would be overkill. An auction site however can have hundreds of things a user can do, hundreds of pages, and use more than a dozen database tables at the least. And that's just thinking about it. In reality you want to measure the scope or size of the application by the number of business objects and rules it will consist of. This you will find out during the planning and will help you to determine how many components, lines or pages of coding it will take. If your really experienced you can say that it takes approximately X hours to flesh out a basic data table object and you will have X amount of tables, and etc.. You really don't know what architecture structure would be best for an application until the planning is complete. Maybe you don't need OOP or MVC at all. In planning you find out what structural route is best for the size and complexity of the future structure. Kind of like deciding if you will need bulldozers and backhoes or just picks and shovels.

The auction site will offer OOP and MVC such things like objects in the form of users and products and the need for controllers (aka. listeners) to decouple and recouple business rules to separate design from development. And many other interesting facets you may or may not of heard or thought about. Who knows, you might even learn a little bit about design patterns along the way.


No comments:

Post a Comment