Componentizing a database application

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hplloyd

    #1

    Componentizing a database application

    I am fairly new to VB.NET programming but have built many database applications in Access SQL Server etc.

    I need to find a good book or other reference material that will help me take my OO programing skills to the next level.

    I can build forms and bind data to them from SQL server, but somehow this seems not to be the best way to use an OO programming language.

    I guess the professional way of doing it is to have classes for each of the tables in the database and have methods that ADD UPDATE and DELETE records for the table plus additional methods that load the object from the database etc. The propoerties for the class would correspond to the fields in the database.

    So for example you might have a CUSTOMER table and a CUSTOMER class that handles everything to do with manipulating customers. Manipulations include adding, updating deleting, validating, retreiving from the database. Then i guess you would have a CUSTOMERS collection class that is a collection of customers so that for example you could load the collection into a datatable and present them in a grid.

    Then one level deeper is that you may have an INVOICE class that has a CUSTOMER object as one of its properties. etc etc etc

    It seems to me that this approach although difficult to get right will result in a much more flexible end result.

    I have loads of books on VB.NET and ASP.NET and the only one that I have found that even touches on this subject is "Beginning ASP.NET Databases with VB.NET by Wrox Press" Chapter 10 Componentizatio n.

    Does anyone know of any books, etc that can help me understand how to do this componentizatio n properly ( i need lots of example etc )? Also, are there any tools out there that will examine a SQL server database and generate all the data classes and methods for you?

    Thanks for your help
  • Cor Ligthert

    #2
    Re: Componentizing a database application

    Hi Hpployd,

    Why so afraid about your OO programming skills, when you use a dotNet
    language you cannot pass that, so why not see the resource kit of VB and see
    how it is done and as welk the godotnet link I show beneath.

    Another good place is regulary read the newsgroup.

    microsoft.publi c.dotnet.langua ges.vb

    and/or become a contributor.

    VB.net Resource kit
    http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

    And if you have problems installing the resource kit
    http://msdn.microsoft.com/vbasic/vbr...q/#installvdir

    Another resource for learning is the Quick Starts


    I hope this helps?

    Cor


    Comment

    • Nick Malik

      #3
      Re: Componentizing a database application

      Hello,

      I know what you mean. Most folks don't really make an attempt to actually
      "understand " what OO programming gives them. Those folks are destined to
      stay in the world of structured programming with simple components.

      The question you ask goes beyond just the database concept that you are
      dealing with... it goes to the heart of how to use Objects to solve
      problems.

      One good place to start is the microsoft patterns and practices literature.
      For the specific questions below, see this link:
      http://www.microsoft.com/resources/p...e/default.mspx

      To really begin to understand the ideas behind OO, however, you need to go
      beyond creating a set of objects that represent database tables.
      I strongly recommend the following book: "Design Patterns Explained, a New
      Perspective on Object Oriented Design" by Shalloway and Trott.

      The book is very easy to read, and it will improve your understanding of
      components and objects by 150% at least.

      If you'd like a quick intro to design patterns, you can find a PPT of a
      presentation on this topic at:


      Hope this helps
      --- Nick


      "hplloyd" <hplloyd@discus sions.microsoft .com> wrote in message
      news:19B236CF-1581-47A0-B1DE-E4499CD743DD@mi crosoft.com...[color=blue]
      > I am fairly new to VB.NET programming but have built many database[/color]
      applications in Access SQL Server etc.[color=blue]
      >
      > I need to find a good book or other reference material that will help me[/color]
      take my OO programing skills to the next level.[color=blue]
      >
      > I can build forms and bind data to them from SQL server, but somehow this[/color]
      seems not to be the best way to use an OO programming language.[color=blue]
      >
      > I guess the professional way of doing it is to have classes for each of[/color]
      the tables in the database and have methods that ADD UPDATE and DELETE
      records for the table plus additional methods that load the object from the
      database etc. The propoerties for the class would correspond to the fields
      in the database.[color=blue]
      >
      > So for example you might have a CUSTOMER table and a CUSTOMER class that[/color]
      handles everything to do with manipulating customers. Manipulations include
      adding, updating deleting, validating, retreiving from the database. Then i
      guess you would have a CUSTOMERS collection class that is a collection of
      customers so that for example you could load the collection into a datatable
      and present them in a grid.[color=blue]
      >
      > Then one level deeper is that you may have an INVOICE class that has a[/color]
      CUSTOMER object as one of its properties. etc etc etc[color=blue]
      >
      > It seems to me that this approach although difficult to get right will[/color]
      result in a much more flexible end result.[color=blue]
      >
      > I have loads of books on VB.NET and ASP.NET and the only one that I have[/color]
      found that even touches on this subject is "Beginning ASP.NET Databases with
      VB.NET by Wrox Press" Chapter 10 Componentizatio n.[color=blue]
      >
      > Does anyone know of any books, etc that can help me understand how to do[/color]
      this componentizatio n properly ( i need lots of example etc )? Also, are
      there any tools out there that will examine a SQL server database and
      generate all the data classes and methods for you?[color=blue]
      >
      > Thanks for your help[/color]


      Comment

      Working...