473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

XML Serialization Vs Breaking Domain/Business Logic Vs Custom Serialization

XML Serialization is a great feature. Recently I've found myself
"leveraging" it on some of my classes and spending far too much time
altering a class so that it's resultant XML message is in the correct
format using XmlAttribute etc

Eventually I end up with a who collection of classes with default
constructors, writeable properties which should be readonly/Property
Sets etc,

Typically these would be wrong from an OO point of view if they were in
my Domain layer.

For example I might have a Person class with a readonly DateOfBirth
property, but I'd have to make that writeable in order to get XML
serililsation to work - (I won't go into the inability to actually
format DateTimes to specifc formats)

My current appproach is to hand code my XmlGeneraters in a
'Persistence' layer which takes a domain object and manually creates
XML docuements using an XMLWriter. This doesn't feel right as the
XMLGenerators have explicitly knowledge of a domain object

Does anyone have thoughts on crossing logical layers like this?

Jason

Dec 19 '06 #1
0 1234

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: womber | last post by:
I am getting XML from a dataset that has been populated via a storedprocedure no schemas have been applied nor any relationships. But the correct table names have been given to match the table(s)...
25
by: Stuart Hilditch | last post by:
Hi all, I am hoping that someone with some experience developing nTier apps can give me some advice here. I am writing an nTier web app that began with a Data Access Layer (DAL), Business...
10
by: SStory | last post by:
My app is near completed for the basic feature of version 1.0. I have an extensive object model and I now want to persist my objects using serialization. I have chosen binaryformatter to...
3
by: Zachary Turner | last post by:
Hello, I have a situation where I would like to perform custom serialization and deserialization of an existing .NET framework object (specifically, System.DateTime). Is there a common paradigm...
6
by: Relaxin | last post by:
I'm coming from Borland C++ and am "somewhat" new to C#, but very seasoned in C++. I'm looking for a specific feature that Borland had that I can't seem to find in C#. In Borland that feature...
5
by: googlenewsgroups | last post by:
I have a custom set of objects that is correctly serializing & deserializing the object tree. However in some cases the size of the resultant serialization is larger than I would expect. Is there...
2
by: grawsha2000 | last post by:
Greetings, I am developing this N-tier business app. The problem I'm facing is when I try to pass business objects (employees, dept..etc) from business tier to data tier,i.e., the add method in...
2
by: Chris Zopers | last post by:
Hello, I would like to know what's the best way to implement a business logic layer between my user interface and my database. I would say I'd make a dll-project for the business logic layer...
4
by: camarkco | last post by:
Why does C# go out of it's way to prevent this? Mark
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.