views:

57

answers:

3

Hi -

I don't have a specific question here but I'm more looking for some guidance regarding a new software project I'm starting at work.

Here is a description of the project:

I am refactoring windows software that was written in Visual Basic 6 and uses MS SQL Server for a database. The code is tightly coupled with SQL queries and references old active X controls.

The software can run in a standalone mode where its only running one instance on one computer or in a distributed mode where it runs on several machines simultaneously all connected to a shared data source.

The users of the software need use of a wide range of USB devices that are integrated with the software on the client side. (I'm assuming this means the new version of the software needs to be a desktop application and can not be a browser based web application.)

The new version of the software is going to be updated to use new technologies in an effort to modernize the code and improve performance.

I would like the architecture of the new software be both logical 3-tiers and to use design patterns if appropriate. Although I am new to design patterns it seem like there is an opportunity to use the abstract factory, observer, and singleton patterns together in the new version of the software.

In a very generic explanation the software has an "employee" database table that stores information about employees. The client side has a grid view that allows the user to view the employee information stored in the database and to make modifications to the data through the grid view. Data can be added to the employee database by the client using forms that have text fields and drop down menus. Employee related data can also be captured by USB devices on the client side and then that data can be added to the employee database as well.

In terms of how this relates to architecture I'm guessing there could be an observable singleton employee object that is observed by data display objects like a grid view object and that these data display objects are created by an abstract factory method. (Does that make sense?)

The new software will be written in Visual Basic using Visual Studio 2010. Aside from that none of the other technologies have been decided upon.

I think we will use windows forms opposed to the windows presentation foundation although I'm not sure as there might be some image handling functionality that we want that is better done with WPF.

From what I've read I like the Entity Framework and Linq but I'm not sure how that works in conjunction with the business logic layer with the design patterns I mentioned above.

Also, I'm trying to understand if we could use the windows communication foundation and web services. This makes sense when the software is running in distributed mode but not much sense in the standalone single machine deployment. Adding web services and using IIS might be overkill for what we are trying to accomplish. I don't know.

So this is what I'm working on and what I've been reading about and researching. I would greatly appreciate your thoughts on this and any guidance you can provide.

Thanks!

+2  A: 

Aside from the fact that you will learn a lot during the development process I can give you the following recommendations:

  • Use Stored Procedures in the database for database access. This will prevent concurrency problems and also allows for transactions. This means if something goes wrong (users computer crashes etc) then no data nor data integrity is lost

  • Treat the windows forms as simply 'interfaces' between the user and the database. Hence they shouldn't contain anything that keeps track of data (let the database do that) and they're only a means of gathering and showing data

m.edmondson
+1  A: 

I had a very similar experience.

I tried importing a VB6 database project that ran as a standalone app into VB 2005, and the code was very ugly.

One book that I found very helpful with doing three-tier DB applications using VB.NET (VB 2005, actually) was ADO.NET 2.0 with VB 2005 published by Murach. Got me up to speed very quickly, and it gave direct examples of writing three-tier DB applications (business layer, presentation layer, and DB access layer).

Can't remember for sure if there's a newer version of the book, but I was impressed with the layout of that one. It also deals with web apps.

Beyond that, I did some code generation to streamline hacking out the Object classes and the DB access classes for my project.

John at CashCommons
A: 

I believe this project is really going to have you learn and gain a lot of experience.

Like eddy556 said, use the forms only as interfaces. It works better that way.

Plus, if you have any problems, don't hesitate to ask. That's what we the StackOveflow team are here for anyway.

Good Luck.

Alex Essilfie