CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10
  1. #1
    Join Date
    May 1999
    Location
    Slovenia (currently: Germany)
    Posts
    249

    Three Tier in VB a myth?

    Is three tier in VB a reality?

    Most programmers I've seen use data controls and data bound controls to connect to DBMS. Does anyone actually writes class objects for business logic and then uses dumb controls at the presentation level to present information stored inside business logic object?

    Anyone dividing program to three levels or all of you simply putting controls to forms and connecting them(?)

    Sincerely,
    Tomaz

    ---------------------------------------------
    Tomaz Stih, B.Sc.CS [email protected]
    Ob sotoccju 10 Nameco Group
    SI-1000 Ljubljana http://www.nameco.com
    Europe

  2. #2
    Join Date
    Apr 1999
    Location
    Michigan, USA
    Posts
    115

    Re: Three Tier in VB a myth?

    I don't know about anybody else but I have only once used bound controls. I suppose that it would be
    OK if you only wanted to browse data but you loose almost all control when entering data into a bound control.


  3. #3
    Join Date
    Apr 1999
    Location
    Rotterdam, Netherlands
    Posts
    278

    Re: Three Tier in VB a myth?

    Hi
    I've used both a class to access the db as drop all code in a form. In the latter, i used usercontrols which did the validation things so in the form I didn't have to do more then add/modify the data. With the class, I used just the basic controls and let the class validate. I like the way with usercontrols more (since I like them :-) but after all there wasn't much difference for me, it's both easy. Although I can imagine that with some projects it's easier to use classes for the connection and validation.
    Crazy D :-)


  4. #4
    Join Date
    Jan 1999
    Posts
    24

    Re: Three Tier in VB a myth?

    Hello,
    In three tier app, we can use Datasource class instead of bound control.
    It is very good class for three tier App!!

    Bye.
    H.Q. Cuong
    MCP


  5. #5
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: Three Tier in VB a myth?

    HI,

    My style is: I usually design all my DB access in a seperate class - right from loading reference to "MS DAO 3.5 Object Library", defining a class member for database, recordset etc. It does have a little bit "more" of coding work, but it gives the liverage. Data valiation is usually done by a
    member fn.
    My semi-scientific progs doesn't have "Business Logic", so they remain mostly 2-tier. I guess the 3rd layer could be added if required.

    so i have programes VB database apps, where i haven't even put a data control on the form!!. - May be i am reinventing the wheel:-)

    Ravi Kiran


  6. #6
    Join Date
    May 1999
    Location
    Slovenia (currently: Germany)
    Posts
    249

    Re: Three Tier in VB a myth?

    Hear, hear.

    Do you know any good book or other source on the topic. I think that VB with it's easy COM interface could provide good common ground for a small team of developers. Business logic could be modelled using UML and then presentation level prototyped and the work effectively divided.

    The one argument where bound controls perform better is browsing. But I did a test using collection object and list view to browse through the database and the code was not such an overhead. There would be a problems with displaying several 1000 records but my philosophy is - if you display more then 100 records at one time to the user you blew it anyway - change your usability heuristics.

    I am very glad to hear that someone else is dividing database access to separate class. I thought the idea was weird.

    Sincerely,
    Tommy

    ---------------------------------------------
    Tomaz Stih, B.Sc.CS [email protected]
    Ob sotoccju 10 Nameco Group
    SI-1000 Ljubljana http://www.nameco.com
    Europe

  7. #7
    Join Date
    May 1999
    Location
    Slovenia (currently: Germany)
    Posts
    249

    Re: Three Tier in VB a myth?

    The real power of objects is when you divide work among more people. Also when you have a complex system where there are a lot of different events going around (for example data entry triggers some complex recalculation and so on...). Then dividing business logic (domain objects) and user interface gives your users the possibility of using the same user interface software on the first and the 100th version of domain level objects.
    I guess with good planning you can have them both. Use bound controls to display data and also use report generators... directly. And use classes for data entry and for modelling other business processes.


    ---------------------------------------------
    Tomaz Stih, B.Sc.CS [email protected]
    Ob sotoccju 10 Nameco Group
    SI-1000 Ljubljana http://www.nameco.com
    Europe

  8. #8
    Join Date
    May 1999
    Posts
    7

    Re: Three Tier in VB a myth?

    For a book, I'd recommend Professional Visual Basic 5.0 Business Objects, by Rockford Lhotka, 1997, Wrox Press Ltd., ISBN: 1-861000-43-X. I understand that there's a VB 6.0 version out, but that it hasn't changed much from the VB 5.0 version.

    Brian


  9. #9
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: Three Tier in VB a myth?

    You said it!!. I couldn't have said it better!

    I perfectly endorse your view. Thats what i meant by "gives liverage". But, good planning is *the key*

    Ravi


  10. #10
    Join Date
    May 1999
    Location
    Slovenia (currently: Germany)
    Posts
    249

    Re: Three Tier in VB a myth?

    Loved the customer comments on Amazon.com. Will order, thanks a lot! This book is also available for VB 6.0 now.
    The other one I found is VB6 UML Design and Development by Jake Sturm.

    ---------------------------------------------
    Tomaz Stih, B.Sc.CS [email protected]
    Ob sotoccju 10 Nameco Group
    SI-1000 Ljubljana http://www.nameco.com
    Europe

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