Home » Stars! Clones, Extensions, Modding » FreeStars » Design Delimma
Re: Design Dilemma |
Sat, 10 April 2004 13:38 |
|
|
Sorry, my answer to Overworked is sort of a ramble, hard to otherwise explain my way of thinking. I present ideas, others may use or discard as they like.
No matter what... NO WINX ONLY! (imo)
Also for all the joys of stuff similar to MS Access, it is a real pain in the butt when using a complex database to have to work around the bugs of others, especially when they add new bugs with each version.
I believe everything for the server should be in non-machine specific c++ to keep life simple. 'Relational' is just a means of organising data, it is possible to do relational with simple collections (groups of objects) with links to other objects.
I normally layer OO code so that everything is idiot resistant from the outside, not possible to have a simple mistake cause a stray pointer or memory leak if following the system. I also now try to keep every reference to an object to one variable, for example printing a name of a component only requires an ID rather than a TYPE and an ID. These ideas are to protect me from my own stupidness.
Code outside an object/system would not do memory allocations with NEW, etc. Instead you work with either global objects or local (on the stack) ones which are really just references to the true objects (and memory management is all automatic and unseen).
...
There are a number of existing open source c++ memory based databases I have been looking at a bit. For my own needs I am mostly trying to build from scratch (simpler, cleaner).
One trick that can be used is to come up with a simple format for database structure that is thrown through a simple c++ translator program that turns it into c++ language objects including both compile time and run time ways to reference fields, eg both t.Id and t("Id") as well as extra objects for linking/indexing/etc.
Loading all the underlying data then becomes a matter of a simple text file describing the structure followed by an extra "#include" and command in your main program to "mydb.load(zPath);" to load the various xml files.
[Updated on: Sat, 10 April 2004 13:39] Report message to a moderator
|
|
|
|
|
Design Delimma
By: LEit on Fri, 13 June 2003 15:26
|
|
|
Re: Design Delima
By: gible on Fri, 13 June 2003 20:47
|
|
|
Re: Design Delima
|
|
|
Re: Design Delima
By: LEit on Mon, 16 June 2003 21:35
|
|
|
Re: Design Delima
|
|
|
Re: Design Delima
By: LEit on Mon, 16 June 2003 23:28
|
|
|
Re: Design Delima
|
|
|
Re: Design Delima
By: LEit on Wed, 18 June 2003 13:09
|
|
|
Re: Design Delima
|
|
|
Re: Design Delimma
By: JeffMC on Thu, 26 June 2003 00:59
|
|
|
Re: Design Delimma
By: Ptolemy on Fri, 26 March 2004 07:07
|
|
|
Re: Design Delimma
By: LEit on Fri, 26 March 2004 13:09
|
|
|
Re: Design Delimma
By: Ptolemy on Fri, 26 March 2004 14:21
|
|
|
Re: Design Delimma
By: multilis on Fri, 09 April 2004 13:42
|
|
|
Re: Design Delimma
By: Ptolemy on Sat, 10 April 2004 02:00
|
|
|
Re: Design Delimma
By: Ashlyn on Sat, 10 April 2004 02:07
|
|
|
Re: Design Delimma
By: Ptolemy on Sat, 10 April 2004 02:10
|
|
|
Re: Design Dilemma
By: Ashlyn on Sat, 10 April 2004 02:19
|
|
|
Re: Design Delimma
By: multilis on Sat, 10 April 2004 11:15
|
|
|
Re: Design Dilemma
|
|
|
Re: Design Dilemma
By: multilis on Sat, 10 April 2004 13:38
|
|
|
Re: Design Dilemma
By: Kotk on Sun, 11 April 2004 13:15
|
|
|
Re: Design Delimma
By: LEit on Sun, 11 April 2004 14:57
|
|
|
Re: Design Delimma
By: Kotk on Mon, 12 April 2004 06:29
|
|
|
Re: Design Delimma
By: LEit on Tue, 13 April 2004 15:04
|
|
|
Re: Design Delimma
By: multilis on Tue, 13 April 2004 15:32
|
|
|
Re: Design Delimma
By: Ptolemy on Tue, 13 April 2004 15:49
|
Goto Forum:
Current Time: Sat Jun 01 22:16:36 EDT 2024
|