Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6047385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:20:43+00:00 2026-05-23T07:20:43+00:00

When we pass a Db identifier of any object to the UI (Let’s say

  • 0

When we pass a Db identifier of any object to the UI (Let’s say the PrimaryKey of an object in the url query string) aren’t we mixing two layers (Persistnet layer and presentation layer) basically?

A data-base identifier sounds like a persistent layer related data only to me in a way, but when we ‘have’ to pass it on UI, isn’t is a kind of BAD practice, where I have no idea what could be a better one though.

Is it in an exceptional case?

In short, how does the multi-tier architecture addresses this practice, passing a persistent layer data to UI?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:20:44+00:00Added an answer on May 23, 2026 at 7:20 am

    It’s a kind of a Leaky Abstraction everybody has to deal with.

    There is more examples of persistance leaking to other layers as for example validating string lenght in domain layer because the lenght in the database column is set to some value. Another example could be exposing EF IQueryable from DAL to domain layer, because doing that the potenital database scheme is leaking to the domain layer.

    So I think there is a acceptable compromise we could deal with and we can’t eliminate leaky abstraction at all but we should work hard to have it at minimum. Exposing the ID to UI is a such acceptable compromise I deal with because it’s simple and everybody understand it.

    But if someone has a silver bullet I will be glad to hear about 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My users pass me an array of some type, say int[] or string[]. I
Let me make this clear, I have this enum: enum Token { Number(v:Float); Identifier(v:String);
I pass my string value to one method but I can't get the stored
I've created a helper, that I can pass a DateTime object to, and an
I have two kinds of objects in my application where every object of one
Pass a []byte into a template as the body of a message post on
I pass in the following XML to XMLin : <root foo=bar foo2=bar2> <pizzas> <pizza>Pepperoni</pizza>
Goal Pass images generated by one process efficiently and at very high speed to
I need to pass all my current page cookies to other server with request:
Is it safe to pass objects into a Resque job? For example: Resque.enqueue(Foobar, @foo,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.