Design Question
-
I have an app in which the user can create invoices. There is a lot of data on an invoice:
Jobs
Ship To AddressBuilders
Foremen
Foreman PhoneVendors
Vendor Locations
Vendor Contacts
Vendor Contact Email
Vendor Contact PhoneDelivery Method (Will Call or Delivery)
Delivery Date
For Will Call
Picked Up By (employee)
Picked Up By Email
Picked Up By Email
Picked Up Location (From Vendor Locations)Items (The items on the PO)
Much of this is just lists. Right now, some dat is not retrieved until it's needed. For example, Vendor Locations are not retrieved until a Vendor is selected. The problem is that it's getting slow. There's a lot of logic being run when list items are picked. So, should I only load data when it's needed, or load all data first then run any logic, like the Vendor Location? In other words, get all Vendors and all Vendor Locations, and only load the locations in the client one the initial data load is done? Thanks
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
-
I have an app in which the user can create invoices. There is a lot of data on an invoice:
Jobs
Ship To AddressBuilders
Foremen
Foreman PhoneVendors
Vendor Locations
Vendor Contacts
Vendor Contact Email
Vendor Contact PhoneDelivery Method (Will Call or Delivery)
Delivery Date
For Will Call
Picked Up By (employee)
Picked Up By Email
Picked Up By Email
Picked Up Location (From Vendor Locations)Items (The items on the PO)
Much of this is just lists. Right now, some dat is not retrieved until it's needed. For example, Vendor Locations are not retrieved until a Vendor is selected. The problem is that it's getting slow. There's a lot of logic being run when list items are picked. So, should I only load data when it's needed, or load all data first then run any logic, like the Vendor Location? In other words, get all Vendors and all Vendor Locations, and only load the locations in the client one the initial data load is done? Thanks
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
Both. Your app should anticipate the user's intention by the parts they're accessing and start asynchronous loads into observable collections that get bound when a particular user control ("view") gets loaded. And / or you need revised stored procs / data views / filtering.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I