Magritte with Pragma support update

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

Magritte with Pragma support update

Nick
Hi,

I've built on Esteban's pragma work and all tests are again green - that is the Magritte container and description extensions now work.

The code is in:

If you want to try it out you'll have to ensure MAPragmaBuilder is used by resetting the builder:

    MADescriptionBuilder default: nil.

Currently the code is backwards compatible.

The next step appears to be to break backwards compatibility and move the descriptions to the instance side.

Lukas mentioned that it might be possible to automate this breaking change with an automated refactoring. I've had a quick look at some of the existing refactorings and will need some support to build a reliable refactoring, which should perform the following:

1) Add <magritte>, <magritte: #extensionMethod>, <magritteContainer> for respectively descriptions, descriptions extensions and description containers.
2) Move the descriptions to the instance-side

Perhaps more contentiously it could also:

3) put descriptions in category "magritte" or "magritte-descriptions" or "meta-descriptions" rather than just "descriptions"
4) rename descriptions from: #descriptionPlace to #placeDescription.

Once descriptions are on the instance-side Magritte will require a little more refactoring... Then Pier will need to be migrated...

Any thoughts on the above or pointers on how to tackle the automated the refactoring?

Thanks

Nick





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

Re: Magritte with Pragma support update

Nick
I've created a package to contain the refactorings: 'Magritte-Tools' in http://source.lukas-renggli.ch/magritte2unstable contain an initial attempt at description refactoring MAMoveDescriptionsToInstanceRefactoring
 
On 12 January 2012 21:31, Nick Ager <[hidden email]> wrote:
Hi,

I've built on Esteban's pragma work and all tests are again green - that is the Magritte container and description extensions now work.

The code is in:

If you want to try it out you'll have to ensure MAPragmaBuilder is used by resetting the builder:

    MADescriptionBuilder default: nil.

Currently the code is backwards compatible.

The next step appears to be to break backwards compatibility and move the descriptions to the instance side.

Lukas mentioned that it might be possible to automate this breaking change with an automated refactoring. I've had a quick look at some of the existing refactorings and will need some support to build a reliable refactoring, which should perform the following:

1) Add <magritte>, <magritte: #extensionMethod>, <magritteContainer> for respectively descriptions, descriptions extensions and description containers.
2) Move the descriptions to the instance-side

Perhaps more contentiously it could also:

3) put descriptions in category "magritte" or "magritte-descriptions" or "meta-descriptions" rather than just "descriptions"
4) rename descriptions from: #descriptionPlace to #placeDescription.

Once descriptions are on the instance-side Magritte will require a little more refactoring... Then Pier will need to be migrated...

Any thoughts on the above or pointers on how to tackle the automated the refactoring?

Thanks

Nick






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

Re: Magritte with Pragma support update

Lukas Renggli
In reply to this post by Nick
Hi Nick,

Looks cool!

> 1) Add <magritte>, <magritte: #extensionMethod>, <magritteContainer>
> for respectively descriptions, descriptions extensions and description
> containers.

I don't like the name of the pragma. Maybe better call it <magritteDescription>?

Not sure if there was the possibility to extend the container in the
previous implementation?

> 3) put descriptions in category "magritte" or "magritte-descriptions" or
> "meta-descriptions" rather than just "descriptions"

I guess you could have it together with the accessors. So in the
browser you have everything together:

      #name
      #name:
      #nameDescription

Otherwise I would put them into a protocol like
#'accessing-descriptions' or #'accessing-magritte'.

Lukas

> 4) rename descriptions from: #descriptionPlace to #placeDescription.
>
> Once descriptions are on the instance-side Magritte will require a little
> more refactoring... Then Pier will need to be migrated...
>
> Any thoughts on the above or pointers on how to tackle the automated the
> refactoring?
>
> Thanks
>
> Nick
>
>
>
>
>
> _______________________________________________
> 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 with Pragma support update

NorbertHartl

Am 15.01.2012 um 10:56 schrieb Lukas Renggli:

> Hi Nick,
>
> Looks cool!
>
>> 1) Add <magritte>, <magritte: #extensionMethod>, <magritteContainer>
>> for respectively descriptions, descriptions extensions and description
>> containers.
>
> I don't like the name of the pragma. Maybe better call it <magritteDescription>?
>
+1

> Not sure if there was the possibility to extend the container in the
> previous implementation?
>
I think until two weeks ago you were the only one that knew an extension mechanism exists. So if you don't know who else? :)

Norbert

>> 3) put descriptions in category "magritte" or "magritte-descriptions" or
>> "meta-descriptions" rather than just "descriptions"
>
> I guess you could have it together with the accessors. So in the
> browser you have everything together:
>
>      #name
>      #name:
>      #nameDescription
>
> Otherwise I would put them into a protocol like
> #'accessing-descriptions' or #'accessing-magritte'.
>
> Lukas
>
>> 4) rename descriptions from: #descriptionPlace to #placeDescription.
>>
>> Once descriptions are on the instance-side Magritte will require a little
>> more refactoring... Then Pier will need to be migrated...
>>
>> Any thoughts on the above or pointers on how to tackle the automated the
>> refactoring?
>>
>> Thanks
>>
>> Nick
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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


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