<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Cocoa Tutorial: Windows OOP vs Cocoa MVC</title>
	<atom:link href="http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/</link>
	<description>Taglines are for Windows programmers</description>
	<lastBuildDate>Fri, 12 Mar 2010 16:26:13 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: SubstanceMX</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-1196</link>
		<dc:creator>SubstanceMX</dc:creator>
		<pubDate>Sun, 10 May 2009 20:10:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-1196</guid>
		<description>&lt;p&gt;Hi, im a 2 or 3 months Cacao beginer (leaved ActionScript girlfriend) and what ever I read from apple the most confusing until a few days my sinapsis started and brain neurons connected just to &quot;thing in Objetive-C&quot; whay, as when you start solving things with something you recently adquired comprension.&lt;/p&gt;

&lt;p&gt;Here I have a concrete problem, wich is a possibility in cacao but (as far as I can see) is not explained: work with documents and tool panels.&lt;/p&gt;

&lt;p&gt;How can I have a document, wich contains a window and have tools in diferent panels, of course, wired with de document (or documents open that may be many).&lt;/p&gt;

&lt;p&gt;BTW, this is one of my cacao&#039;s guru bookmarks since a month ago and really apreciated your help a lot.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, im a 2 or 3 months Cacao beginer (leaved ActionScript girlfriend) and what ever I read from apple the most confusing until a few days my sinapsis started and brain neurons connected just to &#8220;thing in Objetive-C&#8221; whay, as when you start solving things with something you recently adquired comprension.</p>

<p>Here I have a concrete problem, wich is a possibility in cacao but (as far as I can see) is not explained: work with documents and tool panels.</p>

<p>How can I have a document, wich contains a window and have tools in diferent panels, of course, wired with de document (or documents open that may be many).</p>

<p>BTW, this is one of my cacao&#8217;s guru bookmarks since a month ago and really apreciated your help a lot.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: brg666</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-1180</link>
		<dc:creator>brg666</dc:creator>
		<pubDate>Wed, 25 Mar 2009 15:11:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-1180</guid>
		<description>&lt;p&gt;I&#039;m not going to win any friends here, but i believe the partial class stuff that c# uses could be thought of as the controller part.&lt;/p&gt;

&lt;p&gt;All the GUI is designed in a different code file (in vs2008 anyway) and if you stick to putting your event handlers in the partial class that vs gives to you then i think that that is separation enough.&lt;/p&gt;

&lt;p&gt;OK its not oop mvc of course - but who cares, what i want is a separation of the form design and the event handlers - all i need to do is define a model to talk to and i&#039;m away.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;m not going to win any friends here, but i believe the partial class stuff that c# uses could be thought of as the controller part.</p>

<p>All the GUI is designed in a different code file (in vs2008 anyway) and if you stick to putting your event handlers in the partial class that vs gives to you then i think that that is separation enough.</p>

<p>OK its not oop mvc of course &#8211; but who cares, what i want is a separation of the form design and the event handlers &#8211; all i need to do is define a model to talk to and i&#8217;m away.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Software Warlock &#187; OOP in Cocoa versus .NET</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-796</link>
		<dc:creator>Software Warlock &#187; OOP in Cocoa versus .NET</dc:creator>
		<pubDate>Fri, 29 Aug 2008 05:12:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-796</guid>
		<description>&lt;p&gt;[...] is My Girlfriend has a good article discussing some of the differenences between the way .NET encourages you to write code and the way [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] is My Girlfriend has a good article discussing some of the differenences between the way .NET encourages you to write code and the way [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: btmac</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-777</link>
		<dc:creator>btmac</dc:creator>
		<pubDate>Thu, 14 Aug 2008 00:48:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-777</guid>
		<description>&lt;p&gt;Thanks for the quick walk through of the differences.... I&#039;ve used VS and Flex 3 builder  to build my apps and just started to look at cocoa.  I&#039;ve been scratching my head for the past couple of days... guess I&#039;ve got the windows mindset ingrained... wished I had a format button to reset my thinking to make understanding cocoa and objective-c better.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for the quick walk through of the differences&#8230;. I&#8217;ve used VS and Flex 3 builder  to build my apps and just started to look at cocoa.  I&#8217;ve been scratching my head for the past couple of days&#8230; guess I&#8217;ve got the windows mindset ingrained&#8230; wished I had a format button to reset my thinking to make understanding cocoa and objective-c better.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Cocoa Tutorial: Windows OOP vs Cocoa MVC &#171; Recycleosphere</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-774</link>
		<dc:creator>Cocoa Tutorial: Windows OOP vs Cocoa MVC &#171; Recycleosphere</dc:creator>
		<pubDate>Thu, 07 Aug 2008 01:09:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-774</guid>
		<description>&lt;p&gt;[...] Tutorial: Windows OOP vs Cocoa&#160;MVC   Cocoa Tutorial: Windows OOP vs Cocoa MVC: &#8220;Encapsulate everything! Right? Or not. I was watching the Cocoa developers email list today [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Tutorial: Windows OOP vs Cocoa&nbsp;MVC   Cocoa Tutorial: Windows OOP vs Cocoa MVC: &#8220;Encapsulate everything! Right? Or not. I was watching the Cocoa developers email list today [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: AK47 &#187; links for 2008-08-01 [delicious.com]</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-771</link>
		<dc:creator>AK47 &#187; links for 2008-08-01 [delicious.com]</dc:creator>
		<pubDate>Sat, 02 Aug 2008 01:02:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-771</guid>
		<description>&lt;p&gt;[...] Cocoa Is My Girlfriend Â» Cocoa Tutorial: Windows OOP vs Cocoa MVC [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Cocoa Is My Girlfriend Â» Cocoa Tutorial: Windows OOP vs Cocoa MVC [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: kickabit</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-769</link>
		<dc:creator>kickabit</dc:creator>
		<pubDate>Thu, 31 Jul 2008 18:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-769</guid>
		<description>&lt;p&gt;Having switched between Windows and Cocoa development for the last couple years I have to agree that Cocoa is a far better framework for developing applications.  To me Cocoa provides a really clean application framework.  .Net on the other hand gives you a mess?  Actually I&#039;d label .Net as a component framework.  There&#039;s really not much baked into .Net to help you build apps quickly.  I know people will disagree with that assessment, but I always find myself writing a lot of glue code to get an application up and running the way I want it.  That&#039;s not the case when I write a Cocoa app.  If you look at application frameworks like Cocoa or even Ruby on Rails, all that glue code is baked into the framework.  All you have to worry about is extending the functionality.&lt;/p&gt;

&lt;p&gt;All that said I have built .Net apps that are like Cocoa apps using MVC.  As you can see by the following example it&#039;s not nearly as straight forward as developing in Cocoa, but it does mimic the Cocoa app above.  What I really find interesting is both frameworks provide a very similar set of functionality, but the focus on how applications should be built is completely different.&lt;/p&gt;

&lt;p&gt;using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;&lt;/p&gt;

&lt;p&gt;namespace MVCSharp {
    public class FormInput : Form {&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    public Controller controller = null;
    private TextBox textBox = new TextBox();
    private Button updateButton = new Button();

    public FormInput() {
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.Text = &quot;FormInput&quot;;
        this.Padding = new Padding(10);
    }

    public void Initialize() {
        controller.ClientConnected++;

        textBox.Multiline = true;
        textBox.Dock = DockStyle.Fill;
        this.Controls.Add(textBox);

        updateButton.Dock = DockStyle.Bottom;
        updateButton.Click += new EventHandler(controller.updateText);
        updateButton.Text = &quot;Update Text&quot;;
        this.Controls.Add(updateButton);

        textBox.DataBindings.Add(new Binding(&quot;Text&quot;, controller, &quot;InputText&quot;));
    }

    protected override void OnClosed(EventArgs e) {
        base.OnClosed(e);
        controller.ClientConnected--;
    }
}

public class FormOutput : Form {

    public Controller controller = null;
    private TextBox textBoxEcho = new TextBox();

    public FormOutput() {
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.Text = &quot;FormOutput&quot;;
        this.Padding = new Padding(10);
    }

    public void Initialize() {
        controller.ClientConnected++;

        textBoxEcho.Multiline = true;
        textBoxEcho.ReadOnly = true;
        textBoxEcho.Dock = DockStyle.Fill;
        this.Controls.Add(textBoxEcho);

        textBoxEcho.DataBindings.Add(new Binding(&quot;Text&quot;, controller, &quot;OutputText&quot;));
    }

    protected override void OnClosed(EventArgs e) {
        base.OnClosed(e);
        controller.ClientConnected--;
    }
}

public class Model {
    public string inputText;
    public string outputText;
}

public class Controller {

    private Model _model = new Model();
    public int ClientConnected = 0;

    public void Initialize() {
        _model.inputText = &quot;&quot;;
        _model.outputText = &quot;&quot;;
    }

    public void updateText(object o, EventArgs e) {
        _model.outputText = _model.inputText;
        OnOutputTextChanged(new EventArgs());
    }

    public string InputText {
        get { return _model.inputText; }
        set { _model.inputText = value; }
    }

    public string OutputText {
        get { return _model.outputText; }
        set { _model.outputText = value; }
    }
    public event System.EventHandler OutputTextChanged;
    protected virtual void OnOutputTextChanged(System.EventArgs e) {
        if (null != OutputTextChanged) {
            OutputTextChanged(this, e);
        }
    }
}

static class Program {
    /// 
    /// The main entry point for the application.
    /// 
    [STAThread]
    static void Main() {

        Controller controller = new Controller();
        controller.Initialize();

        FormOutput viewOutput = new FormOutput();
        viewOutput.controller = controller;
        viewOutput.Initialize();
        viewOutput.Show();

        FormInput viewInput = new FormInput();
        viewInput.controller = controller;
        viewInput.Initialize();
        viewInput.Show();

        while (controller.ClientConnected &gt; 0) {
            Application.DoEvents();
        }

        Application.Exit();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;}&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Having switched between Windows and Cocoa development for the last couple years I have to agree that Cocoa is a far better framework for developing applications.  To me Cocoa provides a really clean application framework.  .Net on the other hand gives you a mess?  Actually I&#8217;d label .Net as a component framework.  There&#8217;s really not much baked into .Net to help you build apps quickly.  I know people will disagree with that assessment, but I always find myself writing a lot of glue code to get an application up and running the way I want it.  That&#8217;s not the case when I write a Cocoa app.  If you look at application frameworks like Cocoa or even Ruby on Rails, all that glue code is baked into the framework.  All you have to worry about is extending the functionality.</p>

<p>All that said I have built .Net apps that are like Cocoa apps using MVC.  As you can see by the following example it&#8217;s not nearly as straight forward as developing in Cocoa, but it does mimic the Cocoa app above.  What I really find interesting is both frameworks provide a very similar set of functionality, but the focus on how applications should be built is completely different.</p>

<p>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;</p>

<p>namespace MVCSharp {
    public class FormInput : Form {</p>

<pre><code>    public Controller controller = null;
    private TextBox textBox = new TextBox();
    private Button updateButton = new Button();

    public FormInput() {
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.Text = "FormInput";
        this.Padding = new Padding(10);
    }

    public void Initialize() {
        controller.ClientConnected++;

        textBox.Multiline = true;
        textBox.Dock = DockStyle.Fill;
        this.Controls.Add(textBox);

        updateButton.Dock = DockStyle.Bottom;
        updateButton.Click += new EventHandler(controller.updateText);
        updateButton.Text = "Update Text";
        this.Controls.Add(updateButton);

        textBox.DataBindings.Add(new Binding("Text", controller, "InputText"));
    }

    protected override void OnClosed(EventArgs e) {
        base.OnClosed(e);
        controller.ClientConnected--;
    }
}

public class FormOutput : Form {

    public Controller controller = null;
    private TextBox textBoxEcho = new TextBox();

    public FormOutput() {
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.Text = "FormOutput";
        this.Padding = new Padding(10);
    }

    public void Initialize() {
        controller.ClientConnected++;

        textBoxEcho.Multiline = true;
        textBoxEcho.ReadOnly = true;
        textBoxEcho.Dock = DockStyle.Fill;
        this.Controls.Add(textBoxEcho);

        textBoxEcho.DataBindings.Add(new Binding("Text", controller, "OutputText"));
    }

    protected override void OnClosed(EventArgs e) {
        base.OnClosed(e);
        controller.ClientConnected--;
    }
}

public class Model {
    public string inputText;
    public string outputText;
}

public class Controller {

    private Model _model = new Model();
    public int ClientConnected = 0;

    public void Initialize() {
        _model.inputText = "";
        _model.outputText = "";
    }

    public void updateText(object o, EventArgs e) {
        _model.outputText = _model.inputText;
        OnOutputTextChanged(new EventArgs());
    }

    public string InputText {
        get { return _model.inputText; }
        set { _model.inputText = value; }
    }

    public string OutputText {
        get { return _model.outputText; }
        set { _model.outputText = value; }
    }
    public event System.EventHandler OutputTextChanged;
    protected virtual void OnOutputTextChanged(System.EventArgs e) {
        if (null != OutputTextChanged) {
            OutputTextChanged(this, e);
        }
    }
}

static class Program {
    /// 
    /// The main entry point for the application.
    /// 
    [STAThread]
    static void Main() {

        Controller controller = new Controller();
        controller.Initialize();

        FormOutput viewOutput = new FormOutput();
        viewOutput.controller = controller;
        viewOutput.Initialize();
        viewOutput.Show();

        FormInput viewInput = new FormInput();
        viewInput.controller = controller;
        viewInput.Initialize();
        viewInput.Show();

        while (controller.ClientConnected &amp;gt; 0) {
            Application.DoEvents();
        }

        Application.Exit();
    }
}
</code></pre>

<p>}</p>]]></content:encoded>
	</item>
	<item>
		<title>By: nevyn</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-768</link>
		<dc:creator>nevyn</dc:creator>
		<pubDate>Thu, 31 Jul 2008 10:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-768</guid>
		<description>&lt;p&gt;Cocoa&#039;s version of MVC gives your user interface malleability like no other. Because your code isn&#039;t &lt;em&gt;in&lt;/em&gt; the view, you can edit the UI and the code completely separately. Delete an editfield, replace it with a slider, drag the outlet, done, you don&#039;t need to change a line of code. (Whereas with the Form Editor, you&#039;d have to save the handler code, delete the field, put in the slider, make a new handler, paste the old handler code, and adapt it to match the new control).&lt;/p&gt;

&lt;p&gt;I would even say that Interface Builder + properly Cocoa MVC&#039;d code gives you easier and greater UI malleability than HTML + well-written Javascript.&lt;/p&gt;

&lt;p&gt;(Why am I harping on about UI malleability? Because the UI is your app&#039;s most important aspect, and thus the UI has to be reiterated many times and evolve far before you get it right)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Cocoa&#8217;s version of MVC gives your user interface malleability like no other. Because your code isn&#8217;t <em>in</em> the view, you can edit the UI and the code completely separately. Delete an editfield, replace it with a slider, drag the outlet, done, you don&#8217;t need to change a line of code. (Whereas with the Form Editor, you&#8217;d have to save the handler code, delete the field, put in the slider, make a new handler, paste the old handler code, and adapt it to match the new control).</p>

<p>I would even say that Interface Builder + properly Cocoa MVC&#8217;d code gives you easier and greater UI malleability than HTML + well-written Javascript.</p>

<p>(Why am I harping on about UI malleability? Because the UI is your app&#8217;s most important aspect, and thus the UI has to be reiterated many times and evolve far before you get it right)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: twidle-de</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-767</link>
		<dc:creator>twidle-de</dc:creator>
		<pubDate>Thu, 31 Jul 2008 07:47:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-767</guid>
		<description>&lt;p&gt;When trying to understand MVC, one should understand that there are many different flavors of MVC in use.  I would argue that .Net uses a version of MVC, but the variant is that it uses what is called a &quot;heavy component&quot; approach.  This approach means that the Model remains separate, but the controller and view are mashed together in the same class (thus giving this class it&#039;s heavy weight).  Java&#039;s Swing library follows the same paradigm when it comes to MVC.  I&#039;m not saying this is a great way of doing MVC, but it is common enough that a good programmer should know of this version.&lt;/p&gt;

&lt;p&gt;What is known as &quot;True MVC&quot; is the approach where the model and view and as dumb as can be, and the controller is the mediator through which all business logic processing happens.  Cocoa follows close to this &quot;True MVC&quot; approach, however, Cocoa adds a little bit more flexibility through the delegation mentioned in this post, as well as the key value observing system, which makes it easy to link together complex views and do notifications of a change in data application wide.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>When trying to understand MVC, one should understand that there are many different flavors of MVC in use.  I would argue that .Net uses a version of MVC, but the variant is that it uses what is called a &#8220;heavy component&#8221; approach.  This approach means that the Model remains separate, but the controller and view are mashed together in the same class (thus giving this class it&#8217;s heavy weight).  Java&#8217;s Swing library follows the same paradigm when it comes to MVC.  I&#8217;m not saying this is a great way of doing MVC, but it is common enough that a good programmer should know of this version.</p>

<p>What is known as &#8220;True MVC&#8221; is the approach where the model and view and as dumb as can be, and the controller is the mediator through which all business logic processing happens.  Cocoa follows close to this &#8220;True MVC&#8221; approach, however, Cocoa adds a little bit more flexibility through the delegation mentioned in this post, as well as the key value observing system, which makes it easy to link together complex views and do notifications of a change in data application wide.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jumping Through Hoops &#8211; del.icio.us links for 2008-07-30</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-766</link>
		<dc:creator>Jumping Through Hoops &#8211; del.icio.us links for 2008-07-30</dc:creator>
		<pubDate>Thu, 31 Jul 2008 00:49:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-766</guid>
		<description>&lt;p&gt;[...] Cocoa Is My Girlfriend &gt; Cocoa Tutorial: Windows OOP vs Cocoa MVC - An explanation of Cocoa&#8217;s MVC architecture for Windows Forms switchers. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Cocoa Is My Girlfriend &gt; Cocoa Tutorial: Windows OOP vs Cocoa MVC &#8211; An explanation of Cocoa&#8217;s MVC architecture for Windows Forms switchers. [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2008-07-30 &#124; /dev/random</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-765</link>
		<dc:creator>links for 2008-07-30 &#124; /dev/random</dc:creator>
		<pubDate>Wed, 30 Jul 2008 23:30:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-765</guid>
		<description>&lt;p&gt;[...] Cocoa Tutorial: Windows OOP vs Cocoa MVC How .Net object encapsulation differs from Cocoa. (tags: cocoa programming) [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Cocoa Tutorial: Windows OOP vs Cocoa MVC How .Net object encapsulation differs from Cocoa. (tags: cocoa programming) [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Long</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-764</link>
		<dc:creator>Matt Long</dc:creator>
		<pubDate>Wed, 30 Jul 2008 19:17:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-764</guid>
		<description>&lt;p&gt;@warren416&lt;/p&gt;

&lt;p&gt;It&#039;s perfectly fine to remain unconvinced that it makes you a better programmer, but you won&#039;t be able to do Cocoa development unless you do drink it in. ;-)&lt;/p&gt;

&lt;p&gt;You have to decide whether or not you want to be a Cocoa developer. If the answer is yes, then buy the Hillegasse book and get going.  No shortcuts--just diligence.&lt;/p&gt;

&lt;p&gt;Best regards,&lt;/p&gt;

&lt;p&gt;-Matt&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@warren416</p>

<p>It&#8217;s perfectly fine to remain unconvinced that it makes you a better programmer, but you won&#8217;t be able to do Cocoa development unless you do drink it in. ;-)</p>

<p>You have to decide whether or not you want to be a Cocoa developer. If the answer is yes, then buy the Hillegasse book and get going.  No shortcuts&#8211;just diligence.</p>

<p>Best regards,</p>

<p>-Matt</p>]]></content:encoded>
	</item>
	<item>
		<title>By: warren416</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-763</link>
		<dc:creator>warren416</dc:creator>
		<pubDate>Wed, 30 Jul 2008 18:08:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-763</guid>
		<description>&lt;p&gt;What if you&#039;re like me: Poised on the brink of all this stuff, and unable to drink the MVC kool-aid?&lt;/p&gt;

&lt;p&gt;Are there any short-cuts to enlightenment? I&#039;m unconvinced that MVC makes your code better.&lt;/p&gt;

&lt;p&gt;W&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>What if you&#8217;re like me: Poised on the brink of all this stuff, and unable to drink the MVC kool-aid?</p>

<p>Are there any short-cuts to enlightenment? I&#8217;m unconvinced that MVC makes your code better.</p>

<p>W</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Long</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-761</link>
		<dc:creator>Matt Long</dc:creator>
		<pubDate>Wed, 30 Jul 2008 15:23:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-761</guid>
		<description>&lt;p&gt;@SHatfield&lt;/p&gt;

&lt;p&gt;I agree with you. I think I will also provide the why of MVC. Rather than try posting it here in the comments, though, I think I&#039;ll do a follow up post. Thanks for the insight. It&#039;s appreciated.&lt;/p&gt;

&lt;p&gt;-Matt&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@SHatfield</p>

<p>I agree with you. I think I will also provide the why of MVC. Rather than try posting it here in the comments, though, I think I&#8217;ll do a follow up post. Thanks for the insight. It&#8217;s appreciated.</p>

<p>-Matt</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ross</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-759</link>
		<dc:creator>Ross</dc:creator>
		<pubDate>Wed, 30 Jul 2008 14:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-759</guid>
		<description>&lt;p&gt;Thanks for this explanation, Matt. Before becoming obsessed with Cocoa, I had dabbled with other languages and platforms and none of them held my interest for very long. When I was about halfway through the Hillegass book, the Cocoa paradigms--MVC, target-action, view hierarchy, responder chain, and so on--suddenly made wonderful sense. I put the book down and started writing apps.&lt;/p&gt;

&lt;p&gt;Your article explains exactly why Cocoa dev is so enjoyable. It&#039;s not so much about learning how to do this and how to do that; it&#039;s about understanding the paradigms. I constantly marvel at them; there&#039;s a kind of elegance about the Cocoa way of doing things that makes coding a pleasure.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for this explanation, Matt. Before becoming obsessed with Cocoa, I had dabbled with other languages and platforms and none of them held my interest for very long. When I was about halfway through the Hillegass book, the Cocoa paradigms&#8211;MVC, target-action, view hierarchy, responder chain, and so on&#8211;suddenly made wonderful sense. I put the book down and started writing apps.</p>

<p>Your article explains exactly why Cocoa dev is so enjoyable. It&#8217;s not so much about learning how to do this and how to do that; it&#8217;s about understanding the paradigms. I constantly marvel at them; there&#8217;s a kind of elegance about the Cocoa way of doing things that makes coding a pleasure.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Snazell</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-758</link>
		<dc:creator>Chris Snazell</dc:creator>
		<pubDate>Wed, 30 Jul 2008 13:08:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-758</guid>
		<description>&lt;p&gt;With apologies, as a hoary old Smalltalk coder this is a hobby horse of mine ...&lt;/p&gt;

&lt;p&gt;MVC is essentially a data-management pattern - the view is a pool of data pulled from the model and manipulated by the controller. The view is so-called because it&#039;s a window onto the content of the model.&lt;/p&gt;

&lt;p&gt;In more complicated scenarios you have multiple view + controller pairs, each targeted at a particular category or subset of data in the model and servicing a particular aspect of the display. Typically in these scenarios the view + controller is merged into a single object that performs both duties. Let&#039;s call it a view-controller.&lt;/p&gt;

&lt;p&gt;Classically the MVC is always presented in relation to user-interfaces but the UI is never shown in the diagram and this leads people into assuming the view is the UI. Writing an MVC-based application is relatively trivial once you realise the UI is not the view.&lt;/p&gt;

&lt;p&gt;In .NET terms, the data displayed on the form is bound to the appropriate properties of the appropriate view-controller and the event processing code-behinds call the methods exposed by the same view-controller. To provide easy access to the view-controller the coder can instantiate them in the application object&#039;s constructor at start-up and expose them as properties. In this way the forms can always bind / call the required view-controller.&lt;/p&gt;

&lt;p&gt;The majority of coders haven&#039;t been exposed to the &#039;full on&#039; object-oriented coding experience of using a language like Smalltalk, Objective-C or Ruby. They don&#039;t &#039;think in objects&#039; so MVC seems like witchcraft.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>With apologies, as a hoary old Smalltalk coder this is a hobby horse of mine &#8230;</p>

<p>MVC is essentially a data-management pattern &#8211; the view is a pool of data pulled from the model and manipulated by the controller. The view is so-called because it&#8217;s a window onto the content of the model.</p>

<p>In more complicated scenarios you have multiple view + controller pairs, each targeted at a particular category or subset of data in the model and servicing a particular aspect of the display. Typically in these scenarios the view + controller is merged into a single object that performs both duties. Let&#8217;s call it a view-controller.</p>

<p>Classically the MVC is always presented in relation to user-interfaces but the UI is never shown in the diagram and this leads people into assuming the view is the UI. Writing an MVC-based application is relatively trivial once you realise the UI is not the view.</p>

<p>In .NET terms, the data displayed on the form is bound to the appropriate properties of the appropriate view-controller and the event processing code-behinds call the methods exposed by the same view-controller. To provide easy access to the view-controller the coder can instantiate them in the application object&#8217;s constructor at start-up and expose them as properties. In this way the forms can always bind / call the required view-controller.</p>

<p>The majority of coders haven&#8217;t been exposed to the &#8216;full on&#8217; object-oriented coding experience of using a language like Smalltalk, Objective-C or Ruby. They don&#8217;t &#8216;think in objects&#8217; so MVC seems like witchcraft.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: SHatfield</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-756</link>
		<dc:creator>SHatfield</dc:creator>
		<pubDate>Wed, 30 Jul 2008 11:10:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-756</guid>
		<description>&lt;p&gt;Long time reader, first time poster :-)&lt;/p&gt;

&lt;p&gt;In this article you talk about the MVC pattern, but you never explain why it is better than just placing code under buttons in the views (forms for Windows users).&lt;/p&gt;

&lt;p&gt;As you state in the article, the .NET UI practically begs you not to use the MVC pattern, and so to some Windows developers who have now started to look at the Mac, the MVC pattern might actually be a foreign concept entirely!&lt;/p&gt;

&lt;p&gt;So what is the answer to &quot;Why is MVC important?&quot;&lt;/p&gt;

&lt;p&gt;It is because it allows the views to vary while giving them a single point of reference to code that provides (and maybe updates) their data.&lt;/p&gt;

&lt;p&gt;Say for instance that you have an application that provides views that allow the data to be edited, but has security built in so that certain users can only view the data.&lt;/p&gt;

&lt;p&gt;In the Windows world where the developer hasn&#039;t used MVC, you would have to set the visible property of the Save buttons to false. Easy... but limiting. What if the controls in the views could be arranged so that they provide for better legibility to the &quot;read only&quot; user? What if a lot of controls in the forms need to be hidden because they are only relevant to users who can edit the data?&lt;/p&gt;

&lt;p&gt;Without MVC, you are stuck writing a lot of code to move/resize or hide controls on your forms. Not fun!&lt;/p&gt;

&lt;p&gt;In the MVC compliant application you can replace your views entirely with views that are designed with legibility in mind, while simply reusing the controller to get the data from your data source.&lt;/p&gt;

&lt;p&gt;I hope this helps any other Windows developers who have started to look at the Mac as a development platform.&lt;/p&gt;

&lt;p&gt;Best,
Steven&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Long time reader, first time poster :-)</p>

<p>In this article you talk about the MVC pattern, but you never explain why it is better than just placing code under buttons in the views (forms for Windows users).</p>

<p>As you state in the article, the .NET UI practically begs you not to use the MVC pattern, and so to some Windows developers who have now started to look at the Mac, the MVC pattern might actually be a foreign concept entirely!</p>

<p>So what is the answer to &#8220;Why is MVC important?&#8221;</p>

<p>It is because it allows the views to vary while giving them a single point of reference to code that provides (and maybe updates) their data.</p>

<p>Say for instance that you have an application that provides views that allow the data to be edited, but has security built in so that certain users can only view the data.</p>

<p>In the Windows world where the developer hasn&#8217;t used MVC, you would have to set the visible property of the Save buttons to false. Easy&#8230; but limiting. What if the controls in the views could be arranged so that they provide for better legibility to the &#8220;read only&#8221; user? What if a lot of controls in the forms need to be hidden because they are only relevant to users who can edit the data?</p>

<p>Without MVC, you are stuck writing a lot of code to move/resize or hide controls on your forms. Not fun!</p>

<p>In the MVC compliant application you can replace your views entirely with views that are designed with legibility in mind, while simply reusing the controller to get the data from your data source.</p>

<p>I hope this helps any other Windows developers who have started to look at the Mac as a development platform.</p>

<p>Best,
Steven</p>]]></content:encoded>
	</item>
	<item>
		<title>By: iamleeg</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-755</link>
		<dc:creator>iamleeg</dc:creator>
		<pubDate>Wed, 30 Jul 2008 10:57:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-755</guid>
		<description>&lt;p&gt;&lt;q&gt;So, you may ask, how can I do MVC in C#? Well, this is a Objective-C/Cocoa programming blog, so thatâ€™s an exercise for the glutton-for-punishment reader. Frankly, I donâ€™t know. I know itâ€™s possible, but there is nothing in the language that inherently leads you in that direction.&lt;/q&gt;
I think what you could adopt in the example you give (and hence elsewhere, probably) is the Mediator pattern from the GoF; specifically look at an architectural pattern called Model-View-ViewModel.  Your ViewModel class works in a similar way to the Controller in Cocoa (which actually isn&#039;t an MVC controller at all - NeXT seem to have hijacked the word back in the 1980s).&lt;/p&gt;

&lt;p&gt;I should point out though that my experience of C# is not that great, and I&#039;ve recently been using Cocoa# anyway (and writing Cocoa-style model and controller objects as a result).  Google brings up some good M-V-VM results after a search for &quot;ViewModel&quot;, including some which compare it with traditional SmallTalk MVC.&lt;/p&gt;

&lt;p&gt;Cheers,
Graham.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><q>So, you may ask, how can I do MVC in C#? Well, this is a Objective-C/Cocoa programming blog, so thatâ€™s an exercise for the glutton-for-punishment reader. Frankly, I donâ€™t know. I know itâ€™s possible, but there is nothing in the language that inherently leads you in that direction.</q>
I think what you could adopt in the example you give (and hence elsewhere, probably) is the Mediator pattern from the GoF; specifically look at an architectural pattern called Model-View-ViewModel.  Your ViewModel class works in a similar way to the Controller in Cocoa (which actually isn&#8217;t an MVC controller at all &#8211; NeXT seem to have hijacked the word back in the 1980s).</p>

<p>I should point out though that my experience of C# is not that great, and I&#8217;ve recently been using Cocoa# anyway (and writing Cocoa-style model and controller objects as a result).  Google brings up some good M-V-VM results after a search for &#8220;ViewModel&#8221;, including some which compare it with traditional SmallTalk MVC.</p>

<p>Cheers,
Graham.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: News &#187; Windows OOP vs Cocoa MVC</title>
		<link>http://www.cimgf.com/2008/07/29/cocoa-tutorial-windows-oop-vs-cocoa-mvc/comment-page-1/#comment-754</link>
		<dc:creator>News &#187; Windows OOP vs Cocoa MVC</dc:creator>
		<pubDate>Wed, 30 Jul 2008 10:04:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.cimgf.com/?p=148#comment-754</guid>
		<description>&lt;p&gt;[...] Cocoa Is My Girlfriend: &#8220;Encapsulate everything! Right? Or not.&#8221; [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Cocoa Is My Girlfriend: &ldquo;Encapsulate everything! Right? Or not.&rdquo; [...]</p>]]></content:encoded>
	</item>
</channel>
</rss>
