Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

More MVC help .?

  • 06-11-2012 08:17PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 2,062 ✭✭✭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