Results 1 to 7 of 7
- 03-09-2012, 03:21 PM #1
Member
- Join Date
- Apr 2011
- Location
- Athens, Greece
- Posts
- 52
- Rep Power
- 0
Where should I store objects in my design
Hello guys,
I have a system that needs to store various kinds of information such as users, publications, meetings etc. I have various objects describing that sort of information but I am having a hard time choosing where to store the objects inside the design.
Quick overview of the system: I have a SystemAdmin who registers users. I have a RegisteredUser who makes publications and meetings. I have Publications and Meetings.
Where should I store the objects created by all these classes? Where should I store the "RegisteredUser" or the "Publication"? Should I use a "super" class with a bunch of collection objects or is it a bad design?
I would like to avoid using a DBMS, but if you think it would get messy otherwise, I can give it a go. Thanks
- 03-09-2012, 03:32 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Re: Where should I store objects in my design
Arrays!
- 03-09-2012, 03:36 PM #3
Member
- Join Date
- Apr 2011
- Location
- Athens, Greece
- Posts
- 52
- Rep Power
- 0
Re: Where should I store objects in my design
I know how to store them, I don't know where. Having a control class that instantiates everything and stores everything makes any sense or is it a wrong design decision?
- 03-09-2012, 03:43 PM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Re: Where should I store objects in my design
What I am doing to keep the separation in different classes itself and retrieve when required.
- 03-09-2012, 03:47 PM #5
Member
- Join Date
- Apr 2011
- Location
- Athens, Greece
- Posts
- 52
- Rep Power
- 0
Re: Where should I store objects in my design
So having a "main" class with 2-3 collection objects in it to keep all the data in one place and accessor methods for those collections seems a good idea for you?
- 04-11-2012, 12:57 PM #6
AN21XX
- Join Date
- Mar 2012
- Location
- Munich
- Posts
- 297
- Rep Power
- 2
Re: Where should I store objects in my design
I would say: Open your mind about what is the structure of your application. E.g. you can have the application for planning inside a company - you could have Company as superclass - each company has Employees and Projects, Projects may organize Meetings and have Publications... just a hint. You need a big picture, and even then sometimes there is more than one place where items/objects may have their home.
So go and think of a tree like structure and maybe how objects relate to each other, just my 2 cents.
- 04-11-2012, 01:07 PM #7
Member
- Join Date
- Apr 2011
- Location
- Athens, Greece
- Posts
- 52
- Rep Power
- 0
Re: Where should I store objects in my design
Similar Threads
-
Picking a Collection and Design for querying 1G Point objects
By ennuages in forum Advanced JavaReplies: 8Last Post: 11-22-2010, 10:09 AM -
How can i store ArrayList objects in Access database
By frankycool in forum Advanced JavaReplies: 3Last Post: 11-04-2009, 06:55 AM -
read txt file,with some records, create objects and store objects in tables of a db.
By stamv in forum JDBCReplies: 1Last Post: 01-22-2009, 04:25 PM -
Can I store multiple objects in an array
By lareauk in forum New To JavaReplies: 9Last Post: 05-29-2008, 03:57 AM -
Can I use vectors to store multiple types of objects
By Nathand in forum Advanced JavaReplies: 6Last Post: 04-28-2008, 07:55 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks