I’m having a conceptual crisis.

Although it might be a bit early to be dealing with this (at least according to my project plan, which after changing last night puts me back on schedule – but only just), but I’ve started to work on the models and tables I need for the project.

I’m using CakePHP as my development framework, which uses the OOP patten of MVC. What this means, from a practical point of view, is that I need to think of all my data as models rather than database tables. It shouldn’t be too hard to make the switch – but apparently it is! I’m used to thinking about data in tables, and how the tables relate to one another – and although models work in a similar way – they don’t! And to make things worse – once I have finished designing the models, I then still need to go back and start thinking about the tables the models required due to Cake’s Bake feature (which automates the generation of the classes used within your application) using the tables in the database to build the models.

ARGH!!!!

But wait, there’s more.

I’m trying to use UML to map out the models and how they’re going to work, but getting myself all confused. My only past experience with UML was via my Multimedia Scripting module, in which I used it to show class inheritance. Due to this, for a while I was getting myself all confused as to what type of symbol needs to be on the end of each line linking each model together, or even if there should be a line at all.

Add all of that together, and (I hope) it’s not surprising that my brain could not think about what attributes each model should have. Hence, a ‘conceptual crisis’: the inability to understand several different programming concepts all at once.

I think I’m past the worst of it now, and have managed to produce two diagrams which, if nothing else, make sense to me. They’re pretty similar in reality, with mostly the same information on them, but with minor differences such as plurality of the names, as per the CakePHP naming conventions, and the absence of the story_tag box from the models image.

They are listed below for your viewing pleasure:

Models

Models

Tables

Tables

While I’m here

You might find it funny to hear that after posting the message “I’m having a conceptual crisis” on Twitter, I got some concerned messages from friends, and even my support tutor at University, who was worried that I might be having some ‘personal issues’. Rest assured, it’s nothing to worry about, and thank you for your concern.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Related posts: