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. Working with data bases

Working with data bases

Scheduled Pinned Locked Moved Design and Architecture
designdatabasebusinesssalesoop
3 Posts 3 Posters 0 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.
  • C Offline
    C Offline
    columbos14927
    wrote on last edited by
    #1

    Hello, I have a begginers design issue. I'm building an layered application(Presentation layer, Business logic layer and Data base layer). I have three entities in my application:customer,staff member and vendor that all of them deriving from person. The user can add new customer,staff member or vendor to the data base(using UI). My question is which layer is responsible for the next tasks: 1.Validating user data 2.Saving customer,staff member,vendor in to the DB. 3.Retrieving customer,staff member,vendor from the DB. 4.Perform other DB related manipulation with customer,staff member,vendor. 5.Which classes i need to define to perform the above tasks. I'm new in to object oriented programming so thru the current question i am trying to understand the concept. Thanks

    J R 2 Replies Last reply
    0
    • C columbos14927

      Hello, I have a begginers design issue. I'm building an layered application(Presentation layer, Business logic layer and Data base layer). I have three entities in my application:customer,staff member and vendor that all of them deriving from person. The user can add new customer,staff member or vendor to the data base(using UI). My question is which layer is responsible for the next tasks: 1.Validating user data 2.Saving customer,staff member,vendor in to the DB. 3.Retrieving customer,staff member,vendor from the DB. 4.Perform other DB related manipulation with customer,staff member,vendor. 5.Which classes i need to define to perform the above tasks. I'm new in to object oriented programming so thru the current question i am trying to understand the concept. Thanks

      J Offline
      J Offline
      jschell
      wrote on last edited by
      #2

      columbos14927 wrote:

      I have three entities in my application:customer,staff member and vendor that all of them deriving from person.

      Vendors are almost never "people". They might have sales people representing them but those can change. Also customers can be companies and thus not "people" either.

      columbos14927 wrote:

      My question is which layer is responsible for the next tasks:

      Business layer.

      1 Reply Last reply
      0
      • C columbos14927

        Hello, I have a begginers design issue. I'm building an layered application(Presentation layer, Business logic layer and Data base layer). I have three entities in my application:customer,staff member and vendor that all of them deriving from person. The user can add new customer,staff member or vendor to the data base(using UI). My question is which layer is responsible for the next tasks: 1.Validating user data 2.Saving customer,staff member,vendor in to the DB. 3.Retrieving customer,staff member,vendor from the DB. 4.Perform other DB related manipulation with customer,staff member,vendor. 5.Which classes i need to define to perform the above tasks. I'm new in to object oriented programming so thru the current question i am trying to understand the concept. Thanks

        R Offline
        R Offline
        Rahul Rajat Singh
        wrote on last edited by
        #3

        columbos14927 wrote:

        1.Validating user data

        a) client side input validation should be in presentation layer. b) Server side input validation should also be in presentation layer. c) Business rule validations should be in business logic layer.

        columbos14927 wrote:

        2.Saving customer,staff member,vendor in to the DB.

        Actual data base CRUD operations will be in Data access layer but on successful validation the operation should be done in Business logic layer.

        columbos14927 wrote:

        3.Retrieving customer,staff member,vendor from the DB. 4.Perform other DB related manipulation with customer,staff member,vendor.

        Again, the db layer should contain the data access logic and db entities. The actions should be triggered from business logic layer. Perhaps these article could be a little useful for you: Creating ASP.NET Applications with N-Tier Architecture[^] YaBlogEngine - A Tiny Blog Engine written in ASP.NET/C#[^]

        Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.

        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