<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TALKbasic.com</title>
	<atom:link href="http://www.talkbasic.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.talkbasic.com</link>
	<description>Talk about REALbasic stuff.</description>
	<lastBuildDate>Fri, 17 Jul 2009 09:46:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Pseudo-Cocoa Delegation Pattern With REALbasic</title>
		<link>http://www.talkbasic.com/2009/07/17/pseudo-cocoa-delegation-pattern-with-realbasic/</link>
		<comments>http://www.talkbasic.com/2009/07/17/pseudo-cocoa-delegation-pattern-with-realbasic/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 09:44:32 +0000</pubDate>
		<dc:creator>Ryan Dary</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.talkbasic.com/?p=15</guid>
		<description><![CDATA[If you&#8217;ve ever done any programming with Cocoa, you&#8217;ll notice fairly quickly that the dynamic runtime offered by Objective-C has some serious advantages over traditional function calls.  The Objective-C runtime operates with a concept of messages being sent to objects.  These objects can then handle these messages in any way they choose.  A good example [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever done any programming with Cocoa, you&#8217;ll notice fairly quickly that the dynamic runtime offered by Objective-C has some serious advantages over traditional function calls.  The Objective-C runtime operates with a concept of messages being sent to objects.  These objects can then handle these messages in any way they choose.  A good example of how this is useful is in the Cocoa delegation design pattern.  When you want to customize an object, you don&#8217;t usually need to subclass it.  Instead, you simply provide a delegate to the object that will handle customization.  Delegates in REALbasic are basically function pointers, but in Cocoa, a delegate is an object which responds to certain messages on behalf of another object.<span id="more-15"></span></p>
<p>When programming on the iPhone, for example, you may place a UITableView into the window.  This would be like placing a Listbox onto a REALbasic window.  In REALbasic, you actually are creating a subclass, named Listbox1 by default.  In Cocoa, however, you&#8217;re placing a UITableView object onto the window.  So, how does loading the data into the &#8220;list&#8221; differ between Cocoa and REALbasic?  Well, in REALbasic, since you have placed a subclass into the window, you simply respond to the necessary events, and call methods such as AddRow on the Listbox subclass.  In Cocoa, you assign a &#8220;delegate&#8221; object which will respond to several messages sent by the UITableView when it needs to load data.  The UITableView will &#8220;ask&#8221; the delegate how many rows of data there will be in the list.  Then it asks for enough data to fill the visible area of the list.  The benefit to this model is that the list only needs to be populated with enough data that can actually be seen.  In REALbasic, you must add all the data to the list, even if the data will never be seen by the user.  This can waste processing time, which can cause the user experience to be slow and non-responsive.</p>
<p>How can you fix this then?  You could use Interfaces to create a delegation model, but then the object which is acting as the delegate would need to specifically implement the entire interface.  In Cocoa, you can choose to implement at least the &#8220;required&#8221; methods and several of the &#8220;optional&#8221; methods.  REALbasic doesn&#8217;t have an &#8220;optional&#8221; way to implement methods.  Sure, you can just choose to fill in only some of the interface methods, but that means that you have to go through the process of choosing, ahead of time, to implement the interfaces.  That also means that your code is not as separated since the interface must be explicitly declared and the implementor must explicitly implement the interface.  It isn&#8217;t as &#8220;dynamic&#8221; as the Cocoa methodologies.</p>
<p>So, we can mimic the loose binding of methods by using the &#8220;Extends&#8221; keyword, and then optionally implementing the methods in various objects.  Look at this Module:</p>
<p><span style="color: #0000ff;">Module</span> MyOptionalDelegateModule</p>
<p style="padding-left: 30px; "><span style="color: #0000ff;">Function</span> numberOfRowsInTable( <span style="color: #0000ff;">Extends</span> tableView <span style="color: #0000ff;">As</span> <span style="color: #0000ff;">Object</span> ) <span style="color: #0000ff;">As</span> <span style="color: #0000ff;">Integer</span></p>
<p style="padding-left: 60px; "><span style="color: #993300;">// Do nothing here except return a &#8220;default&#8221; value</span></p>
<p style="padding-left: 60px; "><span style="color: #993300;"><span style="color: #000000;"><span style="color: #0000ff;">Return</span> 0</span></span></p>
<p style="padding-left: 30px; "><span style="color: #0000ff;">End Function</span></p>
<p><span style="color: #0000ff;">End Module</span></p>
<p>Now, in your &#8220;pretend&#8221; delegate object, you can declare this method:</p>
<p><span style="color: #0000ff;">Class</span> MyDelegateObject</p>
<p style="padding-left: 30px; "><span style="color: #0000ff;">Function</span> numberOfRowsInTable() <span style="color: #0000ff;">As Integer</span></p>
<p style="padding-left: 60px; "><span style="color: #993300;">// Here do the actual work</span></p>
<p style="padding-left: 60px; "><span style="color: #0000ff;">Return</span> 5</p>
<p style="padding-left: 30px; "><span style="color: #0000ff;">End Function</span></p>
<p><span style="color: #0000ff;">End Class</span></p>
<p>Now, you could create a custom listbox which asks a &#8220;delegate&#8221; for some number of rows.  You can assign any object as the delegate, even if it doesn&#8217;t implement &#8220;Function numberOfRowsInTable() As Integer&#8221; because the implementation in the module will be called.  If the object does implement the method, its implementation will be called instead.  So, you can define a bunch of methods and attempt to call them, and if the object actually implements the method, you&#8217;ll get the customized behavior.</p>
<p>So, if you like the delegation design pattern in Cocoa, you can now mimic it using the Extends feature of the REALbasic language.  Protocols can already be mimicked simply by defining an Interface.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.talkbasic.com/2009/07/17/pseudo-cocoa-delegation-pattern-with-realbasic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The REALbasic IDE: Correct Code</title>
		<link>http://www.talkbasic.com/2009/05/27/the-realbasic-ide-correct-code/</link>
		<comments>http://www.talkbasic.com/2009/05/27/the-realbasic-ide-correct-code/#comments</comments>
		<pubDate>Thu, 28 May 2009 06:50:44 +0000</pubDate>
		<dc:creator>Ryan Dary</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.talkbasic.com/?p=11</guid>
		<description><![CDATA[When first approached, the REALbasic IDE may seem restrictive to those who have spent their lives writing code in a basic text editor.  The requirement to fill out forms when creating new methods, properties, constants and many other elements of the language may seem to be far less relaxed than more traditional programming.  The benefit, [...]]]></description>
			<content:encoded><![CDATA[<p>When first approached, the REALbasic IDE may seem restrictive to those who have spent their lives writing code in a basic text editor.  The requirement to fill out forms when creating new methods, properties, constants and many other elements of the language may seem to be far less relaxed than more traditional programming.  The benefit, however, is that the IDE actually assists you in properly formatting your code.  Anyone who began programming earlier than the 1990&#8217;s will probably admit that they remember spending extra time every now and again just hunting down a compiler bug that would have been immediately solved had the been able to use an IDE like REALbasic.  The editor of REALbasic helps the programmer in writing correct code.<span id="more-11"></span></p>
<p>The forms for creating methods, properties, etc. really can be a time saver, but it isn&#8217;t the only help the IDE provides.  One of the best ways to produce more correct code is a proper auto-completing code editor.  REALbasic&#8217;s is one of the best I have ever used.  While some editors will help you type common keywords and previously-typed words, the REALbasic IDE will provide methods and properties that make sense to the context of the code.  Since the REALbasic IDE knows your code and project structure, the suggestions are often more accurate than some other IDE&#8217;s.  I recently used NetBeans IDE for writing Php code, and the auto-completion often just wasn&#8217;t able to recognize the context of the code in order to produce a valuable auto-complete suggestion.  Many of the most modern IDE&#8217;s are improving their code-completion, but I believe that REALbasic was far beyond the others much earlier.  As the REALbasic IDE improves, I look forward to seeing even more accurate code-completion to help me code much faster.</p>
<p>Building projects quickly is another area that REALbasic excels.  Since the REALbasic IDE is responsible for project structure, code and user interface, an application can be built in record time.  When you launch the REALbasic IDE, you&#8217;re started off with a brand new project that is already setup with the basic components that most applications need.  All you have to do is add a button and tell it what to do.  Even when I&#8217;m not working on an active project, I have jumped into REALbasic many times to whip up a quick file convertor or some other helpful automation.  Better than most of the &#8220;automation&#8221; software available, REALbasic can be quickly built to create any helpful tool in a matter of minutes to hours, rather than what could take days.  The rich framework also helps in rapidly creating utility or productivity applications since most of the routine functions are wrapped up into convenient classes and modules.</p>
<p>REALbasic provides more than just an alternative programming environment for new programmers and hobbyists, it provides a rapid application development environment that helps you speed up the process of building valuable applications in record time.  One of the key ways it does this is to help you write correct code quickly in a managed environment called the REALbasic IDE.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.talkbasic.com/2009/05/27/the-realbasic-ide-correct-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REALbasic 2009 Release 2.1 Thoughts</title>
		<link>http://www.talkbasic.com/2009/05/13/realbasic-2009-release-21-thoughts/</link>
		<comments>http://www.talkbasic.com/2009/05/13/realbasic-2009-release-21-thoughts/#comments</comments>
		<pubDate>Wed, 13 May 2009 11:35:09 +0000</pubDate>
		<dc:creator>Ryan Dary</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.talkbasic.com/?p=8</guid>
		<description><![CDATA[REALbasic 2009 Release 2.1 makes it easy to bring your old projects up-to-date and gain immediate boosts in performance and user experience for your applications.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using REALbasic since version 1.0 and it isn&#8217;t unlikely that I have projects from many years ago scattered about my computer.  Throughout the years, REALbasic has taken some turns, even some turns that have cause projects to stop compiling.  The usual process of working through the compiler errors to make old projects run has become a rather common course of events for me.  Some projects even required that I remain in an old version of REALbasic to continue to support the applications.  One of the most frustrating processes I would have to undergo was to bring an old project up-to-date with the current REALbasic.  This has been highly improved in the late 2008 and current 2009 releases of REALbasic.  I&#8217;ve been very impressed with the ability to bring my old projects up to the current version of REALbasic quickly.<span id="more-8"></span></p>
<p>Now it has been a joy for me to go through all my old projects and bring them up-to-date with the current REALbasic 2009 Release 2.1.  I&#8217;m excited about the progress that has been made, and my applications seem to immediately benefit from all kinds of performance increases and improved user experience.  It is easier in REALbasic 2009 Release 2.1 to build platform-native applications than it has ever been, which allows for a quick and easy transition path for all my old projects.</p>
<p>REAL Software is bringing the fun back to programming as they continue to improve the development environment that we have all come to enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.talkbasic.com/2009/05/13/realbasic-2009-release-21-thoughts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TALKbasic Under Construction</title>
		<link>http://www.talkbasic.com/2009/04/28/hello-world/</link>
		<comments>http://www.talkbasic.com/2009/04/28/hello-world/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 03:43:36 +0000</pubDate>
		<dc:creator>Ryan Dary</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://talkbasic.com/?p=1</guid>
		<description><![CDATA[The site is undergoing a change.  My goal is to improve the site&#8217;s usefulness.
]]></description>
			<content:encoded><![CDATA[<p>The site is undergoing a change.  My goal is to improve the site&#8217;s usefulness.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.talkbasic.com/2009/04/28/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
