CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Feb 2011
    Posts
    4

    Questions About Using Classes.

    Hello.

    I am a newbie and currently writing a couple of WPF applications to improve my work productivity. I had a specific question regarding using classes in the windows based applications.

    Let's say my application will 1) get personal data entry from user and 2) save them to the DB.

    What is the correct way of doing it?

    A. Get user entries from WPF windows called "Person.xaml and Person.xaml.CS" then, saves the entries to a object of class called Person from "Person.CS", and finally save them to the DB.

    B. Get user entries from WPF windows called "Person.xaml and Person.xaml.CS", use the variables declared in Person.Xaml.CS, then save to the DB? Since I have created an object of WPF Windows when the application loaded, isn't it also an OOP?

    Thank you in advance. Your answer will help me in improving my coding skills greatly!

    ADDED:

    I guess I kind of understand what OOP is... but then, I am not sure how to implement it while coding.
    For example, one of my application of tracking grocery products... I will need 3 classes for Vendor, Product, and Customer.

    Do I create class files for each of the objects AND separate WPF windows for each of the objects?
    or Can I just use the WPF windows as a class file?

    I hope you understand what my confusions are >.<
    Last edited by prideofjc; May 6th, 2011 at 04:08 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured