Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. 3tier app in vs 2005

3tier app in vs 2005

Scheduled Pinned Locked Moved Design and Architecture
csharpdatabasevisual-studiowinformswcf
8 Posts 3 Posters 24 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amc4042
    wrote on last edited by
    #1

    I am trying to write a layered app in vb 2005 .NET I think on a 2 physical levels/tiers: host with a DB, and client (desktop), both not interconnected (except for internet) Host: will contain the DB (SQLServer) , the Data Access Layer DAL, and a Web Service layer, WS_CH desktop, will contain the application (winforms), and Business Logic layer BLL. The BLL will call the (remote) WS_CH, this will call the DAL and this will attack the DB. OK. I will use a Data Transfer Object DTO to pass data up and down all the stream, from the UI to the DB and back. This DTO can be an untyped dataset, in which case all the assemblies involved (in fact, all I mentioned) will contain a reference to System.Data. But.... what if I want the DTO to be a custom class, living in a independent assembly, and possibly hosted in the client. How will the host receive and handle a reference to that (remote) object. Have I to place the DTO in the host (because from the client I know the URL and then I can reference it)?. If not, i suspect I have to use remoting technology, or activator, or reflection, or the new WCF in 3.0,... but I cannot find my way to that..... Any hint, please? thx

    P L 2 Replies Last reply
    0
    • A amc4042

      I am trying to write a layered app in vb 2005 .NET I think on a 2 physical levels/tiers: host with a DB, and client (desktop), both not interconnected (except for internet) Host: will contain the DB (SQLServer) , the Data Access Layer DAL, and a Web Service layer, WS_CH desktop, will contain the application (winforms), and Business Logic layer BLL. The BLL will call the (remote) WS_CH, this will call the DAL and this will attack the DB. OK. I will use a Data Transfer Object DTO to pass data up and down all the stream, from the UI to the DB and back. This DTO can be an untyped dataset, in which case all the assemblies involved (in fact, all I mentioned) will contain a reference to System.Data. But.... what if I want the DTO to be a custom class, living in a independent assembly, and possibly hosted in the client. How will the host receive and handle a reference to that (remote) object. Have I to place the DTO in the host (because from the client I know the URL and then I can reference it)?. If not, i suspect I have to use remoting technology, or activator, or reflection, or the new WCF in 3.0,... but I cannot find my way to that..... Any hint, please? thx

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      This thread might help to get you started: Clickety[^]

      the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
      Deja View - the feeling that you've seen this post before.

      A 1 Reply Last reply
      0
      • P Pete OHanlon

        This thread might help to get you started: Clickety[^]

        the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
        Deja View - the feeling that you've seen this post before.

        A Offline
        A Offline
        amc4042
        wrote on last edited by
        #3

        thx, that thread deals on dataset versus other structures as Data Transfer Objects, and this is OK, but if the DAL in a remote host has to deal, say, with a typed dataset or a custom class or custom collection defined in the desktop (in an assembly who seats in a desktop, I mean), how can the DAL (in the host) get a reference to that????

        P 1 Reply Last reply
        0
        • A amc4042

          thx, that thread deals on dataset versus other structures as Data Transfer Objects, and this is OK, but if the DAL in a remote host has to deal, say, with a typed dataset or a custom class or custom collection defined in the desktop (in an assembly who seats in a desktop, I mean), how can the DAL (in the host) get a reference to that????

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          Actually, the thread deals with defining the structure of the class in the datalayer (I know because I wrote that thread as well). Once the structure is defined in the DAL, then it can be made available across all the tiers. So, the DAL can populate the collection, and new entries can be added in the business layer and saved back via the DAL. So, if you reverse your thinking, you start with the entity in the DAL and then this gets exposed to the business layer (and on into the presentation layer). The beauty about this approach is that you remove the need to reference things such as System.Data in the front end, and as I stated in that thread you can expose this to other programming environments as well.

          the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
          Deja View - the feeling that you've seen this post before.

          A 1 Reply Last reply
          0
          • P Pete OHanlon

            Actually, the thread deals with defining the structure of the class in the datalayer (I know because I wrote that thread as well). Once the structure is defined in the DAL, then it can be made available across all the tiers. So, the DAL can populate the collection, and new entries can be added in the business layer and saved back via the DAL. So, if you reverse your thinking, you start with the entity in the DAL and then this gets exposed to the business layer (and on into the presentation layer). The beauty about this approach is that you remove the need to reference things such as System.Data in the front end, and as I stated in that thread you can expose this to other programming environments as well.

            the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
            Deja View - the feeling that you've seen this post before.

            A Offline
            A Offline
            amc4042
            wrote on last edited by
            #5

            thx, letting the DTO live in the host, together with the DAL "it gets exposed to the BL and presentation layer"... but, how, if DAL/DTO and BL/PL are in different computers, only visible through internet? thx

            P 1 Reply Last reply
            0
            • A amc4042

              thx, letting the DTO live in the host, together with the DAL "it gets exposed to the BL and presentation layer"... but, how, if DAL/DTO and BL/PL are in different computers, only visible through internet? thx

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #6

              If you are using a webservice, the definition of the class (well a proxy version), will be added to the business layer when you add in a web-reference. This means that you can pass this back and forwards without worrying about it.

              the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
              Deja View - the feeling that you've seen this post before.

              1 Reply Last reply
              0
              • A amc4042

                I am trying to write a layered app in vb 2005 .NET I think on a 2 physical levels/tiers: host with a DB, and client (desktop), both not interconnected (except for internet) Host: will contain the DB (SQLServer) , the Data Access Layer DAL, and a Web Service layer, WS_CH desktop, will contain the application (winforms), and Business Logic layer BLL. The BLL will call the (remote) WS_CH, this will call the DAL and this will attack the DB. OK. I will use a Data Transfer Object DTO to pass data up and down all the stream, from the UI to the DB and back. This DTO can be an untyped dataset, in which case all the assemblies involved (in fact, all I mentioned) will contain a reference to System.Data. But.... what if I want the DTO to be a custom class, living in a independent assembly, and possibly hosted in the client. How will the host receive and handle a reference to that (remote) object. Have I to place the DTO in the host (because from the client I know the URL and then I can reference it)?. If not, i suspect I have to use remoting technology, or activator, or reflection, or the new WCF in 3.0,... but I cannot find my way to that..... Any hint, please? thx

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Hiya, Not sure if you're still looking at this, but I came across a similiar problem where in the BLL and UI layers I had my own data objects that were hosted in the client or a webservice. Communication from the BLL to the DAL is remoting. I didn't want the DAL to have any knowledge of these objects because these objects were "plugins" and the DAL could not possibly be able to reference the objects. What I did was implement functionality to disassemble custom classes (in the BLL tier) into a generic object which was then passed into the DAL. All my custom classes inherit from a general object providing methods and properties to extract the data from the custom class, which helped disassemble the data. Hope this helps Cheers, Ty

                A 1 Reply Last reply
                0
                • L Lost User

                  Hiya, Not sure if you're still looking at this, but I came across a similiar problem where in the BLL and UI layers I had my own data objects that were hosted in the client or a webservice. Communication from the BLL to the DAL is remoting. I didn't want the DAL to have any knowledge of these objects because these objects were "plugins" and the DAL could not possibly be able to reference the objects. What I did was implement functionality to disassemble custom classes (in the BLL tier) into a generic object which was then passed into the DAL. All my custom classes inherit from a general object providing methods and properties to extract the data from the custom class, which helped disassemble the data. Hope this helps Cheers, Ty

                  A Offline
                  A Offline
                  amc4042
                  wrote on last edited by
                  #8

                  thanks, remoting is the answer I was looking for. Anyway, with framework 3.0 maybe the right way is to use WCF windows communication foundation that seems to combine webservices and remoting in a unified skeleton thx

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups