[Magritte] Empty classes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Magritte] Empty classes

Tuan Anh Bui
Hi all,

I'm analysing the Magritte system and I can see that there are many classes that haven't been declared. Some, I believe, are those are there only to be abstracted like MABasicObject. Some others, like MAAccessorMock, are there only for testing purpose? And some other ones, like MAPropertyError, have blank code but still have some references to themselves.

So are all they code left blank intentionally for future work or for just testing, or just an incomplete work. Should they be considered bad smells code as I am analysing those.

Thank you very much!

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: [Magritte] Empty classes

Lukas Renggli
I don't remember the details about the classes you mention, but empty classes make perfectly sense. For example, most exception classes in Smalltalk are completely empty.

Have a look at the references of the respective classes to see how they are used and why they don't need any extra behavior.

Lukas


On 14 November 2013 16:49, Tuan Anh Bui <[hidden email]> wrote:
Hi all,

I'm analysing the Magritte system and I can see that there are many classes that haven't been declared. Some, I believe, are those are there only to be abstracted like MABasicObject. Some others, like MAAccessorMock, are there only for testing purpose? And some other ones, like MAPropertyError, have blank code but still have some references to themselves.

So are all they code left blank intentionally for future work or for just testing, or just an incomplete work. Should they be considered bad smells code as I am analysing those.

Thank you very much!

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

RE: [Magritte] Empty classes

Tuan Anh Bui

Thank you,

 

For the empty class, for example, the class MAAccessorMock is completely blank and without comment. I’m wondering if this is intentional.

 

I have another question related to the design patterns. Is this true that the packages in Magritted are named based on the design patterns based on which they are developed? Like –Visitor, -Memento. And there are many design patterns lying in the code of Magritte.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Lukas Renggli
Sent: 17 November 2013 16:03
To: Magritte, Pier and Related Tools ...
Subject: Re: [Magritte] Empty classes

 

I don't remember the details about the classes you mention, but empty classes make perfectly sense. For example, most exception classes in Smalltalk are completely empty.

 

Have a look at the references of the respective classes to see how they are used and why they don't need any extra behavior.

 

Lukas

 

On 14 November 2013 16:49, Tuan Anh Bui <[hidden email]> wrote:

Hi all,

 

I'm analysing the Magritte system and I can see that there are many classes that haven't been declared. Some, I believe, are those are there only to be abstracted like MABasicObject. Some others, like MAAccessorMock, are there only for testing purpose? And some other ones, like MAPropertyError, have blank code but still have some references to themselves.

 

So are all they code left blank intentionally for future work or for just testing, or just an incomplete work. Should they be considered bad smells code as I am analysing those.

 

Thank you very much!


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki



 

--
Lukas Renggli
www.lukas-renggli.ch


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: [Magritte] Empty classes

Stephan Eggermont-3
In reply to this post by Tuan Anh Bui
Are you using Moose to analyse the Magritte system? Moose has its own mailing list.
Magritte uses a lot of the patterns from the gang of four book, and names classes
(and a few packages) after the patterns.

Magritte is a good example of a framework with high essential complexity
and low accidental complexity. It is difficult to understand because it solves
(difficult) problems at a high abstraction level. The elimination of duplication
has been done rather well.

If you want to use Magritte for web development, you might want to take a look
at the extensions in QCMagritte.

MABasicObject overrides GRObject class side basicErrorClass method.
Magritte has to work in multiple Smalltalk implementations. Grease helps with that.
Having Magritte objects inherit from GRObject allows platform-specific overrides
to be applied.

The role of MAAccessorMock isn’t clear to me either. It has no references and removing it
doesn’t make any test fail. It could of course be that references/subclasses are only defined
in packages not loaded by default. More likely is perhaps that it was used in an earlier
version of the framework or tried out at a certain point in time and not removed when no longer
needed. You could find out by browsing earlier versions of the Magritte packages.

Stephan


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

RE: [Magritte] Empty classes

Tuan Anh Bui
Yes,

I'm using Moose to analyse the Magritte system. It's rather really
complicated, just as what you say, solving problems at a high level and not
easy to understand. One thing really weird is I can't view entire code of
Magritte classes using Pharo browser, but using Moose instead.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
On Behalf Of Stephan Eggermont
Sent: 20 November 2013 17:48
To: Pier and Related Tools ... Magritte
Subject: Re: [Magritte] Empty classes

Are you using Moose to analyse the Magritte system? Moose has its own
mailing list.
Magritte uses a lot of the patterns from the gang of four book, and names
classes (and a few packages) after the patterns.

Magritte is a good example of a framework with high essential complexity and
low accidental complexity. It is difficult to understand because it solves
(difficult) problems at a high abstraction level. The elimination of
duplication has been done rather well.

If you want to use Magritte for web development, you might want to take a
look at the extensions in QCMagritte.

MABasicObject overrides GRObject class side basicErrorClass method.
Magritte has to work in multiple Smalltalk implementations. Grease helps
with that.
Having Magritte objects inherit from GRObject allows platform-specific
overrides to be applied.

The role of MAAccessorMock isn't clear to me either. It has no references
and removing it doesn't make any test fail. It could of course be that
references/subclasses are only defined in packages not loaded by default.
More likely is perhaps that it was used in an earlier version of the
framework or tried out at a certain point in time and not removed when no
longer needed. You could find out by browsing earlier versions of the
Magritte packages.

Stephan


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki