473,756 Members | 3,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Design dilemma...

Hi all,

Not sure if this is the most appropriate place for this so apologies if
inappropriate.. .

I have come back to a framework I built some time ago to see where some
refactoring can take place to improve performance, and following some test
have highlighted a few areas where some changes would definitely benefit the
application.

I have however come to a point where there are two ways to make the change
and I wanted some objective input to help me decide what is the better way.

My app is split into the classic three tiers, Backend, Business and
Frontend. Using the template pattern, abstract methods are called from base
classes which build a list of business objects from the database given a
search criteria. Each business object has its own set of fields all of
varying types, i.e. String, Float, Integer, DateTime.

The original setup called an abstract method in the chosen backend object,
say for this example we have an Activity business object, so a corresponding
backend object exists as does a Config Activity front end object.

Assuming a wild card search criteria an activity list could be generated, so
as each 'row' was read from the database it created a new Activity business
object, and called a method on the Activity backend object to transfer the
data to each field in the Activity business object. This proved time
consuming performance wise as some of the objects had many fields, so took a
while to be populated.

I changed this a while back so that in the base business object class there
was a string list which held the data for each field and had an enumerated
type which facililated access to the data for viewing purposes on a grid for
selection, and then when the User chose an actual Activity from the result
set list then there was no real need to have the field values in their
native type.

I have now realised that in certain areas where lists of business objects in
their native type are being generated the performance is appalling, so
looking back into the framework I see that the same problem is present, i.e.
the time to populate native type fields is time consuming and similarly the
only real time that one needs the data in native type is at the point of
Edit/Config.

So I figured that I would keep the native type fields for each business
object, and then have an abstract method that would 'PopulateObject ToType'
when the User chose to edit this field. But then I thought well shouldn't
it really be properties that simply provide the native type field when
required, so now my dilemma is which to go for, the overall Population at an
appropriate time OR simply pull the values to a native type when required.
But THEN I thought well what is the point of having the native type fields
in the business objects at all, why not just have them held in a list of
strings and read from and write to them which makes it all sound far simpler
to maintain, as in the original two options I see there being a potential
for duplication of data, and hence potential for data loss.

So what do people think about this, assuming they haven't lost the will to
live at this point?

Many thanks for any input on this...
Colin B
Nov 15 '05 #1
0 1211

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2295
by: TheFerryman | last post by:
Hi, I keep running up against the same design problem. Let's say I have a cat object like this: //----------------------------------------------------------------------------------------- class Cat { private:
7
1822
by: bartek | last post by:
Hello, I've been pondering with this for quite some time now, and finally decided to ask here for suggestions. I'm kind of confused, actually... Maybe I'm thinking too much... Brain dump follows... I need a class to represent a variable, with an associated data type and/or value. Though, I don't want it to be a variant type, and not a
7
1855
by: Susan Bricker | last post by:
Greetings. As a relative newcomer to Access, I am having trouble deciding on how to design the form flow for updating and creating related records. I'm looking for a variety of suggestions so that I can decide what's best for the user and what's best for screen flow. Here's the structure: I have what's called "an Event". Each Event can have multiple "Trials". Each "Trial" can multiple "Classes". (This is the structure for a dog...
1
1509
by: PCC | last post by:
I am writing a data access layer for a web service. Data from the web service is to be returned as XML. My design dilemma is this... Should I be returning XML from my stored procedures using the "for xml" clause or loading the data into a DataSet in the data access layer and then outputting XML from the dataset as the response? All my sprocs are simple CRUD spocs just to keep maintenance easy. My own bias is to output XML from the...
3
1870
by: reageer | last post by:
Hi all, I have a design question: I have a bunch of users (name, address, zip, etc.). They are assigned a card with a specific id. The only thing unique is this card id, or probably the combination of all other user fields. So it's seductive to use the card id as the primary key. This card allows access to certain places and all access is logged.
14
1592
by: ApexData | last post by:
In my database, I uniformly handle records on a Record by Record basis, in a single form that contains New/Edit/Del buttons. Because I'm dealing with records one at a time, I can easily manage my button operations. The user enters the system in ViewOnlyMode, if EditButton is pressed, the fields turn yellow, and Me.AllowEdits becomes true, and the user edits. This is followed by a Save/Undo/Quit button, that does the obvious, and the user...
10
2218
code green
by: code green | last post by:
I wasn't sure what title to give this, or whether I can explain my dilemma, but here goes. My company sells products that are inter-compatible with each other, mainly four ranges I will call A,B,C,D. A key table in the database is `product_compatability` with two columns listing product IDs that are compatible with each other.. At the moment it lists the compatibility between A-B with A in col 1 and B in col 2. Straightforward. This must...
2
1607
by: =?Utf-8?B?SnVsaWEgQg==?= | last post by:
Hi, I'm wondering if anyone can give me any ideas/good practice/advice. I've got a web form which a user inputs lots of data into, then presses submit. The submit button uses two classes to input data into 2 tables. I want to put a try....catch...finally block into the data input sections of the classes or submit.on_click event to ensure that, if there's a problem with data entry into the database, that the system doesn't crash and the...
3
2020
by: DerrickH | last post by:
I have a template class with three policies: PolicyA, PolicyB, and PolicyC. The design dilemma I am having is that B and C depend upon A, but I would like my Host class to derive from all three. In all three cases I would like to take advantage of enriched policies. template < class PolicyA, template <classclass PolicyB, template <classclass PolicyC class Host: public PolicyA, public PolicyB<PolicyA>, public
0
9273
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9872
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9841
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9711
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8712
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7244
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5141
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.