472,973 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 software developers and data experts.

Looking for assistance with design patterns

I am looking for better concrete examples, as I am a bit dense, on design
patterns that facilitate my goals. I have been out to the code project,
planet source code, and microsoft's patterns and practices site and it just
isn't sinking in all that clearly to me.

Currently we have code in production and it all works well, however it is
not the way we want it. We know that we can implement a better design plan
to improve performance, readability, and enhancements.

We started out as a prototype for discovery, modeling after an existing
mainframe application and set of job streams. Expectations were set on the
application behaving as the old program did, and now the business wants to
take advantage of what the "PC" world has to offer in smart clients, web
services, bi reporting and the like.

Feel free to correct any false assumptions in this post as I get to each of
my questions.

First, we are currently using SQL Server 2000 because our document
management solution is bound to it and the company doesn't want to have two
SQL environments until the document management solution also supports SQL '05
(due out this fall.).

One of our main goals is to replace the need for our Citrix and Terminal
Server farms. Some of our internal folks will still connect in this manner,
however remote offices and sales/service folks will make use of
disconnected/web based front-ends.

Our data must maintain a historical audit, preserving what it looked like at
any given point in time. Changes occur in the form of "Corrections" or
"Transactions". Corrections are non-volatile changes to the data that imply
this is how the data should have been. Transactions consist of any change
that occurs and impacts legal or monetary conditions.

Basically, we do not delete, or update rows, rather we version our data.
The data itself consists of basically a "Contracts" table and its elemental
sub tables. There are other entity tables for vendors, producers, and a
variety of lookup tables.

Essentially, the company is services based company and two elements of a
contract contain information that requires a calculation for determining a
price towards the contract. There are commonalities between these items,
and we attempted to generalize the calculation logic to allow us to work
with either element.

Currently, the main application is a windows forms program. We have
separated the core business logic and data interaction in it's own dll
project, and use it in our batch processing and reporting programs. It is
up to the programs to validate data were possible, otherwise, and hopefully,
our database catches the remaining issues.

The business library consists of a master class, used as a singleton, to
manage interaction with the rest of the library. It fetches list data in
the form or data tables, or binding lists. Creates either an instance of a
new contract or reconstitutes an existing contract. It manages the state
and condition of the contract, which seems to get hairy at times. Sub
elements of the contract are presented as a bindinglist(of T).

Each entity derives from two base classes, BaseEntity and BaseEntityDetail.
BaseEntity represents a place holder for a single row of data.
BaseEntityDetail represents all the detail attributes for each "version"
change of the entity. This is also the construct in the SQL database, a
parent entity table and its entity details table.

Among my issues, the state of the data becomes confused, the user interface
can get into an unstable state, and sometimes information is not written to
the database without error. Finally, with 5 developers on the team, there
are times when new features break existing functionality and are not
discovered until long after release.

I apologize for the long preface just to get to my questions. Please bear
with me.

What I am looking for is a better way to manage my data, a better way to
manage my business logic, a better way to implement my calculation engine
and a better way to manage user interaction. And ultimately, I am looking
for a better way to perform regression testing.

It seems to me that we can make use of Subject/Observer pattern and
Model-View-Controller in the user interfaces to better manage validation. I
think I understand the concept, but in practice there are 10 ways to skin a
cat, and I get lost.

It seems that my calculation routines can make use of the decorator pattern.
Basically, I have a "LineItem" and should be able to create a single set of
code that takes into the slight differences in each of the LineItem types.
I get lost in factories, patterns, and the like.

We have tracing and log files embedded throughout the entire application and
libraries with varying levels of detail output. So now I can get miles of
information or none at all when a problem occurs. I know MS is recommending
test driven development and nUNIT is available for incorporation. First, I
haven't found too much information on creating tests in VS '05 Pro, and
certainly nothing that doesn't require Team server. And OMG, where do you
start with nUNIT? I want to do more than just test that a value is a date
or string.

I also think that I can make use of datasets and add appropriate code to
accomplish my needs. Certainly, creating dataviews become less of a hassle.
We used data objects because it seemed like a great idea. Well, more
specifically because we wanted to manage the SQL statements field by field
and to make use of SQLDataTypes so that we can have a Nullable object, since
Nullable(of ) doesn't support strings. And because strongly typed datasets
have an issue, we have not found a work around for, with null values when
bound.

We have some really brilliant code, and our bug history is impressively
short for a two year old application. However, we the developers know that
there are many opportunities for improvement. Before we propose/apply the
changes to the system, we have to better understand a better way to do the
work. We would like to incorporate these changes prior to exposing our
libraries via web services or creating web applications and extending the
database.

Any insight and comments are welcomed.

Thanks
Apr 30 '07 #1
0 1927

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

Similar topics

2
by: Design Pattern Catalog | last post by:
Thank you for your interest in "Design Patterns: Elements of Reusable Object-Oriented Design", by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. This message answers several...
1
by: Jay | last post by:
The GOF text is widely considered the definitive book on the topic. Design Patterns: Elements of Reusable Object-Oriented Softare, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides ...
1
by: Josh28 | last post by:
Hi We are a group of two chaps just out of undergrad, we created a software to automate the use of Design Patterns. We have put it up at Source Forge--http://dpatoolkit.sourceforge.net/ The...
13
by: John Salerno | last post by:
Here are a few I'm considering: Design Patterns Explained : A New Perspective on Object-Oriented Design (2nd Edition) (Software Patterns Series) by Alan Shalloway Design Patterns C# by...
22
by: Krivenok Dmitry | last post by:
Hello All! I am trying to implement my own Design Patterns Library. I have read the following documentation about Observer Pattern: 1) Design Patterns by GoF Classic description of Observer....
5
by: Ludwig Wittgenstein | last post by:
Other than the Design Patterns book, which book(s) is/are the best to learn object-oriented software design/architecture from ?
11
by: oliver.saunders | last post by:
I'm looking for help with project. I have written a detailed post about it. Please see: http://forums.devnetwork.net/viewtopic.php?t=52753
0
by: krzysztof.konopko | last post by:
I know that the informations I provide may seem limited but maybe someone has solved similar problem. I am new in design patterns and I am quite confused who should control whom, how to configure...
5
by: macca | last post by:
Hi, I'm looking for a good book on PHP design patterns for a OOP beginner - Reccommendations please? Thanks Paul
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.