Question about Morphic in Pharo 4

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

Re: Question about Morphic in Pharo 4

Trygve
I can't resist adding my pennyworth to this discussion. The ST vision was to empower "children of all ages"  to master their own programs. This gives me an imperative discriminator for all my work:  Am I making the programs more readable? If not, don't do it.

I have been programming Smalltalk since 1978 starting with ST76, ST78, ST80, and VisualWorks. VW evolved steadily into greater complexity, thus moving away from the goal.  Squeak emerged as a new beginning, but I am much afraid that I again see a steady movement away from the goal towards increasing complexity. I regret it, because I believe the original goal is well worth pursuing. (I'll soon be transferring to Pharo, hoping I'll find what I'm looking for  there).

Example: The first thing I have always done when moving to a new ST dialect is to modify SystemWindow. The system default has been to open a new window with default size and more or less random position. My personal preference is to retain control and open  it in Rectangle fromUser. This has always been very easy to achieve with a small modification of a SystemWindow class method. I am now in the process of moving from Squeak 3.10 to 4.5. I have spent several unsuccessful hours trying to add my fix. I find a new layer of runtime Spec code between me and the SystemWindow. I fail to see how this can make the code easier to master. I think I have read somewhere that this automatically generated code is not even intended for human consumption.

This seems to me to be a great pity and an opportunity lost. Much  of the Morphic complexity may be essential because it is caused by its great power and flexibility, but user/programmers need to be protected from this complexity.  Not by hiding Morphic, but by helping the user/programmer create code for it. Wouldn't it be great if something like Spec were an IDE that generated exemplary Morphic code?  Leverage implies rigidity, so there would be different Specs for different purposes. One for property sheets, one for tables, etc.  I currently need to create a property sheet but am not looking forward to the Morphic chore. I know that the resulting code should be simple, but I also know that it will take me a very long time to find it. Wouldn't it be nice if I could create my property sheet through a simple Spect tool. Afterwards, I could read the generated Morphic code and say: Aha! So that's how I should have done it.

Just a dream.
--Trygve

On 20.12.2014 14:08, Esteban Lorenzano wrote:

      
On 20 Dec 2014, at 13:44, Sean P. DeNigris [hidden email] wrote:

kilon.alios wrote
even if continue to use Spec I will stiil have to rely on Morphic
since custom GUIs is really important for me.
Yes, that's why they can not be compared:
Morphic = make and understand any UI
Spec = make common business UIs easily (on top of a general framework like
Morphic)
but that’s not completely true because in that case Morphic should be just the “graphic atoms” while spec should provide a set of widgets (made with those atoms), when what actually happens is that Morphic is everything: the atoms, the widgets, layers ever those widgets and even theming, etc.  So… is not correctly designed. Or better said: it has evolved in a way that now needs a massive reengineering to make it right. 
And Spec, instead being a set of widgets with a declarative way to compose them, is yet another layer on top of other layers. 

cheers, 
Esteban

Reply | Threaded
Open this post in threaded view
|

Re: Question about Morphic in Pharo 4

stepharo
In reply to this post by Daniel Lyons
Hi daniel,

I do not have the time to go too much into the details.
Now orginal Morphic made mistake (global coordinates is one).

What is important for us:
     - cleaning the current version (we made a lot of progress with
FrameLayout and others)
     - untangling polymorph
     - migrating to athens may be better to build on Bloc but we will
see (note that Bloc is fully vectorial now since a couple of days)
     - supporting themes correctly
     - identifying and improving widgets
     - UIBuilder theme with all the widgets creation in this class is a
bad pattern. Each widget should have its API in its class!
     - cleaning Spec (we should handle the announcement plague)
     - in parallel prepare the future with Bloc.
             - I'm currently reading code and adding new class comments
             - preparing a tutorial
             - checking the widget we built

Stef


Reply | Threaded
Open this post in threaded view
|

Re: Question about Morphic in Pharo 4

stepharo
In reply to this post by EstebanLM

> if I can say it, I think Spec has several design flaws, that prevent us to actually use it productively.
>
> 1st: I believe Spec is 80% of what Morphic should do by it self, but since is now that monster no body wants to take by the horns, Spec provides a layer.
> 2nd: The original idea of Spec is to produce composable objects that can be some-kind described and then reused by plugging them, but
> - is an idea that has a lot of sense is we have a UI builder… which we dont. 2
> - the metadata itself is not very well defined (I would like something like the ones in VW and StX, but is like a weird array right now), because of this, Spec has created some “in the middle” way to define specs in a more “declarative way”, breaking the original design (the one I just pointed)
> 3rd: Frankly, with this “more declarative way” spec adopted more or less the same path glamour took. But if this is the point, glamour does a really better work on the “declarative” part. Of course, it does that at the cost of being less reusable, but well… we are talking about Spec, not Glaour here :)
>
> So, to summarise, IMHO:
>
> - Spec wouldn’t have much sense in a well-defined, clean, Morphic
Not really we need a way to express and reuse logic. This is what we saw
with alain so we will valueholder and may be spec to compose widgets
but we will see.
> - Even as a layer, Spec still does not has much sense without:
> -- a rebuild of the descriptive model
-- shrinking of the api
-- cleaning of announcement mess
> -- an UI builder to use it.

yes

>
> cheers,
> Esteban
>
>
>> On 19 Dec 2014, at 17:32, nacho <[hidden email]> wrote:
>>
>> I too prefer Morphic over Spec. I find Spec too much verbose. And in fact,
>> Morphic as presented in the Self language it's a much modern approach to
>> building UIs than Spec which is pure code. So as complicated as it might
>> have become, I'm still attached to Morphic.
>>
>>
>>
>>
>> -----
>> Nacho
>> Smalltalker apprentice.
>> Buenos Aires, Argentina.
>> --
>> View this message in context: http://forum.world.st/Question-about-Morphic-in-Pharo-4-tp4796331p4796449.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Question about Morphic in Pharo 4

stepharo
In reply to this post by nacho

Le 19/12/14 17:53, nacho a écrit :
> Esteban,
> I agree 100%.
> In fact that was, in part, the reason of my question. As I don't see a Spec
> UI coming soon I was wondering if perhaps Morphic will be trimmed in Pharo
> 4.
No
Now have a look at Bloc in AlainPlantec/Bloc

> Thanks
> Cheers
> Nacho
>
>
>
>
> -----
> Nacho
> Smalltalker apprentice.
> Buenos Aires, Argentina.
> --
> View this message in context: http://forum.world.st/Question-about-Morphic-in-Pharo-4-tp4796331p4796452.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Question about Morphic in Pharo 4

stepharo
In reply to this post by Sean P. DeNigris

Le 20/12/14 13:44, Sean P. DeNigris a écrit :
> kilon.alios wrote
>> even if continue to use Spec I will stiil have to rely on Morphic
>> since custom GUIs is really important for me.
> Yes, that's why they can not be compared:
> Morphic = make and understand any UI
This is not the case from my experience fighting with morphic.

> Spec = make common business UIs easily (on top of a general framework like
> Morphic)
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Question-about-Morphic-in-Pharo-4-tp4796331p4796532.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Question about Morphic in Pharo 4

abergel
In reply to this post by jfabry
Thanks Johan for taking the time to answer all of this…

Cheers,
Alexandre


> On Dec 20, 2014, at 2:18 AM, Johan Fabry <[hidden email]> wrote:
>
>
>> On Dec 19, 2014, at 21:54, kilon alios <[hidden email]> wrote:
>>
>> "UI Element = an interactive graphical element displayed as part of the Graphical User Interface.
>> UI Model = an object that contains the state and behavior of one or several UI elements."
>>
>> "To define a user interface, it is sufficient to define the model of the user interface. […] since all UIs are constructed through composition of other UI's, and it is sufficient to define the model to define the UI, the root class of all UIs is named ComposableModel.So, to define a new user interface, a subclass of ComposableModel needs to be created.”"
>>
>> I dont understand this for me a GUI is a UI with graphics I dont see it as two separate entities. I dont see what the model is in my case and why I should inform Spec about it. I just wanted to create some buttons I dont see how those method returning the names of the buttons as instance variables helps me in any way. Whats the benefit ?
>
> This is an explanation of how the whole is composed of the different parts and how different responsibilities of the UI are split up amongst different classes. In Morphic these are joined and that’s a reason why many persons are unhappy with it.
>
>> "Just wondering, did you see an example with the double instantiation of models or with the needles splitting up in methods? If so tell us where it is so we can fix it."
>>
>> Double initiation may have been just me not understanding documentation or probably I saw an example that confused me. Splitting up methods is probably the first thing I learned using Squeak and Pharo. Also The system browser turns red if you make long methods .  
>
> I focused on you splitting up into methods because that was a complaint of yours and you said you were following Spec examples when doing that.
>
> ---> Save our in-boxes! http://emailcharter.org <---
>
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply | Threaded
Open this post in threaded view
|

Re: Question about Morphic in Pharo 4

nacho
In reply to this post by stepharo
<quote author="stepharo">

>No
>Now have a look at Bloc in AlainPlantec/Bloc

Thanks Stef,
Where I can find about Bloc??
I want to take a look at it!
cheers


Nacho Smalltalker apprentice. Buenos Aires, Argentina.
Reply | Threaded
Open this post in threaded view
|

Re: Question about Morphic in Pharo 4

Sean P. DeNigris
Administrator
In reply to this post by stepharo
stepharo wrote
> Morphic = make and understand any UI
This is not the case from my experience fighting with morphic.
Agreed, of course ;) We were talking about intention, not implementation. In what little experience I have, I think that statement would be true full stop for Self's Morphic.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Question about Morphic in Pharo 4

stepharo
stepharo wrote
>>> Morphic = make and understand any UI
>> This is not the case from my experience fighting with morphic.
> Agreed, of course ;) We were talking about intention, not implementation.

:) but I live in reality not dreams :)

>   In
> what little experience I have, I think that statement would be true full
> stop for Self's Morphic.
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Question-about-Morphic-in-Pharo-4-tp4796331p4796783.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Question about Morphic in Pharo 4

stepharo
In reply to this post by nacho
Look for AlainPlantec/Bloc on smalltalk hub.

Le 23/12/14 14:34, nacho a écrit :

>
>> No
>> Now have a look at Bloc in AlainPlantec/Bloc
> Thanks Stef,
> Where I can find about Bloc??
> I want to take a look at it!
> cheers
>
>
>
>
>
>
> -----
> Nacho
> Smalltalker apprentice.
> Buenos Aires, Argentina.
> --
> View this message in context: http://forum.world.st/Question-about-Morphic-in-Pharo-4-tp4796331p4796781.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


123