object-graph

Optimal way to persist an object graph to flash on the iPhone

I have an object graph in Objective-C on the iPhone platform that I wish to persist to flash when closing the app. The graph has about 100k-200k objects and contains many loops (by design). I need to be able to read/write this graph as quickly as possible. So far I have tried using NSCoder. This not only struggles with the loops but als...

How to eager load in WCF Ria Services/Linq2SQLDomainModel

I have a databound grid at my view (XAML) and the Itemsource points to a ReportsCollection. The Reports entity has three primitives and some complex types. These three are shown as expected at datagrid. Additionally the Reports entity has a property of type Store. When loading Reports via GetReports domain method, I quickly figure out th...

Object graphs and web services

I'm really new to web services and need to create a webservice that can deal with object graphs. My canonical example would be a CRM web service that given a customer number would return an "object" of type Company with a collection property of Contacts. ie: [WebService] public Company GetCompanyByCustomerNumber( string customerNumber ...

Object tree navigation language in Java

In the system which I'm currently developing I often have to navigate an object tree and based on its state and values take actions. In normal Java this results in tedious for loops, if statements etc... Are there alternative ways to achieve tree navigation, similar to XPath for XML? I know there is JXPath and OGNL, but do you know any o...

Clone Whole Object Graph....

While using for an object this code to serialize it: public object Clone() { var serializer = new DataContractSerializer(GetType()); using (var ms = new System.IO.MemoryStream()) { serializer.WriteObject(ms, this); ms.Position = 0; return serializer.ReadObject(ms); ...

StructureMap HowTo: Conditional Construction on Deep Object

I'm having difficulty conditionally creating a dependency. Googling, I have yet to find a good example of using the BuildStack and Conditional Predicates. Here's what I'm doing in the Registry: //snip public SomeRegistry() { this.InstanceOf<IFoo>().Is.Conditional( c => { c.TheDefault.Is.Constru...

Why do people talk about DI frameworks "instantiating an object graph" rather than "instantiating objects"?

I'm reading a book about DI that always talks about DI frameworks "instantiating an object graph". Why say it this way rather than "instantiating objects"? ...

How do I serialize/deserialize a NHibernate entity that has references to other objects?

I have two NHibernate-managed entities that have a bi-directional one-to-many relationship: public class Storage { public virtual string Name { get; set; } public virtual IList<Box> Boxes { get; set; } } public class Box { public virtual string Box { get; set; } [DoNotSerialize] public virtual Storage ParentStorage { ge...

Entity Framework's object graph & Repository Pattern

The repository pattern typically has Get*() and Save() (or equivalent) methods for each object. How does this fit into the object graph in EF? Consider the following with lazy-loading POCO objects: // EF var orderItems = context.OrderItems.Where(oi => oi.Order.Id == 123); // Repository IOrderItemsRepository orderItemsRepository = new...

java: assigning object reference IDs for custom serialization

For various reasons I have a custom serialization where I am dumping some fairly simple objects to a data file. There are maybe 5-10 classes, and the object graphs that result are acyclic and pretty simple (each serialized object has 1 or 2 references to another that are serialized). For example: class Foo { final private long id; ...

Java object graph visitor library

Do you know a good java object graph visitor library? I want to visit an object and its sub components and perform some actions when some conditions are matched. Example usage: on a huge domain object graph, reset each id to null on a huge domain object graph, replace each Set with a TreeSet instance containing the same elements. ...

Library for visualizing object graphs in .NET

Does anyone know of, or can recommend, a library that can recursively visualize an arbitrary object graph in .NET? I need to be able to print out (to the console) a formatted representation of an object graph. For example, given a simple object graph like this: var foo = new Foo(); foo.Bar = new Bar(); foo.Bar.Baz = 42; foo.Bar.Qux = "...