Page 1 of 1

'The Block'- Desiging a project, but unable to 'get with it'

Posted: Wed Oct 12, 2005 8:19 am
by Jenk
Hi folks,

If any of you remember, I mentioned in another thread somewhere that I have been considering taking over a project (EVEKills on SourceForge). I finally decided that I can't bare to read the previous developers code, since leaving 100's of notice errors in (undefined vars etc.) and other such trivial poor qualities, that will only lead to me ammending the entire project. I have decided to give creating a new project a go which is primarily just for me to flex the php skills etc. and I doubt I will actually release it, but meh.

In procedural methods, I can do this quite easily, but I want to do this strictly in an OO method. Having read several chapters now of PoEAA, I hope to maintain this in a Domain Model (;)) fashion and seperate into the three basic layers (data source, domain logic and presentation of course)

But! I am sat here looking at a blank piece of paper, doing nothing but doodling and wondering where to start.. I've got most of the DB structure defined, but as far as the class construction is going, I suck!

I've jotted a list of what each type of object needs, but am just not with it enough to actually translate into code.. as I said before, if this were procedural I probably would be well into the production phase right now, but as it is not, I am not :p

What do you guys do to clear 'the block' ? :)

Posted: Wed Oct 12, 2005 8:36 am
by feyd
this feels oddly similar to this thread, but anyways....

I do other stuff of any sort: other programming, playing games, go out to the beach, etc etc

Posted: Wed Oct 12, 2005 8:37 am
by Jenk
Doh, didn't see/remember that thread :(

Also, when designing classes etc, are there any 'thumb rules' ?

Anything that a new to OOP guy should know?

Posted: Wed Oct 12, 2005 8:45 am
by feyd
I figure out all the verbs (actions) the class will need, at least roughly.. then just start building. I personally design the systems from the top down, but build from the bottom up, refactoring in "regular" cycles.. none of the code is above revision, whether mine or some third party library...

Posted: Wed Oct 12, 2005 10:39 am
by alvinphp
I start out by first figuring out what presentation pages/modules I will need by listing them out. Sometimes it is useful to create this visually using something like Visio. From that I create an ERD. The ERD then becomes my starting point for my class structure. In the class structure I start listing all the methods I need.

Posted: Wed Oct 12, 2005 10:57 am
by Maugrim_The_Reaper
three basic layers (data source, domain logic and presentation of course)
Sounds a little like MVC...;) It's just missing mention of a controller...

When the coding gets a little lodged in my brain I usually decide to find a similar project and work out how it works. Sometimes it jars a few ideas loose so I get a better idea for a starting point... Maybe there's something similar done in OOP with Patterns you can get some encouragement from? :)

Posted: Thu Oct 13, 2005 5:32 am
by Grim...
feyd wrote:go out to the beach
You live near a beach?

Posted: Thu Oct 13, 2005 7:20 am
by feyd
Grim... wrote:You live near a beach?
but of course.. I'm in sunny southern Florida.. :)