May 2004 - Posts
You can read about the ObjectSpaces integration challenge with WinFS here and on Alex's blog. So I guess although we need ORM TODAY, we are forced to wait a little longer, invest in porting, an buying expensive licenses later on. I’m confident integration is the right step, but from a customers perspective I would be very happy to leverage ORM technology on v1.* incarnations of the framework. I think I just have to keep moving forward.
And hey I’m a framework purist, I still think the best place for an ORM API would be somewhere within the framework. Despite the at hand alternatives for ORM in .NET.
While skimming improving the .NET Application Performance and Scalability document I got caught by “Improving Serialization Performance (page 891). While designing my BatchML.NET library I considered implementing the ISerializable interface. I back then figured I don't need such explicit control over the serialization process; hence my goal with BatchML.NET is to reassemble the schemas 1:1 in serializable classes. While most of my previous ORM work uses explicit serialization I’m glad I took another direction with the BatchML.NET library. Microsoft has these guidelines for the ISerializable interface:
Note: In general, you should avoid implementing ISerializable for the following reasons:
• It requires derived classes to implement ISerializable to participate in serialization.
• It requires that you override the constructor and GetObjectData.
• It limits the type from taking advantage of future features and performance improvements.
What’s interesting here is the lacking support for future features and improvements. There’s a lot of signal to noise regarding XmlSerializer improvements in .NET 2.0, but I’d like to know in what way this affects ISerializable implementers. Why would the framework’s implementation behind this contact differ in 2.0 and why would the difference leave out future improvements?
I repeatedly registered debug builds of our Serviced Components on our server. Now that I try to register a clean release version I constantly get this error:
An unknown exception occurred during installation:
1: System.Runtime.Serialization.SerializationException - Insufficient state to deserialize the object. More information is needed.
Could this have anything to do RegSvcs generating the applicationName from my assembly? Why would a release build be any different from a debug build, registration wise?
Unfortunately I just missed Jimmy’s quiz. Jimmy knows his books that’s for sure! And the answer is:
DDD, Domain Driven Development
GoF, Gang Of four
JDO, Java Data Objects
PoEA, Pattern of Enterprise Architecture
POSA, Pattern Oriented Software Architecture
PPP, Single Responsibility Principle
TDD, Test Driven Development
And I’m the proud owner of all of these books, though Jimmy is missing one in the list namely:
EIP
Who knows which book this is?
Are you interfacing control, MES and ERP systems? Would you be interested in meeting ANSI/ISA S88, BatchML compliance in your applications using .NET technology? Then I've got something interesting coming your way. Lately I've been working on a BatchML.NET library providing a set of classes capable of bridging the XML and OOP paradigm.
BatchML defines a set of XML schemas based upon the ANSI/ISA 88 family of standards. The schemas where written using the World Wide Web Consortium's XML Schema Language (XSD). XML is designed as "the" technology for data exchange across heterogeneous systems. Because of XML being text-based this does not enforce type-safety rules. Though XML Schema can help us programmers quit a bit, we have to acknowledge XML Schema Validation has it's limitations. Besides, us programmers are much more enticed by object-oriented programming models. The ideal programming environment would use an object-oriented model to encapsulate data and behavior but still leverage the benefits of XML to communicate across physical boundaries, using a message based integration architecture.
The BatchML.NET library allows transforming object state to XML and vice versa using .NET XML serialization technology. All classes map to the XML format as is defined in the BatchML schemas. The BatchML.NET library can be used to exchange data and implement behavior about recipes, equipment, and batch lists.
Extending the standard for your application specific needs is easy. It involves inheriting specific BatchML.NET base classes as can be seen below where I introduce a traceable material identification.
|
using System;
using System.Xml.Serialization;
using PaulGielens.S88.BatchML;
namespace PaulGielens.TT
{
[XmlTypeAttribute(Namespace="http://www.wbf.org/xml/BatchML-V02")]
[XmlRootAttribute("BatchListEntry", Namespace="http://www.wbf.org/xml/BatchML-V02", IsNullable=false)]
public class TraceableBatchListEntry : BatchListEntry,
ITraceable
{
private string tramId;
public TraceableBatchListEntry(string tramId)
{
this.Any.Add( new AnyType(TracingConstants.UDE_TRAMID, tramId, TracingConstants.UDE_TTMLURI) );
}
[XmlIgnoreAttribute()]
public string TraceableMaterialId
{
get
{
return this.tramId;
}
set
{
this.tramId = value;
}
}
}
} |
I’m still thinking about the license model for the BatchML.NET library. Ideas are more then welcome, drop me a line.
The Batch Markup Language (BatchML) is used courtesy of the World Batch Forum.
I’m using an XML file as the datasource for a crystal report. Worked fine for the first report! Now with the second the report viewer displays the “database login” dialog every time I wish to display the report. What’s up with that? This awkward behavior is starting to drive me crazy! And it appears I’m not the only one having this problem.
Any ideas?
*edit
Do not bind DataView objects directly, use a DataSet or DataTable instead. Crystal does not accept you pushing data encapsulated in a DataView instance.
I implemented this adapter interface which takes about 5000+ lines of code. Did you know VS.NET 2003 can’t handle files of this size? My IDE is crawling, even when typing a single line of code. Intellisense is behaving very buggy, overall this is wrecking my productivity (on a p4 2.0, 384 meg). Grrr!!!
Tim Sneath (who’s apparently tracking the information flow regarding the event) assured us that the TechEd isn’t all about technology shipping in the next few years. Tim is managing this years content I believe.
Paul and Jeroen, I can promise you that TechEd has more than enough developer-focused content for you to attend breakout sessions throughout the whole conference without hearing mention of Whidbey! We've got 10 Connected Systems sessions on building Service-Orientated Architecture systems, plus over 45 sessions on building for today's released developer platforms. Of course, we've also got plenty of Whidbey, but if that doesn't float your boat, no problem! Trust me - we've got more than enough developer content that you'll be spoilt for choice...! If you think we're missing something, drop me a line...
I won’t be there though unless I find myself a sponsor.
Today we welcome Jeroen van den Bos! Grab the OPML file here.
Though ObjectSpaces isn’t available yet, there are more then enough alternatives to practice Domain Driven Design (DDD) in the .NET development environment. You could grab a top down Object Relational Mapping solution and start doing TDD today. Or try ECO. Jimmy has drawn my attention back to Eric Evans title Domain-Driven Design: Tackling Complexity in the hart of Business Software (the third book in line on my desk). DDD concepts are becoming less abstract since we’re closing the gap between the relational and object paradigm which clears the path for DDD, technology wise. Start participating in the discussion here.
More Posts
Next page »