473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 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 1974

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
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
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...
0
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,...
0
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...

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.