<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[Important Shock]]></provider_name><provider_url><![CDATA[https://importantshock.wordpress.com]]></provider_url><author_name><![CDATA[Patrick Thomson]]></author_name><author_url><![CDATA[https://importantshock.wordpress.com/author/importantshock/]]></author_url><title><![CDATA[It&#8217;s Hard Out Here for an MVC&nbsp;Advocate]]></title><type><![CDATA[link]]></type><html><![CDATA[<p> <em>Edit: I finally got the Interface Builder palette mentioned herein working. I&#8217;ll post a screenshot sometime later. I also cleared up some language. </em></p>
<p>In the past, I have alluded to the fact that I am a diehard Model-View-Controller advocate. I stay remarkably lax on other issues &#8211; I don&#8217;t mind breaking encapsulation, enjoy both static and dynamic typing, and even advocate paradigms other than OOP for certain applications. However, when it comes to GUI or web application development, I will defend Smalltalk&#8217;s Model-View-Controller paradigm to the death. In my still-inchoate Cocoa application, I&#8217;m using Interface Builder for the view, Core Data for the model, and Cocoa Bindings + my own code for the controller.</p>
<p>The problem emerges when I need to use the smattering of custom widgets that I&#8217;ve selected. Since creating Interface Builder palettes is so difficult, it&#8217;s hard to get people to make them &#8211; but <em>MVC falls apart the moment you have to exit out of Interface Builder to make visual changes to your own instances of custom widgets. </em></p>
<p>Therefore, I am stuck with a hard decision. Do I break the MVC design pattern and make a zillion little subclasses of NSView, in which I stick a whole bunch of initialization code? It would be a lot easier, especially when one considers how hard it is to create an IBPalette.</p>
<p>But it&#8217;s so ugly! I don&#8217;t want a custom-made NSView subclass for each color CTGradient that I want! And until Chad Weider releases a CTGradientWell (please, please, please, pretty please?) making a PTGradientView will be quite difficult.</p>
<p>Bah. Any comments/help/IB Palettes will be appreciated.</p>
]]></html></oembed>