WPF Applications/Database - Total Beginner

Posted on 2012-03-25
Medium Priority
Last Modified: 2012-04-11
I am new to object oriented programming and application development.  I have seen lots of books detailing WPF or VB.Net or SQL Server but there doesn't seem to be anything combining these elements, providing practical examples of how to build an application/database.  My only experience of code is VBA and a little HTML/CSS/Javascript.

Question by:Damozz
LVL 12

Expert Comment

ID: 37763113
Microsoft "How Do I" video series are a good start.

LVL 83

Accepted Solution

CodeCruiser earned 2000 total points
ID: 37763259
LVL 15

Expert Comment

by:David L. Hansen
ID: 37767079
I'd like to help with the object-oriented question.  It is a concept that is often made harder than it needs to be.  If you'd like to hear my mini-lecture on the topic, just say so.

Author Comment

ID: 37767167
That would be good.  Thanks
LVL 15

Expert Comment

by:David L. Hansen
ID: 37767480
It used to be that programmers would have an idea in mind for what their interface (GUI) would look like to the user.  They would then approach programming from that point of view (what do I need to code to get that button to work right, or the grid will have x, y, and z info, so I'll grab that from the database and fill the grid, etc.).  This happened without much though as to how these decisions would affect the program as a whole.  As programs became bigger and bigger, and more and more complex, that approach eventually broke down.  The same queries would be found scattered all over in the code.  During later maintenance, nobody (including the original author/authors) knew where they were in the code a few moths after writing it, and so on.  So objects became the new point-of-view for programming.  

I'm going to throw in a personal experience which may help here.  I toured a car manufacturing facility back in the early 90's and observed that although an assembly line was being used, it was not a typical one; each station along the path would perform different tasks based on the car that came through - yes, the assembly line had a mixture of car types on the same line!  Robots did most of the work.  Consider, each car had an electronic canister attached that told the robots everything about that specific car (model, color, accessories, and perhaps other buyer's decisions) so the robots knew just what to do.  That is what we are doing now.  Our (your) routines are like the robots and the information you are dealing with are the objects.  You make the object (like the information canister) and pass it around through your program dealing with it and responding to it appropriately.

You might make a custom 'bike' class.  Now, at this level you'll want to keep that class pretty sparse (not intuitive is it - but I'll explain).  If you will be dealing with race bikes, mountain bikes, touring bikes, etc. then the bits of information about those bikes that are specific to them go in their OWN classes (ie, Class_Moutain_Bike) and they would each INHERIT from the more general bike class.  So, the bike class may have: Serial_Number, Frame_Type, Wheel_Type, Color, and so on...very general.  Although the mountain_bike class would still have all the stuff in the general bike class (because of inheritance) it will also have things like Shocks, or specialized gearing.  Those things don't belong in the bike class - it's too specific.

So your program creates bikes (using the different bike classes to create bike-objects) which get passed around your program getting adjusted and/or simply sharing its information.  At the end of the day, your program looks sort of like that car manufacturing plant - you don't see data or processes that say "hey, I deal with the data belonging to that one model during that period of time."  Instead you see flexible processes that can deal with a lot of different objects and scenarios.  So data complexities are contained in the objects and process complexities are contained in the routines.  Need to start a new line of bikes? - just inherit from the bike class and off you go.  Need to implement a new billing process? - just build the processes and pass the same old bike objects into them.

Objects have improved our programming lives and although it is powerful, it isn't perfect. However, once you understand it's strengths you can leverage them to make your programs easier to build and maintain.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Screencast - Getting to Know the Pipeline
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question