also you can build a factory architecture where you will inject at runtime based on a conficuration
the actual implementation of a strategy. This patern is called inversion of control.----- Original Message ----- From: "Sina Bahram" <sbahram@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx> Sent: Wednesday, October 06, 2010 6:31 PM Subject: RE: createing a transparent interface for serialization?
Have you examined ORM solutions? Hibernate is very popular, for example. Take care, Sina -----Original Message-----From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Tyler LittlefieldSent: Wednesday, October 06, 2010 11:20 AM To: programmingblind@xxxxxxxxxxxxx Subject: createing a transparent interface for serialization? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all,I want to set up serialization of objects in my mud engine a bit differently than it currently is. Right now, Ijust write all the values to a file in binary form, then read them back in in the same order, but Iwant the user to be able to choose xml, binary, or any other sort of backend they want for serialization. So, Ihave a question. how should this be done? the idea would be for each object to call a function, without having to know what itis storing. I've thought my player file will look like this: <player> <name>ty</name> <password>asdfghjklasdfghjkl</password> </player>so Isuppose Ican just do a key-value sort of setup where Isend the name and the value, and binary can ignore the name while XML doesnot?That being said though, I still need to set it up a bit differently from that, so any help is appriciated with suggestions andideas. - -- Thanks, Tyler Littlefield -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJMrJOJAAoJELDPyrppriJPqf4H/RdYh9PDv9NxUAIYA29cf9/Q mkah4xc4n2ojTXfLyDDnfrlj3iPW+cUKT1qYvGMYOy2jfgryK0a3xIgJ7rw+q7PV qMUXz/TBWnAnDtQ8unsakYP2EhPE5MI8zK6foOlQIkiomFHETfsp90vSXbvGEhet s337WGQM39UNmB9q5VzVW2eyuIk747gIdf1Ihh8Df2rlsMwGUVY4Ba3B87aCrt4u Dv8tBzAG6hi1CXdeB0CINJjgFhAdpRegLw5OcBO3tl7LqQZ4mYh5UgNW0UA2zv7e dJDhzdJmEkXacEq9UobrzqMqPLzzkC29/QPMaCLyXxBaLRF+/LH47fKng/Eu5HI= =H7OH -----END PGP SIGNATURE----- __________View the list's information and change your settings at //www.freelists.org/list/programmingblind__________ View the list's information and change your settings at //www.freelists.org/list/programmingblind
__________View the list's information and change your settings at //www.freelists.org/list/programmingblind