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

  • SEARCH
  • Home
  • 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 8846871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:06:08+00:00 2026-06-14T12:06:08+00:00

I am writing some hobby project for poker game. My application will store a

  • 0

I am writing some hobby project for poker game. My application will store a lot of games in database. I created representation of object Game which uses a lot of other objects like: PlayerHand (basically 2 Card objects as properties, and some utility methods like isSuited(), isPaired(), etc), Actions (describes stakes raisings done by players), Board (describes flop, turn and river cards), etc.

Problem is that for database storage I can describe game in a more compact and efficient way. For instance I can just use integers for each unique hand. Such representation is compact and good for DB, but for other logic implementation I would like to have more fields describing a hand then just one integer. I don’t like idea having both representations in one class this just doesn’t look right.

Question: what approach can be used for my problem?

The best solution I’ve come up with is something like MVC pattern. Where Model is my compact database representation and view is my business-logic representations. But again, this doesn’t seem right to me, because looks too complex for such a simple task. Are there more elegant approaches or maybe more simple patterns?

  • 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-06-14T12:06:09+00:00Added an answer on June 14, 2026 at 12:06 pm

    MVC is for the entire application, to separate flow control, from presentation, from business logic. What you need is Data Mapper, so you can have domain objects that know nothing about the db. For most applications I usually use both MVC and Data Mapper.

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

Sidebar

Related Questions

I'm writing some code that will take a screenshot of another application, given its'
I'm writing an iPhone app as a hobby project and it will need a
I'm writing a 3D model viewer application as a hobby project, and also as
I writing some simple application that will look for some message ( sms message
I am writing some small games in Python with Pygame & Pyglet as hobby
Im writing some helper functions for a project im working on. I've always wanted
I'm writing some decision-making AI for a game, and I've come up with the
Writing some additional classes for an existing GWT project. I need to: Request a
In writing some tests for a project I'm working on, I found that the
I am currently writing a KDTree for a physics engine (Hobby project). The KDTree

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.