This is a migrated thread and some comments may be shown as answers.

Disconnected API in heterogenious environment

1 Answer 72 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jay
Top achievements
Rank 1
Jay asked on 01 Oct 2009, 06:07 PM
We have a Flash/Flex web application that consumes and updates data through a .net service layer that runs in asp.net.  We use an open source project called Fluorine which handles all of the serialization and language translation for us so that the C# code I write is unaware that the data consumer is actually flex.  This service layer currently uses NHibernate which has no problem saving the disconnected objects it receives.  I'm in the process of replacing NHibernate with OpenAccess because of the medium trust environment that the hosting company has imposed on us and I'm running into a problem.  It appears that OpenAccess requires the use of the ChangeSet object for disconnected use and Flex, using ActionScript, obviously cannot accommodate this.  In this scenario, there is no way for the .net code to keep track of the changes that happen.  The front end simply loads a bunch of data and sporadically sends updated objects to the server.  With NHibernate, I would simply use the SaveOrUpdate method and it would just figure out how to reconnect and sync the object changes.  Is there not a similar way to do this with OpenAccess, or does the disconnected api have to be so explicit?

Thanks

1 Answer, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 02 Oct 2009, 09:08 AM
Hello Ben,

I've never heard of Fluorine, but it looks interesting.

If you really need to work with completely detached serialized objects then you should have a look into the ObjectNetworkAttacher.cs file that can be found in the src/Helper directory of your OpenAccess installation.
This class provides the functionality to logically reattach such a disconnected instance in an object scope.
I hope the code is self-explaining enough.

Regards,
Thomas
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Development (API, general questions)
Asked by
Jay
Top achievements
Rank 1
Answers by
Thomas
Telerik team
Share this question
or