Mike New | 2 Jan 2008 19:45
Favicon

Re: Classes with no behaviour (Inheritance)

Hi,

Given how these are used, why don't you just have one class which has an
"id" instance variable and takes m_scLogFileType in its constructor (or
better, an enumerated type that gets converted to the string value)?

Mike

>
> CommonMetaData
>
> Class CommonMetaData
> {
>             String    m_scLogFileType     = "";
>  	private string logvolumename = “”;
>
>             public String getLogVolName()
>    	{
>       		return m_scLogVolName;
>   	}
>
>    	public void setLogVolName( String scLogVolName )
>    	{
>       		if ( scLogVolName != null )
>       		{
>          logVolName = scLogVolName;
>       		}
> }
>
> …..
(Continue reading)

Picon
Favicon

Re: Classes with no behaviour (Inheritance)

Hi Mike,

  In this case I think we can use "Pull up field" and
define variable ID in the base class. This should
represent both processID and taskID. But I also have a
case where data is differernt as below.

Class ProcessMetaData extends CommonMetaData {
  private string hostname;
  // getter
  // setter
}

Class TaskMetaData extends CommonMetaData {
 private string domain;
 // getter
 // setter
}

Regards,
Krishna

--- Mike New <mike <at> noozoo.com> wrote:

> Hi,
> 
> Given how these are used, why don't you just have
> one class which has an
> "id" instance variable and takes m_scLogFileType in
> its constructor (or
(Continue reading)

Joshua Kerievsky | 3 Jan 2008 11:34
Gravatar

Re: Classes with no behaviour (Inheritance)

Hello Krishna,

Here are some questions to ponder:

1.  Are there really enough differences in your Process and Task loggers 
to  justify two classes?  

2.  Is it important to have the ProcessMetaData and TaskMetaData 
classes?   Is there a way to collapse those classes into the Logger?

3. Why do you need a LoggerFactory?   Could you simply pass in two 
instances of a Logger to application and give users of the logs access 
to them?

--

-- 
best regards,
jk

I n d u s t r i a l   L o g i c ,  I n c .
Joshua Kerievsky
Founder, Extreme Programmer & Coach
http://industriallogic.com
866-540-8336 (toll free)
510-540-8336 (phone)
Berkeley, California

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
(Continue reading)

Picon
Favicon

Re: Classes with no behaviour (Inheritance)

Hi JK,

1.  Are there really enough differences in your
Process and Task loggers to  justify two classes?

I see only two differences

a) ProcessLogger has capability of setting the Log
fields for MDC context of log4j which TaskLogger does
not have. To simplify things, I can define this in
Task Logger as well. In fact I am not really sure why
this feature was not provided to Tasklogger. But in
case this feature should not be provided to
TaskLogger, how to go about it?

b) TaskLogger has a domain field with setter and
getter methods which ProcessLogger does not need. 
Domain field is from TaskMetaData class.

2.  Is it important to have the ProcessMetaData and
TaskMetaData 
classes?   Is there a way to collapse those classes
into the Logger?

There is only data differences between ProcessMetaData
and TaskMetaData. There are around 10 to 15 data
fields which I can move to Logger class. But it will
clutter the logger class with lot of data. If that is
the best solution, I can put them in Logger class.

(Continue reading)

Joshua Kerievsky | 3 Jan 2008 22:33
Gravatar

Re: Classes with no behaviour (Inheritance)

Krishnamurthy Chakravarthula wrote:
> 1.  Are there really enough differences in your
> Process and Task loggers to  justify two classes?
>
> I see only two differences
>
> a) ProcessLogger has capability of setting the Log
> fields for MDC context of log4j which TaskLogger does
> not have. To simplify things, I can define this in
> Task Logger as well. In fact I am not really sure why
> this feature was not provided to Tasklogger. But in
> case this feature should not be provided to
> TaskLogger, how to go about it?
>   
Can you support a few different ways of constructing a Logger via 
Creation Methods -- one would set the log fields for MDC context, one 
would not?
> b) TaskLogger has a domain field with setter and
> getter methods which ProcessLogger does not need. 
> Domain field is from TaskMetaData class.
>   
Don't know what a domain field is in this context - is it necessary to 
go in the Logger?
> 2.  Is it important to have the ProcessMetaData and
> TaskMetaData 
> classes?   Is there a way to collapse those classes
> into the Logger?
>
> There is only data differences between ProcessMetaData
> and TaskMetaData. There are around 10 to 15 data
(Continue reading)

Picon
Favicon

Re: Classes with no behaviour (Inheritance)

Hi JK,

  1. ProcessLogger and TaskLoggers have different log
format layouts defined in configuration file. So the
log statements appear in different formats in log
files. This is an additional difference. If I have
single class I need a check to differentiate between
these loggers. Can you please expand on "Different
creation methods". Does it mean having construtors
with different number of parameters in single class to
differentiate the loggers?

2. I can collapse the metadata classes to the logger
class by using HashMaps. This will eliminate the
metadata classes. Thanks a lot for the suggestion. But
I have getters and setters for this metadata in logger
class. How can get/set data only with couple of
methods? There are some string data and interger data
in metadata.

3. Applications can generate multiple log files. So
multiple loggers are supported to write to different
log files. One logger writes to one file.

Regards,
Krishna

--- Joshua Kerievsky <joshua <at> industriallogic.com>
wrote:

(Continue reading)

Jan Wloka | 4 Jan 2008 16:28
Picon
Picon

Re: Re: Refactoring tools and AOP

Hi Robert,

current programming languages that support AOP still cause unsolved  
evolution issues in resulting programs, such as the "fragile pointcut  
problem". Newer approaches propose improved language features or  
advanced tool support to cope with these issues. However, the use of  
the program's meta-level in specification-like definitions (so-called  
pointcuts) makes tool support for refactoring much more challenging.
In short, the tool support for aspect-aware variants of refactorings  
requires a more expensive program analysis and  does not necessarily  
result in a behavior-preserving transformation. It may also propose to  
accept an equivalent alteration of the behavior. The integration of  
advanced program analyses into a refactoring tool, the algorithms/ 
heuristics for identifying equivalent program behaviors (specified in  
pointcuts), and the generation of updated specifications (pointcuts)  
that still can be recognized by the original developer are currently  
open research challenges.

HTH,
Jan.

On Dec 30, 2007, at 6:10 PM, Robert Krahn wrote:

> All kinds of refactorings but particularly the standard ones like
> Rename Method, Extract Class, Move Method and so on. I don't know if
> there is tool support for aspect specific refactorings (refactorings
> for improving the design of aspect-oriented code and refactorings for
> transforming OO structures like Extract Advice).
>
> Refactorings alter the join points of a program so a tool must at
(Continue reading)

Kevin Rutherford | 8 Jan 2008 15:46
Gravatar

[ANN] Return of the Naked Agilists | 19-Jan-08 | Reminder and final CfP

Hi,
Do you wish you could attend the Agile conferences and XP days, but
can't get the funding or the travel budget or the time off work?  Well
there is one agile event that you can even attend from your own bath
-- the Naked Agilists!  Save the date now:

Date:     Saturday 19-Jan-08
Time:   20:00 GMT - 21:30 GMT  [UK time]
Venue:  Your place, or mine

The event format is a Skype conference, supported by chat and a
website.  There's also a mailing list [2] where you can find more
details of what happened last time we did this.

This time we have some terrific 10-minute talks lined up, featuring
Laurent Bossavit and Nancy van Schooenderwoert among others.  But
there's still time for you to join in too!  Please join the mailing
list and propose a session:

Experience Reports, lasting 2, 5 or 10 minutes.  Think of these as
     blog posts -- your chance to share a quick idea or observation
     with the rest of us.

Open Questions / Open Space.  You'll get 1 minute to ask the group
     a question, and then there will be 10 minutes of discussion.  This
     is your chance to tap into the experience and expertise of the assembled
     agile experts.

If you would like to present or table a question, please join the
mailing list [2] and post your suggestion there.  We're putting the
(Continue reading)

alexanderbinun | 10 Jan 2008 18:10
Picon
Picon
Favicon

Refactoring to Patterns in Industry

Hello Friends,
 Does somebody know whether Refactoring to Patterns technique is used
in industry ? That is, are there tools that supply users with several
built-in refactorings that could be further used to build design
patterns automatically? 

Currently many users implement design patterns manually, so there are
a lot  of design pattern variations that are not sometimes
recognizable by design pattern detectors.

I am doing the research on Design Pattern recognition in the Univ.
Bonn, Germany.

Great thanks forwardly,
  Alex Binun 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/refactoring/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/refactoring/join
    (Yahoo! ID required)

<*> To change settings via email:
(Continue reading)

Sasan | 10 Jan 2008 18:52
Picon
Favicon

Re: Refactoring to Patterns in Industry

Alex,

The concept it obviously used but I don't think if tools are evolved that much to be used in production,
personally I'm one of those people that manually applying design patterns and I've never seen anybody
(within my teams) trusting such automation much within production; specially when the code is already in
the field it takes courage to use them considering all test effort. 

But in general the concept of refactoring and design pattern is more like a template and best practice, they
need to be applied case by case basis as oppose to automated copy & 
paste (either of them), I'd be happy to see a tool that much intelligent to provide the proper solution for
all cases

S.

----- Original Message ----
From: alexanderbinun <binun <at> cs.bgu.ac.il>
To: refactoring <at> yahoogroups.com
Sent: Thursday, January 10, 2008 5:10:40 PM
Subject: [refactoring] Refactoring to Patterns in Industry

Hello Friends,
Does somebody know whether Refactoring to Patterns technique is used
in industry ? That is, are there tools that supply users with several
built-in refactorings that could be further used to build design
patterns automatically? 

Currently many users implement design patterns manually, so there are
a lot of design pattern variations that are not sometimes
recognizable by design pattern detectors.

(Continue reading)


Gmane