[Spec] ComposableModel renamed to ComposablePresenter

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

[Spec] ComposableModel renamed to ComposablePresenter

Pavel Krivanek-3
Hello, important change for the Spec users.

In "The Spec UI Framework" book you can read:

Considering the construction and orchestration of the different widgets in
a user interface, Spec is inspired by the Model-View-Presenter pattern. The
model that is defined in Spec corresponds to a presenter in the MVP triad.
Note that because of this, future versions of Spec may rename the ComposableModel into ComposablePresenter for naming consistency.

This change was done in the Pharo 7 development images by this pull request:

All other Spec presenters that use suffix -Model were renamed too to end with -Presenter suffix. This is the complete list:

AbstractFormButtonModel
AbstractWidgetModel
ButtonModel
CheckBoxModel
ComposableModel
ContainerModel
DateModel
DialogWindowModel
DiffModel
DropListModel
DynamicComposableModel
FastTableModel
IconListModel
ImageModel
LabelModel
ListModel
ListSelectionModel 
MenuGroupModel
MenuItemModel
MenuModel
MultiColumnListModel
PickListModel
RadioButtonGroupModel
RadioButtonModel
SliderModel
TabManagerModel
TabModel
TableContainerModel
TestingComposableModel
TextInputFieldModel
TextModel
TickingWindowModel
TransferModel
TreeColumnModel
TreeModel
TreeNodeModel
WindowModel
WorldModel

To be sure that most of the current code which uses the old name will work, we created for every renamed class a subclass with the old name. These subclasses are moved (mostly) into Spec-Deprecated package. Currently such deprecation does not make any action so no exception is generated nor no code is rewritten. We will add such mechanisms in future as soon as most users and documentation will adopt his change.

This deprecation can cause problems in two cases: you use code like 'isKindOf:' or if your package adds extension methods to the basic Spec classes. 

To rename these classes was only the first step. We need to rename some Spec tests classes and mainly touch methods like instantiateModels: and later make them deprecated.

We are sorry for troubles that these changes can cause but it is necessary to make the Spec code less confusing.

Cheers,
-- Pavel













Reply | Threaded
Open this post in threaded view
|

Re: [Spec] ComposableModel renamed to ComposablePresenter

Sean P. DeNigris
Administrator
Pavel Krivanek-3 wrote
> To be sure that most of the current code which uses the old name will
> work,
> we created for every renamed class a subclass with the old name. These
> subclasses are moved (mostly) into Spec-Deprecated package.

Ah, nice trick. Thanks for easing the transition.


Pavel Krivanek-3 wrote
> it is necessary to make the Spec code less confusing.

Sounds good. I often needed a mental pause to translate "model" from "domain
model" to "something modelling a UI on the domain model".



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: [Spec] ComposableModel renamed to ComposablePresenter

Stephane Ducasse-3
Yes me too and listModel model value killed me

On Thu, Oct 12, 2017 at 2:57 PM, Sean P. DeNigris <[hidden email]> wrote:

> Pavel Krivanek-3 wrote
>> To be sure that most of the current code which uses the old name will
>> work,
>> we created for every renamed class a subclass with the old name. These
>> subclasses are moved (mostly) into Spec-Deprecated package.
>
> Ah, nice trick. Thanks for easing the transition.
>
>
> Pavel Krivanek-3 wrote
>> it is necessary to make the Spec code less confusing.
>
> Sounds good. I often needed a mental pause to translate "model" from "domain
> model" to "something modelling a UI on the domain model".
>
>
>
> -----
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
>