Click here to Skip to main content
16,011,608 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionvalidation in windows application Pin
amruta_muley20-Mar-07 7:45
amruta_muley20-Mar-07 7:45 
AnswerRe: validation in windows application Pin
Dave Kreskowiak20-Mar-07 7:57
mveDave Kreskowiak20-Mar-07 7:57 
AnswerRe: validation in windows application Pin
manni_n20-Mar-07 9:47
manni_n20-Mar-07 9:47 
AnswerRe: validation in windows application Pin
amruta_muley20-Mar-07 17:23
amruta_muley20-Mar-07 17:23 
GeneralRe: validation in windows application Pin
manni_n20-Mar-07 20:38
manni_n20-Mar-07 20:38 
AnswerRe: validation in windows application Pin
Christian Graus20-Mar-07 17:49
protectorChristian Graus20-Mar-07 17:49 
QuestionVB.Net 2.0 Checkbook Register? Pin
Owen3720-Mar-07 7:13
Owen3720-Mar-07 7:13 
AnswerRe: VB.Net 2.0 Checkbook Register? Pin
Dave Kreskowiak20-Mar-07 7:54
mveDave Kreskowiak20-Mar-07 7:54 
Worry about how you're going to represent the data first. Answer the basic questions first. What transactions are you going to handle? What is the information needed to perform each transaction? Stuff like that. It'll make your data layer much easier to write if you lay everything out ahead of time. Basically, you want this data layer to be able to do anything you want to the data, without any kind of a user interface.

How the transactions are setup and executed is the domain of the business layer. It sits between your UI and data layers and enforces all the rules for each transaction. Data is validated and massaged on this layer before any kind of transaction is built and executed by your data layer.

Now, after those two are done, the user interface practically writes itself. You start with a simple interface and build it up from there. Maybe using some textboxes and buttons. Simple. Then when your ready to move up to more complex, custom drawn interface elements, like filling in an actual image of a check, you just have to modify the UI layer.

I've got an "application" written entirely in SQL Server, a small football pool. It doesn't have any user interface at all but runs entirely inside SQL Server. The business logic (transactions) and data layers have been combined enitrely into SQL stored procedures, Views, and Triggers. The entire data model is defined inside the SQL database.

You can run the app entirely using nothing but simple SQL statements, or, if you wanted just opening the tables and start editing them directly, like adding players, games, changing the scoring model, whatever... You can view current standings or any game details by just opening the View you want. You can't screw up the database with invalid data because the validation rules in the business logic inside the SP's and Triggers won't let you. The database defends itself from bad data entirely on its own. It doesn't need a seperate business layer written in .NET code to keep the data safe.

Now, all I have to do is put together a number of user interfaces for the app, like an ASP.NET application and/or a Windows Forms app.


Why did I say all this?? Because if you need to change how the application looks, you don't have to touch the business and data layers at all. The application can still run, even if you chose to use a simple console app as the user interface!

Want to run this in a web browser? No problem! Just add an ASP.NET project to the solution and you can start building a web-based UI for the exact same app.


Really, this is a great little project to teach yourself how to write n-tier applications.


Dave Kreskowiak
Microsoft MVP - Visual Basic


GeneralRe: VB.Net 2.0 Checkbook Register? Pin
Owen3720-Mar-07 8:04
Owen3720-Mar-07 8:04 
GeneralRe: VB.Net 2.0 Checkbook Register? Pin
Dave Kreskowiak20-Mar-07 8:43
mveDave Kreskowiak20-Mar-07 8:43 
GeneralRe: VB.Net 2.0 Checkbook Register? Pin
Owen3720-Mar-07 9:53
Owen3720-Mar-07 9:53 
QuestionHow to type on command window at an instance? Pin
barkanb20-Mar-07 6:06
barkanb20-Mar-07 6:06 
AnswerRe: How to type on command window at an instance? Pin
Dave Kreskowiak20-Mar-07 6:13
mveDave Kreskowiak20-Mar-07 6:13 
GeneralRe: How to type on command window at an instance? Pin
barkanb20-Mar-07 6:23
barkanb20-Mar-07 6:23 
QuestionRe: How to type on command window at an instance? Pin
barkanb20-Mar-07 7:07
barkanb20-Mar-07 7:07 
AnswerRe: How to type on command window at an instance? Pin
Dave Kreskowiak20-Mar-07 7:23
mveDave Kreskowiak20-Mar-07 7:23 
AnswerRe: How to type on command window at an instance? Pin
barkanb20-Mar-07 20:58
barkanb20-Mar-07 20:58 
GeneralRe: How to type on command window at an instance? Pin
Dave Kreskowiak21-Mar-07 1:39
mveDave Kreskowiak21-Mar-07 1:39 
GeneralRe: How to type on command window at an instance? Pin
barkanb21-Mar-07 4:19
barkanb21-Mar-07 4:19 
QuestionRe: How to type on command window at an instance? Pin
barkanb21-Mar-07 7:23
barkanb21-Mar-07 7:23 
AnswerRe: How to type on command window at an instance? Pin
Dave Kreskowiak21-Mar-07 8:40
mveDave Kreskowiak21-Mar-07 8:40 
AnswerRe: How to type on command window at an instance? Pin
barkanb22-Mar-07 0:46
barkanb22-Mar-07 0:46 
GeneralRe: How to type on command window at an instance? Pin
Dave Kreskowiak22-Mar-07 2:20
mveDave Kreskowiak22-Mar-07 2:20 
QuestionNumericUpDown displays too many digits while it has focus Pin
ChrisDavidson20-Mar-07 5:50
ChrisDavidson20-Mar-07 5:50 
AnswerRe: NumericUpDown displays too many digits while it has focus Pin
Dave Kreskowiak20-Mar-07 6:10
mveDave Kreskowiak20-Mar-07 6:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.