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 89249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:41:13+00:00 2026-05-10T22:41:13+00:00

This is often situation, but here is latest example: Companies have various contact data

  • 0

This is often situation, but here is latest example:

Companies have various contact data (addresses, phone numbers, e-mails…) when they make job ad, they have checkboxes where they choose how they want to be contacted. It is basically descriptive data. User when reading an ad sees something like ‘You can apply by mail, in person…’, except if it’s ‘through web portal’ or ‘by e-mail’ because then appropriate buttons should appear. These options are stored in database, and client (owner of the site, not company making an ad) can change them (e.g. they can add ‘by telepathy’ or whatever), yet if they tamper with ‘e-mail’ and ‘web-portal’ options, they screw their web site.

So how should I handle data where everything behaves same way except ‘this thing’ that behaves this way, and ‘that thing’ that behaves some other way, and data itself is live should be editable by client.

  • 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. 2026-05-10T22:41:14+00:00Added an answer on May 10, 2026 at 10:41 pm

    You’ve tagged your question as ‘language-agnostic’, and not all languages cleanly support polymorphism, but that’s the way I would approach this.

    Each option has some type, and different types require different properties to be set. However, every type supports some sort of ‘render’ method that can display the contact method as needed. Since the properties (phone number, or web address, etc.) are type-specific, you can validate the administrator’s input when creating these ‘objects’, to make sure that the necessary data is provided and valid. Since you implement the render method, rather than spitting out HTML provided by a user, you can ensure that the rendered page is correct. It’s less flexible, but safer and more user friendly.

    In the database, you can have one sparsely populated table that holds data for all types of contacts, or a ‘parent’ table with common properties and sub-tables with type-specific properties. It depends on how many types you have and how different they are. In either case, you would have some sort of type indicator, so that you know the type of object to which the data should be be bound.

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

Sidebar

Ask A Question

Stats

  • Questions 58k
  • Answers 58k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Ok, I've got this working, I figured I'd answer it.… May 11, 2026 at 8:38 am
  • added an answer Here you can pass parameter to delete command : //… May 11, 2026 at 8:37 am
  • added an answer m_ServiceHost.Description.Behaviors.Add(New ServiceMetadataBehavior()) m_ServiceHost.AddServiceEndpoint( GetType(IMetadataExchange), MetadataExchangeBindings.CreateMexTcpBinding(), 'net.tcp://localhost:6595') May 11, 2026 at 8:37 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

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.

      Related Questions

      No related questions found