This project is read-only.

ThankYou & Input

Aug 1, 2011 at 2:16 PM

Hi

First of all, thank you a for this nice Tool. It helps me a lot with a few very new and innovative things to grow, because of the flexibility of xml and hard typed objects to put together.
So, I had a few problems yet and had to fix this. I don't know if you can put it into the new versions, because it would make the upgrade for me much easier and maybe it would help
you to get a more stable and intuitive version. I don't understand the code you wrote yet in detail, so I will just show you, where I had to make fixes, so you can decide wheter
you want to put it into the code. But first something else. In the Version 2.7 I had the experience that sometimes it crashed in a way, that it was not possible to catch the exception.
This problem is something I still do not understand exactly, why this happens in .NET and how to deal with it. I had this with some other libraries as well. I think this is a very hard problem
because this can cause an immediate shutdown of a service without any warnings! Very dangerous. But this seems to be fixed in later versions of SharpSerializer.

So and here are two other thins:

Polenter.Serialization.Serializing.PropertyFactory, Line 158: I had to make a try/catch block around this because it crashed sometimes. I did not find out yet, why. But it seems to
work if I just prevent the exception from being thrown.

Polenter.Serialization.Advanced.XmlPropertyDeserializer, after Line 412 (estimating the propertyInfo) I wrote this line

if (subPropertyInfo == null)
                        throw new ArgumentException(string.Format("The Property: {0} does not exist in the Type you tried to deserialize",subPropertyName));

It took me a long time, to find out why it crashed. So the problem was, that I changed the hard typed Object, so it could not be deserialized anymore, but did not say why exactly.
So this is importand for me, because this, in my oppinion, could be one of the powerful things of this stuff, that it is possible to convert from any type to any type and sometimes
there would by an error like this, so you can find out quickly where to change something.

 

Thank you again for this work, I really appreciate that.

 

Regards

 

Christian

Aug 1, 2011 at 9:34 PM

hi Christian, thanks for all the good words :-)

you say:

Polenter.Serialization.Serializing.PropertyFactory, Line 158: I had to make a try/catch block around (...)

Sorry, I cannot do this. It's not advisable to close the code with try/catch and then ignore this. It would be better to find the reason. in the meantime the class RootContainer from the Hello World example grew up, but it still serializes flawlessly. it would be of great help if you could reproduce your error. then I can alter the sources.

further you write:

if (subPropertyInfo == null)
                        throw new ArgumentException(string.Format("The Property: {0} does not exist in the Type you tried to deserialize",subPropertyName));

You mean there is a business object serialized. in the next version you remove from this object some properties? hmm. upto now i tended not to removed obsolete properties. but I test your scenario and maybe inserting this line of code would not be so bad.

have you thought of installing mercurial? it simple, and not invasive version control system. it could help synchronizing our sources.

thanks for your feedback in any case:-)

Aug 2, 2011 at 9:52 AM

Hi Polo

Yes, I understand that preventing the exception from being thrown is not really a solution :) So, when I can find some time i'll try to reproduce the error.

As soon as I have some more time, I will install mercurial, so we can work togheter in the future.

Here are some requirements I will have in the future

  • Create hard coded business objects and serialize them to xml (persist into DB) (vice versa of course)
  • Change these business objects (add, change, remove properties) and convert the old ones in the database
  • Functionality to merge business objects of different types. So it should be possible to add more information to the xml without loosing information
    and cast into any type of business objects which has some of the properties in the xml

Detailed explanation of the last point: We are developing a Process Engine which can execute any kind of code. This code is encapsulated into so called
bricks. So the challange is to have very flexible Process Objects which can persist data to transport it from one brick to the next brick, but still typed. And as
I can see, to work with XML this can be done very easy, because the XML and the Business Object does not neccessarly have to be exactly the same. Just
the Information inside of the XML and the properties in the Business Object, when used in a specific kontext in the brick do have to correspond. So, your
work can solve the requirement I have, but there must be done some more work in the future to have a more stable and flexible library for that. Can you see,
what I mean?

Regards

Christian