Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Re: MVC Pattern (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: listbox sorting
Next thread: (Not) Showing a Window on RB/RS


Re: MVC Pattern   -   Mark.Gregory poundland.co.uk
  Re: MVC Pattern   -   Ruslan Zasukhin
   Re: MVC Pattern   -   Andy Dent
    Re: MVC Pattern   -   Andy Dent
    Re: MVC Pattern   -   Andy Dent
    Re: MVC Pattern   -   Charles Yeomans
    Re: MVC Pattern   -   Seth Willits
    Re: MVC Pattern   -   Mark.Gregory poundland.co.uk
    Re: MVC Pattern   -   Philip Regan
  Re: MVC Pattern   -   Beatrix Willius
   MVC Pattern   -   Mark.Gregory poundland.co.uk
    Re: MVC Pattern   -   Seth Willits
    Re: MVC Pattern   -   Andy Dent
    Re: MVC Pattern   -   Ian Piper
    Re: MVC Pattern   -   Tom Benson

Re: MVC Pattern
Date: 02.08.10 08:38 (Mon, 2 Aug 2010 08:38:19 +0100)
From: Mark.Gregory poundland.co.uk
Thanks Beatrix, I did spot these after I sent the request and they along
with the book have been a great help in my quest to understand oop and
patterns.
Its all making sense now. Thank you for your conversion, its is very useful
not only from the pattern side but also demonstrates how to convert from
Java to RB.
well done and thanks again.
Mark



From: Beatrix Willius <<email address removed>>
To: <email address removed>
Cc: <email address removed>
Date: 01/08/2010 06:09
Subject: Re: MVC Pattern
Sent by: <email address removed>


Hi Mark,

sure: download it from
http://www.mothsoftware.com/sites/default/files/headfirstdesignpatterns1.1.zip
. As the name says I translated the patterns from the book "Head First
Design Patterns" from Java into Realbasic. A MVC is inlcuded.

Anfang der weitergeleiteten E-Mail:

> Message: 8
> Date: Sat, 31 Jul 2010 13:02:51 +0100
> From: Ian Piper <<email address removed>>
> Subject: Re: MVC Pattern
> To: REALbasic NUG <<email address removed>>
> Message-ID: <<email address removed>>
> Content-Type: text/plain; charset=us-ascii
>
> On 30 Jul 2010, at 15:07, <email address removed> wrote:
>
>>
>> Does anyone have any examples of using the MVC pattern with RB
>> Thanks
>> MG
>
> I doubt whether many people programming with RB are using MVC: neither
the IDE nor the language itself really steer the developer towards MVC.
Like most development tools you can hand-roll it, but since it is harder
work than just diving in and programming my guess is that most people dive
in and program.
>
> This is one of the areas where Xcode, for all its shortcomings, really
shines. The toolset more or less enforces a separation of concerns.

Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: archive, clean and search email
http://www.beatrixwillius.de
Fractals, 3d landscapes etc.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: MVC Pattern
Date: 04.08.10 14:31 (Wed, 04 Aug 2010 16:31:11 +0300)
From: Ruslan Zasukhin
On 8/4/> Date: Wed, 4 Aug 2010 13:27:03 +0800
> From: Andy Dent <<email address removed>>
> Subject: Re: MVC Pattern

Hi Guys.

I have not see start of discussion, but it seems Andy votes for bindins in
RB.

I support this vote :)

In fact I have not catch why RELA have drop bindings which was yet in RB
2007. Was quite good feature.

Only guess was on that time, this is because RB gong to Cocoa.
But for me strange reason. XCODE - main competitor now for RB,
And they have strong techniques for this ...

IMO, after RELA make Cocoa, they can spend big efforts to return bindings
back.

> IF I was mainly working in RB I'd be tempted to do something about the dearth
> of higher-level frameworks but I'm mainly in .Net and native C++ land for the
> foreseeable future.

Re: MVC Pattern
Date: 04.08.10 06:27 (Wed, 4 Aug 2010 13:27:03 +0800)
From: Andy Dent


On Wed 04/08/10 12:22 PM , Seth Willits <email address removed> sent:

> Bindings weren't in Cocoa for 15(?) years.
They have been there since at least 2004 http://cocoadevcentral.com/articles/000080.php

> Bindings aren't in many other frameworks either.
WinForms and WPF.

Not sure which other frameworks you're talking about and unfortunately the term gets used to refer to APIs for languages, ie Qt Binding to Ruby, so that makes searches awkward.

>RB is just not structured to be MVC friendly.
The basics are there but it's a bit too easy for people to just bury code in event handlers.

http://www.excelsoftware.com/newsrbapp_230.html might add a bit of structure on top, I haven't looked at it for a while.

I think there were a couple of other frameworks floating around, at least one (YFrame from http://www.ravenna.com/~forbes/yonk/source/) looked interesting but was GPL which ruled it out for me.

IF I was mainly working in RB I'd be tempted to do something about the dearth of higher-level frameworks but I'm mainly in .Net and native C++ land for the foreseeable future.

Andy the defector

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: MVC Pattern
Date: 05.08.10 00:48 (Thu, 5 Aug 2010 07:48:57 +0800)
From: Andy Dent

On 04/08/2010, at 7:19 PM, <email address removed> wrote:

> Andy, do you have any simple examples please..

sorry, not in any code I have access to.

We were working on a Rails-style convention-based binding mechanism at
a former client.

As Seth has pointed out, one of the more obvious ways to separate out
the model is to have your window event handlers just immediately call
methods in a model object.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: MVC Pattern
Date: 05.08.10 00:47 (Thu, 5 Aug 2010 07:47:52 +0800)
From: Andy Dent

On 05/08/2010, at 5:14 AM, Charles Yeomans wrote:

> MVC as a pattern -- to the extent that it is a pattern at all -- has
> largely been rendered obsolete by modern GUI frameworks, of which
> REALbasic is one.

MVVM as a pattern however has grown out of the use of modern GUI
frameworks, to achieve independence from the GUI being edited and
testability. Ease of implementing the MVVM pattern depends highly on
having bindings, either in the framework or added as a layer by the
application developer.

MVVM evolved in the design of Microsoft's WPF framework which had the
interesting interwoven development of their Expression Blend UI
editing tool - the first time one of the major frameworks has had an
app of that complexity being simultaneously created by the same
company and thus able to feed back into the patterns. Whilst there's a
lot of postings suggesting MVVM was based on Martin Fowler's
Presentation Model pattern, it's actually a parallel evolution from
the ideas of people in the Blend team who had a Smalltalk background
and contributed their experience of how commercial Smalltalk
frameworks evolved from MVC.

I recently presented on MVVM (aka ViewModel) at a testing conference,
links from my presentation (OK, with a .Net WPF bias):

http://msdn.microsoft.com/en-us/library/ms752347.aspx Data Binding
Overview

http://blogs.msdn.com/b/gblock/archive/2009/08/03/the-spirit-of-mvvm-viewmodel-it-s-not-a-code-counting-exercise.aspx
Spirit of MVVM great article by Glenn Block (quote this!)

http://blogs.msdn.com/b/johngossman/archive/2005/10/08/478683.aspx
Introduction to Model/View/ViewModel pattern for building WPF apps by
John Gossman

http://msdn.microsoft.com/en-us/magazine/dd419663.aspx WPF Apps With
The Model-View-ViewModel Design Pattern good article by Josh Smith
(Feb 2009)

Martin Fowler updates:
http://martinfowler.com/eaaDev/uiArchs.html
GUI Architectures

http://martinfowler.com/eaaDev/SupervisingPresenter.html Supervising
Controller

http://martinfowler.com/eaaDev/PassiveScreen.html Passive View

http://martinfowler.com/eaaDev/PresentationModel.html Presentation
Model

http://mvvmfoundation.codeplex.com/ MVVM Foundation framework for MVVM

http://mvvmlight.codeplex.com/ MVVM Light Toolkit

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: MVC Pattern
Date: 04.08.10 22:14 (Wed, 4 Aug 2010 17:14:23 -0400)
From: Charles Yeomans

On Aug 4, 2010, at 3:44 PM, Seth Willits wrote:

> On Aug 3, 2010, at 10:27 PM, Andy Dent wrote:
>
>>> Bindings weren't in Cocoa for 15(?) years.
>> They have been there since at least 2004 http://cocoadevcentral.com/articles/000080.php
>
> Right. Cocoa didn't have bindings until 10.3 and MVC was the design
> principle it was created around in the 80's. My point was that not
> having bindings doesn't "get in the way of applying MVC."
>
>>> RB is just not structured to be MVC friendly.
>> The basics are there but it's a bit too easy for people to just
>> bury code in event handlers.
>
> Right. RB was designed with that in mind. To do MVC strictly, you'd
> have to add method calls in all of the used event handlers to call
> out to a separate controller instance. It's not terribly difficult
> to do, but it is just easier to stick the code straight into the
> event handler, and there isn't really anything wrong with that as
> long as you stick to good programming practices, regardless.

MVC as a pattern -- to the extent that it is a pattern at all -- has
largely been rendered obsolete by modern GUI frameworks, of which
REALbasic is one.

Charles Yeomans

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: MVC Pattern
Date: 04.08.10 20:44 (Wed, 4 Aug 2010 12:44:02 -0700)
From: Seth Willits
On Aug 3, 2010, at 10:27 PM, Andy Dent wrote:

>> Bindings weren't in Cocoa for 15(?) years.
> They have been there since at least 2004 http://cocoadevcentral.com/articles/000080.php

Right. Cocoa didn't have bindings until 10.3 and MVC was the design principle it was created around in the 80's. My point was that not having bindings doesn't "get in the way of applying MVC."

>> RB is just not structured to be MVC friendly.
> The basics are there but it's a bit too easy for people to just bury code in event handlers.

Right. RB was designed with that in mind. To do MVC strictly, you'd have to add method calls in all of the used event handlers to call out to a separate controller instance. It's not terribly difficult to do, but it is just easier to stick the code straight into the event handler, and there isn't really anything wrong with that as long as you stick to good programming practices, regardless.

My 2¢ :-)

-

Re: MVC Pattern
Date: 04.08.10 12:19 (Wed, 4 Aug 2010 12:19:43 +0100)
From: Mark.Gregory poundland.co.uk
Andy, do you have any simple examples please..
Mark



From: Philip Regan <<email address removed>>
To: REALbasic NUG <<email address removed>>
Date: 04/08/2010 11:49
Subject: Re: MVC Pattern
Sent by: <email address removed>



On Jul 31, 2010, at 08:02, Ian Piper wrote:

> I doubt whether many people programming with RB are using MVC: neither
the IDE nor the language itself really steer the developer towards MVC.
Like most development tools you can hand-roll it, but since it is harder
work than just diving in and programming my guess is that most people dive
in and program.

On Aug 4, 2010, at 01:27, Andy Dent wrote:

> The basics are there but it's a bit too easy for people to just bury code
in event handlers.

Not to throw a simple "Me, too" into the thread, but these are the best
assessments of MVC in RB. I've written several applications that make
extensive use of MVC. It's really not that hard to do, it's just that RB
isn't designed to be MVC by default.

Re: MVC Pattern
Date: 04.08.10 11:45 (Wed, 4 Aug 2010 06:45:44 -0400)
From: Philip Regan

On Jul 31, 2010, at 08:02, Ian Piper wrote:

> I doubt whether many people programming with RB are using MVC: neither the IDE nor the language itself really steer the developer towards MVC. Like most development tools you can hand-roll it, but since it is harder work than just diving in and programming my guess is that most people dive in and program.

On Aug 4, 2010, at 01:27, Andy Dent wrote:

> The basics are there but it's a bit too easy for people to just bury code in event handlers.

Not to throw a simple "Me, too" into the thread, but these are the best assessments of MVC in RB. I've written several applications that make extensive use of MVC. It's really not that hard to do, it's just that RB isn't designed to be MVC by default.

Re: MVC Pattern
Date: 01.08.10 06:06 (Sun, 1 Aug 2010 07:06:57 +0200)
From: Beatrix Willius
Hi Mark,

sure: download it from http://www.mothsoftware.com/sites/default/files/headfirstdesignpatterns1.1.zip . As the name says I translated the patterns from the book "Head First Design Patterns" from Java into Realbasic. A MVC is inlcuded.

Anfang der weitergeleiteten E-Mail:

> Message: 8
> Date: Sat, 31 Jul 2010 13:02:51 +0100
> From: Ian Piper <<email address removed>>
> Subject: Re: MVC Pattern
> To: REALbasic NUG <<email address removed>>
> Message-ID: <<email address removed>>
> Content-Type: text/plain; charset=us-ascii
>
> On 30 Jul 2010, at 15:07, <email address removed> wrote:
>
>>
>>
>> Does anyone have any examples of using the MVC pattern with RB
>> Thanks
>> MG
>
> I doubt whether many people programming with RB are using MVC: neither the IDE nor the language itself really steer the developer towards MVC. Like most development tools you can hand-roll it, but since it is harder work than just diving in and programming my guess is that most people dive in and program.
>
> This is one of the areas where Xcode, for all its shortcomings, really shines. The toolset more or less enforces a separation of concerns.

Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: archive, clean and search email
http://www.beatrixwillius.de
Fractals, 3d landscapes etc.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

MVC Pattern
Date: 30.07.10 15:07 (Fri, 30 Jul 2010 15:07:07 +0100)
From: Mark.Gregory poundland.co.uk


Does anyone have any examples of using the MVC pattern with RB
Thanks
MG

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: MVC Pattern
Date: 04.08.10 05:22 (Tue, 3 Aug 2010 21:22:13 -0700)
From: Seth Willits
On Aug 3, 2010, at 5:28 PM, Andy Dent wrote:

> Lack of bindings in RB gets in the way of applying patterns such as MVC and MVVM.
>
> People have to roll their own far too much by comparison with frameworks such as Cocoa and WPF.

Bindings weren't in Cocoa for 15(?) years. Bindings aren't in many other frameworks either. RB is just not structured to be MVC friendly.

Re: MVC Pattern
Date: 04.08.10 01:28 (Wed, 4 Aug 2010 08:28:30 +0800)
From: Andy Dent
Lack of bindings in RB gets in the way of applying patterns such as
MVC and MVVM.

People have to roll their own far too much by comparison with
frameworks such as Cocoa and WPF.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: MVC Pattern
Date: 31.07.10 13:02 (Sat, 31 Jul 2010 13:02:51 +0100)
From: Ian Piper
On 30 Jul 2010, at 15:07, <email address removed> wrote:

>
> Does anyone have any examples of using the MVC pattern with RB
> Thanks
> MG

I doubt whether many people programming with RB are using MVC: neither the IDE nor the language itself really steer the developer towards MVC. Like most development tools you can hand-roll it, but since it is harder work than just diving in and programming my guess is that most people dive in and program.

This is one of the areas where Xcode, for all its shortcomings, really shines. The toolset more or less enforces a separation of concerns.

Ian.

Re: MVC Pattern
Date: 30.07.10 22:30 (Sat, 31 Jul 2010 07:30:58 +1000)
From: Tom Benson
I built a developer tool a while back that built the "Model" part of a specified MySQL database, by connecting and generating a set of classes to represent each table, along with get/setter functions etc.

As far as view/controller goes, RB is a little fuzzy.

As far as I am concerned, Window Objects are both the viewer and the controller.

- Tom



On 31/07/2010, at 12:07 AM, <email address removed> wrote:

>
> Does anyone have any examples of using the MVC pattern with RB
> Thanks
> MG

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>