473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Good OO organization os statistics data

Hi
We have a large class library of different classes, now we are going to
implement a lot of usage statistics that we need, stuff like how many times
a user has logged in, how many times a message has been read, how many times
a ad has been shown and so on.
Now I'm wondering what would be a good OO organization of this data, should
the statistics be part of the objects they are for, or should statistics be
seperate.
Perhaps each object could have a statistics property that contains the
different statistics for that object.
How do you organize your statistics for your objects and what are your
experinces with this.

Kind Regards,
Allan Ebdrup
Jun 7 '06 #1
5 1732
Not knowing a great deal about what you are doing, but I would recommend
coding the statistics properties within their designated objects rather than
have them separate.

Simon.

"Allan Ebdrup" <eb****@noemail.noemail> wrote in message
news:O4****************@TK2MSFTNGP03.phx.gbl...
Hi
We have a large class library of different classes, now we are going to
implement a lot of usage statistics that we need, stuff like how many
times a user has logged in, how many times a message has been read, how
many times a ad has been shown and so on.
Now I'm wondering what would be a good OO organization of this data,
should the statistics be part of the objects they are for, or should
statistics be seperate.
Perhaps each object could have a statistics property that contains the
different statistics for that object.
How do you organize your statistics for your objects and what are your
experinces with this.

Kind Regards,
Allan Ebdrup

Jun 7 '06 #2
I always code metadata as a separate class IF I expecte the metadata to
become complex OR IF I a have a RAD metadata management subsystem (class
library).

The 'IF' separates a tatical code design from a strategic code design.

If the usage statistics become a 'entity unto themselves' then you can
leverage logging, tracing, presentation and other sub-systems/class
libraries. (assuming you have them
or want to build them).

If you are short on time, have just a few statistics or want a fast
prototype you may want to just make the statistics part of the object state.

Shawnk

"Allan Ebdrup" wrote:
Hi
We have a large class library of different classes, now we are going to
implement a lot of usage statistics that we need, stuff like how many times
a user has logged in, how many times a message has been read, how many times
a ad has been shown and so on.
Now I'm wondering what would be a good OO organization of this data, should
the statistics be part of the objects they are for, or should statistics be
seperate.
Perhaps each object could have a statistics property that contains the
different statistics for that object.
How do you organize your statistics for your objects and what are your
experinces with this.

Kind Regards,
Allan Ebdrup

Jun 7 '06 #3
Hi Allan,

I would prefer Simon's suggestion and put those Simon statistics
properties(methods or fields) into their designated class(as static
members). And only when there are large number of such statistics members
will I consider group them into a separate utility class(which contains
only those static methods or fields ).

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Jun 8 '06 #4
OK. Thank you all for the feedback.
Jun 8 '06 #5
You're welcome Allan,

Good luck!

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Jun 8 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Felix | last post by:
Dear Sql Server experts: First off, I am no sql server expert :) A few months ago I put a database into a production environment. Recently, It was brought to my attention that a particular...
0
by: Jerry Brenner | last post by:
Our users have potentially dirty legacy data that they need to get into our application. We provide a set of staging tables, which map to our source tables, that the users do their ETL into. ...
12
by: Philip Sherman | last post by:
I'm trying to copy production statistics to a test database and can't set the column statistics for a VARGRAPHIC column to match what RUNSTATS generated on production. The reason code and some...
1
by: J | last post by:
I'm early in my C# larval stage, so I'd like a little direction to help understand good code organization. Take for example a program I have written in another language that does the following: ...
4
by: serge | last post by:
I am running a query in SQL 2000 SP4, Windows 2000 Server that is not being shared with any other users or any sql connections users. The db involves a lot of tables, JOINs, LEFT JOINs, UNIONS...
17
by: romixnews | last post by:
Hi, I'm facing the problem of analyzing a memory allocation dynamic and object creation dynamics of a very big C++ application with a goal of optimizing its performance and eventually also...
20
by: weight gain 2000 | last post by:
Hello all! I'm looking for a very good book for an absolute beginner on VB.net or VB 2005 with emphasis on databases. What would you reccommend? Thanks!
49
by: Martin Unsal | last post by:
I'm using Python for what is becoming a sizeable project and I'm already running into problems organizing code and importing packages. I feel like the Python package system, in particular the...
0
ADezii
by: ADezii | last post by:
In last week's Tip, I showed you how to use the ISAMStats Method of the DBEngine (DAO) to return vital statistics concerning Query executions such as: Disk Reads and Writes, Cache Reads and Writes,...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.