Joined: 18 Jun 2010
Location: alliston ontario canada
|Posted: Mon Jul 05, 2010 10:47 pm Post subject: meta architecture question: why is Model in Query?
I was tracing my ASP.NET WebForms application
and I noticed that Korch.EasyQuery.Query
contains much redundant values from Korch.EasyQuery.DataModel.
Example: Description, Links, and Tables
Comment: with a large DataModel, it seems this adds a lot of bloat.
Additionally, in the WebForms version, you create both a
Session["DataModel"] and a Session["Query"], example:
Korzh.EasyQuery.DataModel easyQueryNetDataModel = new Korzh.EasyQuery.DataModel();
Session["DataModel"] = easyQueryNetDataModel;
Korzh.EasyQuery.Query easyQueryNetQuery = new Korzh.EasyQuery.Query();
easyQueryNetQuery.Model = easyQueryNetDataModel;
Session["Query"] = easyQueryNetQuery;
QUESTION: why so much redundancy?
(example, instead of storing the DataModel in Query.Model, why not just reference the actual DataModel?)
Gerry Lowry · twitter=.@gerryLowry1947
· TIMTOWTDI=.There Is More Than One Way To Do It
· If your only tool is a hammer then all of your problems tend to look like nails.
Joined: 07 Nov 2005
|Posted: Tue Jul 06, 2010 5:19 am Post subject:
You possibly have mistaken about redundancy.
First of all there is not Description, Links or Tables properties in Query object.
Secondly, Query object contains only a reference to DataModel object. It does not copy the whole object during assignment.