buddymoore Posted October 13, 2007 Share Posted October 13, 2007 Hi there. I've recently discovered the joys of OOP and have been writing classes a-plenty. I'm just looking for some advice as to how far I should go in some scenarios, by means of a current example. So I've programmed an events system. So an event is an object. It has a Title, a Date, a Picture, and then Detailed information. But in my mind, that event, should be part of a larger object, the 'events system'. So I can call functions to list all events etc. But I can't see what an event could inherit from the events system. So should I just have functions that apply to all events as functions, not tied to a particular class. Hope this makes sense. Would be grateful for any advice. Quote Link to comment https://forums.phpfreaks.com/topic/73116-solved-how-much-should-be-class-ed/ Share on other sites More sharing options...
trq Posted October 13, 2007 Share Posted October 13, 2007 The events system would be a seperate class that creates, edits, deletes and looks up event objects. Quote Link to comment https://forums.phpfreaks.com/topic/73116-solved-how-much-should-be-class-ed/#findComment-368844 Share on other sites More sharing options...
buddymoore Posted October 14, 2007 Author Share Posted October 14, 2007 Many thanks. It was one of those things when starting out that seemed to make sense, that they should somehow be linked. Cheers Quote Link to comment https://forums.phpfreaks.com/topic/73116-solved-how-much-should-be-class-ed/#findComment-369140 Share on other sites More sharing options...
aschk Posted November 1, 2007 Share Posted November 1, 2007 Post a prototype here so we may offer our advice. I'm always curious to see what patterns are in use and how people code. Quote Link to comment https://forums.phpfreaks.com/topic/73116-solved-how-much-should-be-class-ed/#findComment-382623 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.