call for cleaning ideas around Spec

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

call for cleaning ideas around Spec

stepharo
Hi guys


this afternoon we will have a meeting with Peter and others to talk
about cleaning Spec API.

If you want/can join let us know

else we can organise another skype.

if you have ideas let us know too.

Stef


Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Denis Kudriashov
Hi.

I want to join

2016-05-04 8:19 GMT+02:00 stepharo <[hidden email]>:
Hi guys


this afternoon we will have a meeting with Peter and others to talk about cleaning Spec API.

If you want/can join let us know

else we can organise another skype.

if you have ideas let us know too.

Stef



Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Peter Uhnak
Yes, let's discuss why ButtonModel needs 36 instance variables, and TextInputFieldModel 49. :)

On Wed, May 4, 2016 at 9:51 AM, Denis Kudriashov <[hidden email]> wrote:
Hi.

I want to join

2016-05-04 8:19 GMT+02:00 stepharo <[hidden email]>:
Hi guys


this afternoon we will have a meeting with Peter and others to talk about cleaning Spec API.

If you want/can join let us know

else we can organise another skype.

if you have ideas let us know too.

Stef




Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Denis Kudriashov
Oh my god! :)

2016-05-04 10:12 GMT+02:00 Peter Uhnák <[hidden email]>:
Yes, let's discuss why ButtonModel needs 36 instance variables, and TextInputFieldModel 49. :)

On Wed, May 4, 2016 at 9:51 AM, Denis Kudriashov <[hidden email]> wrote:
Hi.

I want to join

2016-05-04 8:19 GMT+02:00 stepharo <[hidden email]>:
Hi guys


this afternoon we will have a meeting with Peter and others to talk about cleaning Spec API.

If you want/can join let us know

else we can organise another skype.

if you have ideas let us know too.

Stef





Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Thierry Goubier
In reply to this post by stepharo
Hi Stef,

could you have a look into making it more efficient? Spec-based interfaces are slow to instantiate, by a factor of at least 2,5x compared to pure Morphic (I've seen a 5x).

It's important because we rely a lot on 'on the fly' GUI instantiation in practice (all the GT stuff, all of Morphic complex widgets).

Regards,

Thierry

2016-05-04 8:19 GMT+02:00 stepharo <[hidden email]>:
Hi guys


this afternoon we will have a meeting with Peter and others to talk about cleaning Spec API.

If you want/can join let us know

else we can organise another skype.

if you have ideas let us know too.

Stef



Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Peter Uhnak
by a factor of at least 2,5x compared to pure Morphic (I've seen a 5x).

This doesn't mean anything. Can you please provide concrete numbers (what you experience) and what is your expected target? Because I do not have such problematic experience.
Even if morphic took 40 ms and Spec 100 ms to open a window, then it's a non-priority problem (~100ms to open a medium-sized window is a non-issue). Unless you are opening such windows every minute…

Also I am a bit afraid that the slowness would come from the layout processing / composing the objects… which is a really complex piece, and right now our priority is cleaning up the user-facing API.
But at least we can think about it, whether we would be able to do something about it now or not.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

stepharo
In reply to this post by stepharo
We are thinking that we would like to rename ComposableModel into Presenter

to convey its role into the MVC triad.

What do the spec users think?

Stef


Le 4/5/16 à 08:19, stepharo a écrit :

> Hi guys
>
>
> this afternoon we will have a meeting with Peter and others to talk
> about cleaning Spec API.
>
> If you want/can join let us know
>
> else we can organise another skype.
>
> if you have ideas let us know too.
>
> Stef
>


Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Stephan Eggermont-3
On 04/05/16 15:24, stepharo wrote:
> We are thinking that we would like to rename ComposableModel into Presenter
>
> to convey its role into the MVC triad.
>
> What do the spec users think?

There are too many Models. A clear distinction between DomainModel
and ViewModel is needed. Please explain when a ViewController should
be a Presenter. Where is the boundary between MVC and MVP?

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Stephan Eggermont-3
In reply to this post by Peter Uhnak
On 04/05/16 13:43, Peter Uhnák wrote:
>>
>> by a factor of at least 2,5x compared to pure Morphic (I've seen a 5x).
>>
>
> This doesn't mean anything. Can you please provide concrete numbers (what
> you experience) and what is your expected target? Because I do not have
> such problematic experience.

Thierry develops on a machine that is somewhat slower than those most
Pharo users develop on: a Celeron 2955U machine. For Pharo I'd hope to
be able to reasonably do development on a Raspberry Pi2.

He is very aware of Morphic performance issues, so that factor 2.5 is
not the layout processing, as that is the same for Morphic and Spec.

We could add some Spec performance tests to jenkins/travis to see when
we have regressions.

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Stephan Eggermont-3
In reply to this post by stepharo


On 04/05/16 08:19, stepharo wrote:
> Hi guys
>
>
> this afternoon we will have a meeting with Peter and others to talk
> about cleaning Spec API.

In AbstractWidgetModel we have
dragEnabled dropEnabled dragTransformationBlock wantDropBlock
acceptDropBlock transferBlock

That needs to be one instance variable dealing with drag and drop.

ComposableModel: aboutText seems to be in the wrong place.
That is a WindowModel property, and we seem to need some kind of
mechanism to propagate property access in the widget hierarchy.

ComposableModel: keyStrokesForNextFocusHolder
keyStrokesForPreviousFocusHolder I'm pretty sure I do not want
focus switch to be an individual widget concern

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Denis Kudriashov
In reply to this post by Stephan Eggermont-3

2016-05-04 15:34 GMT+02:00 Stephan Eggermont <[hidden email]>:
There are too many Models. A clear distinction between DomainModel
and ViewModel is needed. Please explain when a ViewController should
be a Presenter. Where is the boundary between MVC and MVP?

Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Thierry Goubier
In reply to this post by Peter Uhnak


2016-05-04 13:43 GMT+02:00 Peter Uhnák <[hidden email]>:
by a factor of at least 2,5x compared to pure Morphic (I've seen a 5x).

This doesn't mean anything. Can you please provide concrete numbers (what you experience) and what is your expected target? Because I do not have such problematic experience.

It depends a lot on the underlying platform you use. If you are on a Macbook Pro with a core i7 with turbo boost of 3GHz, no Pharo GUI, even very badly coded, will register.

On a lower spec processor, it is significantly different.
 
Even if morphic took 40 ms and Spec 100 ms to open a window, then it's a non-priority problem (~100ms to open a medium-sized window is a non-issue). Unless you are opening such windows every minute…

I'm talking about 250ms to open a very small window, 400/500ms for some tools, and a significant delay on many interactions because you have to wait for the rebuilding of a window components. It becomes problematic when you can type faster than the GUI reacts (scrolling with keypresses, for example).
 
Also I am a bit afraid that the slowness would come from the layout processing / composing the objects… which is a really complex piece, and right now our priority is cleaning up the user-facing API.

When profiling, it doesn't seems to be the layout. But processing the object spec, yes.
 
But at least we can think about it, whether we would be able to do something about it now or not.

Thanks,

Thierry
 

Peter

Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Stephan Eggermont-3
In reply to this post by Denis Kudriashov
On 04/05/16 16:10, Denis Kudriashov wrote:

> 2016-05-04 15:34 GMT+02:00 Stephan Eggermont <[hidden email]>:
>
>> There are too many Models. A clear distinction between DomainModel
>> and ViewModel is needed. Please explain when a ViewController should
>> be a Presenter. Where is the boundary between MVC and MVP?
>>
>
> But there is good article about it
> http://www.object-arts.com/downloads/papers/TwistingTheTriad.PDF
>

I know. But that is not what Spec does.

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

stepharo
In reply to this post by Stephan Eggermont-3
First we should clean it, then we speed it up.


Stef


Le 4/5/16 à 15:45, Stephan Eggermont a écrit :

> On 04/05/16 13:43, Peter Uhnák wrote:
>>>
>>> by a factor of at least 2,5x compared to pure Morphic (I've seen a 5x).
>>>
>>
>> This doesn't mean anything. Can you please provide concrete numbers
>> (what
>> you experience) and what is your expected target? Because I do not have
>> such problematic experience.
>
> Thierry develops on a machine that is somewhat slower than those most
> Pharo users develop on: a Celeron 2955U machine. For Pharo I'd hope to
> be able to reasonably do development on a Raspberry Pi2.
>
> He is very aware of Morphic performance issues, so that factor 2.5 is
> not the layout processing, as that is the same for Morphic and Spec.
>
> We could add some Spec performance tests to jenkins/travis to see when
> we have regressions.
>
> Stephan
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

stepharo
In reply to this post by Stephan Eggermont-3
I would rename composableModel into Presenters.

Stef


Le 4/5/16 à 16:58, Stephan Eggermont a écrit :

> On 04/05/16 16:10, Denis Kudriashov wrote:
>> 2016-05-04 15:34 GMT+02:00 Stephan Eggermont <[hidden email]>:
>>
>>> There are too many Models. A clear distinction between DomainModel
>>> and ViewModel is needed. Please explain when a ViewController should
>>> be a Presenter. Where is the boundary between MVC and MVP?
>>>
>>
>> But there is good article about it
>> http://www.object-arts.com/downloads/papers/TwistingTheTriad.PDF
>>
>
> I know. But that is not what Spec does.
>
> Stephan
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

stepharo
In reply to this post by Stephan Eggermont-3
***Thanks*** Stephan

this is the kind of things we should start fixing!!!

I want more :).

Can you open bug entries with such points?


Stef


Le 4/5/16 à 16:03, Stephan Eggermont a écrit :

>
>
> On 04/05/16 08:19, stepharo wrote:
>> Hi guys
>>
>>
>> this afternoon we will have a meeting with Peter and others to talk
>> about cleaning Spec API.
>
> In AbstractWidgetModel we have
> dragEnabled dropEnabled dragTransformationBlock wantDropBlock
> acceptDropBlock transferBlock
>
> That needs to be one instance variable dealing with drag and drop.
>
> ComposableModel: aboutText seems to be in the wrong place.
> That is a WindowModel property, and we seem to need some kind of
> mechanism to propagate property access in the widget hierarchy.
>
> ComposableModel: keyStrokesForNextFocusHolder
> keyStrokesForPreviousFocusHolder I'm pretty sure I do not want
> focus switch to be an individual widget concern
>
> Stephan
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Stephan Eggermont-3


On 04/05/16 18:18, stepharo wrote:
> Can you open bug entries with such points?

18164 Put drag-and-drop behaviour in one object

18165 ComposableModel: aboutText seems to be in the wrong place

18166 Where should focus change keystrokes be handled?

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Glenn Cavarlé
In reply to this post by stepharo
stepharo wrote
cleaning Spec API.
+10 !
just general remarks i have about Spec:

I think the role of Spec may be clarified.
If Spec is just an UI builder we may remove the "overengineering" and we need another framework that provides someting like MVC, MVP, MVVM or ...
If Spec intent to be an "app" framework, it is too confused now, and yes, it needs a clear separation between the presentation, the presentation logic, the domain logic, ...

Maybe, extending the SpecLayout's responsibility should be one idea to handle the full "presentation" part, like the role played by markup languages.
I'm not saying I want to transform Spec to XML :), but its role is basically the same.
The existing separation between the widget declarations (instance side) and the widgets composition (class side) seem confusing to me.

And we need also a clearest way to bind domain models to widgets.
Using #whenSomethingChangedDo:aBlock everywhere make code a bit hard to read and to debug, if not completly ugly in complex UI...

For me, the first goal of an UIBuilder (graphical or programmatic) is to ease the presentation and to ease the two-way data-binding with domain data/logic.
If the ease-of-use of Spec is not more obvious compared to the underlying widget libraries (Morph / Bloc soon maybe...), it will be difficult to convince people to use it in future developments...

But it is maybe a bit off topic -> "cleaning Spec API".

Cheers,
Glenn.

Glenn Cavarlé
Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Stephan Eggermont-3
In reply to this post by stepharo
On 04/05/16 08:19, stepharo wrote:
> if you have ideas let us know too.

Why does every NewValueHolder have its own announcer?
And is initializing all those unused valueHolders in initialize
of Spec presentation classes not slow?

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: call for cleaning ideas around Spec

Stephan Eggermont-3
On 05/05/16 00:15, Stephan Eggermont wrote:
 > On 04/05/16 08:19, stepharo wrote:
 >> if you have ideas let us know too.
 >
 > Why does every NewValueHolder have its own announcer?
 > And is initializing all those unused valueHolders in initialize
 > of Spec presentation classes not slow?

Just a 50721 image I'm working in on SpecGenerator with 20 open windows:

NewValueHolder allInstances size
4872

(NewValueHolder allInstances select: [ :each | (each instVarNamed:
#announcer) numberOfSubscriptions = 0 ])size
2566



123