Talk:DMA Design Project

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
Line 8: Line 8:
 
Is it really necessary that a logger only contain one type of object? Do we need to be certain that the logger only logs Strings for example? Are we retrieving the logged object for further processing at the end of processing?
 
Is it really necessary that a logger only contain one type of object? Do we need to be certain that the logger only logs Strings for example? Are we retrieving the logged object for further processing at the end of processing?
  
Other possible solutions for
+
Alternatives to the use of generics in this circumstance:
 +
* If you are calling the ToString of an object then you could define the type coming into the logger as Object type.
 +
  * Object has the ToString method which is the interface required by the logger.
 +
  * I don't like this solution since the use of ToString is inconsistent - different classes implement this method to return different representations of an object. Sometimes this is the memory location of the object - which is unlikely to be meaningful in a log file.
  
 
--[[User:Linda Pettigrew|Linda]] 20:02, 3 October 2010 (UTC)  
 
--[[User:Linda Pettigrew|Linda]] 20:02, 3 October 2010 (UTC)  
 
----
 
----

Revision as of 20:17, 3 October 2010


Design Study Comments----

I was given this design study to take a look at during class. I fed back some comments but have since thought of some more.

Firstly - this s an awesome study. Congatulations on the amount of effort and work which has gone into creating the design. The end result looks good.

I do have one problem with the final design and that is the use of generics "feels" wrong. I would like to find principles to support my feelings about this. The only one that I can think of at this stage is that it adds an extra layer of complexity to the design.

Is it really necessary that a logger only contain one type of object? Do we need to be certain that the logger only logs Strings for example? Are we retrieving the logged object for further processing at the end of processing?

Alternatives to the use of generics in this circumstance:

  • If you are calling the ToString of an object then you could define the type coming into the logger as Object type.
 * Object has the ToString method which is the interface required by the logger.
 * I don't like this solution since the use of ToString is inconsistent - different classes implement this method to return different representations of an object. Sometimes this is the memory location of the object - which is unlikely to be meaningful in a log file.

--Linda 20:02, 3 October 2010 (UTC)


Personal tools