<?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>Development &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Mon, 23 Mar 2026 21:27:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Code Signing on macOS: What Developers Need to Know, Part 1</title>
		<link>https://blog.xojo.com/2026/03/04/code-signing-on-macos-what-developers-need-to-know-part-1/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Wed, 04 Mar 2026 16:00:00 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Apple Developer Account]]></category>
		<category><![CDATA[Code Signing]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Distribution]]></category>
		<category><![CDATA[macOS]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15856</guid>

					<description><![CDATA[Your macOS app is finished and ready to go. But unless you plan to run it only on your own machine, there’s one essential step&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Your macOS app is finished and ready to go. But unless you plan to run it only on your own machine, there’s one essential step before sharing it with others: code signing with certificates.</p>



<span id="more-15856"></span>



<p>This blog series provides a clear, practical overview of how certificates work, with a focus on signing and distributing macOS applications. Some concepts apply to digital certificates in general, while others are specific to the macOS code signing process. By the end of the series, you’ll understand what certificates are, why they matter, and the role they play when building and distributing a macOS app.</p>



<p>The Developer ID field in the Build Settings &gt; macOS &gt; Sign Inspector Panel is our starting point:</p>



<figure class="wp-block-image"><img fetchpriority="high" decoding="async" width="1000" height="574" src="https://blog.xojo.com/wp-content/uploads/2026/02/Captura-de-pantalla-2026-02-26-a-las-10.51.17.png" alt="" class="wp-image-15857" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Captura-de-pantalla-2026-02-26-a-las-10.51.17.png 1000w, https://blog.xojo.com/wp-content/uploads/2026/02/Captura-de-pantalla-2026-02-26-a-las-10.51.17-300x172.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Captura-de-pantalla-2026-02-26-a-las-10.51.17-768x441.png 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></figure>



<p>By default, this field is empty. When you click Build, the app bundle (and its contents) is signed using a more relaxed security configuration. This does not require an explicit developer certificate and does not verify that the app comes from a known, trusted developer.</p>



<p>This type of signing is called Ad-Hoc signing. It is perfectly fine when debugging from the IDE or when building apps you intend to run locally.</p>



<p>In earlier versions of macOS, it was even possible to distribute and run Ad-Hoc–signed apps on other Macs, as long as the user explicitly chose to trust them. While this is still technically possible on recent versions of macOS, Apple has continued to tighten security, making it increasingly difficult for users to launch Ad-Hoc–signed applications.</p>



<p>In most cases, <a href="https://support.apple.com/en-au/guide/security/sec5599b66df/web" target="_blank" rel="noreferrer noopener">Gatekeeper</a> will intervene and prevent the app from launching. Since the system cannot verify the identity of a trusted developer, it treats the app as unverified. With Ad-Hoc signing, macOS can only confirm that the app has not been modified since it was signed, it cannot validate who created it.</p>



<h2 class="wp-block-heading">Under the hood: How &#8220;Ad-Hoc&#8221; signing works</h2>



<p>Every time an app is signed (including all the contents inside its bundle) macOS uses Apple’s codesign tool. When Ad-Hoc signing is applied, the simplified process works roughly like this:<br></p>



<figure class="wp-block-image"><img decoding="async" width="1390" height="812" src="https://blog.xojo.com/wp-content/uploads/2026/02/Ad-Hoc-How-it-works.png" alt="" class="wp-image-15858" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Ad-Hoc-How-it-works.png 1390w, https://blog.xojo.com/wp-content/uploads/2026/02/Ad-Hoc-How-it-works-300x175.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Ad-Hoc-How-it-works-1024x598.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Ad-Hoc-How-it-works-768x449.png 768w" sizes="(max-width: 1390px) 100vw, 1390px" /></figure>



<ul class="wp-block-list">
<li>A hash value (a unique digital fingerprint) is calculated for every file in the app bundle, whether it is executable or not, as well as for the bundle itself.</li>



<li>These hash values are stored inside the app bundle, in the <code>_CodeSignature</code> folder.</li>



<li>If the app contains multiple architectures (for example, x86 and ARM), the process is repeated for each supported architecture.</li>
</ul>



<p>When a user double-clicks the app to launch it, macOS performs a similar verification process:</p>



<ul class="wp-block-list">
<li>It recalculates the hash value for every file in the bundle.</li>



<li>It compares the newly calculated values with those stored in the <code>_CodeSignature</code> folder and if any hash differs from the stored value, macOS determines that the bundle has been modified since it was signed and it will refuse to launch the app.</li>
</ul>



<p>Want to see this in action? Create a new Desktop project in the Xojo IDE, save it to your Documents folder, and build it for macOS.</p>



<p>Next, locate the built app in Finder. Control-click it and choose “Show Package Contents.” Then open the Contents &gt; _CodeSignature folder and inspect the CodeResources file using your favorite text editor. You’ll see a list of hash values and digests corresponding to every file in the app bundle.</p>



<figure class="wp-block-image"><img decoding="async" width="1248" height="1344" src="https://blog.xojo.com/wp-content/uploads/2026/02/SignatureFile.png" alt="" class="wp-image-15859" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/SignatureFile.png 1248w, https://blog.xojo.com/wp-content/uploads/2026/02/SignatureFile-279x300.png 279w, https://blog.xojo.com/wp-content/uploads/2026/02/SignatureFile-951x1024.png 951w, https://blog.xojo.com/wp-content/uploads/2026/02/SignatureFile-768x827.png 768w" sizes="(max-width: 1248px) 100vw, 1248px" /></figure>



<h2 class="wp-block-heading">Apple Developer Certificates: Establishing Trust on macOS</h2>



<p>What must you do so your apps are recognized as first-class citizens on macOS and can be distributed without Gatekeeper intervening? The answer is likely familiar: enroll in the Apple Developer Program (currently US $99 per year).</p>



<p>Among its many benefits, membership in the Apple Developer Program allows you to create your own Developer ID certificates. When you use these certificates to sign your apps, macOS can validate the signature and identify you as the verified developer distributing the software.</p>



<p>But how is this trust established and verified? To answer that, we need to start at the very root, literally!</p>



<p>Every computer, smartphone, tablet, and many other devices come with preinstalled Root Certificates. These certificates are issued by trusted organizations known as Root Certificate Authorities (CAs), including Apple. They serve as the foundation of a chain of trust, allowing other certificates issued by those authorities to be verified.</p>



<p>Technically speaking, a Root Certificate Authority (CA) is the top-level trusted entity in a public key infrastructure (<a href="https://en.wikipedia.org/wiki/Public_key_infrastructure">PKI</a>). It issues self-signed root certificates that act as the trust anchor for verifying other digital certificates. In other words, it is the foundation upon which the entire certificate trust model is built.</p>



<p>It is easy to take a look to these installed on your Mac:</p>



<ol class="wp-block-list">
<li>Open Keychain Access.</li>



<li>Select Certificates at the top of the window.</li>



<li>In the sidebar, choose System Roots.</li>



<li>You will then see the complete list of root certificates trusted by macOS.</li>
</ol>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="2186" height="1264" src="https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates.png" alt="" class="wp-image-15860" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates.png 2186w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates-300x173.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates-1024x592.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates-768x444.png 768w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates-1536x888.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Certificates-2048x1184.png 2048w" sizes="auto, (max-width: 2186px) 100vw, 2186px" /></figure>



<p>You’ll notice that there are three different Apple Root CA certificates. Why?</p>



<p>Each <a href="https://en.wikipedia.org/wiki/X.509" target="_blank" rel="noreferrer noopener">X.509</a> certificate contains detailed metadata defining its cryptographic properties and permitted usage. This includes the key type (such as <a href="https://en.wikipedia.org/wiki/RSA_cryptosystem" target="_blank" rel="noreferrer noopener">RSA</a> or <a href="https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm" target="_blank" rel="noreferrer noopener">ECDSA</a>), the public key length, and the signature algorithm used.</p>



<ul class="wp-block-list">
<li><strong>Apple Root CA</strong>: Is a RSA type, with a public key length of 2048 bits that uses the SHA-1 algorithm.</li>



<li><strong>Apple Root CA-G2</strong>: Is a RSA type, with a public key length of 4096 bits that uses the SHA-384 algorithm.</li>



<li><strong>Apple Root CA-G3</strong>: Is a ECDSA type, with a public key length of 384 bits that uses the SHA-384 algorithm.</li>
</ul>



<h2 class="wp-block-heading">Intermediate Certificates and the Chain of Trust</h2>



<p>Root certificates are highly valuable and sensitive, so they are rarely used directly to sign end-user certificates (also called “Leaf” certificates). In the case of macOS app development, the developer’s certificate is the Leaf. This is where Intermediate Certificates come into play.</p>



<p>In simple terms, Intermediate Certificates are signed by Root Certificates and, in turn, are used to sign Leaf certificates. This protects the Root certificate from direct exposure. Together, the Root, Intermediate, and Leaf certificates form what is called the “Chain of Trust.”</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1254" height="932" src="https://blog.xojo.com/wp-content/uploads/2026/02/Root-Intermediate-Lead-Span.png" alt="" class="wp-image-15861" srcset="https://blog.xojo.com/wp-content/uploads/2026/02/Root-Intermediate-Lead-Span.png 1254w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Intermediate-Lead-Span-300x223.png 300w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Intermediate-Lead-Span-1024x761.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/02/Root-Intermediate-Lead-Span-768x571.png 768w" sizes="auto, (max-width: 1254px) 100vw, 1254px" /></figure>



<p>The Chain of Trust verification starts with the Leaf certificate and works upward through the Intermediate to the Root. This same process occurs whenever you visit a secure website, make an online payment, or transmit sensitive data securely.</p>



<p>For example, the Leaf certificate is validated against its Intermediate certificate. If the Intermediate certificate is missing or expired, the Leaf certificate is considered invalid. Similarly, the Intermediate certificate itself must be validated against the Root certificate. If the Root certificate is missing or expired, the Intermediate is invalid, and all Leaf certificates signed by it are also invalid.</p>



<p>The same process happens when you sign your macOS apps: macOS validates the entire certificate chain before allowing the app to run.</p>



<p>Finally, certificates closer to the Root generally have longer validity periods. Leaf certificates must be renewed more frequently, while Root certificates are valid for many years.</p>



<h2 class="wp-block-heading">Wrapping up</h2>



<p>In this first article, we covered the fundamentals of digital certificates and their role in macOS app security. In the next article, we will focus specifically on Apple Developer certificates and how they enable trusted app distribution.</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<p><strong>Code Signing on macOS: What Developers Need to Know</strong></p>



<ul class="wp-block-list">
<li><a href="https://blog.xojo.com/2026/03/04/code-signing-on-macos-what-developers-need-to-know-part-1/" target="_blank" rel="noreferrer noopener">Part 1, Get Started</a></li>



<li><a href="https://blog.xojo.com/2026/03/18/code-signing-on-macos-what-developers-need-to-know-part-2/" target="_blank" rel="noreferrer noopener">Part 2, Code Signing With Developer Certificates</a></li>



<li><a href="https://blog.xojo.com/2026/03/24/code-signing-on-macos-what-developers-need-to-know-part-3/">Part 3, Entitlements and Provisioning Profiles</a></li>



<li><a href="https://blog.xojo.com/2026/04/07/code-signing-on-macos-what-developers-need-to-know-part-4/" target="_blank" rel="noreferrer noopener">Part 4, How Xojo helps with Certificates, Signing and Distribution</a></li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Introducing Jade, the Xojo AI Assistant</title>
		<link>https://blog.xojo.com/2025/12/09/introducing-jade-the-xojo-ai-assistant/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 09 Dec 2025 16:31:26 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[2025r3]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[AI Code Generation]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Jade]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15548</guid>

					<description><![CDATA[With Xojo 2025 Release 3, we are introducing Jade, an AI assistant for Xojo. This initial version is primarily for asking general Xojo-related questions and&#8230;]]></description>
										<content:encoded><![CDATA[
<p>With Xojo 2025 Release 3, we are introducing Jade, an AI assistant for Xojo. This initial version is primarily for asking general Xojo-related questions and can be used as an alternative to the documentation.</p>



<h2 class="wp-block-heading">Getting Started</h2>



<p>Jade uses Anthropic Claude as its engine, so before using Jade, you first need to sign up for an Anthropic API key to access Claude. You can do this from the <a href="https://console.anthropic.com" target="_blank" rel="noreferrer noopener">Anthropic Claude Console</a>.</p>



<p>From there you can create your account. After you&#8217;ve done that, you will want to get an API key to use with Xojo. Click on the &#8220;API keys&#8221; tab to see existing keys and create new ones. Click the &#8220;Create Key&#8221; button to generate a new key. In the dialog, give it a name to indicate its purpose.</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="920" height="666" src="https://blog.xojo.com/wp-content/uploads/2025/11/Create-in-Workspace-®.png" alt="" class="wp-image-15551" style="width:381px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2025/11/Create-in-Workspace-®.png 920w, https://blog.xojo.com/wp-content/uploads/2025/11/Create-in-Workspace-®-300x217.png 300w, https://blog.xojo.com/wp-content/uploads/2025/11/Create-in-Workspace-®-768x556.png 768w" sizes="auto, (max-width: 920px) 100vw, 920px" /></figure>



<p>When you click Add, the actual key will be shown. Copy it to the clipboard.</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="922" height="658" src="https://blog.xojo.com/wp-content/uploads/2025/11/Keep-a-record-of-the-key-below.-You-wont-be-able-to-view-it.png" alt="" class="wp-image-15552" style="width:390px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2025/11/Keep-a-record-of-the-key-below.-You-wont-be-able-to-view-it.png 922w, https://blog.xojo.com/wp-content/uploads/2025/11/Keep-a-record-of-the-key-below.-You-wont-be-able-to-view-it-300x214.png 300w, https://blog.xojo.com/wp-content/uploads/2025/11/Keep-a-record-of-the-key-below.-You-wont-be-able-to-view-it-768x548.png 768w" sizes="auto, (max-width: 922px) 100vw, 922px" /></figure>



<p>Note that you cannot see the key again after closing that dialog, but you can always create a new key at any time.</p>



<p>Now go to Xojo Settings and in the General tab, paste it into the &#8220;Anthropic API Key&#8221; field.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="748" src="https://blog.xojo.com/wp-content/uploads/2025/11/4E41D4E3-6D1F-494E-B830-8FB73DC944FB-1024x748.jpeg" alt="" class="wp-image-15559" style="width:670px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2025/11/4E41D4E3-6D1F-494E-B830-8FB73DC944FB-1024x748.jpeg 1024w, https://blog.xojo.com/wp-content/uploads/2025/11/4E41D4E3-6D1F-494E-B830-8FB73DC944FB-300x219.jpeg 300w, https://blog.xojo.com/wp-content/uploads/2025/11/4E41D4E3-6D1F-494E-B830-8FB73DC944FB-768x561.jpeg 768w, https://blog.xojo.com/wp-content/uploads/2025/11/4E41D4E3-6D1F-494E-B830-8FB73DC944FB-1536x1122.jpeg 1536w, https://blog.xojo.com/wp-content/uploads/2025/11/4E41D4E3-6D1F-494E-B830-8FB73DC944FB.jpeg 1624w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Go back to the Claude Console and click on the Billing tab to buy credits. Interacting with Jade requires credits. The amount of credits used depends on the complexity of your interactions. Until you get used to Jade and credit usage, you’ll probably want to start with a small amount, like $5, and disable auto-reload.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="302" src="https://blog.xojo.com/wp-content/uploads/2025/11/CleanShot-2025-11-24-at-14.19.55@2x-1024x302.png" alt="" class="wp-image-15560" style="width:625px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2025/11/CleanShot-2025-11-24-at-14.19.55@2x-1024x302.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/11/CleanShot-2025-11-24-at-14.19.55@2x-300x88.png 300w, https://blog.xojo.com/wp-content/uploads/2025/11/CleanShot-2025-11-24-at-14.19.55@2x-768x226.png 768w, https://blog.xojo.com/wp-content/uploads/2025/11/CleanShot-2025-11-24-at-14.19.55@2x-1536x453.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/11/CleanShot-2025-11-24-at-14.19.55@2x-2048x604.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Using Jade</h2>


<div class="wp-block-image">
<figure class="alignright size-full"><img loading="lazy" decoding="async" width="48" height="48" src="https://blog.xojo.com/wp-content/uploads/2025/11/Assistant@3x.png" alt="" class="wp-image-15556"/></figure>
</div>


<p>To use Jade, select Help-&gt;Ask Jade or click the Ask Jade button in the toolbar. You’ll get some short introductory text. Note: Using Jade requires an internet connection.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="982" src="https://blog.xojo.com/wp-content/uploads/2025/11/DF74EF37-BA6B-4A56-B933-0339A00359A2-1024x982.jpeg" alt="" class="wp-image-15558" style="width:668px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2025/11/DF74EF37-BA6B-4A56-B933-0339A00359A2-1024x982.jpeg 1024w, https://blog.xojo.com/wp-content/uploads/2025/11/DF74EF37-BA6B-4A56-B933-0339A00359A2-300x288.jpeg 300w, https://blog.xojo.com/wp-content/uploads/2025/11/DF74EF37-BA6B-4A56-B933-0339A00359A2-768x736.jpeg 768w, https://blog.xojo.com/wp-content/uploads/2025/11/DF74EF37-BA6B-4A56-B933-0339A00359A2-1536x1473.jpeg 1536w, https://blog.xojo.com/wp-content/uploads/2025/11/DF74EF37-BA6B-4A56-B933-0339A00359A2.jpeg 2044w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>You interact with Jade similarly to a chat app by typing prompts in the conversation area (bottom section) and pressing Send. Jade will think for a moment and then display its response.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="982" src="https://blog.xojo.com/wp-content/uploads/2025/11/DFF0253D-0333-46DD-9780-8A0322F652C0-1024x982.jpeg" alt="" class="wp-image-15562" style="width:680px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2025/11/DFF0253D-0333-46DD-9780-8A0322F652C0-1024x982.jpeg 1024w, https://blog.xojo.com/wp-content/uploads/2025/11/DFF0253D-0333-46DD-9780-8A0322F652C0-300x288.jpeg 300w, https://blog.xojo.com/wp-content/uploads/2025/11/DFF0253D-0333-46DD-9780-8A0322F652C0-768x736.jpeg 768w, https://blog.xojo.com/wp-content/uploads/2025/11/DFF0253D-0333-46DD-9780-8A0322F652C0-1536x1473.jpeg 1536w, https://blog.xojo.com/wp-content/uploads/2025/11/DFF0253D-0333-46DD-9780-8A0322F652C0.jpeg 2044w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>If Jade’s response includes Xojo source code you can click one of the buttons above the code block to copy the code to the clipboard or to directly insert it into the active code editor.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="1010" height="1024" src="https://blog.xojo.com/wp-content/uploads/2025/11/99B34DEE-DD4E-47E6-A565-FD1437B9D552-1010x1024.jpeg" alt="" class="wp-image-15563" style="width:678px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2025/11/99B34DEE-DD4E-47E6-A565-FD1437B9D552-1010x1024.jpeg 1010w, https://blog.xojo.com/wp-content/uploads/2025/11/99B34DEE-DD4E-47E6-A565-FD1437B9D552-296x300.jpeg 296w, https://blog.xojo.com/wp-content/uploads/2025/11/99B34DEE-DD4E-47E6-A565-FD1437B9D552-768x779.jpeg 768w, https://blog.xojo.com/wp-content/uploads/2025/11/99B34DEE-DD4E-47E6-A565-FD1437B9D552-1515x1536.jpeg 1515w, https://blog.xojo.com/wp-content/uploads/2025/11/99B34DEE-DD4E-47E6-A565-FD1437B9D552-2020x2048.jpeg 2020w" sizes="auto, (max-width: 1010px) 100vw, 1010px" /></figure>



<p>When interacting with Jade, keep in mind that although it remembers the context from the current conversation, it has no knowledge of prior conversations. Click the &#8220;Start Over&#8221; button to clear things and start a new conversation. Starting a new conversation is useful when switching to a different topic as it prevents Jade from relying on information you previously discussed that is no longer relevant.</p>



<p>The Export button saves the current Jade conversation to a JSON file which is a great way to save information you want to retain and refer to later.</p>



<h2 class="wp-block-heading">Other Tips</h2>



<ul class="wp-block-list">
<li>Jade currently uses Claude Sonnet 4, but this may change as newer models become available.</li>



<li>The only thing Jade knows about your project is what type it is (Desktop, Web, iOS, etc.). If you want Jade to offer suggestions based on your code, you will need to copy/paste the relevant code into the Jade conversation area.</li>



<li>Your Jade conversation is restored when the IDE restarts. If you get errors, ensure that you have valid internet access, that the API key is valid and you have a positive credit amount.</li>
</ul>



<h2 class="wp-block-heading">Wrap</h2>



<p>We hope you find Jade helpful with your Xojo development. Remember, Jade in Xojo 2025r3 is the first version of an AI assistant for Xojo and will improve over time. In subsequent releases we expect to add more capabilities and project integration. Read more about <a href="https://documentation.xojo.com/getting_started/using_the_ide/ask_jade.html" target="_blank" rel="noreferrer noopener">Jade</a> in Xojo&#8217;s Documentation.</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Web Framework Updates in 2025r2</title>
		<link>https://blog.xojo.com/2025/07/08/web-framework-updates-in-2025r2/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 08 Jul 2025 18:01:00 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[2025r2]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[WebMapViewer]]></category>
		<category><![CDATA[WebStyles]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14977</guid>

					<description><![CDATA[Featuring WebStyle state support for creating more polished user interfaces, enhanced event handling capabilities, and a collection of bug fixes and utility improvements, 2025r2 continues&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Featuring WebStyle state support for creating more polished user interfaces, enhanced event handling capabilities, and a collection of bug fixes and utility improvements, 2025r2 continues improvements to your Web Application development experience with Xojo.</p>



<h2 class="wp-block-heading"><strong>Added Support for WebStyle States</strong></h2>



<p>Working on Desktop projects is all fun and jokes. You can just change how the whole application looks every time your application users move their mouse one pixel to the left. Latency? Who cares!</p>



<p>In order to achieve the same results, WebStyle has been improved to support states. Hover, Pressed and Visited.</p>



<ul class="wp-block-list">
<li><strong>WebStyle.Hover</strong><br>This is the style that will be applied when the mouse is over the element</li>



<li><strong>WebStyle.Pressed</strong><br>This is the style that will be applied when the user is pressing a mouse button in the element</li>



<li><strong>WebStyle.Visited</strong><br>This style can be used with WebLink instances. Used to let the user know the browser has visited that link in the past</li>
</ul>



<p>Consider the following WebContainer:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="686" src="https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.31.08-1024x686.png" alt="" class="wp-image-14978" srcset="https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.31.08-1024x686.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.31.08-300x201.png 300w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.31.08-768x514.png 768w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.31.08-1536x1029.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.31.08-2048x1371.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p>In this case, it&#8217;s just a container with a WebLabel inside.</p>



<p>The Opening event contains the following code:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="686" src="https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.34.34-1024x686.png" alt="" class="wp-image-14979" srcset="https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.34.34-1024x686.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.34.34-300x201.png 300w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.34.34-768x514.png 768w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.34.34-1536x1029.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.34.34-2048x1371.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p>Please note I&#8217;m using named colors. You can read more about named colors in <a href="https://blog.xojo.com/2024/10/01/introducing-named-color-and-css-classes-in-xojo-web/" data-type="link" data-id="https://blog.xojo.com/2024/10/01/introducing-named-color-and-css-classes-in-xojo-web/">Introducing Named Color and CSS Classes in Xojo Web</a>. If you try using another Bootstrap theme, the same code will use the new color palette without modifications.</p>



<p>Here is the result:</p>



<figure class="wp-block-video aligncenter"><video height="1044" style="aspect-ratio: 1392 / 1044;" width="1392" controls src="https://blog.xojo.com/wp-content/uploads/2025/06/Grabacion-de-pantalla-2025-06-17-a-las-10.32.14.mp4.mp4"></video></figure>



<p>Combined with <code>WebStyle.AddTransition</code>, it opens the gates for more interesting GUIs. Let&#8217;s add some transitions to our code:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="686" src="https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.41.12-1024x686.png" alt="" class="wp-image-14981" srcset="https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.41.12-1024x686.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.41.12-300x201.png 300w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.41.12-768x514.png 768w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.41.12-1536x1029.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.41.12-2048x1371.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Let&#8217;s try the project again:</p>



<figure class="wp-block-video"><video height="1044" style="aspect-ratio: 1392 / 1044;" width="1392" controls src="https://blog.xojo.com/wp-content/uploads/2025/06/Grabacion-de-pantalla-2025-06-17-a-las-10.41.58.mp4.mp4"></video></figure>



<p>Neat! Let&#8217;s go crazy for a second with more complex effects:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="686" src="https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.57.15-1024x686.png" alt="" class="wp-image-14983" srcset="https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.57.15-1024x686.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.57.15-300x201.png 300w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.57.15-768x514.png 768w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.57.15-1536x1029.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-10.57.15-2048x1371.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The result:</p>



<figure class="wp-block-video"><video height="1044" style="aspect-ratio: 1392 / 1044;" width="1392" controls src="https://blog.xojo.com/wp-content/uploads/2025/06/Grabacion-de-pantalla-2025-06-17-a-las-10.57.58.mp4.mp4"></video></figure>



<p>You should definitely avoid going that crazy, this is just to show the possibilities. As Dr. Ian Malcolm said &#8230; <em>&#8220;Your scientists were so preoccupied with whether or not they could, they didn&#8217;t stop to think if they should.&#8221;</em></p>



<h2 class="wp-block-heading"><strong>WebContainer.Pressed</strong></h2>



<p>Speaking about pressing on things, WebContainer.Pressed event is now available, so you don&#8217;t need to place a WebLabel or a WebContainer on top just to capture that event anymore. The event comes with some coordinates, just in case you need them.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="686" src="https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-11.05.54-1024x686.png" alt="" class="wp-image-14985" srcset="https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-11.05.54-1024x686.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-11.05.54-300x201.png 300w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-11.05.54-768x514.png 768w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-11.05.54-1536x1029.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/06/Captura-de-pantalla-2025-06-17-a-las-11.05.54-2048x1371.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The result:</p>



<figure class="wp-block-video"><video height="1044" style="aspect-ratio: 1392 / 1044;" width="1392" controls src="https://blog.xojo.com/wp-content/uploads/2025/06/Grabacion-de-pantalla-2025-06-17-a-las-11.05.36.mp4.mp4"></video></figure>



<h2 class="wp-block-heading"><strong>Other changes</strong></h2>



<p><strong>WebToolbar.Resized</strong></p>



<p>Trying to tweak your design for different screen sizes? If WebToolbar&#8217;s automated behavior is not enough, you can implement the new WebToolbar.Resized event and adapt the contents. This is useful when you are reusing the same WebToolbar subclass in multiple WebPages. You will be able to place this code in just one place.</p>



<p><strong>Exporting maps with WebMapViewer</strong></p>



<p>Same as with MobileMapViewer. You can now use WebMapViewer.ToPicture method to export the current map. Like WebChart.ToPicture, due to the asynchronous nature of Web projects, the picture will be available in the new WebMapViewer.RequestedPicture event.</p>



<p><strong>Updated DataTables</strong></p>



<p>Last, but not least, DataTables has been upgraded from v1.13.4 to v2.2.2.</p>



<h2 class="wp-block-heading"><strong>That&#8217;s (not) all!</strong></h2>



<p>As always, please make sure to check the <a href="https://documentation.xojo.com/versions/2025r2/resources/release_notes/2025r2.html">release notes</a> for a detailed list of new features and bug fixes. The Web framework is built on top of Xojo, new global features or bug fixes also applies to Web, including improvements to Console projects. Xojo Web is &#8220;just&#8221; a big Console project.</p>



<p>Thank you everyone for reporting, testing beta builds and giving us feedback.</p>



<p>Happy coding!</p>



<p><em>Ricardo has always been curious about how things work. Growing up surrounded by computers</em> he became interested in <em>web technologies in the dial-up connections era. Xojo has been his secret weapon and language of preference since 2018. When he’s not online, chances are he will be scuba diving … or crocheting amigurumis. Find Ricardo on Twitter <a href="https://web.archive.org/web/20220805000833/https://www.twitter.com/piradoiv" target="_blank" rel="noreferrer noopener">@piradoiv</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2025/06/Grabacion-de-pantalla-2025-06-17-a-las-10.32.14.mp4.mp4" length="143729" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2025/06/Grabacion-de-pantalla-2025-06-17-a-las-10.41.58.mp4.mp4" length="212247" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2025/06/Grabacion-de-pantalla-2025-06-17-a-las-10.57.58.mp4.mp4" length="814128" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2025/06/Grabacion-de-pantalla-2025-06-17-a-las-11.05.36.mp4.mp4" length="321178" type="video/mp4" />

			</item>
		<item>
		<title>Build Your First iOS App with Xojo: 10 Practical Steps</title>
		<link>https://blog.xojo.com/2025/05/16/build-your-first-ios-app-with-xojo-10-practical-steps/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Fri, 16 May 2025 15:45:00 +0000</pubDate>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[App Marketing]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[App Store Connect]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Developer Marketing]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Mobile]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14876</guid>

					<description><![CDATA[Xojo is an extremely useful, fast and fun development environment for building your first (or next) iOS app. In this article, I offer a series&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Xojo is an extremely useful, fast and fun development environment for building your first (or next) iOS app. In this article, I offer a series of practical steps to guide you from idea to app.</p>



<span id="more-14876"></span>



<h2 class="wp-block-heading">1. Define Your Idea</h2>



<p>Start by summarizing your app’s purpose in a single, clear sentence. The more concise it is, the better defined your objective will be. This clarity will help guide your screen designs, navigation structure and code architecture.</p>



<p>This sentence can also double as your app’s short description in App Store Connect.</p>



<p>Focus on the essential features that form your app’s <a href="https://en.wikipedia.org/wiki/Minimum_viable_product">Minimum Viable Product</a> (MVP). It’s easy to get sidetracked by new ideas during development. Resist the urge! Instead, keep a list of potential features for future updates and base priorities on user feedback.</p>



<h2 class="wp-block-heading">2. Choose The Platform(s)</h2>



<p>Xojo supports both iPhone and iPad, but your app doesn’t have to. Choose the device type that best fits your app’s use case.</p>



<ul class="wp-block-list">
<li>iPhone apps often support quick, task-based interactions.</li>



<li>iPad apps are better suited to immersive, content-rich experiences.</li>
</ul>



<p>To target a specific device only, set the unused layout (iPhone or iPad) to “None” in the App item’s Inspector Panel.</p>



<p>You’ll also need to decide the minimum iOS version to support. Xojo currently defaults to iOS 14.0, but as of writing, over 60% of users are on iOS 18 or later.</p>



<h2 class="wp-block-heading">3. Prototyping</h2>



<p>Xojo’s visual layout editor makes it easy to dive in designing your app. But take time to prototype your app first, especially if it has more than basic functionality.</p>



<p>Use tools like Figma or MockUp, or simply sketch your ideas with pencil and paper. Choose whatever helps you plan best and clearly.</p>



<p>Also, review Apple’s <a href="https://developer.apple.com/design/human-interface-guidelines/">Human Interface Guidelines</a> to align your app with native iOS expectations.</p>



<p>When designing in Xojo, you can fine-tune layout behavior using the <a href="https://documentation.xojo.com/api/ios/ioslayoutconstraint.html#ioslayoutconstraint">iOSLayoutConstraint</a> class to adapt to orientation and screen size changes at runtime.</p>



<h2 class="wp-block-heading">4. Database Design</h2>



<p>Most apps use a database. For local storage on iOS, use <a href="https://documentation.xojo.com/api/databases/sqlitedatabase.html#methods">SQLiteDatabase</a>, and save your database file in <a href="https://documentation.xojo.com/api/files/specialfolder.html#specialfolder">SpecialFolder.Documents</a>.</p>



<p>Two key best practices:</p>



<ul class="wp-block-list">
<li>Add a Metadata table to track the database schema version. </li>



<li>Create a custom <a href="https://blog.xojo.com/2025/02/05/customize-and-extend-core-databases-functionality/">SQLiteDatabase subclass</a> to manage all read/write operations in one place.</li>
</ul>



<p>This setup allows you to always know which version is installed on the user&#8217;s device and to react accordingly as your app evolves.</p>



<h2 class="wp-block-heading">5. Graphic Resources</h2>



<p>For icons, buttons and tab bar images, use <a href="https://documentation.xojo.com/api/graphics/picture.html#picture-systemimage">Picture.SystemImage</a> with symbols from Apple’s <a href="https://developer.apple.com/sf-symbols/">SF Symbols</a> app. These scale beautifully across devices and adapt to light/dark mode. Just ensure compatibility with your minimum iOS version.</p>



<p>When using custom images, add them at multiple resolutions for optimal display across all screen sizes.</p>



<p>Typography also matters. Use system <a href="http://www.iosfont.com">fonts</a> thoughtfully, ideally no more than two font families. Vary sizes and weights to establish content hierarchy. Keep text readable with a minimum font size of 11pt.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Tip: When testing in the Simulator, set the window to physical size (Simulator &gt; Window &gt; Physical Size) to preview real-world readability.</p>
</blockquote>



<h2 class="wp-block-heading">6. Localization and Accessibility</h2>



<p>Nothing prevents you from publishing an app in a single language, whether it&#8217;s your native language or English; but supporting multiple languages can increase downloads by over 100x.</p>



<p>Start localizing early to avoid design issues later. Add a module to your Xojo project with localized String constants for all app text, and enable the “Localized” option for each one.</p>



<p>Suggested languages (in order of impact):</p>



<p>Core: English</p>



<p>High-impact additions: Chinese, Spanish, German, French, Japanese, Italian, Portuguese, Russian, Korean</p>



<p>Also, localize accessibility labels and App Store listings, including screenshots and descriptions, for each supported language.</p>



<h2 class="wp-block-heading">7. Testing the App</h2>



<p>Xojo provides multiple ways to test your app, both from a design and user experience perspective, as well as from a functionality perspective:</p>



<ul class="wp-block-list">
<li><strong>Simulators</strong>: Ideal for design, layout and localization testing. You can also use them to take App Store screenshots.</li>



<li><strong>On-device Debugging</strong>: Offers realistic input experience and access to hardware-only features.</li>



<li><strong>Build to Device</strong>: Lets you run the app outside the debugger, simulating real-world use.</li>
</ul>



<p>Once you’ve finished fixing bugs in your code and app design, move on to testing in the real world by compiling your app and using Xcode to copy that bundle to a physical device. Testing like this, you&#8217;ll likely find some optimizations, especially around design and usability.</p>



<p>TestFlight is your gateway to external beta testers. After uploading a build to App Store Connect, create a public link to invite testers. Remember to increment the version number with each new build.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Tip: Add <code>ITSAppUsesNonExemptEncryption = False</code> in your Property List to streamline build approvals.</p>
</blockquote>



<h2 class="wp-block-heading">8. Publish it!</h2>



<p>Publishing with Xojo is straightforward. The most time-consuming step is preparing your App Store Connect listing including text, artwork, screenshots, keywords and possibly localized pages. Read more about this in my earlier post <em><a href="https://blog.xojo.com/2025/03/25/how-to-publish-macos-and-ios-apps-to-the-app-store-directly-from-xojo/">How to Publish macOS and iOS Apps to the App Store Directly from Xojo</a></em>.</p>



<p>Make sure you select the correct build when submitting your app for review.</p>



<h2 class="wp-block-heading">9. Marketing</h2>



<p>Something you should be doing simultaneously is preparing the related materials to introduce your app to the world. Start your marketing efforts early. A simple website can significantly boost discoverability. Use it to:</p>



<ul class="wp-block-list">
<li>Provide tutorials and FAQs</li>



<li>Link to App Store and social media</li>



<li>Highlight features and updates</li>
</ul>



<p>Consider creating a YouTube channel for app demos and support videos, and maintain active social media profiles to stay visible.</p>



<p>Don&#8217;t forget to take advantage of the <a href="https://toolbox.marketingtools.apple.com">Marketing tools provided by Apple</a> to help you create badges, assets, links and even QR codes to promote your app.</p>



<h2 class="wp-block-heading">10. The Next Steps …</h2>



<p>After launch, gather user feedback and track any bugs that slipped through. At this stage, it’s common to manage:</p>



<ul class="wp-block-list">
<li>A public release (on the App Store)</li>



<li>A development version (next major update)</li>
</ul>



<p>Save your Xojo iOS project in text format and use a version control system. This helps you manage multiple branches and collaborate efficiently.</p>



<h2 class="wp-block-heading">To Summarize</h2>



<p>Even the simplest iOS apps require a fair amount of time and effort, but thanks to Xojo, both aspects are significantly reduced.</p>



<p>What iOS apps have you created with Xojo? What&#8217;s your methodology or any tips you&#8217;d like to share? Feel free to comment on the <a href="http://forum.xojo.com">Xojo forum</a>!</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Decoding &#8216;Vibe Coding&#8217;: What Does It Mean for Developers (and the Code We Write)?</title>
		<link>https://blog.xojo.com/2025/04/02/decoding-vibe-coding-what-does-it-mean-for-developers-and-the-code-we-write/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Wed, 02 Apr 2025 15:00:00 +0000</pubDate>
				<category><![CDATA[Dev Marketing]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[AI Code Generation]]></category>
		<category><![CDATA[Artificial Intelligence]]></category>
		<category><![CDATA[Code Quality]]></category>
		<category><![CDATA[Developer Productivity]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Future of Programming]]></category>
		<category><![CDATA[Maintainability]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Vibe Coding]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14776</guid>

					<description><![CDATA[Let’s talk about a term buzzing around: ‘vibe coding.’ Yes, you read that right. Vibe. Coding. As in,&#160;feeling&#160;the code into existence? As someone immersed in&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Let’s talk about a term buzzing around: ‘vibe coding.’ Yes, you read that right. Vibe. Coding. As in,&nbsp;<em>feeling</em>&nbsp;the code into existence? As someone immersed in development, stumbling across this concept wasn’t just surprising; it felt like it poked at the very foundations of how we approach building software. It’s more than just a new tool; it represents a potential shift in mindset, sparking debate about the future of our craft.</p>



<p>Apparently, vibe coding is the latest and greatest thing in software development, or so I hear from the younger generation. It seems like it’s all about using AI tools to generate code based on natural language prompts. You tell the AI what you&nbsp;<em>want</em>&nbsp;to build, and it spits out the code. No more late nights wrestling with syntax errors, no more meticulously planning out every class and function. You just…&nbsp;<em>vibe</em>&nbsp;it into existence.</p>



<h3 class="wp-block-heading" id="the-origin-story">The Origin Story</h3>



<p>The term gained traction thanks to Andrej Karpathy, a prominent figure in AI (OpenAI, Tesla). He described ‘vibe coding’ as fully embracing AI generation, iterating based on natural language, and potentially minimizing direct code interaction or even deep review. This idea – letting the ‘vibe’ of the requirement guide the AI, potentially bypassing meticulous human coding – is where the conversation gets really interesting, and perhaps, a little unsettling for seasoned developers.</p>



<h3 class="wp-block-heading" id="how-it-works-supposedly">How It Works (Supposedly)</h3>



<p>From what I gather, the process involves describing your desired outcome in plain English (even voice commands are suggested), letting AI generate the code. You then refine through further prompts. The most discussed and debated aspect? The suggestion by proponents that deep, line-by-line understanding of the <em>generated</em> code might become less critical than iterating on the high-level ‘vibe’.</p>



<h3 class="wp-block-heading" id="my-slightly-jaded-take">My (Slightly Jaded) Take</h3>



<p>Look, progress is essential, and making development more accessible is a worthy goal. We see this with low-code/no-code platforms and the genuine utility of AI assistants. However, as someone who values robust, understandable, and maintainable code, principles that are core to Xojo’s design philosophy, the notion of accepting code without fully grasping its mechanics raises serious questions.</p>



<p>We’ve spent years learning that the devil is in the details: edge cases, security vulnerabilities, performance bottlenecks. Can a ‘vibe’ truly account for all that?</p>



<p>As one Reddit user aptly put it, ‘Coding is easy, testing and maintaining is hard.’ That deep understanding is crucial for the hard parts.</p>



<h3 class="wp-block-heading" id="the-potential-upsides-maybe">The Potential Upsides (Maybe)</h3>



<p>Okay, I’ll admit, there might be some potential benefits to this “vibe coding” thing.</p>



<ul class="wp-block-list">
<li><strong>Rapid Prototyping:</strong>&nbsp;It could be useful for quickly creating prototypes and experimenting with new ideas.</li>



<li><strong>Lower Barrier to Entry:</strong>&nbsp;It might allow non-developers to build simple applications and bring their ideas to life.</li>



<li><strong>Increased Productivity:</strong>&nbsp;It could free up developers to focus on higher-level tasks like architecture and problem-solving.</li>
</ul>



<h3 class="wp-block-heading" id="the-concerns-definitely">The Concerns (Definitely)</h3>



<p>But here are the things that keep me up at night:</p>



<ul class="wp-block-list">
<li><strong>Lack of Understanding:</strong>&nbsp;If you don’t understand the code, how can you possibly debug it or fix it when things go wrong?</li>



<li><strong>Hidden Risks (Security &amp; Quality):</strong>&nbsp;Could relying heavily on AI without rigorous review introduce subtle bugs or security flaws that aren’t immediately apparent?</li>



<li><strong>The Maintainability Maze:</strong>&nbsp;What happens to long-term maintainability when the original ‘author’ (the AI) has no memory, and the human overseer lacks deep understanding of the implementation?</li>



<li><strong>Erosion of Craftsmanship?:</strong>&nbsp;Does over-reliance risk deskilling developers or devaluing the rigorous problem-solving at the heart of good engineering?</li>
</ul>



<h3 class="wp-block-heading" id="the-verdict">My Verdict</h3>



<p>So, is ‘vibe coding’ poised to take over software development? For complex, critical applications, it seems unlikely in its purest form. The risks associated with a lack of deep understanding are simply too high. However, dismissing the power of AI in coding would be equally misguided.</p>



<p>These tools&nbsp;<em>are</em>&nbsp;becoming powerful assistants. The key isn’t choosing between ‘vibes’ and traditional coding; it’s about&nbsp;<strong>intelligent integration</strong>. Use AI to accelerate development, handle boilerplate, and explore ideas. But never relinquish the crucial step of understanding, testing, and refining the output.</p>



<p>Fundamentals matter. Clarity, solid architecture, and maintainability, the very things Xojo is built to facilitate, become&nbsp;<em>more</em>&nbsp;important, not less, in an AI-assisted world. We need to leverage these tools wisely, as co-pilots, not as autopilots flying blind.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>But, what do you think? Am I simply being a traditionalist coder, or do you share some of my concerns regarding “vibe coding”? Let’s discuss it in the&nbsp;<a href="https://forum.xojo.com/" target="_blank" rel="noreferrer noopener">Xojo forums</a>. Share your experiences and perspectives. Navigating this evolution is something we should do together as a community.</p>



<p><em>Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Building a Web Kanban Board GUI with Drag and Drop Support</title>
		<link>https://blog.xojo.com/2025/03/25/building-a-web-kanban-board-gui-with-drag-drop-support/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 25 Mar 2025 15:32:34 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[2025r1]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Drag and Drop]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14651</guid>

					<description><![CDATA[Imagine a sleek, interactive Kanban board right in your browser: Columns labeled &#8220;To Do,&#8221; &#8220;In Progress,&#8221; and &#8220;Done,&#8221; each populated with cards representing tasks. With&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Imagine a sleek, interactive Kanban board right in your browser: Columns labeled &#8220;To Do,&#8221; &#8220;In Progress,&#8221; and &#8220;Done,&#8221; each populated with cards representing tasks. With Xojo’s new drag and drop support for web projects, you can grab a card with your mouse, drag it to another column to update its status, or even reorder it within the same column to prioritize it.</p>



<h2 class="wp-block-heading"><strong>The End Result</strong></h2>



<figure class="wp-block-video aligncenter"><video height="1410" style="aspect-ratio: 1854 / 1410;" width="1854" controls src="https://blog.xojo.com/wp-content/uploads/2025/03/kanban-board-demo.mp4"></video><figcaption class="wp-element-caption">Kanban board demo</figcaption></figure>



<p>The latest drag and drop example has a functional GUI that looks professional and feels intuitive. All without writing a single line of JavaScript (we will enhance it a bit with some CSS, though).</p>



<p>Please note this is a sample project created to explore drag and drop, not a full featured Kanban board. I&#8217;ll omit on purpose things like persistence. The complete project can be found in the Examples section of the IDE, under <strong>Platforms > Web</strong>.</p>



<p>Let’s walk through how to make it happen.</p>



<h2 class="wp-block-heading"><strong>Creating the Required Components</strong></h2>



<p>First, we need to define the building blocks of our Kanban board. In Xojo, WebContainers are perfect for modularizing reusable UI elements. Here’s what we’ll create:</p>



<ul class="wp-block-list">
<li><strong>KanbanCard</strong><br>A WebContainer to represent each task card. It’ll have a simple label for the task name (e.g., &#8220;Write blog post&#8221;) and maybe a colored border or handle to indicate it’s draggable. Add a WebLabel for the text and set its properties in the Inspector to make it visually distinct.</li>



<li><strong>KanbanCardContainer</strong><br>Another WebContainer to act as a column. It’ll hold multiple KanbanCard Containers and serve as both a drag source (where cards come from) and a drop target (where cards land). Include a WebLabel at the top for the column title (e.g., &#8220;To Do&#8221;) and a rectangular area below it to house the cards.</li>



<li><strong>Main Page</strong><br>A WebPage to host everything. This is where we’ll arrange our columns side by side.</li>
</ul>



<p>In the Xojo IDE, drag a WebContainer onto your project for the Card, another for the Column, and set up three instances of the Column Container on the main WebPage (&#8220;To Do,&#8221; &#8220;In Progress,&#8221; &#8220;Done&#8221;).</p>



<h2 class="wp-block-heading"><strong>KanbanCard</strong></h2>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="807" src="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-06-a-las-15.50.08-1024x807.png" alt="" class="wp-image-14653" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-06-a-las-15.50.08-1024x807.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-06-a-las-15.50.08-300x236.png 300w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-06-a-las-15.50.08-768x605.png 768w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-06-a-las-15.50.08.png 1190w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">The KanbanCard custom control</figcaption></figure>
</div>


<p>This component will be pretty easy to build. It is basically a WebRectangle with a WebLabel that we will use for the Title. To make it easier to update, I&#8217;ve added a Title Computed Property that will update the TitleLabel if needed.</p>



<p>For the background WebRectangle, we will use the following ColorGroup. Please notice Xojo added support for Named colors, that will rely on the current Bootstrap theme, supporting Dark Mode:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="807" src="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-06-a-las-17.44.17-1024x807.png" alt="" class="wp-image-14654" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-06-a-las-17.44.17-1024x807.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-06-a-las-17.44.17-300x236.png 300w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-06-a-las-17.44.17-768x605.png 768w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-06-a-las-17.44.17.png 1190w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Adding a ColorGroup using a Bootstrap Named Color</figcaption></figure>
</div>


<p>As you can see, BackgroundRectangle and TitleLabel controls are implementing the Opening event. This is just to set the mouse cursor that will be shown when we hover:</p>



<pre class="wp-block-code xojo"><code>Me.Style.Cursor = WebStyle.Cursors.Move</code></pre>



<p>The container itself is also implementing the Opening event. This is to make this control draggable, using the following line of code:</p>



<pre class="wp-block-code xojo"><code>AllowTextDrag(WebDragItem.DragActionTypes.Move)</code></pre>



<p>Any descendant of the WebUIControl class is draggable. And yes, that includes custom controls created with the Web SDK.</p>



<p>For the WebDragItem.DragActionTypes Enumeration, you can choose one these options:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="324" height="386" src="https://blog.xojo.com/wp-content/uploads/2025/03/1-CopyAndLink.png" alt="" class="wp-image-14655" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/1-CopyAndLink.png 324w, https://blog.xojo.com/wp-content/uploads/2025/03/1-CopyAndLink-252x300.png 252w" sizes="auto, (max-width: 324px) 100vw, 324px" /><figcaption class="wp-element-caption">The WebDragItem.DragActionTypes Enumeration</figcaption></figure>
</div>


<p>In this case we will only be allowed to &#8220;Move&#8221; a card from one place to another.</p>



<p>There are cases where it makes sense to support multiple drag action types. In your operating system&#8217;s file browser, when you drag and drop files and folders, you can change between Move, Link or Copy by using Keyboard shortcut combinations. Depending on the drag action type, the element will be moved, a symbolic link will be created, or it will be copied, respectively.</p>



<p>Normally you will implement just Move or Copy, but keep in mind it&#8217;s possible to have more (at the cost of increasing the learning curve of your application for your users)</p>



<p>Allowing something to be dragged is the first of two steps. You also need a place to drop these items into.</p>



<h2 class="wp-block-heading"><strong>KanbanCardContainer</strong></h2>



<p>This container will be more elaborate, but should be easy to follow. Let&#8217;s see how it works at runtime, with some annotations:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="895" height="1024" src="https://blog.xojo.com/wp-content/uploads/2025/03/WebLabel-895x1024.png" alt="" class="wp-image-14656" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/WebLabel-895x1024.png 895w, https://blog.xojo.com/wp-content/uploads/2025/03/WebLabel-262x300.png 262w, https://blog.xojo.com/wp-content/uploads/2025/03/WebLabel-768x879.png 768w, https://blog.xojo.com/wp-content/uploads/2025/03/WebLabel.png 1071w" sizes="auto, (max-width: 895px) 100vw, 895px" /><figcaption class="wp-element-caption">Combined controls to create the KanbanCardContainer</figcaption></figure>
</div>


<p>The WebLabel we used for the Title and the WebButton used for adding new cards are positioned manually in the IDE designer. Same as the invisible WebRectangle holding the KanbanCard items and the KanbanAddCard custom button.</p>



<p>But instead of placing our cards manually, we&#8217;ll take advantage of the browser&#8217;s capacity for doing this job for us. We just want to add them dynamically at runtime and let the browser stack them vertically, automatically. We also want the browser to display a scrollbar if the columns have several cards.</p>



<p>Here is the code we will add to the WebRectangle:</p>



<pre class="wp-block-code"><code>// Let the framework know we want to let the
// browser place the items automatically
Me.LayoutType = LayoutTypes.Flex

// This style will ensure cards won't be
// placed horizontally by the browser
Me.Style.Value("flex-direction") = "wrap"

// If there are more cards than available
// space, this style will allow the user
// to scroll
Me.Style.Value("overflow") = "auto"</code></pre>



<p>Let&#8217;s add some methods to add and remove cards at runtime.</p>



<ul class="wp-block-list">
<li>AddCardWithTitle(title As String)</li>



<li>AddCardWithTitleAt(title As String, index As Integer)</li>



<li>RemoveCardAt</li>
</ul>



<h2 class="wp-block-heading"><strong>Moving Cards Between Columns</strong></h2>



<p>Here’s where Xojo’s drag and drop shines. Each Card Container needs to be draggable and each Column Container needs to accept dropped cards. In Xojo:</p>



<ol class="wp-block-list">
<li><strong>Make Cards Draggable</strong>: Open the KanbanListCard in the IDE and implement the Opening event. Enter this code:<br><code>AllowTextDrag(WebDragItem.DragActionTypes.Move)</code></li>



<li><strong>Accept Card Drops:</strong> Open the KanbanCardContainer and implement the Opening event. This is the code we need in order to accept drops:<br><code>AcceptTextDrop(WebDragItem.DragActionTypes.Move)</code></li>



<li><strong>Remove from Source</strong>: To move (not copy) the card, in the source Column’s DragEnd event, remove the dragged card from its original parent after a successful drop.</li>
</ol>



<p>With this, you can drag a card from &#8220;To Do&#8221; to &#8220;In Progress,&#8221; and it’ll visually jump columns. Xojo handles the heavy lifting. No JavaScript or DOM manipulation needed!</p>



<h2 class="wp-block-heading"><strong>The Hard Part: Reordering Cards</strong></h2>



<p>Reordering cards within a column, or dropping a card into another column in a specific position is trickier. You need to detect where the card lands among its siblings and adjust their positions. Xojo’s drag and drop doesn’t natively sort UI elements, so we’ll simulate it.</p>



<p>There are several ways to achieve this, let&#8217;s explore some options.</p>



<p>One would be to deal with X/Y coordinates. Once you drop a card, you could take a look to see where the card landed, compare the coordinates with the other cards and reorder them accordingly. In desktop and mobile projects this could be a valid solution. In web projects, dealing with specific coordinates might work, but there are more accurate and easier solutions.</p>



<p>The second way could be good enough in most cases. Cards could also accept drops so, if you drop one card on another, we just have to put the card being dropped in the position where it&#8217;s being dropped, and push down the rest of the stack. This way you won&#8217;t need to scratch your head and deal with screen coordinates or control dimensions. The end result will be based on this idea.</p>



<p>But what should we do to generate the gap between Cards? Maybe you can create a transparent Container that also accept Card drops, to simulate the gap between cards.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="1024" src="https://blog.xojo.com/wp-content/uploads/2025/03/KanbanCardContainer-1024x1024.png" alt="" class="wp-image-14657" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/KanbanCardContainer-1024x1024.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/03/KanbanCardContainer-300x300.png 300w, https://blog.xojo.com/wp-content/uploads/2025/03/KanbanCardContainer-150x150.png 150w, https://blog.xojo.com/wp-content/uploads/2025/03/KanbanCardContainer-768x768.png 768w, https://blog.xojo.com/wp-content/uploads/2025/03/KanbanCardContainer.png 1158w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">One way of achieving sorting, that we are not using in the sample project</figcaption></figure>
</div>


<p>This would work for you, and I honestly recommend you to give it a try, it&#8217;s super easy to implement and it will just work. If you don&#8217;t want to explore the CSS rabbit hole, that&#8217;s fine, this can be your bus stop.</p>



<p>Two downsides:</p>



<ul class="wp-block-list">
<li>You won&#8217;t have animations</li>



<li>You will double the amount of controls on screen (performance may suffer)</li>
</ul>



<p>I went in another direction though. Using some CSS, you can add and modify margins on the fly, with neat transitions. In my sample project, the margin between cards is managed by the `margin-top` CSS style.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="274" height="444" src="https://blog.xojo.com/wp-content/uploads/2025/03/In-Progress.png" alt="" class="wp-image-14658" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/In-Progress.png 274w, https://blog.xojo.com/wp-content/uploads/2025/03/In-Progress-185x300.png 185w" sizes="auto, (max-width: 274px) 100vw, 274px" /><figcaption class="wp-element-caption">Top margin added to KanbanCardContainer, using CSS styles</figcaption></figure>
</div>


<p>And here is where the Xojo Framework helps. To make styling easier, it adds a CSS class to the element being dragged and also to the element where the mouse is over, when it&#8217;s accepting a drop.</p>



<p><code>dragging</code> &#8211; The HTML element being dragged will have this property<br><code>dragover</code> &#8211; The HTML element under the other element being dragged</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="815" src="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.15.44-1024x815.png" alt="" class="wp-image-14659" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.15.44-1024x815.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.15.44-300x239.png 300w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.15.44-768x611.png 768w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.15.44-1536x1223.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.15.44-2048x1630.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Some CSS Classes added by the Xojo Web Framework at runtime, to help styling Drag and Drop</figcaption></figure>
</div>


<p>In this case, the &#8220;Bar&#8221; card will receive the dragging CSS class, while &#8220;Test #2&#8221; will receive the dragover CSS class, while the &#8220;Bar&#8221; car is above.</p>



<p>I&#8217;ve added some transparency to elements with the dragging class. As you can see in the screenshot, the &#8220;Bar&#8221; Card opacity is set to 30%.</p>



<p>For dragover class, I&#8217;ve added some margin and transitions. If you drag something into a card, the top margin will grow, simulating it&#8217;s making room for the card you are about to drop.</p>



<p>Here is how the HTML Header section of the sample project looks like. It isn&#8217;t too much code, but it does uses some somewhat advanced CSS tricks:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="807" src="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.29.14-1024x807.png" alt="" class="wp-image-14660" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.29.14-1024x807.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.29.14-300x236.png 300w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.29.14-768x605.png 768w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.29.14-1536x1211.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.29.14-2048x1614.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Custom CSS added to App &gt; HTML Header</figcaption></figure>
</div>


<p>This approach keeps cards neatly stacked and sortable. It’s the &#8220;hard part&#8221; not because you will have to write a lot of code, but because you&#8217;ll actually have to think a solution that won&#8217;t require roundtrips between the browser and the server. Xojo’s event system makes it manageable without JavaScript, and with some CSS, the result will be great.</p>



<h2 class="wp-block-heading"><strong>Some CSS Enhancements</strong></h2>



<p>In some cases I&#8217;m using shadows and border radius using the Bootstrap&#8217;s CSS classes.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="807" src="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.44.21-1024x807.png" alt="" class="wp-image-14661" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.44.21-1024x807.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.44.21-300x236.png 300w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.44.21-768x605.png 768w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.44.21-1536x1211.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-09-a-las-18.44.21-2048x1614.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Bootstrap CSS Classes to make the card be rounded and have a subtle shadow</figcaption></figure>
</div>


<p>As you can see, I&#8217;m using rounded-2 for the border radius, and shadow-sm to easily add a shadow to the cards.</p>



<p>You can read more about this in the following blog post:<br><a href="https://blog.xojo.com/2024/10/01/introducing-named-color-and-css-classes-in-xojo-web/" data-type="post" data-id="13668">Introducing Named Color and CSS Classes in Xojo Web</a></p>



<p>There is a related sample project you might want to check:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="822" src="https://blog.xojo.com/wp-content/uploads/2025/03/Platform-1024x822.png" alt="" class="wp-image-14662" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/Platform-1024x822.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/03/Platform-300x241.png 300w, https://blog.xojo.com/wp-content/uploads/2025/03/Platform-768x616.png 768w, https://blog.xojo.com/wp-content/uploads/2025/03/Platform-1536x1233.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/03/Platform.png 1762w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Xojo Web Examples</figcaption></figure>
</div>


<h2 class="wp-block-heading"><strong>Closing Thoughts</strong></h2>



<p>This has been a fun experiment to explore the Xojo Web drag and drop feature. Give the sample project a try and explore each control to see how it&#8217;s been created. I can&#8217;t recommend enough that you try to build it from scratch (and ask in the forum if you get stuck!)</p>



<p>We can&#8217;t wait to hear about how you plan to introduce drag and drop into your projects. Don&#8217;t be shy and create a forum thread to show what you have built, or what you are working on.</p>



<p><em>Ricardo has always been curious about how things work. Growing up surrounded by computers</em> he became interested in <em>web technologies in the dial-up connections era. Xojo has been his secret weapon and language of preference since 2018. When he’s not online, chances are he will be scuba diving … or crocheting amigurumis. Find Ricardo on Twitter <a href="https://web.archive.org/web/20220805000833/https://www.twitter.com/piradoiv" target="_blank" rel="noreferrer noopener">@piradoiv</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2025/03/kanban-board-demo.mp4" length="710061" type="video/mp4" />

			</item>
		<item>
		<title>A Complete Dockerfile for Web Apps</title>
		<link>https://blog.xojo.com/2025/03/19/a-complete-dockerfile-for-web-apps/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Wed, 19 Mar 2025 15:19:48 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14708</guid>

					<description><![CDATA[For a comprehensive guide on deploying Xojo web apps to any server, please refer to the video tutorial available at: https://youtu.be/ARr7d6Z6CRY I also recommend reading&#8230;]]></description>
										<content:encoded><![CDATA[
<p>For a comprehensive guide on deploying Xojo web apps to any server, please refer to the video tutorial available at: <a href="https://youtu.be/ARr7d6Z6CRY" target="_blank" rel="noreferrer noopener">https://youtu.be/ARr7d6Z6CRY</a></p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Complete Guide to Dockerize &amp; Deploy your Web Apps" width="500" height="281" src="https://www.youtube.com/embed/ARr7d6Z6CRY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<ul class="wp-block-list">
<li>The Dockerfile below should be placed in the same directory as your Xojo project</li>



<li>Remember to modify the&nbsp;<code>WEBAPP_NAME</code>&nbsp;variable on line 33 to match the name of your project</li>



<li>Feel free to customize this Dockerfile to suit your specific needs. We encourage you to share your modifications and experiences in the Xojo <a href="https://forum.xojo.com/" data-type="link" data-id="https://forum.xojo.com/" target="_blank" rel="noreferrer noopener">forum</a></li>
</ul>



<pre class="wp-block-code"><code># Step-by-Step Instructions for Building, Saving, and Running the Image:
# 1. Build the Docker image:
#    "docker build -t hellodocker-image ."
#    This creates a Docker image named "hellodocker-image" based on this Dockerfile.
#
# 2. Save the Docker image to a tar file:
#    "docker save -o hellodocker-image.tar hellodocker-image"
#    This saves the "hellodocker-image" to a file named "hellodocker-image.tar".
#    You can use this file to transfer the image to another server.
#
# 3. Upload the .tar file to the remote server.
#    After transferring the tar file, follow these steps on the remote server:
#
#    3.1 Load the Docker image:
#        "docker load -i hellodocker-image.tar"
#        This imports the image into the Docker environment on the server.
#
#    3.2 Run a container from the image:
#        "docker run -d --name hellodocker-container --restart always -p 7000:80 hellodocker-image"
#        This creates and starts a container named "hellodocker-container" that:
#        - Restarts automatically if it stops (via `--restart always`).
#        - Maps port 80 inside the container to port 7000 on the host machine.
#
#    3.3 Verify the web app is running:
#        Open a web browser and navigate to http://server-ip:7000
#        Replace "server-ip" with the IP address of your remote server.
#
# Complete video guide at: https://youtu.be/ARr7d6Z6CRY

# Use Ubuntu 22.04 as the base image for the container.
FROM ubuntu:22.04

# Define the name of the Xojo web app executable.
# This should match the exact name of your compiled Xojo web app (case-sensitive).
ENV WEBAPP_NAME=HelloDocker

# Prevent interactive prompts during the installation of dependencies.
ENV DEBIAN_FRONTEND=noninteractive

# Install required system libraries for the Xojo web app to run, and purge unnecessary software (PHP, Python, Apache)
RUN apt-get update &amp;&amp; apt-get install -y --no-install-recommends \
    curl \
    ca-certificates \
    libunwind8 \
    libsoup2.4 \
    libpango-1.0 \
    libicu70 \
    libglib2.0 \
    libgtk-3-0 \
    &amp;&amp; apt-get purge -y php* python3* apache2* libapache2-mod-php* \
    &amp;&amp; apt-get autoremove -y \
    &amp;&amp; apt-get clean \
    &amp;&amp; rm -rf /var/lib/apt/lists/*

RUN useradd --create-home ${WEBAPP_NAME}

# Set the working directory inside the container.
# This is where the web app files will be located.
WORKDIR /${WEBAPP_NAME}

# Copy the built Xojo web app from the build context into the container.
# Remember, this Dockerfile must be placed in the same folder as the Xojo project.
COPY &#91;"Builds - ${WEBAPP_NAME}/Linux 64 bit/${WEBAPP_NAME}", "."]

# Change ownership of the application files to the non-root user
RUN chown -R ${WEBAPP_NAME}:${WEBAPP_NAME} /${WEBAPP_NAME}

# Ensure the main web app executable has permission to run
RUN chmod +x ${WEBAPP_NAME}

# Create a directory for persistent data storage.
# Ensure the data directory is owned by the non-root user.
RUN mkdir -p /home/${WEBAPP_NAME}/data &amp;&amp; chown -R ${WEBAPP_NAME}:${WEBAPP_NAME} /home/${WEBAPP_NAME}/data

# Define the volume for the container to store data.
# The contents of "/home/${WEBAPP_NAME}/data" will persist outside the container.
VOLUME /home/${WEBAPP_NAME}/data

# Switch to the non-root user for security purposes.
# All subsequent instructions (including CMD) will run as this user.
USER ${WEBAPP_NAME}

# Expose port 80 inside the container.
# This allows the web app to listen on port 80, which will be mapped to port 7000
# on the host machine when the container is run.
EXPOSE 80

# Start the Xojo web app when the container runs.
# The app will listen on port 80 inside the container.
CMD &#91;"sh", "-c", "./${WEBAPP_NAME} --port=80"]</code></pre>



<p>I also recommend reading this article for additional details on Xojo and Docker: <a href="https://blog.xojo.com/2021/05/17/running-xojo-web-applications-in-docker/" target="_blank" rel="noreferrer noopener">https://blog.xojo.com/2021/05/17/running-xojo-web-applications-in-docker/</a></p>



<p><em>Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>MemoryBlocks For Speed: A Case Study</title>
		<link>https://blog.xojo.com/2025/02/26/memoryblocks-for-speed-a-case-study/</link>
		
		<dc:creator><![CDATA[Kem Tekinay]]></dc:creator>
		<pubDate>Wed, 26 Feb 2025 17:00:00 +0000</pubDate>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[MemoryBlocks]]></category>
		<category><![CDATA[One Billion Row Challenge]]></category>
		<category><![CDATA[Preemptive Threads]]></category>
		<category><![CDATA[Software Development]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14534</guid>

					<description><![CDATA[A few years ago I held a session about MemoryBlocks at the Xojo Developer Conference where I discussed how, generally, MemoryBlocks (and Ptrs) should be&#8230;]]></description>
										<content:encoded><![CDATA[
<p>A few years ago I held a <a href="https://www.youtube.com/watch?v=3_uZ62mHCkw" target="_blank" rel="noreferrer noopener">session</a> about <code><a href="https://documentation.xojo.com/api/language/memoryblock.html#memoryblock" target="_blank" rel="noreferrer noopener">MemoryBlocks</a></code> at the Xojo Developer Conference where I discussed how, generally, <code>MemoryBlocks</code> (and <code>Ptrs</code>) should be avoided except for cases where you must use them, e.g., <code>Declare</code>, or when speed is absolutely critical. I offered this advice because a <code>MemoryBlock</code> can be tedious to work with, and can lead to hard-to-trace bugs.</p>



<p>But when you do need that extra boost, it&#8217;s an option to consider, and I recently came across a scenario where it made a huge difference.</p>



<h2 class="wp-block-heading">The (One Billion Row) Challenge</h2>



<p>This came about from <a href="https://forum.xojo.com/t/xojo1brc-xojo-one-billion-row-challenge/82844" target="_blank" rel="noreferrer noopener">a discussion of the &#8220;One Billion Row Challenge&#8221;</a> on the Xojo Forum, where a programmer is tasked with reading a billion rows of temperature data and consolidating it into statistics for each given city. Our friend <a href="https://forum.xojo.com/u/mike_d/summary" target="_blank" rel="noreferrer noopener">Mike D</a> started a project to demonstrate different techniques, and I eventually started <a href="https://github.com/ktekinay/Xojo-BRC" target="_blank" rel="noreferrer noopener">my own project</a>. Using <code>MemoryBlock</code>, <code>Ptr</code>, and preemptive threading, I was able to process a billion rows in roughly 8 seconds.</p>



<p>But that&#8217;s not the point of this post.</p>



<p>See, in order to process the data, you must first create it, which isn&#8217;t as straightforward as it seems.</p>



<h2 class="wp-block-heading">Creating The Data</h2>



<p>Each row of the data file takes the form &#8220;City;temp&#8221;, where &#8220;temp&#8221; is single-place decimal between -99.9 and 99.9. For purpose of limits, I used, arbitrarily, 413 random cities out of a list of all cities. The original code looked something like this where &#8220;bs&#8221; represents a <code>BinaryStream</code>:</p>



<pre class="wp-block-code"><code>Var r As New Random

For i As Integer = 1 To rowCount
  Var city As String = cities(r.InRange(0, cities.LastIndex))
  Var temp As Double = r.InRange(-999, 999) / 10.0

  bs.Write city + ";" + temp.ToString("#0.0") + EndOfLine
Next</code></pre>



<p>This was simple, easy, and slow. To generate the full billion rows took about 2.5 hours.</p>



<h2 class="wp-block-heading">Memory-Unblocking</h2>



<p>Upon investigation, I rediscovered what I already knew. Dealing with strings, both in conversion and concatenation, can be a bottleneck. I won&#8217;t go through all the iterations here, but nothing I tried made a significant difference. The only solution was to ditch strings entirely.</p>



<p>I started with creating a <code>MemoryBlock</code> &#8220;buffer&#8221; (&#8220;outMB&#8221;) of 1 MB with an associated <code>Ptr</code> (&#8220;outPtr&#8221;). (You can access the contents of a <code>MemoryBlock</code> through its methods, but those are function calls, which have an overhead. <code>Ptr</code> methods are operators that work with the bytes directly so they are faster.) The plan was to fill the buffer as much as I could, write it to the file, then start again at the top of the buffer.</p>



<p>Keeping a position index, I started with writing the city using <code>outMB.StringValue</code> since there is no equivalent <code>Ptr</code> method for this. Next, I plugged in the value of a semicolon with <code>outPtr.Byte(outMBIndex) = 59</code>.</p>



<p>Working with integers is faster than doubles, so I used a little math to plug in the temperature values directly using <code>If</code> statements and <code>outPtr.Byte</code>.</p>



<p>Finally, I used <code>outPtr.Byte(outMBIndex) = 10</code> to plug in the linefeed (ASCII 10).</p>



<p>The final code looked something like this:</p>



<pre class="wp-block-code"><code>Const kEOL As Integer = 10
Const kHyphen As Integer = 45
Const kDot As Integer = 46
Const kZero As Integer = 48
Const kSemicolon As Integer = 59

Var r As New Random

Var outMB As New MemoryBlock(1000000)
Var outPtr As Ptr = outMB

Var outMBIndex As Integer = 0

For row As Integer = 1 To rows
  Var cityIndex As Integer = r.InRange(0, cities.LastIndex)
  Var city As string = cities(cityIndex)
  Var cityBytes As Integer = city.Bytes

  If (outMBIndex + cityBytes + 10) &gt;= outMB.Size Then
    bs.Write outMB.StringValue(0, outMBIndex)
    outMBIndex = 0
  End If

  outMB.StringValue(outMBIndex, cityBytes) = city
  outMBIndex = outMBIndex + cityBytes

  outPtr.Byte(outMBIndex) = kSemicolon
  outMBIndex = outMBIndex + 1

  If r.InRange(0, 4) = 0 Then
    outPtr.Byte(outMBIndex) = kHyphen
    outMBIndex = outMBIndex + 1
  End If

  Var temp As Integer = r.InRange(0, 999)
  Var t1 As Integer = temp \ 100
  Var t2 As Integer = (temp \ 10) Mod 10
  Var t3 As Integer = temp Mod 10

  If t1 &lt;&gt; 0 Then
    outPtr.Byte(outMBIndex) = t1 + kZero
    outMBIndex = outMBIndex + 1
  End If

  outPtr.Byte(outMBIndex) = t2 + kZero
  outMBIndex = outMBIndex + 1

  outPtr.Byte(outMBIndex) = kDot
  outMBIndex = outMBIndex + 1

  outPtr.Byte(outMBIndex) = t3 + kZero
  outMBIndex = outMBIndex + 1

  outPtr.Byte(outMBIndex) = kEOL
  outMBIndex = outMBIndex + 1
next

If outMBIndex &lt;&gt; 0 Then
  bs.Write outMB.StringValue(0, outMBIndex)
End If</code></pre>



<p>This code is far longer, harder to follow, and difficult to maintain, which goes back to my original point of why <code>MemoryBlock</code> should be avoided.</p>



<p>It also generates one billion rows of data in about a minute (as opposed to 2.5 hours).</p>



<p>It&#8217;s nice to have the option.</p>



<p><em>Kem Tekinay is a Mac consultant and programmer who has been using Xojo since its first release to create custom solutions for clients. He is the author of the popular utilities <a href="http://www.mactechnologies.com/index.php?page=downloads#tftpclient" target="_blank" rel="noreferrer noopener">TFTP Client</a> and <a href="http://www.mactechnologies.com/index.php?page=downloads#regexrx" target="_blank" rel="noreferrer noopener">RegExRX</a> (both written with Xojo) and lives in Connecticut with his wife Lisa, and their cat.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Xojo for 4D Developers</title>
		<link>https://blog.xojo.com/2024/12/10/xojo-for-4d-developers/</link>
		
		<dc:creator><![CDATA[Geoff Perlman]]></dc:creator>
		<pubDate>Tue, 10 Dec 2024 23:35:07 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[4D]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14178</guid>

					<description><![CDATA[If you are a longtime 4D developer you may recognize my name because I worked for 4D, Inc. (then ACIUS, Inc.) back in the early&#8230;]]></description>
										<content:encoded><![CDATA[
<p>If you are a longtime 4D developer you may recognize my name because I worked for 4D, Inc. (then ACIUS, Inc.) back in the early 1990s, as well as authored a book about 4D. But my experience with 4D goes back even further to 1987 when I began using 4D to build database applications for consulting clients. Over time I found the need to build more general purpose applications. This ultimately resulted in my founding the company that has become Xojo, Inc. and developing and publishing what is now Xojo for the last 28 years. Now, with my credentials out of the way, let’s talk about what Xojo can offer 4D developers.</p>



<p>Like 4D, Xojo has a drag and drop user interface builder, a Code Editor, a Debugger and a Compiler as well as a cross-platform framework. While 4D now has an object-oriented language as an option, Xojo has always been object-oriented. The language is a dot syntax not unlike Javascript. You do not have to become an experienced object-oriented programmer to use Xojo. One of its strengths is that you can learn incrementally.</p>



<p>Xojo supports database application development but there are differences between how it and 4D handles that. 4D has its own database engine and query syntax. Xojo supports SQLite, PostgreSQL, MySQL and ODBC for accessing databases. Unsurprisingly it uses SQL as its query syntax. Because 4D is solely designed for database application development, it ties the user interface you create to tables in the database. Xojo does not. 4D&#8217;s model prevents you from having to write code to get data from database records in and out of your user interface. While by default Xojo does not provide this, it provides an add-on called <a href="https://documentation.xojo.com/topics/databases/dbkit.html" target="_blank" rel="noreferrer noopener">DBKit</a> which assists you in connecting to and interacting with databases.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="660" src="https://blog.xojo.com/wp-content/uploads/2024/12/dbkit_window-1024x660.png" alt="" class="wp-image-14180" srcset="https://blog.xojo.com/wp-content/uploads/2024/12/dbkit_window-1024x660.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/12/dbkit_window-300x193.png 300w, https://blog.xojo.com/wp-content/uploads/2024/12/dbkit_window-768x495.png 768w, https://blog.xojo.com/wp-content/uploads/2024/12/dbkit_window-1536x990.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/12/dbkit_window-2048x1320.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Xojo supports desktop development for Linux, macOS, Windows and Raspberry Pi (Linux on ARM). It supports web development as well and mobile development for iOS and Android. You can also build console apps which can be handy when you need an app with no user interface to run on a server. Xojo uses native controls and compiles to native machine code for x86 and ARM. Whether you come to Xojo to build desktop, web or mobile apps, you&#8217;ll find that 95% of what you learn and the code you write will be applicable to all targets. With the exception of iOS (which because of Apple&#8217;s requirements must be built from a Mac) you can build your apps from any platform to any platform. Xojo also includes a Remote Debugger which allows you to build from one operating system and run on another. For example, you might do your development on macOS but want to debug on Windows to track down a Windows-specific issue. With the Remote Debugger, this is quite easy.</p>



<p>Xojo is free to use for development. You only purchase a license when you need to deploy. This is a developer license, not a deployment license. That means that you can deploy as many applications as you like to as many users as you like, without any additional cost. Each developer purchases their own license. A Xojo license comes with 12 months of updates. The new Xojo releases available during your license period continue to be available to you even after your license expires. Renewing your license gets you another 12 months of updates. If you only need to deploy cross-platform desktop applications, the Xojo Desktop license is $399USD. Yearly updates are also $399USD. If you wish to build for any platform we support, the Pro license is $799USD. Yearly updates are also $799USD. <a href="https://xojo.com/store/#prettyPhoto/0/" target="_blank" rel="noreferrer noopener">Compare licenses</a> and find more pricing details at <a href="https://xojo.com/store/" target="_blank" rel="noreferrer noopener">our webstore</a>.</p>



<p>If you&#8217;d like to give Xojo a spin, I recommend starting with the <a href="https://documentation.xojo.com/getting_started/quickstarts/desktop_quickstart.html" target="_blank" rel="noreferrer noopener">QuickStart</a> and then the <a href="https://documentation.xojo.com/getting_started/tutorials/desktop_tutorial.html" target="_blank" rel="noreferrer noopener">full tutorial</a>. After that, check out <a href="https://documentation.xojo.com/topics/databases/dbkit.html" target="_blank" rel="noreferrer noopener">DBKit</a>, the <a href="https://www.youtube.com/watch?v=3Jjf1Xrnm2w&amp;t=401s" target="_blank" rel="noreferrer noopener">video</a> and its <a href="https://documentation.xojo.com/getting_started/tutorials/dbkit_desktop_tutorial.html" target="_blank" rel="noreferrer noopener">tutorial</a> which will make it easier to build database-oriented applications. These are the desktop tutorials but there are also <a href="https://documentation.xojo.com/getting_started/tutorials/index.html" target="_blank" rel="noreferrer noopener">tutorials for mobile and web application development</a>. Because Xojo is a general, cross-platform development tool rather than one specifically for database applications, what you build with it is truly limited only by your imagination. If you have any further questions, please <a href="https://xojo.com/company/contact.php" target="_blank" rel="noreferrer noopener">reach out to us</a>. Our <a href="https://forum.xojo.com" target="_blank" rel="noreferrer noopener">user forum</a> is also filled with experienced and enthusiastic Xojo users that answer and have answered hundreds of questions. And the <a href="https://blog.xojo.com/tag/database/" target="_blank" rel="noreferrer noopener">Xojo Blog</a> has many posts on database development with Xojo.</p>



<p><em>Geoff Perlman is the Founder and CEO of Xojo. When he’s not leading the Xojo team he can be found playing drums in Austin, Texas and spending time with his family.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>A Programming Pioneer has Died</title>
		<link>https://blog.xojo.com/2024/11/18/a-programming-pioneer-has-died/</link>
		
		<dc:creator><![CDATA[Geoff Perlman]]></dc:creator>
		<pubDate>Mon, 18 Nov 2024 19:59:46 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[BASIC]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14021</guid>

					<description><![CDATA[On November 12th Thomas Kurtz, the co-inventor (along with John Kemeny who passed in 1992) of the BASIC programming language died at the age of&#8230;]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="983" height="538" src="https://blog.xojo.com/wp-content/uploads/2024/11/image-6.png" alt="" class="wp-image-14023" srcset="https://blog.xojo.com/wp-content/uploads/2024/11/image-6.png 983w, https://blog.xojo.com/wp-content/uploads/2024/11/image-6-300x164.png 300w, https://blog.xojo.com/wp-content/uploads/2024/11/image-6-768x420.png 768w" sizes="auto, (max-width: 983px) 100vw, 983px" /></figure>



<p>On November 12th <a href="https://en.wikipedia.org/wiki/Thomas_E._Kurtz">Thomas Kurtz</a>, the co-inventor (along with John Kemeny who passed in 1992) of the <a href="https://en.wikipedia.org/wiki/BASIC">BASIC</a> programming language died at the age of 96. It would be difficult to overstate the impact he had on computing. BASIC made it possible for so many people (myself included) to begin their journey into programming.</p>



<p>In the late 1970s I became interested in learning to code. My father, who was an electrical engineer and coded in Fortran at work, brought home a book that taught the basics of programming. Written and published by Apple, it appeared to only cover 6502 Assembler, the chip that was in the Apple II. Just a few pages in my eyes began to glaze over and I started to wonder if programming was really for me. Fortunately, I flipped the book over to find it was actually two books in one. From the other side it was a book about AppleSoft BASIC. As I looked at the language, it made immediate sense to me. Assembler was too low level and not a great first language but BASIC was ideal for this purpose. I learned enough to get going and my life was forever changed.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="650" height="234" src="https://blog.xojo.com/wp-content/uploads/2024/11/image-7.png" alt="" class="wp-image-14024" srcset="https://blog.xojo.com/wp-content/uploads/2024/11/image-7.png 650w, https://blog.xojo.com/wp-content/uploads/2024/11/image-7-300x108.png 300w" sizes="auto, (max-width: 650px) 100vw, 650px" /></figure>



<p>Programming has evolved a lot since then but we still design Xojo with the same principle that Thomas and John espoused with their original version of BASIC: that programming should be accessible to anyone with an interest. We have many users whose first experience with programming was with Xojo just as mine was with BASIC. In our own way, Xojo is continuing what Thomas and John began. Today more people have the ability to learn programming than ever before. Thomas and John both were true pioneers that contributed significantly to making that happen.</p>



<p><em>Geoff Perlman is the Founder and CEO of Xojo. When he’s not leading the Xojo team he can be found playing drums in Austin, Texas and spending time with his family.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Preemptive Threads Are Here, and They Are… Pretty Good</title>
		<link>https://blog.xojo.com/2024/10/01/preemptive-threads-are-here-and-they-are-pretty-good/</link>
		
		<dc:creator><![CDATA[Kem Tekinay]]></dc:creator>
		<pubDate>Tue, 01 Oct 2024 15:39:29 +0000</pubDate>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[2024r3]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Preemptive Threads]]></category>
		<category><![CDATA[Threading]]></category>
		<category><![CDATA[Threads]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13693</guid>

					<description><![CDATA[At long last, Xojo has introduced what might be the most-requested feature of all time: preemptive threads. But what are they, when and how do&#8230;]]></description>
										<content:encoded><![CDATA[
<p>At long last, Xojo has introduced what might be the most-requested feature of all time: preemptive threads. But what are they, when and how do you use them, and what are their limitations? Let&#8217;s get into it…</p>



<h2 class="wp-block-heading">In The Beginning</h2>



<p>Threads have been a part of of the Xojo language for a long time, and by now experienced users know the basics: subclass a <code>Thread</code>, fill in the <code>Run</code> event, then call <code>Start</code>. The code in <code>Run</code> will execute independently from the rest of your code leaving your app responsive while it does work in the background.</p>



<p>Mostly.</p>



<p>See, until now, a <code>Thread</code> was only &#8220;cooperative&#8221;, meaning it ran alongside your main code with the framework deciding when to switch between them and how long each should execute. While the main code was running, the <code>Thread</code> code was paused, and while the <code>Thread</code> was running, the main code was paused.</p>



<p>Think of it like standing before two devices that perform different functions when cranked, but only having one crank available. You run the first machine for a bit, then the other, then back to the first, until they are done. And you do it really, really fast.</p>



<p>This worked pretty well when your goal was, say, to keep your user interface responsive. You could spin long-running code into a <code>Thread</code>, then present the results once it finished.</p>



<p>But it was inadequate if your objective was to speed up some intense process, or the code in your <code>Thread</code> did not present logical places to yield time back to your main code. In the former scenario, you were better off not using a <code>Thread</code>, or perhaps using <code>Worker</code> (a severely limited earlier attempt at allowing simultaneous processing), while in the latter you would have to manually yield back processing time, leading to even slower operation.</p>



<h2 class="wp-block-heading">In The Now</h2>



<p>Cooperative threads are fine for many tasks, but when you need something that truly runs independently within your app, a &#8220;preemptive&#8221; thread is required.</p>



<p>A preemptive thread spins off onto another core in your machine, which probably has at least four, and runs there entirely isolated from other threads. It&#8217;s like launching a separate, mini-app that you can share information with.</p>



<p>The limitations that apply to cooperative threads drop away. Since it runs on a different core, it cannot slow down or interfere with your main code, and will run as fast as its core will allow.</p>



<h2 class="wp-block-heading">Challenging Times</h2>



<p>This sounds almost too good to be true, but it&#8217;s not without its challenges. While cooperative threads were rather easy to work with, preemptive threads require an extra layer of thought and awareness for Xojo users.</p>



<p>When a cooperative thread&#8217;s code is running, you know nothing else is, so you don&#8217;t have to worry about, say, updating a <code>Dictionary</code> or removing an element from an array. But with preemptive threads, code runs simultaneously with other code so you cannot just update that <code>Dictionary</code> if there is a chance that the main code, or another preemptive thread, might be doing it too.</p>



<p>Consider this example.</p>



<pre class="wp-block-code"><code>// In our thread
If MyArray.Count = 0 And FinishUp Then
  Exit
Else
  Process MyArray.Pop
End If

//////////////////////////////

// In the main code
FinishUp = True
MyArray.Add 1</code></pre>



<p>You might think the thread is going to process the last element and then exit its loop because <code>FinishUp</code> was set to <code>True</code>, but with preemptive threads we have to be aware of <a href="https://en.wikipedia.org/wiki/Race_condition">race conditions</a> where the order of actions is unpredictable. Here, the main code could set <code>FinishUp</code> to <code>True</code>, and the thread could see that <code>MyArray</code> was empty and exit before the main code could add the last element. Conditions can change at literally any instant, even in the middle of a single line of code.</p>



<p>Fortunately, there are ways to protect against this and you must use them to ensure orderly operation and avoid surprises.</p>



<h2 class="wp-block-heading">Know Your Type</h2>



<p>The first step is creating a preemptive thread, and Xojo&#8217;s implementation is pretty straightforward. Rather than introducing a unique class, you can continue to work with the existing <code>Thread</code> by setting its new <code>Type</code> property to <code>Thread.Types.Preemptive</code>. The <code>Type</code> can be set when instantiating the <code>Thread</code> or from within its running code. You can even switch types at will, although once running, the <code>Type</code> can only be changed from within the <code>Thread</code>.</p>



<p>Example:</p>



<pre class="wp-block-code"><code>// A subclass of Thread called PThread

MyThread = New PThread
PThread.Type = Thread.Types.Preemptive
PThread.Start</code></pre>



<p>Or within the <code>Run</code> event, you could do this:</p>



<pre class="wp-block-code xojo"><code>Me.Type = Thread.Types.Preemptive</code></pre>



<p>You can also set <code>Type</code> through the Inspector after dragging a <code>Thread</code> to a window.</p>



<h2 class="wp-block-heading">Protect Yourself</h2>



<p>Now that you have a preemptive thread ready to go, you have to think about how to protect common resources. Xojo has done a good job of making a lot of the framework safe, but that just means your app shouldn&#8217;t crash if, say, the <code>Thread</code> tries to manipulate a variable at the same time as other code. It&#8217;s up to you to make sure one area of your app doesn&#8217;t clobber the changes made by another.</p>



<p>Consider this code that maintains a <code>Dictionary</code> of Integer arrays.</p>



<pre class="wp-block-code"><code>// Thread code
Var arr() As Integer

If MyDictionary.HasKey(x) Then
  arr = MyDictionary.Value(x)
Else
  MyDictionary.Value(x) = arr
End If

arr.Add 1

//////////////////////////////

// Main code
If Not MyDictionary.HasKey(x) Then
  Var arr() As Integer
  MyDictionary.Value(x) = arr
End If</code></pre>



<p>Run this long enough and you&#8217;re going to wonder why some data got lost. Why? Because both the <code>Thread</code> and main code might be checking for the key at the exact same instant and filling it in when it&#8217;s not found. If the <code>Thread</code> does it first, the main code will almost instantly replace it with an empty array.</p>



<p>Instead, you should use a <code>Semaphore</code> or <code>CriticalSection</code> to make sure code is protected.</p>



<p>You&#8217;d first instantiate one of these in a common property like a <code>Window</code> or <code>Module</code>. (I&#8217;m using <code>Semaphore</code> here, but it works the same for <code>CriticalSection</code>.)</p>



<pre class="wp-block-code Xojo"><code>MySemaphore = New Semaphore
MySemaphore.Type = Thread.Types.Preemptive</code></pre>



<p>Notice the new <code>Type</code> property? It must match the one in <code>Thread</code> and can be used between the main code and a <code>Thread</code> or between same-typed threads. (This is one of the limitations of Xojo&#8217;s implementation: you cannot share a <code>Semaphore</code> or <code>CriticalSection</code> between preemptive and cooperative threads.)</p>



<p>The example can be updated like this:</p>



<pre class="wp-block-code"><code>// Thread code
Var arr() As Integer

MySemaphore.Signal

If MyDictionary.HasKey(x) Then
  arr = MyDictionary.Value(x)
Else
  MyDictionary.Value(x) = arr
End If

MySemaphore.Release

arr.Add 1

//////////////////////////////

// Main code
MySemaphore.Signal

If Not MyDictionary.HasKey(x) Then
  Var arr() As Integer
  MyDictionary.Value(x) = arr
End If

MySemaphore.Release</code></pre>



<p>This will force either the main code or <code>Thread</code> to wait for the other to complete before continuing, ensuring proper order and avoiding the race condition.</p>



<h2 class="wp-block-heading">Limitations</h2>



<p>Using preemptive threads comes with certain restrictions. The biggest one is the aforementioned inability to share a <code>Semaphore</code> or <code>CriticalSection</code> with a cooperative thread. The other is the same as in a cooperative thread: you cannot update a user interface component directly instead relying on the <code>UserInterfaceUpdate</code> mechanism (more on that below).</p>



<p>If you are setting up multiple threads to work on different parts of some object, that may crash hard depending on the type of object. For example, writing to the same file or different parts of a <code>MemoryBlock</code> is fine, but updating a <code>Picture</code> may not be. In those cases, you will have to get creative.</p>



<h2 class="wp-block-heading">What&#8217;s It Good For?</h2>



<p>Choosing preemptive threads over cooperative means that you either have some code that needs to truly run in the background that would otherwise interfere with you user interface, or you have some large task that can be logically processed in parts.</p>



<h3 class="wp-block-heading">Window Service</h3>



<p>In the former case, the easiest technique might be to drag a <code>Thread</code> to your window, set its <code>Type</code>, and implement the <code>Run</code> event. It can be started from within the window either through a manual process like a pressing a button, or automatically when the window opens.</p>



<p>Just like with a cooperative thread, you can send data back to your window using the <code>AddUserInterfaceUpdate</code> method and implementing the <code>UserInterfaceUpdate</code> event.</p>



<h3 class="wp-block-heading">Splitting It Up</h3>



<p>If your task involves something that can be split up into logical chunks, I encourage you to look at my <code>ThreadPool</code> module, accessible through the Xojo Examples or <a href="https://github.com/ktekinay/Xojo-ThreadPool/tree/develop">my GitHub page</a>. (The latter has a README with more details.)</p>



<p>The ideal usage for <code>ThreadPool</code> is when you have some data that can be processed in sections. For example, suppose you wanted to count the vowels in a large file. You could subclass <code>ThreadPool</code> and implement its <code>Process</code> event to count one block. You would then send the file into your subclass in chunks of, say, 256k each and gather the results.</p>



<p>The benefit of <code>ThreadPool</code>, among other things, is that it will handle the coordination for you so the dangers of using preemptive threads are minimized. You still have to consider how to send your results back to your main code safely, perhaps using <code>Semaphore</code>/<code>CriticalSection</code> or the <code>AddUserInterfaceUpdate</code> method, but each block can be considered independently of the others.</p>



<p>(A big thanks to MVP Anthony Cyphers for writing the example included with Xojo.)</p>



<h2 class="wp-block-heading">Juggling Chainsaws</h2>



<p>The power of preemptive threads is clear, but the potential pitfalls can be serious. Unless you&#8217;re very careful, you can easily create bugs that may not be readily apparent, and may take hours or even days to track down. (I say this from unfortunate experience.) Unless you have a compelling reason to take on that challenge, don&#8217;t bother.</p>



<p>What I&#8217;m trying to say is, if a cooperate thread does the job adequately, there is no need to introduce the headache that preemptive threads can bring.</p>



<p>But if you do have a legitimate need, like a long-running process that needs to run quickly without blocking your UI, go for it, just be careful.</p>



<p>In any case, it&#8217;s great that we finally have that option.</p>



<p><em>Kem Tekinay is a Mac consultant and programmer who has been using Xojo since its first release to create custom solutions for clients. He is the author of the popular utilities <a href="http://www.mactechnologies.com/index.php?page=downloads#tftpclient" target="_blank" rel="noreferrer noopener">TFTP Client</a> and <a href="http://www.mactechnologies.com/index.php?page=downloads#regexrx" target="_blank" rel="noreferrer noopener">RegExRX</a> (both written with Xojo) and lives in Connecticut with his wife Lisa, and their cat.</em></p>



<p>Need More Information? Read more about <a href="https://documentation.xojo.com/api/language/thread.html#thread-type" target="_blank" rel="noreferrer noopener">preemptive threads</a> in the Xojo Documentation and <a href="https://blog.xojo.com/2024/10/01/cooperative-to-preemptive-weaving-new-threads-into-your-apps/" target="_blank" rel="noreferrer noopener">Blog</a>. Or read about <a href="https://blog.xojo.com/2024/09/05/using-semaphores-to-manage-resources/" target="_blank" rel="noreferrer noopener">Semaphore</a> and <a href="https://blog.xojo.com/2024/09/18/using-criticalsection-to-manage-resources/" target="_blank" rel="noreferrer noopener">CriticalSection</a>, also on the Xojo Blog.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>5 Monetization Strategies for App Developers</title>
		<link>https://blog.xojo.com/2024/09/10/5-monetization-strategies-for-app-developers/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Tue, 10 Sep 2024 16:05:04 +0000</pubDate>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Dev Marketing]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[App Marketing]]></category>
		<category><![CDATA[Developer Marketing]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13579</guid>

					<description><![CDATA[Desktop application monetization is essential for developers to generate revenue and sustain their businesses. Selecting the right approach from numerous available strategies can significantly impact&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Desktop application monetization is essential for developers to generate revenue and sustain their businesses. Selecting the right approach from numerous available strategies can significantly impact an application&#8217;s success. This article explores top monetization strategies for desktop applications, including one-time purchases, subscription models, freemium models, in-app purchases, and advertising. Understanding the pros and cons of each strategy will help developers make informed decisions to maximize revenue and grow their businesses.</p>



<h3 class="wp-block-heading"><strong>1. One-Time Purchase</strong></h3>



<p>Implement a one-time purchase model where users pay a single fee to download and use your desktop application. This approach provides instant revenue and offers several advantages:</p>



<ul class="wp-block-list">
<li>Simple, straightforward pricing</li>



<li>Immediate revenue generation</li>



<li>No ongoing costs or commitments for users</li>
</ul>



<p>However, this model has potential drawbacks:</p>



<ul class="wp-block-list">
<li>Limited ongoing revenue, as users only pay once</li>



<li>Requires continuous updates and improvements to maintain user satisfaction</li>



<li>Relies heavily on new customer acquisition for sustained growth</li>
</ul>



<p>Example: A one-time purchase model is ideal for specialized tools or applications with a specific, well-defined purpose. For example, a desktop application that converts file formats or performs complex calculations for a niche industry would be well-suited for this model. Users typically expect such tools to work reliably without the need for frequent updates or ongoing subscription costs.</p>



<h3 class="wp-block-heading"><strong>2. Subscription Model</strong></h3>



<p>Implement a subscription model where users pay a recurring fee to access and use your desktop application. This approach generates ongoing revenue and encourages customer retention.</p>



<p>Benefits:</p>



<ul class="wp-block-list">
<li>Predictable, recurring revenue streams</li>



<li>Increased customer retention and loyalty</li>



<li>Ability to continually update and improve the application</li>
</ul>



<p>Potential drawbacks:</p>



<ul class="wp-block-list">
<li>Users may be deterred by ongoing costs, especially for one-time tasks</li>



<li>Requires ongoing development and support, which can be resource-intensive</li>
</ul>



<p>Example: Successful subscription-based desktop applications offer regular updates, new features, and premium support to justify the recurring fees. Productivity software suites and antivirus programs commonly use subscription models to provide ongoing value to customers.</p>



<h3 class="wp-block-heading"><strong>3. Freemium Model</strong></h3>



<p>Implement a freemium model where a basic version of your desktop application is offered for free, with the possibility to upgrade to a premium version with added features or support. This approach attracts users with a free version and encourages upgrades to a paid version.</p>



<p>Benefits:</p>



<ul class="wp-block-list">
<li>Attracts a large user base with the free version</li>



<li>Provides opportunities to upsell premium features or support</li>



<li>Allows users to try before buying, reducing purchase risk</li>
</ul>



<p>Successful implementation:</p>



<ul class="wp-block-list">
<li>Clearly define features and limitations of the free version</li>



<li>Offer significant value in the premium version to encourage upgrades</li>



<li>Make the upgrade process easy and seamless for users</li>
</ul>



<p>Example: A photo editing software might offer a free version with basic editing tools, and a premium version with advanced features like HDR support or batch editing.</p>



<h3 class="wp-block-heading"><strong>4. In-App Purchases</strong></h3>



<p>Implement in-app purchases to allow users to buy additional features, content, or services within your desktop application. This approach enhances the user experience and increases revenue.</p>



<p>Types of in-app purchases:</p>



<ul class="wp-block-list">
<li>More features or functionality</li>



<li>Premium content (exclusive data or expert advice)</li>



<li>Virtual goods or currency</li>



<li>Ad-free experience or premium support</li>
</ul>



<p>Successful implementation:</p>



<ul class="wp-block-list">
<li>Clearly communicate the value of in-app purchases to users</li>



<li>Make the purchasing process easy and seamless</li>



<li>Ensure in-app purchases are relevant and useful</li>



<li>Avoid aggressive or deceptive monetization tactics</li>
</ul>



<p>Examples: Productivity applications can use in-app purchases to offer advanced features. For instance, a project management tool might provide basic task tracking for free, but offer in-app purchases for advanced reporting, time tracking, or integration with other popular business tools. This allows users to customize their experience based on their specific needs and budget.</p>



<p>Games often use in-app purchases to enhance player engagement and monetization. A strategy game might offer a base game for free, but include in-app purchases for special units, resource packs, or cosmetic items. This model allows players to enjoy the game without spending money, while providing options for those who want to progress faster or customize their experience.</p>



<h3 class="wp-block-heading"><strong>5. Advertising</strong></h3>



<p>Integrate advertising into your desktop application to generate revenue. This approach can be effective but requires careful consideration to keep a positive user experience.</p>



<p>Types of advertising:</p>



<ul class="wp-block-list">
<li>Display ads (banner ads or pop-up ads)</li>



<li>Sponsored content (sponsored articles or product placements)</li>



<li>Affiliate marketing (promote other partner products or services)</li>
</ul>



<p>Successful implementation:</p>



<ul class="wp-block-list">
<li>Choose relevant and non-intrusive ad formats</li>



<li>Clearly mark ads to avoid confusing users</li>



<li>Use targeting options to deliver relevant ads based on users&#8217; interests</li>



<li>Monitor user feedback and adjust ad strategy accordingly</li>
</ul>



<p>Balance revenue generation with user experience when integrating advertising. Overly aggressive or intrusive advertising can drive users away, while insufficient advertising may not generate adequate revenue. Carefully check user engagement and satisfaction to find the right balance for your application.</p>



<h2 class="wp-block-heading"><strong>Conclusion</strong></h2>



<p>Monetizing a desktop application requires careful consideration of target audience, application type, and revenue goals. Understanding different monetization strategies allows developers to choose the best approach and maximize revenue.</p>



<p>Each strategy, discussed in this article, offers unique advantages and disadvantages. The right choice depends on the specific application and target audience.</p>



<p>To succeed in monetizing a desktop application:</p>



<ul class="wp-block-list">
<li>Understand target audience needs</li>



<li>Choose a monetization strategy aligned with application type and revenue goals</li>



<li>Continuously check and adjust strategy to improve revenue and user experience</li>
</ul>



<p>By following these guidelines and selecting the right monetization strategy, developers can create successful, profitable desktop applications that meet user needs.</p>



<p><em>Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>House of the Snapdragon: Windows ARM is Coming</title>
		<link>https://blog.xojo.com/2024/08/13/house-of-the-snapdragon-windows-arm-is-coming/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 13 Aug 2024 19:03:20 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Windows ARM]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13456</guid>

					<description><![CDATA[We&#8217;ve gotten a requests over the last few months asking about Xojo&#8217;s support for Windows on ARM and it seems like some people are not&#8230;]]></description>
										<content:encoded><![CDATA[
<p>We&#8217;ve gotten a requests over the last few months asking about Xojo&#8217;s support for Windows on ARM and it seems like some people are not aware that Xojo already can build apps for Windows ARM. In fact, we added support for building Windows ARM apps two years ago in Xojo 2022 Release 2!</p>



<p>Some of you might not have noticed because, until recently, most people didn&#8217;t think much about Windows ARM. After all, nearly everyone still runs Windows on x86-64 CPUs. But lately, Windows on ARM is starting to get more traction, both in the press and in the market.</p>



<p>Back in May, Qualcomm announced the Snapdragon Dev Kit for Windows. This is supposed to be a $900 mini PC (about the size of a Mac mini) for developing Windows ARM apps for the Snapdragon X Elite SoC (system on a chip). I say &#8220;supposed to be&#8221; because although the <a href="https://www.qualcomm.com/news/releases/2024/05/qualcomm-accelerates-development-for-copilot--pcs-with-snapdrago">press release</a> says it was intended to go on sale on June 18, I can only find pre-order pages for it, so it seems to not be available just yet or out-of-stock.</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="Introducing the Snapdragon Developer Kit for Windows | Microsoft Build Demo" width="500" height="281" src="https://www.youtube.com/embed/BRCslLlh5BQ?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>There have been other ARM PCs for Windows in the past, but their performance has always been less than desirable. The new Snapdragon X Elite is supposed to be roughly equivalent to Apple M3 SoCs.</p>



<p>You don&#8217;t have to wait for Qualcomm as Copilot+ PCs and laptops with Snapdragon SoCs are starting to appear elsewhere. Lenovo has the <a href="https://www.lenovo.com/us/en/p/laptops/thinkpad/thinkpadt/lenovo-thinkpad-t14s-gen-6-(14-inch-snapdragon)/len101t0099">ThinkPad T14s Gen 6</a>, which at about $1700 is not exactly a bargain, but is in the ballpark of many Mac laptops. The <a href="https://www.lenovo.com/us/en/p/laptops/yoga/yoga-slim-series/yoga-slim-7x-gen-9-14-inch-snapdragon/len101y0049?orgRef=https%253A%252F%252Fwww.google.com%252F&amp;cid=us:sem%7Cse%7Cgoogle%7Csubbrand_pc_yoga%7Cconsumer_premium_notebook_slim7x_snapdragon%7Cyoga%20snapdragon%7Cb%7C1608826469%7C164298886282%7Ckwd-2304613517932%7Csearch%7C%7Cconsumer&amp;gad_source=1&amp;gbraid=0AAAAADnnO-VqiNxfepkoBLp1zD1riF6wH&amp;gclid=Cj0KCQjwtsy1BhD7ARIsAHOi4xbb2IWHPAuyYrrUGnadqCwvwVLAtF4dEmiDKHDXsA8l9KV_I1RBbmAaAsutEALw_wcB">Yoga Slim 7x</a> is even cheaper starting at just $1200.</p>



<p>But I&#8217;m not here to sell Lenovo products. I&#8217;m just pointing out that Windows on ARM is becoming a reality, if slowly. That might be starting to change given Intel&#8217;s recent troubles with its <a href="https://www.tomshardware.com/pc-components/intel-raptor-lake-instability-troubles-everything-you-need-to-know">Raptor Lake CPUs</a> and most <a href="https://www.cnbc.com/2024/08/01/intel-intc-q2-earnings-report-2024.html">recent earnings report</a>, however. Take it with a grain of salt, but Qualcomm is predicting that <a href="https://www.tomshardware.com/pc-components/cpus/qualcomm-ceo-says-arm-taking-50-of-the-windows-pc-market-in-five-years-is-realistic-some-oems-already-expect-snapdragon-chips-to-be-60-of-their-sales-within-three-years">Windows ARM could reach 50% of Windows PC market within five years</a>.</p>



<p>That sounds astonishing, but change often happens slowly then all at once.</p>



<h3 class="wp-block-heading">Building for Windows ARM with Xojo</h3>



<p>The good news is that with Xojo you are already prepared for this. To build your existing Xojo desktop project for Windows ARM, you just need to change one property in the Windows Build Settings and click Build. <a href="https://youtu.be/YHzM4avGrKI?si=2qaVdN5SnXc_puoK&amp;t=2">There is no step 3</a>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="574" height="114" src="https://blog.xojo.com/wp-content/uploads/2024/08/image-3.png" alt="" class="wp-image-13457" srcset="https://blog.xojo.com/wp-content/uploads/2024/08/image-3.png 574w, https://blog.xojo.com/wp-content/uploads/2024/08/image-3-300x60.png 300w" sizes="auto, (max-width: 574px) 100vw, 574px" /></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Xojo can also build Windows apps for x86-64 and x86-32, which pretty much covers all your bases. Not to mention that it can build macOS apps, Linux apps, web apps, iOS apps and Android apps.</p>
</blockquote>



<p>And if you already have an Apple Silicon Mac then you don&#8217;t even need to purchase a Windows ARM computer. You can run <a href="https://support.microsoft.com/en-us/windows/options-for-using-windows-11-with-mac-computers-with-apple-m1-m2-and-m3-chips-cd15fd62-9b34-4b78-b0bc-121baa3c568c">Windows ARM as a virtual machine on a Mac</a> using Parallels or VMware Fusion. You&#8217;ll still need to get your own license for Windows 11, however.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Although you can make your own Windows ARM apps with Xojo today, there are a couple temporary limitations to keep in mind. The first one is that XojoScript is not yet available. The other is that Xojo itself is not yet a native Windows ARM app. Both of these are because the Xojo compiler itself is not yet native on Windows ARM. That will change, but for now Xojo itself runs perfectly fine using the <a href="https://learn.microsoft.com/en-us/windows/arm/apps-on-arm-x86-emulation">Prism x86-64 emulation layer</a> in Windows. In addition you can use the Remote Debugger to test your apps on Windows ARM from another computer.</p>
</blockquote>



<p>Will Windows ARM replace Intel like it did for Macs? It seems hard to believe, but the wind seems to be blowing in that direction. To make sure you&#8217;re prepared, download Xojo for free today and start creating your own ARM apps!</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How Xojo Simplifies Full-Stack Development for Everyone</title>
		<link>https://blog.xojo.com/2024/08/07/how-xojo-simplifies-full-stack-development-for-everyone/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Wed, 07 Aug 2024 17:30:00 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Full-Stack Development]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13360</guid>

					<description><![CDATA[The demand for skilled full-stack developers continues to grow in 2024. These developers handle both the frontend and backend of applications, ensuring a smooth user&#8230;]]></description>
										<content:encoded><![CDATA[
<p>The demand for skilled full-stack developers continues to grow in 2024. These developers handle both the frontend and backend of applications, ensuring a smooth user experience from start to finish. As businesses strive to deliver robust, efficient and visually appealing applications, developers and their choice of programming tools can impact the speed, scalability and overall performance of a full software solution.</p>



<p>Presented with choosing what development tool is best for your main, full-stack development needs, let’s discuss the benefits of Xojo development platform for your next web project. With its simplicity, flexibility, and powerful features, Xojo will help you create high-quality web applications quickly and efficiently, with the added bonus of covering backend and frontend development in the same IDE—no more language switching—while also lowering your overall costs.</p>



<span id="more-13360"></span>



<h2 class="wp-block-heading">Overview of Full-Stack Development</h2>



<p>Full-stack development covers the entire spectrum of technologies and skills required to create a fully functional web application. This approach involves both the frontend, which users interact with directly, and the backend, which powers the application.</p>



<p>At its core, full-stack development refers to the ability to work on both the client-side and server-side of an application. This means that full-stack developers should be proficient in frontend technologies such as HTML, CSS, JavaScript, as well as backend technologies like Node.js, Python, and frameworks such as React and Django. Full-stack developers possess a broad skill set that includes designing user interfaces, managing databases, and server logic, enabling them to oversee the entire development process.</p>



<p><strong>Usually, a full-stack developer handles:</strong></p>



<ul class="wp-block-list">
<li><strong>Frontend Technologies:</strong> These consist of HTML for structure, CSS for styling, and JavaScript for interactivity, crucial for crafting engaging user interfaces. Frameworks such as React, Angular, and Vue.js are also typical choices for building dynamic web applications.</li>



<li><strong>Backend Technologies</strong>: This segment covers server-side programming languages like Node.js, Python, Ruby, and PHP, coupled with frameworks such as Express, Django, and Ruby on Rails, essential for robust backend development. Databases, both relational (e.g., MySQL, PostgreSQL) and NoSQL (e.g., MongoDB), are also crucial for data management.</li>



<li><strong>APIs (Application Programming Interfaces):</strong> APIs enable simple communication between frontend clients and backend applications/servers, facilitating the exchange of data. RESTful APIs and GraphQL are common approaches used in modern web applications.</li>
</ul>



<p><strong>Advantages in adopting a full-stack approach in software development:</strong></p>



<ul class="wp-block-list">
<li><strong>Faster Development Cycles:</strong> With a single developer or a small team capable of handling both frontend and backend tasks, projects can progress more quickly, reducing the time to market.</li>



<li><strong>Easy Integration:</strong> Full-stack developers have a comprehensive understanding of how the different components of an application interact, leading to better integration and fewer compatibility issues.</li>



<li><strong>Enhanced Problem-Solving:</strong> By possessing a complete view of the application, full-stack developers can identify and resolve issues more efficiently, improving overall project quality.</li>
</ul>



<h2 class="wp-block-heading">Why choose Xojo as a full-stack development solution?</h2>



<p>When it comes to full-stack development, selecting the right programming language(s) or frameworks can significantly impact the efficiency and effectiveness of your projects. Xojo is a powerful choice for anyone seeking a robust, user-friendly and versatile development environment that provides everything needed to transform their ideas into fully fledged, working software products, no matter the platform or environment.</p>



<p><strong>Xojo features ideal for full-stack development</strong>:</p>



<ul class="wp-block-list">
<li><strong>Built-in Web Server:</strong> Xojo has its own built-in web server that allows developers to easily test and deploy web applications (on Linux or Windows servers) without the need for additional software. There is no need to set up complicated web server technologies or deal with compatibility issues and security. Xojo handles all of that for you. In production, you can run a web app built with Xojo as stand-alone or behind Apache or Nginx. You decide what works best for your project.</li>



<li><strong>Visual Development Environment:</strong> Xojo offers a visual development environment that allows developers to design user interfaces using drag-and-drop elements. This approach simplifies the process of creating appealing applications, accessible to both novice and experienced developers.</li>



<li><strong>Object-Oriented Programming:</strong> Xojo is object-oriented programming (OOP), enabling developers to create modular and reusable code. OOP encourages better organization and maintainability of applications, making it easier to scale projects over time.</li>



<li><strong>Compiled Code</strong>: Xojo compiles code into machine code, which results in fast and efficient web applications. In the event that some bad actors gain access to your server, rest assured that Xojo built web apps are more secure than those built with other tools.</li>
</ul>



<p>In addition to these features, while many programming languages cater to full-stack development by combining and utilizing multiple external solutions, Xojo distinguishes itself as an ideal, singular solution. Compared to languages like JavaScript, Ruby, PHP or Python, Xojo has a gentle learning curve, making it an attractive option for beginners. Its syntax is straightforward and resembles natural language, which helps new developers learn concepts quickly. Xojo’s visual tools and drag-and-drop features enable developers to prototype applications rapidly. This is particularly advantageous for startups and businesses looking to iterate and launch products quickly.</p>



<h2 class="wp-block-heading">Xojo for Frontend Development</h2>



<p>Creating an engaging and user-friendly frontend is crucial for any web application. With Xojo, developers can quickly prototype and design visually appealing interfaces without the need for 3rd party tools or additional frameworks.</p>



<p>Xojo&#8217;s visual development environment makes building user interfaces an easy and enjoyable thing. With its drag-and-drop interface, developers can easily design and layout their GUI components- buttons, labels, and text fields- without needing any code at all. This intuitive approach allows developers to focus on the logic of the application rather than getting bogged down by low-level details.</p>



<p>So, what makes Xojo&#8217;s frontend capabilities so effective? For starters, it allows frontend developers to quickly:</p>



<ul class="wp-block-list">
<li>Prototype and test ideas without writing code;</li>



<li>Easily create complex layouts and designs;</li>



<li>Focus on the logic of the application rather than the UI;</li>



<li>Collaborate more effectively with designers and other team members.</li>
</ul>



<p><strong>Example: A simple web app frontend built with Xojo</strong></p>



<p>To illustrate the power of Xojo&#8217;s visual development environment, let&#8217;s take a look at a simple web app frontend built using Xojo. In this example, we&#8217;ll create a basic to-do list application with a user-friendly interface without writing any HTML, CSS or JavaScript code.</p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter is-resized"><img decoding="async" src="https://storage.googleapis.com/co-writer/images/HRIwK4xjWLXvNRyAbzXbq5t8wJF3/-1721820376046.webp" alt="Quickly building frontend with Xojo" style="width:915px;height:auto"/><figcaption class="wp-element-caption"><strong>This ToDo web app design can be quickly prototyped in under 10 minutes with Xojo.</strong></figcaption></figure>
</div>


<h2 class="wp-block-heading">Coding Backend Functionality and Connecting it to the Frontend</h2>



<p>While users interact with the frontend of apps, it&#8217;s the backend that does the heavy lifting, handling data and core functionality. Xojo makes building these backend systems easier for developers with useful features that create efficient server-side applications without unnecessary complexity. Xojo is a practical choice for developers who want to build solid, functional backends for web (and even desktop or mobile) apps without getting bogged down in overly complicated processes. Here are some notable aspects:</p>



<ul class="wp-block-list">
<li><strong>Database Integration:</strong> Xojo supports out-of-the box connections to a variety of databases, including MySQL/MariaDB, PostgreSQL, SQLite, and ODBC. Besides the built-in database classes, now there&#8217;s also the <a href="https://documentation.xojo.com/topics/databases/dbkit.html" target="_blank" rel="noreferrer noopener">DBKit</a> project and the new <a href="https://documentation.xojo.com/topics/databases/connecting_to_a_database.html" target="_blank" rel="noreferrer noopener">DatabaseConnection</a> project item.</li>



<li><strong>RESTful API Creation:</strong> Xojo makes it easy to create RESTful APIs, which are essential for enabling communication between the frontend and backend of a web application. By defining endpoints and handling HTTP requests and responses, developers can facilitate data exchange and enhance the interactivity of their varied applications and clients (web, desktop or mobile).</li>



<li><strong>Session Management:</strong> Managing user sessions is crucial for web applications, especially those that require user authentication. Xojo provides built-in support for easy session handling, allowing developers to track user activity and maintain state across different pages, improving the overall user experience.</li>
</ul>



<h2 class="wp-block-heading">Integrating the Frontend and Backend</h2>



<p>Full-stack development works best when the frontend and backend of an app work well together. Xojo makes this easier by offering a single app development software solution for both parts. Developers can use the same programming language throughout the whole project, which saves time and reduces complications. This approach helps programmers focus on creating a smooth user experience without switching between different tools or languages.</p>



<p>Here are some key points worth taking into account when you want to start building your next successful application:</p>



<ul class="wp-block-list">
<li><strong>Unified Language for Development:</strong> One of the standout features of Xojo is that it allows developers to work in one programming language, eliminating the need to switch between multiple languages like HTML, CSS, or JavaScript. This means that both the frontend and backend logic can be implemented using Xojo’s straightforward syntax, streamlining the development process, no matter the OS platform they&#8217;re building for.</li>



<li><strong>Single Integrated Development Environment (IDE):</strong> Xojo’s IDE serves as a centralized hub for managing both frontend design and backend coding. Developers can design user interfaces visually, drag and drop elements, and simultaneously write the corresponding backend code without needing to leave the IDE. This integration enables a more intuitive workflow, reducing the chances of errors and inconsistencies.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>As the demand for agile and efficient software development continues to rise, the choice of programming language solutions and frameworks can have a significant impact on both project timelines and budgets. Xojo stands out as a compelling alternative for developers and teams accustomed to traditional stacks like LAMP (Linux, Apache, MySQL, and PHP) or MEAN (MongoDB, Express.js, Angular, and Node.js) or any other.</p>



<p>For organizations and startups already familiar with other development stacks, transitioning to Xojo can lead to significant savings in training costs. Xojo’s intuitive interface and single programming language approach mean that team members can quickly adapt without needing extensive retraining. This is especially beneficial for companies looking to onboard new developers or expand their teams. And as an extra plus, using Xojo, you can expand your application supported platforms to include building native desktop clients (Mac, Windows, Linux) or mobile clients (iOS, Android) , all with just one codebase.</p>



<p>And let&#8217;s not forget that managing a full-stack application typically involves maintaining multiple technologies, which can result in higher operational costs. Xojo minimizes the need for additional languages and frameworks, resulting in lower maintenance overhead costs and increased efficiency in full-stack development. Updates, debugging, and scaling become more straightforward, allowing teams to allocate resources more effectively.</p>



<p><em>Is it fair to call Xojo not just a <strong>great full-stack development suite</strong> but a full-stack development suite that truly optimizes the entire development process and maximizes productivity?</em></p>



<div class="wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex">
<div class="wp-block-button has-custom-width wp-block-button__width-75 is-style-fill" style="font-style:normal;font-weight:700"><a class="wp-block-button__link has-white-color has-text-color has-background has-link-color wp-element-button" href="https://xojo.com/download/" style="background-color:#00875a" target="_blank" rel="noreferrer noopener">Download and start using Xojo for free!</a></div>
</div>



<p><em>Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Clean Coding in Xojo: Best Practices for Writing Maintainable Code</title>
		<link>https://blog.xojo.com/2024/07/08/clean-coding-in-xojo-best-practices-for-writing-maintainable-code/</link>
		
		<dc:creator><![CDATA[Martin T.]]></dc:creator>
		<pubDate>Mon, 08 Jul 2024 15:00:00 +0000</pubDate>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13301</guid>

					<description><![CDATA[Clean coding is a vital aspect of software development that ensures code readability, maintainability, and scalability. In the context of Xojo, adhering to clean coding principles can significantly enhance the quality and longevity of your projects. In this blog post, we’ll explore key practices for clean coding in Xojo, including the advantages and disadvantages of these approaches, with detailed examples and explanations.]]></description>
										<content:encoded><![CDATA[
<p>Clean coding is a vital aspect of software development that ensures code readability, maintainability, and scalability. In the context of Xojo, adhering to clean coding principles can significantly enhance the quality and longevity of your projects. In this blog post, we’ll explore key practices for clean coding in Xojo, including the advantages and disadvantages of these approaches, with detailed examples and explanations.</p>



<h2 class="wp-block-heading">Why Clean Coding Matters</h2>



<p>Before diving into the specific practices, it’s important to understand why clean coding matters:</p>



<p>1. <strong>Readability</strong>: Clean code is easier to read and understand, which is crucial when multiple developers are involved or when you revisit your code after some time. This reduces the cognitive load on developers, making it easier to grasp the code’s functionality quickly.</p>



<p>2. <strong>Maintainability</strong>: Code that follows clean coding principles is easier to maintain and update, reducing the risk of introducing bugs. Maintainable code allows for efficient troubleshooting and quick implementation of changes or new features.</p>



<p>3. <strong>Scalability</strong>: Clean code can be more easily extended with new features, facilitating the growth of your application. Well-structured code makes it easier to see where and how new functionality can be added without disrupting existing features.</p>



<h2 class="wp-block-heading">Key Practices for Clean Coding in Xojo</h2>



<h3 class="wp-block-heading">1. Use Meaningful Names</h3>



<p>Using meaningful and descriptive names for variables, methods, and classes is one of the simplest yet most powerful practices in clean coding. Avoid abbreviations and opt for clear, self-explanatory names. This practice helps other developers understand your code without needing extensive documentation.</p>



<h4 class="wp-block-heading">Example:</h4>



<pre id="xojo" class="wp-block-code"><code>// Bad
Var n As Integer</code></pre>



<pre id="xojo" class="wp-block-code"><code>// Good
Var userCount As Integer</code></pre>



<p>In the good example, userCount clearly indicates the purpose of the variable, making the code easier to understand at a glance.</p>



<h3 class="wp-block-heading">2. Follow Consistent Coding and Naming Conventions</h3>



<p>Consistent naming conventions make your codebase uniform and easier to navigate. Establish and follow conventions for variables, methods, properties, and classes.</p>



<p>Read more detailed about Coding and Naming Conventions in the <a href="https://documentation.xojo.com/topics/code_management/coding_guidelines.html#topics-code-management-coding-guidelines-naming" target="_blank" rel="noreferrer noopener">Xojo Documentation</a></p>



<h3 class="wp-block-heading">3. Keep Methods Short and Focused</h3>



<p>Each method should perform a single, well-defined task. If a method is too long or performs multiple tasks, consider refactoring it into smaller, more focused methods. This makes the code more modular and easier to test and maintain.</p>



<h4 class="wp-block-heading">Example:</h4>



<pre class="wp-block-code"><code>// Bad
Sub ProcessUserData()
  ' Code to validate user input
  ' Code to save user data to the database
  ' Code to send a confirmation email
End Sub</code></pre>



<pre class="wp-block-code"><code>// Good
Sub ProcessUserData()
  ValidateUserInput
  SaveUserData
  SendConfirmationEmail
End Sub

Sub ValidateUserInput()
  ' Validation logic
End Sub

Sub SaveUserData()
  ' Database saving logic
End Sub

Sub SendConfirmationEmail()
  ' Email sending logic
End Sub</code></pre>



<p>By breaking down ProcessUserData into smaller methods, each method has a single responsibility, which makes the code easier to understand and maintain.</p>



<h3 class="wp-block-heading">4. Comment Wisely</h3>



<p>Comments should explain <em>why </em>something is done, not <em>what </em>is done. The code itself should be self-explanatory whenever possible. Over-commenting can clutter the code, while under-commenting can make it difficult to understand the rationale behind certain decisions.</p>



<h4 class="wp-block-heading">Example:</h4>



<pre class="wp-block-code"><code>// Bad
// Increment the user count by 1
userCount = userCount + 1</code></pre>



<pre class="wp-block-code"><code>// Good
// Increment the user count to keep track of active users
userCount = userCount + 1</code></pre>



<p>In the good example, the comment provides context for why the increment is necessary, which might not be immediately obvious from the code alone.</p>



<h3 class="wp-block-heading">5. Use Constants and Enumerations</h3>



<p>Avoid using magic numbers and strings. Instead, define constants and enumerations for values that have specific meanings. This makes your code more readable and easier to update.</p>



<h4 class="wp-block-heading">Example:</h4>



<pre class="wp-block-code"><code>// Bad
If statusCode = 200 Then
  ' Success logic
End If</code></pre>



<pre class="wp-block-code"><code>// Good
Const kHTTP_SUCCESS As Integer = 200
If statusCode = kHTTP_SUCCESS Then
  ' Success logic
End If</code></pre>



<p>Using kHTTP_SUCCESS instead of 200 makes the code more readable and the purpose of the value clearer.</p>



<h3 class="wp-block-heading">Enumerations</h3>



<p>Enumerations (enums) are a powerful way to represent a set of related constants. They make your code more readable and maintainable by grouping related values under a single type. This can be particularly useful for handling states, options, or categories in your application.</p>



<h4 class="wp-block-heading">Example:</h4>



<pre class="wp-block-code"><code>// Define an enumeration for user roles
Enum UserRole
  Admin
  Editor
  Viewer
End Enum

// Use the enumeration
Var currentUserRole As UserRole = UserRole.Admin

Select Case currentUserRole
Case UserRole.Admin
  ' Admin-specific logic
Case UserRole.Editor
  ' Editor-specific logic
Case UserRole.Viewer
  ' Viewer-specific logic
End Select</code></pre>



<p>In this example, the UserRole enum defines three possible roles: Admin, Editor, and Viewer. Using an enum makes the code more readable and ensures that only valid roles are assigned to currentUserRole.</p>



<h3 class="wp-block-heading">6. Handle Errors Gracefully</h3>



<p>Implement proper error handling to ensure your application can gracefully recover from unexpected conditions. Use Try&#8230;Catch blocks and meaningful error messages. This practice improves the robustness and user experience of your application.</p>



<h4 class="wp-block-heading">Example:</h4>



<pre class="wp-block-code"><code>Try
  ' Code that might throw an exception
Catch e As OutOfBoundsException
  // Log the error and inform the user
  System.DebugLog("Error: " + e.Message)
  MessageBox("An unexpected error occurred.")
End Try</code></pre>



<p>By catching exceptions and providing informative error messages, you help users understand what went wrong and how to proceed, while also aiding in debugging and logging.</p>



<h3 class="wp-block-heading">7. Refactor Regularly</h3>



<p>Refactoring is the process of improving the structure of your code without changing its functionality. Regular refactoring helps keep your code clean and manageable. It involves restructuring your code to improve its internal structure while maintaining its external behavior.</p>



<h4 class="wp-block-heading">Example:</h4>



<p>Before refactoring:</p>



<pre class="wp-block-code"><code>Sub DoEverything()
  ' Lots of code here
End Sub</code></pre>



<p>After refactoring:</p>



<pre class="wp-block-code"><code>Sub DoEverything()
  PerformTaskA
  PerformTaskB
  PerformTaskC
End Sub

Sub PerformTaskA()
  ' Task A code
End Sub

Sub PerformTaskB()
  ' Task B code
End Sub

Sub PerformTaskC()
  ' Task C code
End Sub</code></pre>



<p>By breaking down DoEverything into smaller tasks, the code becomes more modular and easier to maintain.</p>



<h2 class="wp-block-heading">Advantages and Disadvantages of Clean Coding </h2>



<h3 class="wp-block-heading">Advantages</h3>



<ol class="wp-block-list">
<li><strong>Improved Readability:</strong> Clean code is easier for other developers and yourself to read and understand, which is crucial for effective collaboration and maintenance.</li>



<li><strong>Easier Maintenance:</strong> Maintenance tasks are simplified with well- structured and well-documented code, reducing the time and effort required to update and debug the code.</li>



<li><strong>Fewer Bugs:</strong> Following clean coding principles reduces the risk of bugs by promoting clarity and simplicity in the code.</li>



<li><strong>Better Collaboration:</strong> Teams can work more efficiently together when the code is understandable and consistent, reducing misunderstandings and errors.</li>



<li><strong>Scalability:</strong> It’s easier to integrate new features when the code is well- structured, as the modular design allows for more straightforward extensions.</li>
</ol>



<h3 class="wp-block-heading">Disadvantages</h3>



<ol class="wp-block-list">
<li><strong>Time Investment:</strong> Clean coding requires more time and effort, especially in naming, documentation, and refactoring. This can slow down initial development but pays off in the long run.</li>



<li><strong>Initial Learning Curve:</strong> Developers unfamiliar with clean coding principles need time to learn and apply them, which can temporarily decrease productivity.</li>



<li><strong>Over-Perfection:</strong> There’s a risk of spending too much time perfecting the code, which can impact overall productivity and delay project timelines.</li>
</ol>



<p>Clean coding is not just a set of guidelines but a mindset that can significantly improve the quality of your software. By adopting clean coding practices in Xojo, you ensure that your codebase remains readable, maintainable, and scalable. Whether you are working on a small project or a large application, these principles will help you write better code and build more robust software.</p>



<p>Incorporating clean coding practices into your development workflow might require an initial investment of time and effort, but the benefits far outweigh the costs. Clean code leads to fewer bugs, easier maintenance, and a codebase that can grow and evolve with your project’s needs.</p>



<p>Happy coding!</p>



<p><em>Martin T. is a Xojo MVP and has been very involved in testing Android support.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>From Iteration to Interaction with Type Casting</title>
		<link>https://blog.xojo.com/2024/07/03/from-iteration-to-interaction-with-type-casting/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Wed, 03 Jul 2024 15:00:00 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Iteration]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Type Casting]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13268</guid>

					<description><![CDATA[In software development, efficiency and user experience are paramount. One powerful technique that can help achieve both is the use of type casting combined with iteration. By iterating through controls and casting them to specific types, developers can dynamically manipulate user interface elements, resulting in more responsive and interactive applications. In this article, we will explore the concepts of type casting and iteration within Xojo applications. We will break down a practical example to demonstrate how these techniques can be used to optimize form handling and enhance user interactions.]]></description>
										<content:encoded><![CDATA[
<p>In software development, efficiency and user experience are paramount. One powerful technique that can help achieve both is the use of type casting combined with iteration. By iterating through controls and casting them to specific types, developers can dynamically manipulate user interface elements, resulting in more responsive and interactive applications.</p>



<p>In this article, we will explore the concepts of type casting and iteration within Xojo applications. We will break down a practical example to demonstrate how these techniques can be used to optimize form handling and enhance user interactions.</p>



<h2 class="wp-block-heading">Understanding Type Casting</h2>



<p>Type casting is a concept where a generic control is converted—or &#8220;cast&#8221;—to a specific type to access its unique properties and methods. This technique is particularly useful when you need to manipulate various controls dynamically within a loop.</p>



<p>For instance, imagine you have multiple text fields on a Window and you want to apply specific actions only to some controls. By using type casting you can loop through all controls, identify those that you&#8217;re looking for, and then apply the desired actions.</p>



<p>Type casting is advantageous because it allows you to:</p>



<ul class="wp-block-list">
<li>Access Specific Properties: Gain access to properties and methods specific to the control type</li>



<li>Enhance Code Maintainability: Write cleaner, more readable and reusable code</li>



<li>Improve Performance: Perform operations more efficiently by targeting specific control types directly</li>
</ul>



<p>In essence, type casting allows developers to create more interactive and user-friendly applications by leveraging the full capabilities of each control type (you will see later in our example).</p>



<h2 class="wp-block-heading">Iterating Through UI Controls</h2>



<p>Iteration is a fundamental programming technique used to repeat a block of code multiple times. In Xojo, iterating through controls allows developers to dynamically interact with each instanced control, making it possible to apply specific actions based on the control type.</p>



<p>To iterate through controls in Xojo, you can use a simple For Each loop, which simplifies the process of accessing each control individually. Here’s a basic example:</p>



<pre class="wp-block-code"><code>For Each control As DesktopUIControl In Self.Controls
// Perform actions on each control
Next</code></pre>



<p>Now, let&#8217;s utilize type casting to identify and manipulate all DesktopUIControl type controls. For example, if you want to find all DesktopTextField controls and perform certain actions, like disabling them, you can do so as follows:</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:60%">
<pre class="wp-block-code"><code>// Loop through all controls in the current window or container
For Each control As DesktopUIControl In Self.Controls
  // Check if the current control is a DesktopTextField
  If control IsA DesktopTextField Then
    // Cast the control to a DesktopTextField for specific operations
    Var dtfield As DesktopTextField = DesktopTextField(control)
    // Disable the DesktopTextField type controls
    dtfield.Enabled = False
  End If
Next</code></pre>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p>Here’s a breakdown of what each part of the code does:</p>



<ol class="wp-block-list">
<li>The For Each loop iterates through all controls in Self.Controls. Self refers to the current window or container.</li>



<li>The If statement checks if the current control is an instance of DesktopTextField.</li>



<li>If it is a DesktopTextField type, the control is cast to a DesktopTextField variable named dtfield and then disable it.</li>
</ol>
</div>
</div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Tip: Make sure to read more about the operator <strong>IsA </strong>at <a href="https://documentation.xojo.com/api/language/isa.html" target="_blank" rel="noreferrer noopener">https://documentation.xojo.com/api/language/isa.html</a></p>
</blockquote>



<h2 class="wp-block-heading">Practical Example</h2>



<p>Let&#8217;s get into a practical example to see type casting and iteration in action.</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<ol class="wp-block-list">
<li>Place different type controls on a Window (buttons, text fields, text areas, popup menus, etc.).</li>



<li>Make sure to also place two DesktopTextField controls and name them “PasswordField” and “EmailField”.</li>



<li>In a Button control, add the Pressed event and write the following code:</li>
</ol>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%">
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="306" height="452" src="https://blog.xojo.com/wp-content/uploads/2024/06/image-2.png" alt="From Iteration to Interaction: Type Casting in Xojo Applications" class="wp-image-13283" srcset="https://blog.xojo.com/wp-content/uploads/2024/06/image-2.png 306w, https://blog.xojo.com/wp-content/uploads/2024/06/image-2-203x300.png 203w" sizes="auto, (max-width: 306px) 100vw, 306px" /></figure>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<pre class="wp-block-code"><code>// Loop through all controls in the current Window or Container
For Each control As DesktopUIControl In Self.Controls
  // Test if the current control is a DesktopTextField
  If control IsA DesktopTextField Then
    // Cast the control to a DesktopTextField for specific operations
    Var dtfield As DesktopTextField = DesktopTextField(control)
    
    // Get the name of the current text field
    Var ctrlName As String = dtfield.Name
    
    // Check if the text field is either the password field or email field
    If (ctrlName = "PasswordField") Or (ctrlName = "EmailField") Then
      // Check if the text field is empty
      If dtfield.Text.IsEmpty = True Then
        // If empty, set focus to this field
        dtfield.SetFocus
        // Exit the loop and the current method/function
        Return
      End If
    End If
  End If
Next</code></pre>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%">
<p>Code breakdown:</p>



<ol class="wp-block-list">
<li>The code starts with a For Each loop that iterates through all controls available in the Window/Container (Self.Controls).</li>



<li>It checks if each control is a DesktopTextField.</li>



<li>If it is, the control is cast to a DesktopTextField variable named dtfield.</li>



<li>The name of the text field is stored in the ctrlName variable.</li>



<li>The code then checks if the text field is either the &#8220;PasswordField&#8221; or &#8220;EmailField&#8221;.</li>



<li>If it is one of these fields, it checks if the field is empty.</li>



<li>If the field is empty, it sets the focus to this field and exits the current method or function using Return.</li>
</ol>
</div>
</div>



<p>The above Xojo code snippet is used to perform a simple form validation. It checks if the password and email fields are filled out, and if either is empty, it sets the focus to the empty field and stops further processing. This is useful for ensuring that users don&#8217;t submit a form with these crucial fields left blank.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Mastering software development type casting and iteration not only makes your code more maintainable but it’s also a good strategy for dynamically managing instanced objects.</p>



<p>We encourage you to experiment with these techniques in your own Xojo projects. By applying the principles discussed in this blog post, you&#8217;ll be well on your way to creating more efficient and interactive applications.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Make sure to also check the following resources:</strong><br>1. <a href="https://documentation.xojo.com/getting_started/object-oriented_programming/advanced_oop_features.html#casting" target="_blank" rel="noreferrer noopener">https://documentation.xojo.com/getting_started/object-oriented_programming/advanced_oop_features.html#casting</a><br>2. <a href="https://documentation.xojo.com/api/language/isa.html#isa" target="_blank" rel="noreferrer noopener">https://documentation.xojo.com/api/language/isa.html#isa</a><br>3. <a href="https://blog.xojo.com/2017/12/13/make-your-own-classes-iterables/" target="_blank" rel="noreferrer noopener">https://blog.xojo.com/2017/12/13/make-your-own-classes-iterables/</a><br>4. <a href="https://blog.xojo.com/2018/03/21/casting-get-ready-and-keep-the-type/" target="_blank" rel="noreferrer noopener">https://blog.xojo.com/2018/03/21/casting-get-ready-and-keep-the-type/</a></p>
</blockquote>



<p><em>Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Advanced File Processing Techniques: Using Chunks for Handling Large Files</title>
		<link>https://blog.xojo.com/2024/06/10/advanced-file-processing-techniques-using-chunks-for-handling-large-files/</link>
					<comments>https://blog.xojo.com/2024/06/10/advanced-file-processing-techniques-using-chunks-for-handling-large-files/#comments</comments>
		
		<dc:creator><![CDATA[Martin T.]]></dc:creator>
		<pubDate>Mon, 10 Jun 2024 16:00:00 +0000</pubDate>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Text Files]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13054</guid>

					<description><![CDATA[A recent blog post, A Beginner’s Guide to Handling Text Files in Xojo, covered the basics of text file handling in Xojo. This post delves into advanced techniques for reading and writing large files in chunks. This method is crucial for managing large datasets efficiently, minimizing memory usage, and maintaining application performance.]]></description>
										<content:encoded><![CDATA[
<p>A recent blog post, <a href="https://blog.xojo.com/2024/05/29/a-beginners-guide-to-handling-text-files-in-xojo/">A Beginner’s Guide to Handling Text Files in Xojo</a>, covered the basics of text file handling in Xojo. This post delves into advanced techniques for reading and writing large files in chunks. This method is crucial for managing large datasets efficiently, minimizing memory usage, and maintaining application performance.</p>



<h2 class="wp-block-heading">Why Read and Write in Chunks?</h2>



<p>Loading or writing a large file in one go can overwhelm your application’s memory and degrade performance. Processing files in smaller, manageable chunks allows for better memory management and more responsive applications.</p>



<h2 class="wp-block-heading">Reading Files in Chunks</h2>



<p>To read a large file in chunks, you can repeatedly read smaller portions of the file until you reach the end. Here’s an example:</p>



<pre id="xojo" class="wp-block-code"><code>Var file As FolderItem = FolderItem.ShowOpenFileDialog("text/plain")
If file &lt;> Nil Then
  Const kChunkSize As Integer = 1024  ' 1 KB chunks

  Var inputStream As TextInputStream = TextInputStream.Open(file)
  Var buffer As String

  While Not inputStream.EndOfFile
    buffer = inputStream.Read(kChunkSize)
    // Process the buffer (for demonstration, we'll just print it)
    System.DebugLog(buffer)
 Wend

  inputStream.Close
Else
  MessageBox("No file selected.")
End If</code></pre>



<p>In this example:</p>



<ul class="wp-block-list">
<li>A TextInputStream is created to read the file.</li>



<li>The kChunkSize defines how much data is read at a time.</li>



<li>The file is read in a loop until the end is reached, processing each chunk.</li>
</ul>



<h2 class="wp-block-heading">Writing Files in Chunks</h2>



<p>Writing large files in chunks involves writing smaller portions incrementally. Here’s an example using String.Bytes and String.MiddleBytes for better performance:</p>



<pre id="xojo" class="wp-block-code"><code>Var file As FolderItem = FolderItem.ShowSaveFileDialog("text/plain", "example.txt")
If file &lt;> Nil Then
  Const kChunkSize As Integer = 1024  ' 1 KB chunks

  Var outputStream As TextOutputStream = TextOutputStream.Create(file)
  Var data As String = "Large data string here..." // Your data source
  Var totalBytes As Integer = data.Bytes

  For i As Integer = 0 To totalBytes Step kChunkSize
    Var chunk As String = data.MiddleBytes(i, kChunkSize)
    outputStream.Write(chunk)
  Next

  // Write any remaining data
  If totalBytes Mod kChunkSize &lt;> 0 Then
    Var remainingBytes As Integer = totalBytes Mod kChunkSize
    Var chunk As String = data.MiddleBytes(totalBytes - remainingBytes, remainingBytes)
    outputStream.Write(chunk)
  End If

  outputStream.Close
  MessageBox("File written successfully.")
Else
  MessageBox("No file specified.")
End If</code></pre>



<p>In this example:</p>



<ul class="wp-block-list">
<li>A TextOutputStream is created to write to a file.</li>



<li>The total bytes of the string are calculated for iteration.</li>



<li>Data is written in chunks defined by kChunkSize using String.MiddleBytes for improved performance.</li>



<li>After the loop, any remaining data that didn’t fit into a full chunk is written.</li>
</ul>



<h3 class="wp-block-heading">Practical Example: Processing Large Log Files</h3>



<p>Processing large log files line by line in chunks can be done as follows:</p>



<pre id="xojo" class="wp-block-code"><code>Var file As FolderItem = FolderItem.ShowOpenFileDialog("text/plain")
If file &lt;> Nil Then
  Const kChunkSize As Integer = 4096 ' 4 KB chunks
  Var inputStream As TextInputStream = TextInputStream.Open(file)
  Var buffer, remaining As String
  While Not inputStream.EndOfFile
    buffer = inputStream.Read(kChunkSize)
    buffer = remaining + buffer
    Var lines() As String = buffer.ToArray(EndOfLine)
    // Process all but the last line
    For i As Integer = lines.FirstIndex To lines.LastIndex - 1
      System.DebugLog(lines(i))
    Next
    // Save the last line for the next chunk
    remaining = lines(lines.LastIndex)
  Wend
  // Process any remaining content
  If Not remaining.IsEmpty Then
    System.DebugLog(remaining)
  End If
  inputStream.Close
Else
  MessageBox("No file selected.")
End If</code></pre>



<p>In this example:</p>



<ul class="wp-block-list">
<li>The file is read in larger chunks (4 KB).</li>



<li>The buffer is split into lines, and all but the last line are processed.</li>



<li>The last line is saved and appended to the next chunk to ensure no data is lost.</li>
</ul>



<h3 class="wp-block-heading">Advanced Techniques: Handling Binary Files</h3>



<p>Reading and writing binary files also benefits from chunk processing. Here’s a basic example of reading binary files in chunks:</p>



<pre id="xojo" class="wp-block-code"><code>Var file As FolderItem = FolderItem.ShowOpenFileDialog("")
If file &lt;> Nil Then
  Const kChunkSize As Integer = 1024 ' 1 KB chunks
  Var binaryStream As BinaryStream = BinaryStream.Open(file, False)
  Var buffer As MemoryBlock
  While Not binaryStream.EndOfFile
    buffer = binaryStream.Read(kChunkSize)
    // Process the buffer (for demonstration, we'll just print its size)
    System.DebugLog(buffer.Size.ToString)
  Wend
  binaryStream.Close
Else
  MessageBox("No file selected.")
End If</code></pre>



<p>In this example:</p>



<ul class="wp-block-list">
<li>A BinaryStream is created to read the file.</li>



<li>Data is read in chunks and processed accordingly. </li>
</ul>



<h3 class="wp-block-heading">Writing Binary Files in Chunks</h3>



<p>You can also write binary files in chunks. Here’s a basic example:</p>



<pre id="xojo" class="wp-block-code"><code>Var file As FolderItem = FolderItem.ShowSaveFileDialog("text/plain", "example.txt")
If file &lt;> Nil Then
  Var binaryStream As BinaryStream = BinaryStream.Create(file, True)
  Const kChunkSize As Integer = 1024 ' 1 KB chunks
  Var data As MemoryBlock = ...  ' Your binary data source
  Var totalBytes As Integer = data.Size
  For i As Integer = 0 To totalBytes Step kChunkSize
    Var chunk As MemoryBlock = data.MidB(i, kChunkSize)
    binaryStream.Write(chunk)
  Next
  // Write any remaining data
  If totalBytes Mod kChunkSize &lt;> 0 Then
    Var remainingBytes As Integer = totalBytes Mod kChunkSize
    Var chunk As MemoryBlock = data.MidB(totalBytes - remainingBytes, remainingBytes)
    binaryStream.Write(chunk)
  End If
  binaryStream.Close
  MessageBox("Binary file written successfully.")
Else
  MessageBox("No file specified.")
End If</code></pre>



<p>In this example:</p>



<ul class="wp-block-list">
<li>A BinaryStream is created to write to a file.</li>



<li>Data is written in chunks using MemoryBlock.MidB to handle binary data.</li>



<li>After the loop, any remaining data that didn’t fit into a full chunk is written. </li>
</ul>



<h3 class="wp-block-heading">Using Threads for Large File Operations </h3>



<p>When working with large files, consider using a Thread to perform read and write operations. This keeps the user interface responsive while the file operations are running in the background. </p>



<p>Example of reading a large file in a thread: </p>



<pre id="xojo" class="wp-block-code"><code>Class FileReadThread Inherits Thread
  Private mFile As FolderItem
  Sub Constructor(file As FolderItem)
    mFile = file
  End Sub
  Sub Run()
    Const kChunkSize As Integer = 1024 ' 1 KB chunks
    Var inputStream As TextInputStream = TextInputStream.Open(mFile)
    Var buffer As String
    While Not inputStream.EndOfFile
      buffer = inputStream.Read(kChunkSize)
      // Process the buffer (for demonstration, we'll just print it)
      System.DebugLog(buffer)
    Wend
    inputStream.Close
  End Sub
End Class

// Usage
Var file As FolderItem = FolderItem.ShowOpenFileDialog("text/plain")
If file &lt;> Nil Then
  Var fileThread As New FileReadThread(file)
  fileThread.Run
Else
  MessageBox("No file selected.")
End If</code></pre>



<p>In this example:</p>



<ul class="wp-block-list">
<li>A Thread subclass is created to handle file reading.</li>



<li>The main UI remains responsive while the thread processes the file in the background. </li>
</ul>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Handling large files efficiently is crucial for developing robust Xojo applications. By reading and writing files in chunks, you can manage memory usage better and ensure your application remains responsive even when dealing with large datasets. Experiment with these techniques in your projects to experience the benefits. </p>



<p>Happy coding!</p>



<p><em>Martin T. is a Xojo MVP and has been very involved in testing Android support.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.xojo.com/2024/06/10/advanced-file-processing-techniques-using-chunks-for-handling-large-files/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>The One Person Framework for the Rest of Us</title>
		<link>https://blog.xojo.com/2024/05/02/the-one-person-framework-for-the-rest-of-us/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Thu, 02 May 2024 14:00:00 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Xojo Cloud]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Development Tools]]></category>
		<category><![CDATA[Enterprise Software]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Object-Oriented]]></category>
		<category><![CDATA[One-Person Framework]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Small Business]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12882</guid>

					<description><![CDATA[The technology and development world is always changing. First released in 1998, Xojo&#8217;s longevity is a testament to its ability and willingness to adapt from&#8230;]]></description>
										<content:encoded><![CDATA[
<p>The technology and development world is always changing. First released in 1998, Xojo&#8217;s longevity is a testament to its ability and willingness to adapt from the early days of desktop apps, to web apps and on to mobile apps.</p>



<p>Throughout that time, software development has generally become more difficult with developers having to learn a wide variety of tools and programming languages, many of which are the hot thing for a short while and then disappear afterwards for the next hot new thing as the cycle repeats.</p>



<p>Up until recently this was not as big a deal for tech companies because they could just hire their way out of the problem. Teams got big and bloated, often because the tools being used were large, complex, rapidly changing and difficult to learn. So the solution, in opposition of the <a href="https://en.wikipedia.org/wiki/The_Mythical_Man-Month">Mythical Man Month</a>, was to throw more people at it. This was feasible because of 0% interest rates and the relative ease of raising capital.</p>



<figure class="wp-block-image"><a href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4c4ae90-9d8d-4b2a-8301-2ee4be611df7_1152x640.jpeg" target="_blank" rel="noreferrer noopener"><img decoding="async" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4c4ae90-9d8d-4b2a-8301-2ee4be611df7_1152x640.jpeg" alt=""/></a></figure>



<p>But that era is over. Interest rates are no longer historically low and raising capital for companies is now much harder and less desirable than it once was. This means technology companies are reducing staff and hiring more judiciously. Fewer people now have to do more with less.</p>



<p>The idea of a “one person framework” is that there should be a way for a single developer to create software using just one development framework. This is not a new idea, but it is being talked about again because of these recent changes with how technology companies work. In many ways, Xojo is the original one person framework. From its inception, with inspiration from Visual Basic, Xojo let you make complete apps more efficiently without having to also learn other tools, languages or frameworks.</p>



<p>So what can Xojo, as a one person framework, do for you? Xojo lets you build most of the apps your company is likely to need, using only Xojo itself and its easy-to learn object-oriented programming language (which is similar to Visual Basic and Python, languages that many people already are familiar with). Xojo is a cross-platform, integrated development environment (IDE) that combines an object-oriented programming language, visual designer, code editor, debugger and more into one tool and one framework.</p>



<p>With Xojo you can make apps for most of the commonly used platforms that your business is likely to need.</p>



<p><strong>Desktop Apps</strong></p>



<p>Xojo has been a great way to make desktop apps since its inception in 1998. Unlike Java, Electron or other frameworks you’ve seen throughout the years, Xojo makes native apps and can do so for the major desktop platforms: Windows, macOS and Linux. Yes, that includes native ARM and x86 apps as well.</p>



<p>With a single project, you can click one button to have Xojo build separate native apps for each of those platforms. To further drive that point home, the Xojo IDE itself is a desktop app made with Xojo that runs on Windows, macOS and Linux.</p>



<p>With Xojo you have access to many commonly-used controls and the Xojo framework with support for databases, JSON, XML, RegEx, Zip/Unzip, networking and so much more.</p>



<p><strong>Web Apps</strong></p>



<p>Since 2010, Xojo has been able to make web apps. Xojo uses a somewhat unique approach to web apps by running compiled code on the web server. This code communicates to the app running on the web browser using an internal JavaScript framework and Bootstrap for the UI, which you don’t really need to worry about. It’s all handled automatically.</p>



<p>This approach is great for business purposes as it lets you make web apps using a development pattern that is very similar to what is used to make desktop apps.</p>



<p>If you don&#8217;t want to deal with the hassle of managing your own web app server, Xojo even offers Xojo Cloud as a fully managed web hosting service with 1-click deployment of your Xojo web apps.</p>



<p><strong>Mobile Apps</strong></p>



<p>Mobile support first appeared for iOS in 2013 and Android support was recently added in 2023. Using Xojo to make native mobile apps that can be deployed in their respective app stores is yet another way Xojo can help one person make more apps.</p>



<p>A developer that already knows how to use Xojo can jump right into mobile development without having to learn yet another IDE and programming language.</p>



<p><strong>Console Apps</strong></p>



<p>Console apps are text apps that run from the command line. These app are great for automating internal processes or other command-line tools. You can even build Console apps that communicate with other console apps to build a chain of tools for processing or converting data, for example.</p>



<h4 class="wp-block-heading">Xojo Framework</h4>



<p>A single person can create all of the above types of apps because Xojo uses the same programming language for all of them. And as mentioned above, the Xojo framework has many built-in features and is broadly compatible across all the different project types. There are differences, of course, but we strive for consistency and compatibility.</p>



<p>For just a few of its many capabilities, all platforms have the same framework classes and methods for things such as Dictionary, Set, URLConnection, files, SQLite, and most graphics. And speaking of examples, Xojo includes over 400 example projects from which to learn.</p>



<figure class="wp-block-image is-resized"><a href="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62cdb62a-4fe8-4d7a-ac61-cf301408c2dc_1152x640.jpeg" target="_blank" rel="noreferrer noopener"><img decoding="async" src="https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62cdb62a-4fe8-4d7a-ac61-cf301408c2dc_1152x640.jpeg" alt="" style="width:915px;height:auto"/></a></figure>



<h2 class="wp-block-heading">Could Xojo Work For You?</h2>



<p>As you should now realize, a single developer using Xojo could reasonably create a desktop app (for Windows, macOS and Linux), a web app, and mobile apps for iOS and Android. If you previously had multiple teams of multiple people creating that many apps, then Xojo could really save you a lot of money and time.</p>



<p>Will you use Xojo to make the next Photoshop, FaceBook, Excel or Google Docs clone? Perhaps not, but most companies don&#8217;t create those types of apps. Xojo does a lot, but it does not and cannot do everything. There is a limit to what any single framework can do, otherwise it becomes too large for its own good, collapsing under its own weight.</p>



<p>Instead, most businesses have much different needs and often require specially created software. For business apps, especially bespoke small-business apps, Xojo can often be an ideal solution by allowing apps to be created faster, more easily and at less cost than can be done with other tools. This saves you money and time, both of which are in short supply these days.</p>



<p><a href="https://www.xojo.com/download/">Xojo is free</a> for learning, development and testing! Give it a spin to see what it can do for you.</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Using Xojo and GitHub</title>
		<link>https://blog.xojo.com/2024/04/02/using-xojo-and-github/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 02 Apr 2024 17:26:24 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Source Control]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12833</guid>

					<description><![CDATA[Now that Xojo Lite includes support for saving projects in version control format, it seems like a good time to revisit how you can use Xojo with GitHub, the popular online Git hosting service.]]></description>
										<content:encoded><![CDATA[
<p>Now that Xojo Lite includes support for saving projects in version control format, it seems like a good time to revisit how you can use Xojo with <a href="https://github.com">GitHub</a>, the popular online Git hosting service.</p>



<h2 class="wp-block-heading">What are Git and GitHub?</h2>



<p><a href="https://en.wikipedia.org/wiki/Git">Git</a> is an open-source version control system, also known as a source control system. Created by Linus Torvalds in 2005, it is now the most popular version control system, supplanting <a href="https://en.wikipedia.org/wiki/Apache_Subversion">Subversion</a> a while ago.</p>



<p>GitHub is an online Git hosting service, now owned by Microsoft. GitHub provides additional features beyond just Git hosting, but for this post we will focus on its Git hosting. GitHub is free to use for both public and private repositories.</p>



<p>A repository is essentially a place to store a project. Public repositories are great ways to share open-source projects. Others can view and download the source code. Private repositories are only visible to you and are great for your own internal projects.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Git is a distributed version control system, which just means that the source code can be versioned locally and on the server, only synchronizing when necessary. For simplicity it is common to keep both in sync, however. Older version control systems such as Subversion were server-based and versions were only ever kept on the server. A distributed version control system is slightly more complex, but it does have the advantage of making it easier to work offline.</p>
</blockquote>



<p>A version control system tracks changes made to text files, something that is incredibly useful when it comes to source code. Tracking changes is a very common task that is needed while programming. You may have seen people save their projects as MyProject1, MyProject2, MyProjectNewVersion, etc. That is a rudimentary way of trying to ensure you don&#8217;t lose changes as you update your code. With version control and the Xojo version control project file format you get a much more flexible technique.</p>



<p>When you save your project using the Xojo version control project file format (called Xojo Project) in the file selector, each project item is saved as its own file on the drive. And each of these files is plain text &#8212; you could view them using a text editor if you wanted.</p>



<p>You might be thinking: &#8220;I&#8217;m just a single developer, I don&#8217;t need this extra complexity.&#8221; But version control systems are not just for multi-person teams. Sure, version control is a great way to make sure that different team members don&#8217;t make different changes to the same code.  But version tracking is useful to everyone. Even as a single developer, being able to review previous changes, and revert changes if they don&#8217;t work out can be a lifesaver. It removes any &#8220;fear of breaking things&#8221; from your workflow. Plus, having your source code on a remote server (GitHub) can also function as one of your source code backups.</p>



<h2 class="wp-block-heading">A Quick Example</h2>



<p>To give you an example of how this works, consider a single text file that exists in Git: ReadMe.txt</p>



<p>Initially it contains just this text:</p>



<pre class="wp-block-code"><code>Hello!</code></pre>



<p>You pull down the file to your computer (I&#8217;ll define Git terms like these below) to work on it. Opening the file in a text editor, you change its text to this and save:</p>



<pre class="wp-block-code"><code>Hello, Xojo!</code></pre>



<p>Now the file on your computer contains that text. This is called the working copy. The file in the repository still has the text &#8220;Hello!&#8221;. Now you can do a couple useful things.</p>



<p>You can ask to see the differences between the file in the repository and the one in the working copy. When doing so, most tools will highlight the line that changed, showing the repository contents on the left and the working copy contents on the right. This is a wonderful way to review changes made to code.</p>



<p>The other thing you can do is commit the change to the repository. This adds this file to the repository and makes it the latest version. In Git you&#8217;ll then be able to see that this file has two versions and you&#8217;ll be able to see what the file looked like for each version.</p>



<p>These two things mean that you will never again lose any work. Anytime you make a change to your code that you want to save as a version in the repository, you commit it. You don&#8217;t want to commit after every change as that is too granular and will be hard to manage, but it means you can safely make a bunch of big changes to something and still be able to go back and review what the code looked like previously.</p>



<p>The other useful thing you can do is revert changes. If, after saving the file with &#8220;Hello, Xojo!&#8221; you realize that was a mistake, you can go back to the previous version by choosing to revert the file. This discards the local working copy and pulls down the most recent revision from the repository.</p>



<p>I realize that this might all seem rather different and confusing, but once you do this on a couple small projects you&#8217;ll get the hang of it and you will never want to go back to using MyProject1, MyProject2 again!</p>



<h2 class="wp-block-heading">Terminology</h2>



<p><strong>Repository</strong>: This is essentially a place to store a group of files, which for our purposes will be a Xojo project saved in the version control file format (Xojo Project).</p>



<p><strong>Clone</strong>: Copies the repository to your computer so you can work on it</p>



<p><strong>Fetch</strong>: Updates the local repository with any changes that are stored on the server</p>



<p><strong>Pull</strong>: Similar to fetch, except that it also copies the changes into the working copy</p>



<p><strong>Commit</strong>: Add the changed file to the repository as a new version</p>



<p><strong>Push</strong>: Pushes the committed file to the server (GitHub). Often this is done as a single step: Commit and Push.</p>



<p><strong>Working Copy</strong>: Your local copy of the repository and the file</p>



<h2 class="wp-block-heading">General GitHub Usage</h2>



<p>With Xojo, the general workflow you will use is:</p>



<ol class="wp-block-list">
<li>Create repository on GitHub for the project.</li>



<li>Pull it down to a folder on your computer.</li>



<li>Create a Xojo project.</li>



<li>Save it in Xojo Project (text) format into the above folder.</li>



<li>Commit and Push it to GitHub.</li>



<li>Make additional changes to the Xojo project.</li>



<li>Commit and Push to GitHub as necessary.</li>
</ol>



<h2 class="wp-block-heading">Create a GitHub Account</h2>



<p>If you don’t already have a GitHub account, you’ll need to create one. Head on over to the <a href="https://github.com/signup">sign up page</a> to start the process:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="346" src="https://blog.xojo.com/wp-content/uploads/2024/03/image-2-1024x346.png" alt="" class="wp-image-12838" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/image-2-1024x346.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/03/image-2-300x101.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/image-2-768x259.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/image-2.png 1292w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Create a Repository</h2>



<p>Now that you have a GitHub account, you’ll want to go to your GitHub home page and click the “New Repository” button.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="156" height="80" src="https://blog.xojo.com/wp-content/uploads/2024/03/CleanShot-2024-03-28-at-12.59.10@2x.png" alt="" class="wp-image-12839"/></figure>



<p>As mentioned above, a repository is essentially where your project is stored. You’ll typically want a separate repository for each project. This is what the new repository form looks like:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="860" height="1024" src="https://blog.xojo.com/wp-content/uploads/2024/03/image-4-860x1024.png" alt="" class="wp-image-12841" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/image-4-860x1024.png 860w, https://blog.xojo.com/wp-content/uploads/2024/03/image-4-252x300.png 252w, https://blog.xojo.com/wp-content/uploads/2024/03/image-4-768x914.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/image-4-1291x1536.png 1291w, https://blog.xojo.com/wp-content/uploads/2024/03/image-4.png 1504w" sizes="auto, (max-width: 860px) 100vw, 860px" /></figure>



<p>For open-source projects you&#8217;ll want to make sure &#8220;Public&#8221; is selected as it&#8217;s not really open-source if it is not public. For a public repository, be sure to come up with a catchy “repository name” and always include a description. Choose &#8220;Private&#8221; for internal projects.</p>



<p>I always check “Add a README file”, which adds an empty README file to the repository. You can update it later, but it is where you’ll briefly describe the project and how to use it (using <a href="https://en.wikipedia.org/wiki/Markdown">Markdown</a>). The README is shown by default when you go to the repository in a web browser.</p>



<p>You should also select “Xojo” for the gitignore template (click the dropdown and type &#8220;xojo&#8221;). This identifies the project as using the Xojo programming language, which helps with searches and also marks the “uistate” file (which contains user-specific UI settings, such as window sizes and positions) so that it is not included in the project.</p>



<p>Last is the license. For most public open-source projects, I recommend the <a href="https://en.wikipedia.org/wiki/MIT_License">MIT License</a>, which essentially allows anyone to use your code however they want. For private projects, you can leave it at &#8220;None&#8221;.</p>



<p>Click the Create Repository button to create the repository.</p>



<h2 class="wp-block-heading">Clone the Repository to your Computer</h2>



<p>With the repository created, you can view it on the GitHub website for you account:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="480" src="https://blog.xojo.com/wp-content/uploads/2024/03/image-5-1024x480.png" alt="" class="wp-image-12842" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/image-5-1024x480.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/03/image-5-300x141.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/image-5-768x360.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/image-5-1536x720.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/03/image-5-2048x960.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>From here you&#8217;ll be able to see the files in the repository, along with other information.</p>



<p>You are now ready to &#8220;clone&#8221; the repository to your computer. This copies the repository files to a folder on your computer so you can modify its files. Of course, the only files in the repository will be LICENSE and the empty README.md, but it is still necessary to do the clone so that you can create the folder where you will then add your Xojo code.</p>



<p>In order to clone, you’ll want to use a Git client application. There are many to choose from, but two free ones are the official&nbsp;<a href="https://desktop.github.com">GitHub Desktop</a>&nbsp;and&nbsp;<a href="https://www.sourcetreeapp.com">Atlassian&nbsp;SourceTree</a>. GitHub Desktop is simpler so that is the one I’ll show here.</p>



<p>Download GitHub Desktop:&nbsp;<a href="https://desktop.github.com">https://desktop.github.com</a></p>



<p>Start GitHub Desktop and click “Sign into GitHub.com”.</p>



<p>On the Configure Git page, enter the name and email you want to use to identify your commits.</p>



<p>Click Finish on the next page to show the main screen where you have the option of creating new repositories or cloning a repository. Since we already created a repository online in the previous section, you want to select “Clone a Repository” (you can also choose this from the File menu). In the list, choose the repository you created above, choose your local folder location (Choose…) and click Clone.</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="988" height="976" src="https://blog.xojo.com/wp-content/uploads/2024/03/image-8.png" alt="" class="wp-image-12845" style="width:437px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/image-8.png 988w, https://blog.xojo.com/wp-content/uploads/2024/03/image-8-300x296.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/image-8-768x759.png 768w" sizes="auto, (max-width: 988px) 100vw, 988px" /></figure>



<p>You now have a folder on your disk where you can add your Xojo project. This is what the repository looks like in GitHub Desktop:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="716" src="https://blog.xojo.com/wp-content/uploads/2024/03/image-9-1024x716.png" alt="" class="wp-image-12846" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/image-9-1024x716.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/03/image-9-300x210.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/image-9-768x537.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/image-9-1536x1074.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/03/image-9-2048x1432.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p><em>Note: If you are using another Git client, you will choose its “clone a repository from URL” feature and then provide the URL shown in the “Clone or Download” button on the repository page.</em></p>



<h2 class="wp-block-heading">Add Your Xojo Project Code</h2>



<p>Start Xojo and open the project you want for the repository you cloned (or you can just create a new project). Click “Save As”, make sure the Format is “Xojo Project” and choose the folder you created when you cloned the repository.</p>



<p>Go back to GitHub Desktop and you’ll now see all the Xojo files appearing in the list as “changed files”. (For this test I used a Xojo SQLiteExample.)</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="716" src="https://blog.xojo.com/wp-content/uploads/2024/03/image-11-1024x716.png" alt="" class="wp-image-12848" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/image-11-1024x716.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/03/image-11-300x210.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/image-11-768x537.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/image-11-1536x1074.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/03/image-11-2048x1432.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>You now need to “Commit” these changes. By default they are all selected/checked in GitHub Desktop so you can enter a brief summary and description (for the first commit, often “Initial commit.” is used, but I used &#8220;Initial Xojo commit.&#8221;) and then click the “Commit to main” button.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Each time you commit you want to be sure to type a clear summary and description of the changes. This will be helpful later when you are reviewing prior commits.</p>
</blockquote>



<p>This marked the files as committed in your local repository, which is needed before you can push the changes up to the online repository. Generally speaking you want to commit things after you have made changes that you want to track. You don’t need to immediately push the changes up to the server (online repository) each time, however, people often do as it is simpler. Some Git clients even offer a single button or command to commit and push in one step.</p>



<p>For this initial commit you definitely want to push the commit to the server, so click the button in the toolbar that says “Push origin”. This pushes the commit to the origin, which is the GitHub repository in this case.</p>



<p>If you now go back to the GitHub repository online and refresh the page you’ll now see the files have been committed:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="663" src="https://blog.xojo.com/wp-content/uploads/2024/03/image-12-1024x663.png" alt="" class="wp-image-12849" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/image-12-1024x663.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/03/image-12-300x194.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/image-12-768x497.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/image-12-1536x994.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/03/image-12-2048x1325.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Sharing Your Public Project</h2>



<p>If you created a public repository then it is now available on GitHub for anyone to use. People can find it by searching or you can share the URL (perhaps in the <a href="https://forum.xojo.com">Xojo Forum</a>).</p>



<p>Since I <a href="https://github.com/xojo/MyTestProject">published a public project</a>, anyone can use it. This means that they can clone it and push changes to your project as &#8220;pull requests&#8221;. A pull request is a change that a user has made that they would also like you to apply to your project. Since this is your project, others cannot directly change it without you adding them as contributors. However, you can review these pull requests and choose to pull and merge the change into your project if you want. Or you can reject the pull request &#8212; it&#8217;s all up to you since it&#8217;s your project.</p>



<h2 class="wp-block-heading">Changing and Updating Your Project</h2>



<p>You’ll likely be continuing to change your project to fix bugs and add features. Each change you make shows up in GitHub Desktop where you can commit it and then push it to the server.</p>



<p>As an example, go back to Xojo and make a change to the project. I added some comments to the AddTeamRow method. After saving, the changes are now visible in GitHub Desktop:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="716" src="https://blog.xojo.com/wp-content/uploads/2024/03/image-14-1024x716.png" alt="" class="wp-image-12851" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/image-14-1024x716.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/03/image-14-300x210.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/image-14-768x537.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/image-14-1536x1074.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/03/image-14-2048x1432.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>You can see the one file that was changed, SQLiteWindow, and the changes (or diff) is shown in the viewer. Here you can see the changes by the blue highlighted lines in the gutter. The first change indicates that line 386 was removed and replaced, with the change noting that &#8220;Please&#8221; was added.</p>



<p>The next two changes indicate that new lines were added to the code.</p>



<p>It&#8217;s always good to review code like this before you commit it to make sure the changes are what you expect.</p>



<p>You can now Commit this change (always add Summary and Description text so you know the reason for the change!) and then Push it to the server (Push origin).</p>



<h2 class="wp-block-heading">Discarding Changes</h2>



<p>Say you&#8217;ve made changes to your Xojo project, but realize you&#8217;ve really messed things up and want to go back to the way the code was. For example, say I&#8217;ve accidentally deleted a bunch of code in the ShowData method and saved the project. In GitHub Desktop, it would look like this:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="716" src="https://blog.xojo.com/wp-content/uploads/2024/03/image-15-1024x716.png" alt="" class="wp-image-12852" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/image-15-1024x716.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/03/image-15-300x210.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/image-15-768x537.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/image-15-1536x1074.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/03/image-15-2048x1432.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>You can see the big red area indicating the code that was removed.</p>



<p>To discard this change, I can right-click on SQLiteWindow in GitHub Desktop and select Discard Changes. This pops up a confirmation dialog and clicking Discard Changes will restore the file to its previous version, which is the version of the file that was last committed to the repository.</p>



<p>After doing this, you will need to close the project in Xojo and then re-open it so that it can refresh its internal project structures to reflect the discarded changes. After doing that, you can go back to the ShowData method to see that the code is restored.</p>



<p>This capability is a big reason why version control is also incredibly useful for solo developers.</p>



<h2 class="wp-block-heading">Using or Cloning Other Repositories</h2>



<p>Don’t forget that you can also use other people’s public repositories. To do so you’ll want to click the “Clone or Download” button on the repository page.</p>



<p>For simple usage, where you just want to grab the current version of the repository because you don&#8217;t intend to change anything, you can then click the Download ZIP button. Once downloaded, unzip the file and then open the project in Xojo where you can use it or copy/paste it into your own projects (review the license agreement before you use projects, of course).</p>



<p>You’ll want to clone a project when you want to manage it using GitHub Desktop (or your GitHub client of choice). This allows you to fetch/pull updates from the online repository and also allows you to make your own changes and push them up to the server where the repository owner will get them as pull requests, as described above.</p>



<h2 class="wp-block-heading">Change Your Default Project Format</h2>



<p>You might find it worthwhile to change your default project format to be the version control format. This way it will always be selected by default when you save. You can change this in Xojo&#8217;s General Settings:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="656" src="https://blog.xojo.com/wp-content/uploads/2024/03/image-16-1024x656.png" alt="" class="wp-image-12853" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/image-16-1024x656.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/03/image-16-300x192.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/image-16-768x492.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/image-16-1536x984.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/03/image-16.png 1624w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Pro Tip: When saving a project for the first time in version control format, it is always a good idea to save into a newly created folder. This ensures that all your files will be neatly contained in one place and won&#8217;t accidentally override something else that may have been in the folder.</p>
</blockquote>



<h2 class="wp-block-heading">Git Going</h2>



<p>If you&#8217;ve created Xojo projects in public repositories on GitHub, be sure to share them in the <a href="https://forum.xojo.com/">forum</a>!</p>



<p>This post just scratches the surface of what GitHub does and also only touches lightly on Git and the concept of source control in general. If you’d like to use Git for source control, but would prefer an alternative to GitHub you might also want to check out&nbsp;<a href="https://bitbucket.org">Atlassian BitBucket</a>&nbsp;which also offers free Git hosting for both private and public repositories.</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Only 48 Days Until Monkeybread Software&#8217;s Xojo Conference</title>
		<link>https://blog.xojo.com/2024/03/05/only-48-days-until-monkeybread-softwares-xojo-conference/</link>
		
		<dc:creator><![CDATA[Alyssa Foley]]></dc:creator>
		<pubDate>Tue, 05 Mar 2024 15:20:00 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Monkeybread Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12635</guid>

					<description><![CDATA[Monkeybread Software and Christian Schmitz have organized an exceptional event in Germany in just 2 months. Take this opportunity to meet and network with members of the global Xojo Community. Meet Geoff Perlman, Xojo's Founder &#038; CEO and Xojo Engineers, Javier Menendez and Ricardo Cruz.]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Register now for the biggest Xojo event in 2024!</h2>



<p><a href="https://www.monkeybreadsoftware.de/xojo/events/andernach-2024-event.shtm">Monkeybread Software</a> and Christian Schmitz have organized an exceptional event in Germany taking place in just 2 months &#8211; April 22nd to 27th. Take this opportunity to meet and network with members of the global Xojo Community. Meet Geoff Perlman, Xojo&#8217;s Founder &amp; CEO and Xojo Engineers, Javier Menendez and Ricardo Cruz.</p>



<h3 class="wp-block-heading">This event includes:</h3>



<ul class="wp-block-list">
<li>Keynotes from Geoff Perlman and Christian Schmitz</li>



<li>Educational, Feedback and Q&amp;A Sessions</li>



<li>Web Lab with Xojo&#8217;s Ricardo Cruz</li>



<li>Performance Lab with MBS&#8217;s Christian Schmitz</li>



<li>Dinners, Networking and Sightseeing</li>
</ul>



<h2 class="wp-block-heading">Training, Sessions &amp; Events</h2>



<h3 class="wp-block-heading"><a href="https://www.monkeybreadsoftware.de/xojo/events/andernach-2024-event.shtml#Schedule"><strong>6 Day Schedule</strong></a></h3>



<p>Monday          22nd April        Welcome Event<br>Tuesday         23rd April         Sight Seeing Tour &amp; Dinner<br>Wednesday    24th April         Training Day &amp; Reception in Hotel<br>Thursday        25th April         Conference &amp; Dinner at Baggerado<br>Friday             26th April         Conference &amp; Farewell Dinner<br>Saturday         27th April         Geyser Tour</p>



<h2 class="wp-block-heading">Einstein Hotel Am Römerpark</h2>



<p>The event will be hosted at the <a href="https://www.einsteinhotels.de/">Einstein Hotel Am Römerpark</a>, a modern business and conference hotel with unique ambiance and modern facilities. Located in Andernach across from the river Rhine, the hotel features a garden, lounge, terrace and the Sky Bar &amp; Restaurant.</p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="1024" height="394" src="https://blog.xojo.com/wp-content/uploads/2024/03/andernach-1024x394.png" alt="" class="wp-image-12642" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/andernach-1024x394.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/03/andernach-300x115.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/andernach-768x295.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/andernach.png 1300w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Visit, Attend &amp; Network</h2>



<h3 class="wp-block-heading"><a href="https://www.andernach-tourismus.de/en/">Location: Andernach</a></h3>



<p>Networking is not limited to the event hotel! Enjoy the evenings with other Xojo users at casual get-togethers. Arrive a day or two before the conference or stay over the weekend and schedule time to enjoy the area. Join the <a href="https://www.monkeybreadsoftware.de/xojo/events/andernach-2024-event.shtml#SightSeeingTour">group for sightseeing</a> and a <a href="https://www.monkeybreadsoftware.de/xojo/events/andernach-2024-event.shtml#GeyserTour">Geyser Tour</a>. Andernach has much to offer visitors including the &#8220;Runde Turm&#8221; (round tower), Mariendom (Cathedral of Mary), the old crane on the Rhine River front, the Mikveh or the well preserved town wall.</p>



<p>Learn everything else you need to know and <a href="https://www.monkeybreadsoftware.de/xojo/events/register.shtml">Register Today</a> at <a href="https://www.monkeybreadsoftware.de/xojo/events/andernach-2024-event.shtml">Monkeybread Software</a>.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Webinar Follow-Up: Using Xojo to Develop NetSuite iOS Apps</title>
		<link>https://blog.xojo.com/2024/01/29/webinar-follow-up-using-xojo-to-develop-netsuite-ios-apps/</link>
		
		<dc:creator><![CDATA[Tim Dietrich]]></dc:creator>
		<pubDate>Mon, 29 Jan 2024 16:00:00 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[NetSuite]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12515</guid>

					<description><![CDATA[Last week, I presented the second in a series of Xojo / NetSuite webinars, Using Xojo to Develop NetSuite iOS Apps. You can watch that webinar here. During the webinar, I demonstrated a Xojo-based iOS mobile app that integrates with NetSuite. This blog post is a follow-up to the webinar.]]></description>
										<content:encoded><![CDATA[
<p>Last week, I presented the second in a series of Xojo / NetSuite webinars, Using Xojo to Develop NetSuite iOS Apps. You can watch that webinar <a href="https://youtu.be/tXbaAnRHnGU">here</a>. During the webinar, I demonstrated a Xojo-based iOS mobile app that integrates with NetSuite. This blog post is a follow-up to the webinar.</p>



<h3 class="wp-block-heading"><strong>Downloading the Xojo Project</strong></h3>



<p>The Xojo project that I demonstrated can be downloaded <a href="https://tdietrich-opensource.s3.amazonaws.com/Xojo/Xojo%20NetSuite%20iOS%20Demo%20-%2020240124.01.zip" target="_blank" rel="noreferrer noopener">here</a>. In the zip file, you’ll find the Xojo project file and a “Readme” file. The Readme file includes step-by-step instructions on setting up SuiteTalk REST, a custom NetSuite role, an integration record, and more.</p>



<h3 class="wp-block-heading"><strong>The SuiteQL Query</strong></h3>



<p>During the webinar, I spent some time discussing the SuiteQL query that&#8217;s used to lookup items based on the keywords that a user enters. I mentioned that there&#8217;s a lot of variation between NetSuite instances, both in terms of how they&#8217;re configured and customized. That makes NetSuite development both challenging and interesting. </p>



<p>As a result of the variation between NetSuite instances, you may need to modify the SuiteQL query based on how your NetSuite instance is configured. In the Xojo project, you&#8217;ll find that the query is stored as a constant named &#8220;SuiteQLQuery,&#8221; and it&#8217;s an attribute of the ListView screen.</p>



<p>The query uses the REGEXP_LIKE condition, which I discussed recently in this <a href="https://timdietrich.me/blog/netsuite-suiteql-regexp-like-keyword-searches/">blog post</a>. If you&#8217;re not already familiar with REGEXP_LIKE, then you might want to read up on it. Also, in the query I&#8217;m using the TO_CHAR function to format the &#8220;first column Base Price&#8221; as currency. Specifically, in the query, you&#8217;ll see this: TO_CHAR ( COALESCE( MAX( Price ), 0 ), &#8216;fmL99G999D00&#8217; ). If you&#8217;d like to learn more about the TO_CHAR function and the format model modifiers that it supports, visit: <a href="https://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements004.htm#SQLRF00216">https://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements004.htm#SQLRF00216</a></p>



<h3 class="wp-block-heading"><strong>Our Next Webinar</strong></h3>



<p>Our next Xojo / NetSuite webinar will be held on Thursday, February 22nd at 1PM CT (US). I&#8217;ll demonstrate how you can use Xojo to develop a Web app that integrates with NetSuite. To signup, please visit Xojo&#8217;s <a href="https://xojo.com/resources/webinar.php">Webinar</a> page. And finally, I want to thank everyone that attended the webinar, as well as Geoff and the entire Xojo team for the opportunity to present.</p>



<p><em>Tim Dietrich develops custom software for businesses that are running on NetSuite. He makes extensive use of Xojo to develop mobile, desktop, Web apps, and more &#8211; all of which integrate seamlessly with NetSuite. To learn more, visit: https://timdietrich.me</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Xojo for Students</title>
		<link>https://blog.xojo.com/2024/01/25/xojo-for-students/</link>
		
		<dc:creator><![CDATA[Xojo]]></dc:creator>
		<pubDate>Thu, 25 Jan 2024 13:00:00 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Educational]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[GitHub Student Developer Pack]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Student]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11561</guid>

					<description><![CDATA[Students looking to begin their journey into programming look to Xojo for its ease of use and dedication to cross-platform development. Plus, Xojo is true rapid app development and is ideal for building prototypes and mockups really fast. All of these features benefit from Xojo's OOP-focus. Xojo also has a vibrant and helpful community and years worth of free, on-line resources. ]]></description>
										<content:encoded><![CDATA[
<p>Xojo is a programming language and development environment for creating cross-platform applications for macOS, Windows and Linux from whatever computer you use &#8211; Mac, Windows or Linux. You can also create web, iOS, Android and Raspberry Pi apps with Xojo. To empower students, Xojo has partnered with GitHub to offer Xojo Pro to all students in the <a href="https://education.github.com/pack">GitHub Student Developer Pack</a>. In addition to Xojo, the Pack includes tons of free tools to help students expand their technical knowledge and learn new skills. </p>



<p>Students looking to begin their journey into programming choose Xojo for its <strong>ease of use</strong> and dedication to <strong>cross-platform</strong> development. Plus, Xojo is true rapid app development and is ideal for building <strong>prototypes and mockups</strong> really fast. All of these features benefit from Xojo&#8217;s <strong>OOP</strong>-focus. Xojo also has an active and helpful <strong>community</strong> and years worth of free, on-line <strong>resources</strong>. </p>



<span id="more-11561"></span>



<h3 class="wp-block-heading"><strong>Ease of Use from App Design to Build</strong></h3>



<p>Xojo is known for its user-friendly and visual development environment. It employs a drag-and-drop interface, which can be helpful for students who are new to programming and those who want to rapidly prototype software without delving into complex coding. Xojo is efficient, featuring a streamlined development process and extensive feature set, you can create applications fast without sacrificing quality or functionality. Xojo is based on object-oriented programming principles. <a href="https://documentation.xojo.com/getting_started/object-oriented_programming/index.html">Learning OOP</a> through Xojo can provide students with a solid foundation in programming concepts that are widely applicable in the software development industry.</p>



<h3 class="wp-block-heading"><strong>Multiplatform Development for Windows, macOS, Linux, mobile, &amp; web</strong></h3>



<p>Xojo is incredibly versatile. Whether you&#8217;re interested in desktop, mobile, or web application development, you can built it with Xojo. With its cross-platform capabilities, you can even build applications that run on multiple platforms from a single code-base. This can be particularly valuable for students working on a MacBook but needing app for a Windows machine or vice-versa. Write your app once and compile it for macOS, Windows and Linux.</p>



<h3 class="wp-block-heading"><strong>Rapid Application Development for Prototypes and Mockups</strong></h3>



<p>Xojo is designed for rapid application development (RAD), making it an ideal choice for students who need to create functional applications quickly. Students can use Xojo to build practical, real-world applications. This hands-on experience can be valuable for learning and demonstrating software development skills, especially for those working on the design and usability aspects of software development. </p>



<h3 class="wp-block-heading"><strong>Community and Resources</strong></h3>



<p>Xojo has an active community and offers resources, including documentation, tutorials, and forums. Students can benefit from this support when learning and troubleshooting. With an active and friendly community of developers, top-notch support team and extensive documentation and tutorials, you&#8217;ll always have the help and resources you need to succeed. Learn at your own pace, and have access to the support you need to overcome challenges along the way.</p>



<p>No matter why you choose Xojo, whether for its simplicity, cross-platform capabilities, rapid development or community and resources, Xojo is a valuable tool for learning programming and software development concepts. Xojo is a great place to start when building or looking to expand your development toolkit.</p>



<div class="wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex">
<div class="wp-block-button"><a class="wp-block-button__link has-white-color has-text-color has-background has-link-color wp-element-button" href="https://xojo.com/download/" style="background-color:#84bd00">Download Xojo</a></div>
</div>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Remote Debugger: How to debug your app on any computer</title>
		<link>https://blog.xojo.com/2024/01/19/remote-debugger-how-to-debug-your-app-on-any-computer/</link>
		
		<dc:creator><![CDATA[Geoff Perlman]]></dc:creator>
		<pubDate>Fri, 19 Jan 2024 13:00:00 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Remote Debugging]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12482</guid>

					<description><![CDATA[If only you could run your app in debug mode on a specific, remote computer. With Xojo, you can. Let's talk about Xojo's Remote Debugger. ]]></description>
										<content:encoded><![CDATA[
<p>At one time or another we all experienced it. The app you created works beautifully and your users heap praise upon it. Then, a particular user reports that some part of the app (or the entire app) doesn&#8217;t work on their computer. Other users with the same type of computer, same OS version, etc., do not experience the same issue. After scratching your head and thinking to yourself that the fault perhaps lies with the user, you create a special version of your app just for that user with MessageBox commands and/or various points in the code logged to a text file. This will give you the answer as to why your app is failing just for that one user. Alas, your digital spelunking reveals nothing. If only you could run your app in debug mode on <em>their</em> computer.</p>



<h3 class="wp-block-heading">Remote Debugger</h3>



<p>With Xojo, you can. Let&#8217;s talk about Xojo&#8217;s aptly named Remote Debugger. In the instance above, that particular user can install Xojo&#8217;s Remote Debugger app on their computer. You and your users can find the app included in the Extras folder of  the Xojo download. After your user installs, launches and sets the Options in the Remote Debugger app, you can connect to that user&#8217;s computer by adding a connection to it in the Debugging pane of the Settings dialog box in the Xojo IDE on your computer. </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="647" src="https://blog.xojo.com/wp-content/uploads/2024/01/debugging_pane_settings_dialog-1024x647.png" alt="" class="wp-image-12483" srcset="https://blog.xojo.com/wp-content/uploads/2024/01/debugging_pane_settings_dialog-1024x647.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/01/debugging_pane_settings_dialog-300x190.png 300w, https://blog.xojo.com/wp-content/uploads/2024/01/debugging_pane_settings_dialog-768x486.png 768w, https://blog.xojo.com/wp-content/uploads/2024/01/debugging_pane_settings_dialog.png 1240w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Press the Add button, choose a name, add the user&#8217;s IP address and the password they created for the Remote Debugger app. If the user is just barely remote (on your local network for example), the Add dialog that appears will show local Remote Debuggers, making the process even easier. If this is the case, you can click on the user&#8217;s machine from the list without having to ask them for the their IP address.</p>



<p>It gets a bit complicated if you and the user are not on the same network. That&#8217;s because their router has to be configured to allow the connection to get through to their computer. That can be complex and potentially not allowed by their network administrator. The easiest solution in these cases is to use a service such as <a href="https://www.zerotier.com">ZeroTier</a> or <a href="https://tailscale.com">Tailscale</a> that creates a secure, private network which effectively puts you both on the same network making it a breeze to connect. (Both of ZeroTier and Tailscale have a service tier that is free.) </p>



<p>Once you&#8217;ve added the remote debug host, you can choose Project &gt; Run Remotely and then choose that host to begin the connection. When you do this, your computer will compile a debug version for the computer and OS running on that remote user&#8217;s computer. It will then send that build to their computer and launch it. The app will then connect back to your Xojo IDE&#8217;s Debugger! You can then debug just as you normally would. Have the user try various functions as you watch what they are doing using screen sharing of some kind. When it drops in to the Debugger, you can step through the code, look at the values of variables and properties, etc., just as you do when debugging on your local computer. In cases like this, it can take a frustrating, painful debugging experience and make it nearly stress-free. In minutes you&#8217;ll be staring at the line of code that just wasn&#8217;t expecting the user to do what they did. </p>



<p>Also, the remote computer doesn&#8217;t have to actually be remote. For example, the Remote Debugger is handy for debugging on local virtual machines or other computers on your desk. It lets you keep your project where it belongs (where you keep it on your computer) while debugging in an OS running somewhere else.</p>



<p>So the next time you wish you could just debug on another computer or virtual machine, remember Xojo&#8217;s Remote Debugger! Watch a 13 minute <a href="https://youtu.be/q0C4NhY7oRg">video</a> on Xojo&#8217;s Remote Debugger to learn more.</p>



<div class="wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex">
<div class="wp-block-button"><a class="wp-block-button__link has-white-color has-text-color has-background has-link-color wp-element-button" href="https://documentation.xojo.com/getting_started/debugging/remote_debugging.html" style="background-color:#84bd00" target="_blank" rel="noreferrer noopener">Learn more in the Xojo Docs</a></div>
</div>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Time to Reflect on Stack Optimization</title>
		<link>https://blog.xojo.com/2023/12/12/time-to-reflect-on-stack-optimization/</link>
		
		<dc:creator><![CDATA[William Yu]]></dc:creator>
		<pubDate>Tue, 12 Dec 2023 14:30:00 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[2023r4]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[StackOverflow]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12283</guid>

					<description><![CDATA[In 2023r4, we have optimized our stack overflow checks to reduce the unnecessary effort expended on this task. This optimization will be especially valued by macOS users, as our stack overflow checks consumed the most time on that platform. ]]></description>
										<content:encoded><![CDATA[
<p>As the year draws to a close, it&#8217;s a fitting moment to pause and contemplate for a minute. Oh, my apologies, in Xojo 2023r4, my contemplation time has been decreased to a swift 30 seconds. Let me make the most of that time to reflect instead…</p>



<h3 class="wp-block-heading">Overflowing with Gratitude</h3>



<p>Our stacks are overflowing with appreciation. Appreciation for not being overworked that is. That&#8217;s what they have been doing, being overworked in Xojo 2023r3 and slowing things down. In 2023r4, we have optimized our stack overflow checks to reduce the unnecessary effort expended on this task. This optimization will be especially valued by macOS users, as our stack overflow checks consumed the most time on that platform. Take for example, how many more functions calls can be made in 2023r4 over 2023r3 in just one second:</p>



<pre class="wp-block-code"><code>Var start As Integer = System.Ticks
Var count As Integer
While System.Ticks - start &lt; 60
  Reflect("Thanks")
  count = count + 1
Wend

MessageBox count.ToString + " functions calls in one second"</code></pre>



<div class="wp-block-media-text is-stacked-on-mobile"><figure class="wp-block-media-text__media"><video controls src="https://blog.xojo.com/wp-content/uploads/2023/12/2023r3FunctionCalls.mov"></video></figure><div class="wp-block-media-text__content">
<p>In 2023r3, we can <strong>Reflect</strong> (&#8220;Thanks&#8221;) 1236484 times in one second.</p>
</div></div>



<div class="wp-block-media-text is-stacked-on-mobile"><figure class="wp-block-media-text__media"><video controls src="https://blog.xojo.com/wp-content/uploads/2023/12/2023r4FunctionCalls.mov"></video></figure><div class="wp-block-media-text__content">
<p>However, in 2023r4 we can <strong>Reflect</strong> twice as many times, over 2777000 times!  That&#8217;s a lot of <em><strong>Reflection</strong></em>.</p>
</div></div>



<h3 class="wp-block-heading">Appreciation for our Users</h3>



<p>It would be unjust not to recognize the assistance we&#8217;ve received from our users, particularly those who consistently report issues for us to address. A special acknowledgment goes out to those who go the extra mile in helping us pinpoint problems and offer valuable tips and solutions. You know who you are, and we sincerely appreciate your contributions!</p>



<p><em><em><em>William Yu grew up in Canada learning to program BASIC on a Vic-20. He is Xojo’s resident Windows and Linux engineer, among his many other skills. Some may say he has joined the dark side here in the USA, but he will always be a Canadian at heart.</em></em></em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/12/2023r3FunctionCalls.mov" length="446868" type="video/quicktime" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/12/2023r4FunctionCalls.mov" length="377274" type="video/quicktime" />

			</item>
		<item>
		<title>Get Set</title>
		<link>https://blog.xojo.com/2023/10/10/get-set/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 10 Oct 2023 13:30:01 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[2023r3]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Set]]></category>
		<category><![CDATA[Sets]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Xojo MVP]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12126</guid>

					<description><![CDATA[If you need to work with sets, you may find Xojo's new Set class useful.

A set is a group of items, not unlike a Dictionary. You can add or remove items from the set, as you might expect, but some of its more unique capabilities let you do a difference, intersection and union of two sets.]]></description>
										<content:encoded><![CDATA[
<p>If you need to work with <a href="https://en.wikipedia.org/wiki/Set_(abstract_data_type)">sets</a>, you may find Xojo&#8217;s new Set class useful.</p>



<p>A set is a group of items, not unlike a Dictionary. You can add or remove items from the set, as you might expect, but some of its more unique capabilities let you do a difference, intersection and union of two sets.</p>



<ul class="wp-block-list">
<li>Difference returns a new Set with members that are unique to each Set. This is essentially the items in the first set that are not in the second set.</li>
</ul>



<ul class="wp-block-list">
<li>Intersection returns a new Set with members that are common to both Sets.</li>
</ul>



<ul class="wp-block-list">
<li>Union returns a new Set that contain the members of both Sets.</li>
</ul>



<p>There are also methods to populate a set from an array or a Dictionary. Learn more about using the <a href="https://documentation.xojo.com/api/language/set.html">Set class</a> in the Xojo Programming Documentation.</p>



<p>Set is based on code written by Xojo MVP Kem Tekinay and works on all platforms.</p>



<p><em>Kem Tekinay is a consultant and developer based in Connecticut. A Xojo MVP, Kem&nbsp;has been an avid Xojo user since the early days and is a world-renowned thinker and philosopher, at least in his own mind. You can find him and his work at <a href="http://www.mactechnologies.com">MacTechnologies Consulting</a>.</em></p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
