Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

More MVC help .?

Options
  • 06-11-2012 9:17pm
    #1
    Registered Users Posts: 1,645 ✭✭✭


    So I am currently modelling a MVC type system, total noob to this pattern and I'm trying to figure out a couple of things but one thing particular I can't figure out how to handle.

    In my system I create e.g a Customer Class & DAO with CRUD functionality which I understand (to an extent :o ) etc...

    I have a table in my database that log's data, this table is never accessed by the user only the extent that they can view calculations/results from the data in this table.

    How do I represent this in my design, I have no need for CRUD functionality only just to return results from SQL (e.g Select average/total/ etc).

    I obviously need to access the data but I'm not sure if I need a class that models the table or just somewhere to put the logic.

    Any help or pointers would be much appreciated


Comments

  • Registered Users Posts: 2,022 ✭✭✭Colonel Panic


    What are you logging? If it's to record customer CRUD data, you could just put the logging stuff in your customer DAO and write another DAO/Repository that JUST retrieves data via methods that give you log data.

    It's not 100% ideal, but it's a start!

    In work, for my DAO classes, I just put audit/logging stuff into them directly, something else retrieves that information.


Advertisement