Friday, October 28, 2005

Hurray! .NET 2.0 and VS2005 RTM on MSDN

Finally! The RTM version of VS2005 and .NET 2.0 are available. The only problem I see is that currently only the professional version is online. I can't find the "Team Edition for Software Developers" and the servers are somehow overloaded ;-) as usual.

I'm really keen to test the final version and to bring Opf3 to .NET 2.0 RTM! :)

Tuesday, October 11, 2005

It's diving me crazy

Now, I got a virus. Not my computer, myself got it. I'm feeling always sick and weak... means I'm not doing much for university etc. The worst thing is that I'm no good boyfriend at the moment, because of this virus.

In the morning I'm OK, but after I did a little bit stuff that is more "consuming" I'm feeling weak and strange.

I guess the best is to go to bed and watch TV or read something. I could read the book about Indigo, if I'm not to weak to do that. In the morning I'm usually coding a little bit, to have some work done for my father's project. We are using Opf3 there and I'm improving the framework to get everything I need :) (includes fixing bugs).

It's very strange: I never had such a thing before. I never felt such weak. If you remember I wrote about feeling sick after coming back from turkey. It is still this kind of sick and strange. I felt better, but then I ate something that was not good for my stomach... I was also in the cold... Hopefully it gets soon better :)

Guys, I'm back in bed. See you!

Thursday, October 06, 2005

[Opf3] Opf3 questions...

I got this question today:


I am developing a product in C# that will use ASP.NET, Windows forms smart client, and ADO.NET.
I am also using .NET 2.0 beta 2.
I have VistaDB and also want to use SQL Server 2005, or maybe other databases in the future.
You use attributes in the persistent classes. How does this work in a multi-tiered environment where remoting or web services is used to move business objects across the network? I don’t want my remote client tier to reference any of the data access layer logic. I want all that on the server side.

Thanks...


The answer was the following:
On www.Opf3.com/Download.aspx you find a “Tutorial & Samples” zip file to download. This file contains a sample on how Opf3 works with Webservices and an example on how it works with .NET Remoting. For .NET Remoting you have to implement (which is not shown in the example) an interface for each persistent object. Those interfaces are then shared with the client. The interfaces do not contain the Attributes.

If you are using Webservices .NET generates a proxy class on the client side that does not contain any attributes. When sending the object to the client it is transformed to the proxy object. When sending it back it is again transformed to the original object. The proxy object does not contain any attributes. The original object (on the server) contains the attributes… With webservices you have also to consider to put the [XmlIgnore] attribute on properties that hold related objects. If not the .NET XmlSerializer will also serialize that property, which means all related objects are send to the client. If the related objects contain other related objects those will be also serialized and so forth... But this is an issue of Webservices and the .NET XmlSerializer. For .NET Remoting you don’t have to bother about this. When you request the related objects the client asks the server for the objects and they are transmitted to the client (on demand).

Another important thing you have to do is implementing the ISelfContainingObject interface to every persistent object. This interface (look also in the documentation of Opf3 – found in the zip of the Opf3 Demo or on the web page: www.opf3.com/Help.aspx) allows the persistent object to hold its own state (by state is meant Loaded, Inserted, Deleted, Update and the Concurrency Information). Without implementing this interface the ObjectContext instance (used to load or persistet the object) holds the state for the object. If you remote (over .NET Remoting or via Webservice) an object the object leaves the AppDomain of the ObjectContext and after a little while the state information is deleted by the ObjectContext (as the class “thinks” the object does no longer exist – the original object is then also deleted by the GarbageCollector of .NET as it really does no longer exist in the current AppDomain). By implementing the ISelfContainingObject interface the class holds the state information by itself. You remote the object and the state information is carried within the object...

Sunday, October 02, 2005

Sleepless in vienna

I'm back at vienna, but I can't sleep. It's raining out there... This happens each time when I'm back at vienna. I don't exactly know why, but it might have to do that there is some light (little bit) in the room and the new environment.

So: Sleepless in vienna...