<?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>Ricardo Cruz &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/author/ricardo/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Wed, 29 Apr 2026 22:39:55 +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>Web Apps Denial of Service</title>
		<link>https://blog.xojo.com/2026/04/29/web-apps-denial-of-service/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Wed, 29 Apr 2026 22:39:52 +0000</pubDate>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Xojo Cloud]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo Web]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16222</guid>

					<description><![CDATA[Last week we got a report of a critical bug affecting Xojo Web apps. Here's what happened, what we did about it, and what you should do depending on how your apps are deployed.]]></description>
										<content:encoded><![CDATA[
<p>Last week we got a report of a critical bug affecting Xojo Web apps. A malformed percent-encoded URL was enough to crash the web app server. Something as small as <code>?x=%</code> in a query string was all it took. We shipped a fix in <a href="https://xojo.com/download/">2026r1.2</a>, and Xojo Cloud has been patched at the platform level to cover users who can&#8217;t upgrade right away. Here&#8217;s what happened, what we did about it, and what you should do depending on how your apps are deployed.</p>



<h2 class="wp-block-heading">Am I affected? What do I do?</h2>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>If you only read one section, read this one.</strong></p>
</blockquote>



<ul class="wp-block-list">
<li><strong>On Xojo Cloud (Web 1 or Web 2)?</strong>&nbsp;You&#8217;re covered. Nothing to do.</li>



<li><strong>Using Lifeboat?</strong>&nbsp;Update Lifeboat and redeploy.</li>



<li><strong>Self-hosted behind Apache or Nginx?</strong> Drop in the filtering rule below. If you&#8217;re on Web 2, also upgrade to 2026r1.2 if possible.</li>



<li><strong>Self-hosted with the Xojo app exposed directly?</strong> On Web 2, upgrade to 2026r1.2 if possible, otherwise put a reverse proxy in front. On Web 1, put a reverse proxy in front (which is what we&#8217;d recommend either way).</li>
</ul>



<p>The full details follow.</p>



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



<ul class="wp-block-list">
<li><strong>Thursday, the 23rd.</strong>&nbsp;A public issue and a private message landed on the same day, both pointing at the same bug.</li>



<li><strong>Thursday through Monday.</strong>&nbsp;We tracked down the root cause, wrote the fix, and tested it.</li>



<li><strong>Tuesday, the 28th.</strong> 2026r1.2 shipped with the patch.</li>



<li><strong>Wednesday, the 29th.</strong>&nbsp;Xojo Cloud patched at the platform level.</li>
</ul>



<p>Under a week from the report to a patched release, with the platform-level mitigation following the next day.</p>



<h2 class="wp-block-heading">What Happened</h2>



<p>A request with a malformed percent-encoded sequence in a query parameter could crash a running Xojo Web app. The smallest reproducer is something like&nbsp;<code>?x=%</code>. That&#8217;s a&nbsp;<code>%</code>&nbsp;not followed by two hex digits, which is invalid percent-encoding and isn&#8217;t decodable.</p>



<p>The bug lives in&nbsp;<code>DecodeURLComponent</code>. When the method ran into invalid input, it raised an exception instead of handling the input gracefully. Because the framework calls this method while parsing incoming requests, anyone could crash a web app by sending a single malformed URL. No authentication, no special headers, no payload. Just a bad query string.</p>



<p>A few things worth being upfront about:</p>



<ul class="wp-block-list">
<li><strong>The bug has probably been there since&nbsp;<code>DecodeURLComponent</code>&nbsp;was introduced.</strong>&nbsp;Every Xojo release that ships the method might be affected.</li>



<li><strong>Both Web 1 and Web 2 are known to be affected.</strong>&nbsp;The Web framework has been calling this method on incoming requests across both generations.</li>



<li><strong>It&#8217;s not just a Web problem.</strong>&nbsp;<code>DecodeURLComponent</code>&nbsp;is a general-purpose method, and the same crash can happen in Desktop and other project types if you call it on attacker-controlled input. Web is the obvious target because requests arrive from the network, but the underlying issue isn&#8217;t Web-specific.</li>
</ul>



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



<p>In 2026r1.2, <code>DecodeURLComponent</code> no longer crashes on invalid input. Instead, it returns an empty String when the input contains a malformed percent-encoded sequence.</p>



<p>We thought about a few approaches and went with this one on purpose, for being consistent with the other sanity checks we do on this method. An empty return value lets existing code keep running rather than letting an exception bubble up through request handling, which is what you want from a method that&#8217;s frequently called on untrusted input. If your code already wraps&nbsp;<code>DecodeURLComponent</code>&nbsp;with its own validation, the new behavior gives you a clean signal to act on (an empty result) instead of an exception to catch.</p>



<p>Xojo 2026r1.2 is the only release with the fix. <strong>Web 1 won&#8217;t be getting a backported patch.</strong> What that means in practice is covered below.</p>



<h2 class="wp-block-heading">What Xojo has already done for you</h2>



<p><strong>Xojo Cloud has been patched at the platform level.</strong>&nbsp;As of Wednesday 29th, Xojo Cloud rejects requests with malformed percent-encoding before they ever reach your app, returning a&nbsp;<code>400 Bad Request</code>&nbsp;from the front-end web server. This protection doesn&#8217;t care which Xojo version your app was built with, and it covers Web 1 and Web 2 the same way.</p>



<p>If your app runs on Xojo Cloud, you don&#8217;t need to redeploy, upgrade, or change anything. We rolled this out specifically so that users who can&#8217;t upgrade right away are covered, including Web 1 users who can&#8217;t upgrade to a fixed version at all.</p>



<h2 class="wp-block-heading">What you should do</h2>



<p>The right move depends on which Web version you&#8217;re on and where your app runs.</p>



<h3 class="wp-block-heading">If you&#8217;re on Web 2</h3>



<p>Upgrade to 2026r1.2 and redeploy if you can. That&#8217;s the cleanest fix and it addresses the issue at the source.</p>



<p>We know &#8220;just upgrade&#8221; isn&#8217;t always realistic. You might be on an older version because your license has expired, because a third-party plugin you rely on hasn&#8217;t caught up yet, because a newer Xojo release introduced a regression you can&#8217;t ship around, or for any number of other reasons. If that&#8217;s you, the hosting-based mitigations below will protect your app in the meantime, and they work regardless of which Xojo version you built with.</p>



<h3 class="wp-block-heading">If you&#8217;re on Web 1</h3>



<p>There&#8217;s no Xojo release that patches&nbsp;<code>DecodeURLComponent</code>&nbsp;for Web 1, so the fix has to live outside your app. The good news is that if you follow Xojo&#8217;s standard hosting recommendations, you&#8217;re fully covered against this specific issue:</p>



<ul class="wp-block-list">
<li><strong>Stay on Xojo Cloud.</strong>&nbsp;You&#8217;re already protected.</li>



<li><strong>Use Lifeboat.</strong>&nbsp;Tim Parnell shipped a Lifeboat update that catches malformed percent-encoding before it reaches your app. Update Lifeboat and redeploy.</li>



<li><strong>Run behind Apache or Nginx</strong>&nbsp;with the rules in the next section.</li>
</ul>



<p>Separately, and on a longer horizon: Web 1 isn&#8217;t receiving framework patches anymore in general, so if you&#8217;re still on it, this is a reasonable moment to start thinking about a migration to Web 2. That&#8217;s a much bigger conversation than this post, but worth flagging.</p>



<h3 class="wp-block-heading">Hosting-level mitigations</h3>



<p>These rules reject malformed percent-encoded URLs at the web server, before the request reaches your Xojo app at all. They work for Web 1 and Web 2, and they don&#8217;t depend on the Xojo version you built with.</p>



<p><strong>Apache:</strong></p>



<pre class="wp-block-code"><code># Reject malformed percent-encoding in the URI.
RewriteCond %{THE_REQUEST} %(?!&#91;0-9A-Fa-f]{2})
RewriteRule .* - &#91;R=400,L]</code></pre>



<p><strong>Nginx:</strong></p>



<pre class="wp-block-code"><code># Reject malformed percent-encoding in the URI.
if ($request_uri ~ "%(?!&#91;0-9A-Fa-f]{2})") {
  return 400;
}</code></pre>



<p>Reload your web server after updating the config (<code>apachectl graceful</code>&nbsp;or&nbsp;<code>nginx -s reload</code>) and check that a request like&nbsp;<code>https://yourapp.example.com/?x=%</code>&nbsp;comes back as&nbsp;<code>400 Bad Request</code>.</p>



<p>These two snippets aren&#8217;t the only way to handle this. The goal is just to block malformed URLs before they reach your app, however you do it. If you&#8217;re running <code>mod_security</code>, for example, a rule that rejects URIs containing invalid percent-encoding will get you the same result. Same idea for any WAF, edge filter, CDN, or load balancer in front of your stack: catch the bad request, return a&nbsp;<code>400</code>, move on.</p>



<h3 class="wp-block-heading">If your Xojo app is exposed directly to the internet</h3>



<p>If your Web app is talking to the internet without a reverse proxy in front of it, your options are narrower. On Web 2, upgrade to 2026r1.2 if you can. On Web 1, or on Web 2 if upgrading isn&#8217;t an option, you&#8217;ll need to put Apache, Nginx, or Lifeboat in front of your app, or move to Xojo Cloud, our managed hosting solution.</p>



<p>This is also a good moment to revisit the setup more broadly.&nbsp;<strong>Xojo recommends always serving Web apps behind a web server</strong>, both for performance and as a defense-in-depth measure against bugs like this one. A reverse proxy would have neutralized this specific issue before it reached the framework, and it&#8217;ll do the same for the next class of issue too.</p>



<h3 class="wp-block-heading">If you use&nbsp;<code>DecodeURLComponent</code>&nbsp;in a non-Web project</h3>



<p>The crash isn&#8217;t unique to Web. If you&#8217;re calling&nbsp;<code>DecodeURLComponent</code>&nbsp;on input you don&#8217;t control (anything coming from a user, a file, a network response, a clipboard), the same bug can hit a Desktop, Console, or other project type.</p>



<p>Upgrade to 2026r1.2 if you can; that&#8217;s the proper fix.</p>



<p>If you can&#8217;t upgrade, you&#8217;ll need to sanitize the input yourself before calling&nbsp;<code>DecodeURLComponent</code>. The check is simple in principle: every&nbsp;<code>%</code>&nbsp;in the string must be followed by exactly two hexadecimal characters (<code>0-9</code>,&nbsp;<code>A-F</code>,&nbsp;<code>a-f</code>). If any&nbsp;<code>%</code>&nbsp;doesn&#8217;t meet that condition, treat the input as invalid and don&#8217;t pass it to&nbsp;<code>DecodeURLComponent</code>. A small helper that validates the string up front and either returns early or substitutes an empty value will keep your app from crashing on the same kind of malformed input that triggers the Web bug.</p>



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



<p>Thanks to the user who reported this through both public and private channels. That&#8217;s exactly the kind of disclosure that lets us turn a fix around in under a week. Thanks also to Tim Parnell for the fast <a href="https://strawberrysw.com/lifeboat/">Lifeboat</a> update, which gave self-hosted users a drop-in mitigation almost immediately.</p>



<p>If you find a security issue in Xojo, please report it privately. You can email&nbsp;<a href="mailto:support@xojo.com">support@xojo.com</a>&nbsp;or file a confidential issue on the issue tracker. Both reach us, and either one lets us get a fix out before the details become public, protecting the rest of the users.</p>



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



<ul class="wp-block-list">
<li><a href="https://documentation.xojo.com/resources/release_notes/2026r1.2.html">Release notes for 2026r1.2</a></li>
</ul>



<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>
					
		
		
			</item>
		<item>
		<title>Scan Barcodes, Pick Colors, Toggle: Xojo Web in 2026r1</title>
		<link>https://blog.xojo.com/2026/03/31/scan-barcodes-pick-colors-toggle-xojo-web-in-2026r1/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 31 Mar 2026 13:22:00 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[2026r1]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<category><![CDATA[Xojo Web]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15969</guid>

					<description><![CDATA[If you build web apps with Xojo, 2026r1 is worth a close look. There&#8217;s a good mix of new controls and under-the-hood improvements to explore.&#8230;]]></description>
										<content:encoded><![CDATA[
<p>If you build web apps with Xojo, 2026r1 is worth a close look. There&#8217;s a good mix of new controls and under-the-hood improvements to explore. Exciting times!</p>



<h2 class="wp-block-heading">New Controls</h2>



<p>Three new controls have been added to the Web framework in this release, aiming to close the difference gap between Web and the other project types.</p>



<p><code>WebSwitch</code>&nbsp;is a toggle control that mobile developers will already be familiar with. It&#8217;s been available on iOS and Android for a while. It&#8217;s now available for web projects too, so if you&#8217;ve been approximating a toggle switch using a styled checkbox, you can finally retire that workaround.</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="690" src="https://blog.xojo.com/wp-content/uploads/2026/03/switch-vs-checkbox-1024x690.png" alt="" class="wp-image-15992" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/switch-vs-checkbox-1024x690.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/switch-vs-checkbox-300x202.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/switch-vs-checkbox-768x517.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/switch-vs-checkbox-1536x1035.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/switch-vs-checkbox-2048x1380.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><code>WebColorPicker</code> brings color selection to web apps in the same way <code>DesktopColorPicker</code> does for desktop. Drop it in from the Library, wire up the event and you have a color picker the Xojo way.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="731" src="https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-ide-1024x731.png" alt="" class="wp-image-15994" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-ide-1024x731.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-ide-300x214.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-ide-768x548.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-ide-1536x1096.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-ide-2048x1461.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>This is how <code>WebColorPicker</code> looks like in your browser:</p>



<figure class="wp-block-video"><video height="1274" style="aspect-ratio: 1488 / 1274;" width="1488" controls src="https://blog.xojo.com/wp-content/uploads/2026/03/colorpicker-browser.mp4"></video></figure>



<p>The third new control adds barcode reading support. Your web app can now read barcodes directly from the user&#8217;s camera, from desktop or mobile browsers. This opens up a lot of practical use cases: Inventory systems, ticketing, product lookups, that previously would have pushed you toward a native mobile app.</p>



<p>Again, drop the Barcode control into your project and implement the events:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="747" src="https://blog.xojo.com/wp-content/uploads/2026/03/barcode-reader-ide-1024x747.png" alt="" class="wp-image-15995" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/barcode-reader-ide-1024x747.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/barcode-reader-ide-300x219.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/barcode-reader-ide-768x560.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/barcode-reader-ide-1536x1120.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/barcode-reader-ide-2048x1494.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>That&#8217;s it! Your web apps can scan a great variety of barcodes now. Including QR, Data Matrix, Aztec, PDF 417 and much more!</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">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="471" height="1024" src="https://blog.xojo.com/wp-content/uploads/2026/03/aztec-barcode-1-471x1024.png" alt="" class="wp-image-16007" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/aztec-barcode-1-471x1024.png 471w, https://blog.xojo.com/wp-content/uploads/2026/03/aztec-barcode-1-138x300.png 138w, https://blog.xojo.com/wp-content/uploads/2026/03/aztec-barcode-1.png 555w" sizes="auto, (max-width: 471px) 100vw, 471px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="471" height="1024" src="https://blog.xojo.com/wp-content/uploads/2026/03/datamatrix-barcode-1-471x1024.png" alt="" class="wp-image-16008" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/datamatrix-barcode-1-471x1024.png 471w, https://blog.xojo.com/wp-content/uploads/2026/03/datamatrix-barcode-1-138x300.png 138w, https://blog.xojo.com/wp-content/uploads/2026/03/datamatrix-barcode-1.png 555w" sizes="auto, (max-width: 471px) 100vw, 471px" /></figure>
</div>
</div>



<h2 class="wp-block-heading">Icons on WebButtons</h2>



<p><code>WebButton</code>&nbsp;now has an&nbsp;<code>Icon</code>&nbsp;property. You can assign any&nbsp;<code>WebPicture</code>&nbsp;to it, or use one of the Bootstrap icons that are already bundled with the framework. It&#8217;s a small addition, but it makes a noticeable difference when building action-heavy interfaces where a label alone doesn&#8217;t communicate enough at a glance.</p>



<p>Add a button into your project:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="690" src="https://blog.xojo.com/wp-content/uploads/2026/03/button-icon-ide-2-1024x690.png" alt="" class="wp-image-16001" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/button-icon-ide-2-1024x690.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/button-icon-ide-2-300x202.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/button-icon-ide-2-768x517.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/button-icon-ide-2-1536x1035.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/button-icon-ide-2-2048x1380.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Configure its Icon property in the <code>Opening</code> event:</p>



<pre class="wp-block-code"><code>Me.Icon = WebPicture.BootstrapIcon("key-fill")</code></pre>



<p>If you don&#8217;t specify a color in BootstrapIcon, it will inherit the button caption color in this case. This is the easiest way to support Dark Mode with the new <code>WebButton.Icon</code> property, without doing any special tricks.</p>



<p>Here is how it looks like at runtime:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="889" src="https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-light-1024x889.png" alt="" class="wp-image-15999" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-light-1024x889.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-light-300x261.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-light-768x667.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-light-1536x1334.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-light.png 1612w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Dark Mode:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="889" src="https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-dark-1024x889.png" alt="" class="wp-image-16000" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-dark-1024x889.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-dark-300x261.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-dark-768x667.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-dark-1536x1334.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/button-browser-dark.png 1612w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">WebLabel: Semantic HTML and Proper Element Types</h2>



<p>Two related changes landed for&nbsp;<code>WebLabel</code>&nbsp;in this release. The first is a correctness fix: the control was previously rendered using the HTML&nbsp;<code>&lt;label&gt;</code>&nbsp;element, which is semantically meant to label form inputs, not to display general text. That has been corrected.</p>



<p>The more interesting addition is that you can now choose which HTML element&nbsp;<code>WebLabel</code>&nbsp;renders as. If you want a label to be an&nbsp;<code>&lt;h1&gt;</code>&nbsp;or an&nbsp;<code>&lt;h2&gt;</code>, you can set that directly in the Inspector. This is useful not just for visual styling, but for accessibility tools and search engines that rely on page structure to understand content hierarchy.</p>



<p>Improving both, accessibility and making search engines happier, are some of our goals for 2026. You will continue seeing improvements in this sense.</p>



<h2 class="wp-block-heading">WebTextArea Gets AddText</h2>



<p><code>WebTextArea</code>&nbsp;now has an&nbsp;<code>AddText</code>&nbsp;method, consistent with how the control works on Desktop and Mobile. If you&#8217;re writing code that targets multiple platforms, this kind of parity saves you from having to check which target you&#8217;re on, before appending text.</p>



<h2 class="wp-block-heading">Scale Indicator on WebMapViewer</h2>



<p><code>WebMapViewer</code>&nbsp;now has a&nbsp;<code>HasScaleIndicator</code>&nbsp;property. When enabled, a small visual scale appears on the map showing real-world distance. It makes a difference in apps where users need spatial context. Field work, logistics or anything where &#8220;how far is that?&#8221; is a question users might actually ask.</p>



<h2 class="wp-block-heading">Performance and Modernization Under the Hood</h2>



<p>A few changes in this release won&#8217;t be immediately visible, but they improve things for everyone.</p>



<p>Bootstrap has been updated to v5.3.8 which fixes some issues introduced in v5.3.7 impacting Xojo. The TypeScript compiler has been updated to v5.9.3, and the compilation target has been bumped from ES6 to ES2020. Unused code in the Web Framework has been cleaned up to reduce the compiled bundle size.</p>



<p>Xojo has also removed its own internal usage of Modernizr. The library is still present for now so existing apps that rely on it won&#8217;t break, but it&#8217;s no longer used by the framework itself and will be removed in a future release.</p>



<p>If you&#8217;ve been meaning to audit your web app for performance, this is a good moment to look at&nbsp;<code>SendEventsInBatches</code>&nbsp;and&nbsp;<code>LazyLoadDependencies</code>&nbsp;on&nbsp;<code>WebSession</code>&nbsp;as well. Both now default to&nbsp;<code>True</code>&nbsp;on new projects, so if your existing app has them disabled, it&#8217;s worth trying them out. These properties have been around for a while already but were turned off by default.</p>



<h2 class="wp-block-heading">API Consistency Cleanups</h2>



<p>A few methods have been deprecated in favour of names that are consistent with the rest of the framework:</p>



<ul class="wp-block-list">
<li><code>WebApplication.AutoQuit</code>&nbsp;→&nbsp;<code>AllowAutoQuit</code></li>



<li><code>WebListBox.ReloadData</code>&nbsp;→&nbsp;<code>ReloadFromDataSource</code></li>



<li><code>WebRadioGroup.RemoveAllRows</code>&nbsp;→&nbsp;<code>RemoveAll</code>, and&nbsp;<code>RemoveRowAt</code>&nbsp;→&nbsp;<code>RemoveAt</code></li>
</ul>



<p>Your existing code will still compile, but it&#8217;s worth updating these when you get a chance.</p>



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



<p>Between new controls, better HTML semantics, and a leaner runtime, 2026r1 is a worthwhile update for anyone building web apps with Xojo. Check out the&nbsp;<a href="https://documentation.xojo.com/resources/release_notes/2026r1.html">full release notes</a>&nbsp;for the complete list of changes.</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/2026/03/colorpicker-browser.mp4" length="707463" type="video/mp4" />

			</item>
		<item>
		<title>New WebUserAuthentication Control: Look, Mom, No Passwords!</title>
		<link>https://blog.xojo.com/2025/12/09/new-webuserauthentication-control-look-mom-no-passwords/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 09 Dec 2025 16:30:29 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[2025r3]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Passkey]]></category>
		<category><![CDATA[Passwords]]></category>
		<category><![CDATA[webdev]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15321</guid>

					<description><![CDATA[The web framework has a new control available in the Library, WebUserAuthentication. Now that Passkeys have arrived, let&#8217;s explore this feature! Passkeys Demo In this&#8230;]]></description>
										<content:encoded><![CDATA[
<p>The web framework has a new control available in the Library, <code>WebUserAuthentication</code>. Now that Passkeys have arrived, let&#8217;s explore this feature!</p>



<h2 class="wp-block-heading">Passkeys Demo</h2>



<p>In this demo, we will be creating a new account using just our email. Using a platform authenticator, like Apple Passkeys or Windows Hello will make this pretty easy. They are integrated in the operating system and synced across devices. I will be using macOS with the integrated Passwords app, but this is supported in Windows through Windows Hello, or you could store, sync and use Passkeys using a Google Chrome Profile.</p>



<figure class="wp-block-video"><video height="1240" style="aspect-ratio: 1472 / 1240;" width="1472" controls src="https://blog.xojo.com/wp-content/uploads/2025/08/passkeys-passwordless-signup.mp4"></video></figure>



<p>As you can see, there is no intermediate step. No need to use a separate app to store your passwords securely. A Passkey will be generated and stored in the authenticator in one simple step. This Passkey will be automatically synced across devices and available on my iPhone.</p>



<p>Opening the Password application, I already can confirm my new Passkey has been stored for &#8220;localhost&#8221;. Notice the user name is also there, meaning you won&#8217;t need to fill it during the login process.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="710" src="https://blog.xojo.com/wp-content/uploads/2025/08/passkeys-in-password-app-1024x710.png" alt="" class="wp-image-15323" srcset="https://blog.xojo.com/wp-content/uploads/2025/08/passkeys-in-password-app-1024x710.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/08/passkeys-in-password-app-300x208.png 300w, https://blog.xojo.com/wp-content/uploads/2025/08/passkeys-in-password-app-768x533.png 768w, https://blog.xojo.com/wp-content/uploads/2025/08/passkeys-in-password-app-1536x1065.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/08/passkeys-in-password-app.png 1716w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The username isn&#8217;t important or even required, it&#8217;s just to display a friendly name for this user. A Passkey will include the user ID, which can be any arbitrary String you want. In my example, I&#8217;ve used the new <a href="https://documentation.xojo.com/api/math/random.html#random-uuid" target="_blank" rel="noreferrer noopener">Random.UUID method</a>, but this is completely up to you. And this is transparent for the end user.</p>



<p>Now, let&#8217;s try to login:</p>



<figure class="wp-block-video"><video height="1240" style="aspect-ratio: 1472 / 1240;" width="1472" controls src="https://blog.xojo.com/wp-content/uploads/2025/08/passkeys-passwordless-signin.mp4"></video></figure>



<p>That&#8217;s it!</p>



<p>Another thing to notice is, while I have several Passkeys for different websites, only the relevant Passkey can be used. This makes Phishing attacks useless. End users won&#8217;t be able to use a Passkey anywhere else, just on the website where it has been created. And also, users won&#8217;t be able to send their password by mistake to an attacker because … they can&#8217;t!</p>



<p>For web application developers, another interesting thing to note is that you won&#8217;t be able to store a Passkey insecurely. Even if your database gets compromised, a hacker won&#8217;t be able to use the stored public keys to authenticate those users with another service. To make it easier to understand, you will be storing a lock, not the key used to open it.</p>



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



<p>My demo is just the classic email / password sign up / sign in workflow, but without using a password. Passkeys is based on WebAuthn (part of FIDO2) and there are several ways you can use this technology in your web application. For example, you could use a shared computer and still be able to securely log in using your mobile. The platform will display a QR code you can read with your phone camera, and grant the access from your personal device.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="889" src="https://blog.xojo.com/wp-content/uploads/2025/08/Sign-In-1024x889.png" alt="" class="wp-image-15325" srcset="https://blog.xojo.com/wp-content/uploads/2025/08/Sign-In-1024x889.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/08/Sign-In-300x260.png 300w, https://blog.xojo.com/wp-content/uploads/2025/08/Sign-In-768x666.png 768w, https://blog.xojo.com/wp-content/uploads/2025/08/Sign-In-1536x1333.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/08/Sign-In.png 1604w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>In my example application, the user can sign up using different emails. If the Passwords app encounters more than one for my domain it will allow the user to specify the Passkey to use:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="889" src="https://blog.xojo.com/wp-content/uploads/2025/08/o2-baieeamele.com_-1024x889.png" alt="" class="wp-image-15326" srcset="https://blog.xojo.com/wp-content/uploads/2025/08/o2-baieeamele.com_-1024x889.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/08/o2-baieeamele.com_-300x260.png 300w, https://blog.xojo.com/wp-content/uploads/2025/08/o2-baieeamele.com_-768x666.png 768w, https://blog.xojo.com/wp-content/uploads/2025/08/o2-baieeamele.com_-1536x1333.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/08/o2-baieeamele.com_.png 1604w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Xojo will take care of preparing the <code>WebAuthn</code> steps, verifying signatures and doing the common busy work for you. You will have to decide which workflow makes sense for your application and perform any further verifications, like sending a verification email on register, to ensure this user owns that account.</p>



<h2 class="wp-block-heading">Multi-Factor Authentication</h2>



<p>If you already require your users to authenticate with a username (or email) and a password, you could use <code>WebUserAuthentication</code> as a second factor. That means the user will need to provide something this person knows (a username and password combination) in addition to something the user has (the authenticator device)</p>



<p>Other common multi-factor authentication schemes are email magic links and time-based one-time passwords, <em>&#8220;TOTP&#8221;</em>.</p>



<p>More factors equal better security, of course. But as usual when it comes to security, you&#8217;ll have to find the sweet spot between secure and comfortable.</p>



<h2 class="wp-block-heading">Usernameless + Passwordless Authentication … Wait, What?!?</h2>



<p><em>&#8220;How can I authenticate without providing my username or email?&#8221;</em>. This is where real new possibilities arise. When you use a username with a password that only Chuck Norris and you know, this becomes a &#8220;proof of identity&#8221; (at least in theory, in practice a hacker could compromise an account using a weak password)</p>



<p>When using an authenticator without a username or password, it becomes a &#8220;proof of possession&#8221; of the authenticator device.</p>



<p>Again, think about it as a locker&#8217;s lock and a key. Everyone can see the lock, but only people with the correct key can open it. The public key would be the door&#8217;s lock, while the authenticator device would be the key. You can share the key with another person you trust to grant this person access to the contents behind that door. The difference with a real-life lock is that we will be using a really secure one, with a security key.</p>



<p>As long as you can proof you have a valid &#8220;key&#8221; to authenticate, you are granted to continue.</p>



<p>Consider the following scenario. The company could have a web application that uses a traditional username + password authentication but, for really special activities, the user needs to authenticate with a physical USB key authenticator device that is shared by everyone in the office.</p>



<p>Other use cases are obviously when privacy is involved. A private journal, or a private blogging service, voting. The inconvenience in this case is the user won&#8217;t be able to recover the account if they lose access to the authenticator. In this case, you might want to offer a different recovery solution, like printing a very long recovery code. If they also lose the recovery code, they will permanently lose the account.</p>



<h2 class="wp-block-heading">How To Use The New Control</h2>



<p>As you do with any other non-visual control, like a <code>WebTimer</code>, you can just drop the new <code>WebUserAuthentication</code> control into your WebPage.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="491" src="https://blog.xojo.com/wp-content/uploads/2025/08/webauthentication-dropping-into-webpage-1024x491.png" alt="" class="wp-image-15327" srcset="https://blog.xojo.com/wp-content/uploads/2025/08/webauthentication-dropping-into-webpage-1024x491.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/08/webauthentication-dropping-into-webpage-300x144.png 300w, https://blog.xojo.com/wp-content/uploads/2025/08/webauthentication-dropping-into-webpage-768x368.png 768w, https://blog.xojo.com/wp-content/uploads/2025/08/webauthentication-dropping-into-webpage-1536x736.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/08/webauthentication-dropping-into-webpage-2048x982.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Then configure its properties. The most important one is the Domain field. It must match the domain name where your application will be deployed. If you want to test it locally without using HTTPS, it must be &#8220;localhost&#8221; (&#8220;127.0.0.1&#8221; won&#8217;t work)</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="666" height="269" src="https://blog.xojo.com/wp-content/uploads/2025/08/Appearance-copia.png" alt="" class="wp-image-15328" srcset="https://blog.xojo.com/wp-content/uploads/2025/08/Appearance-copia.png 666w, https://blog.xojo.com/wp-content/uploads/2025/08/Appearance-copia-300x121.png 300w" sizes="auto, (max-width: 666px) 100vw, 666px" /></figure>



<p>There are four events available:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="656" height="250" src="https://blog.xojo.com/wp-content/uploads/2025/11/Captura-de-pantalla-2025-11-20-a-las-10.50.33.png" alt="" class="wp-image-15544" srcset="https://blog.xojo.com/wp-content/uploads/2025/11/Captura-de-pantalla-2025-11-20-a-las-10.50.33.png 656w, https://blog.xojo.com/wp-content/uploads/2025/11/Captura-de-pantalla-2025-11-20-a-las-10.50.33-300x114.png 300w" sizes="auto, (max-width: 656px) 100vw, 656px" /></figure>



<p>You can use <code>RegistrationSucceeded</code> and <code>AuthenticationSucceeded</code> to interact with your Database, store the details and redirect the user to their dashboard.</p>



<p>In <code>RegistrationSucceeded</code>, a <code>WebAuthenticationCredential</code> will be given to you. This is a data transfer object with the following properties you need to store in your database:</p>



<ul class="wp-block-list">
<li>ID</li>



<li>PublicKey</li>



<li>AuthenticationAttempts</li>



<li>DisplayName</li>
</ul>



<p>Error will be fired when something goes wrong. A message will also show with the details about what happened, but it isn&#8217;t meant to be shared with the end user. During the sign up and sign in processes, you should display generic messages for security, to avoid letting bad actors know what&#8217;s going on. If you need to inform the user something related to these messages, you can send them an automated email instead.</p>



<p><code>CredentialRequested</code> will be fired during the authentication ceremony. A userId and a credentialId will be given to you, and you should return a new <code>WebAuthenticationCredential</code> instance with the details coming from the <code>RegistrationSucceededEvent</code>.</p>



<p>Also, when <code>AuthenticationSucceeded</code> happens, the event will come with an <code>authenticationAttempts</code> parameter. This will be an incremental value used to update your credentials. This is part of the <code>WebAuthn</code> protocol sign in ceremony used to detect cloned authenticators, which is supported by Xojo. Please notice this value might come always as &#8220;0&#8221; when using Safari, for example, but Google Chrome will increase its value each time.</p>



<p>You can initiate a Registration or Authentication ceremony by calling Register or Authenticate, respectively.</p>



<ul class="wp-block-list">
<li><strong>Register</strong>(userId As String, username As String = &#8220;&#8221;, displayName As String = &#8220;&#8221;)<br>The parameter userId is required, the new credential will be built specifically for it. It can be anything that makes sense in your application, like an auto-incremental number or a random UUID . The other parameters are meant for giving the credential a friendly name. The username could be a nickname, or an email. In workflows where you allow the user to store more than one passkey, the displayName could be something like &#8220;Backup key&#8221;.</li>



<li><strong>Authenticate</strong>(Optional allowCredentials() As String)<br>This will initiate the authentication ceremony. You can optionally pass an array of credential IDs, allowed for the user trying to get access to the protected resource.</li>
</ul>



<h2 class="wp-block-heading">Adoption and Compatibility</h2>



<p>Not every user may know they even exist, what they are, how they work or if they will be more secure than using their pet&#8217;s name and birthdate. This can cause some friction. Other users that adopted the usage from day one might have at least two physical USB keys. They expect your application to allow them to enter more than one, just in case they lose their main USB key.</p>



<p>Passkeys are here to stay and their adoption will continue growing on web services. That said, depending on the combination of operating system and browser, there are some gotchas. Google Chrome or Firefox should work on every operating system. Apple users will probably obtain the best user experience if they&#8217;re tied to this ecosystem. Linux users using alternative browsers could experience some challenges.</p>



<p>If compatibility is a must for your application, you should still offer an alternative to Passkeys. For example, legacy passwords, or &#8220;magic login links&#8221; sent by email.</p>



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



<p>We are sure Passkeys will be the norm in the coming years. Read more in the <a href="https://documentation.xojo.com/api/web/webauthenticationcredential.html" target="_blank" rel="noreferrer noopener">Xojo Docs</a>. Xojo is ready to embrace them and you can start adopting them in your Xojo Web application today!</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/08/passkeys-passwordless-signup.mp4" length="684699" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2025/08/passkeys-passwordless-signin.mp4" length="435817" type="video/mp4" />

			</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>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>Xojo Web Evolves: What’s Here in 2025r1?</title>
		<link>https://blog.xojo.com/2025/03/25/xojo-web-evolves-whats-here-in-2025r1/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 25 Mar 2025 15:31:35 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[2025r1]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo API 2.0]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14678</guid>

					<description><![CDATA[What happens when Xojo Web adds drag and drop support, supercharges WebListBox, and packs in 40+ changes? Let’s find out! Drag and Drop Support The&#8230;]]></description>
										<content:encoded><![CDATA[
<p>What happens when Xojo Web adds drag and drop support, supercharges WebListBox, and packs in 40+ changes? Let’s find out!</p>



<h2 class="wp-block-heading"><strong>Drag and Drop Support</strong></h2>



<p>The biggest thing this time is that we&#8217;ve added general drag and drop support for web. From now on, any visual control can be dragged or accept drops.. That includes controls created using the Web SDK, allowing you (and third-party developers!) to increase the user experience on your web projects.</p>



<p>Now, imagine new ways of updating a Database application. For example, creating a &#8220;Form Builder&#8221;, a full &#8220;Website Builder&#8221; or even a &#8220;Database Schema&#8221; web application where the user can drag elements from a library and drop them into the editor. Are you scheduling posts on social networks using a WebDatePicker? What about using a calendar view with drag and drop support?</p>



<p>We&#8217;ve included a drag and drop Kanban board example. Take a look at <a href="https://blog.xojo.com/2025/03/25/building-a-web-kanban-board-gui-with-drag-drop-support/">the blog post</a> to learn more about it.</p>



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



<p>How cool is that?</p>



<p>While drag and drop can make your app easier to work with for some users, it can also be an accessibility barrier for other users. Just remember to offer an alternative way for interacting with your application. In a full featured Kanban app, for example, the user should still be able to change the status of a task from the task details screen, using a regular WebPopupMenu (or any other accessible method)</p>



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



<p>Speaking of dragging things, WebListBox also now supports reordering rows using the mouse. Just enable the new Allow Row Reordering property (which is Off by default) and you are all set.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="676" src="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-13-a-las-11.49.42-1024x676.png" alt="" class="wp-image-14680" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-13-a-las-11.49.42-1024x676.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-13-a-las-11.49.42-300x198.png 300w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-13-a-las-11.49.42-768x507.png 768w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-13-a-las-11.49.42-1536x1014.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-13-a-las-11.49.42-2048x1352.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>This can also be set programmatically at runtime with AllowRowReordering. Once the user finishes a reorder, the RowsReordered event is called, allowing you to persist the changes in your database, for example.</p>



<figure class="wp-block-video"><video height="1034" style="aspect-ratio: 1320 / 1034;" width="1320" controls src="https://blog.xojo.com/wp-content/uploads/2025/03/Grabacion-de-pantalla-2025-03-13-a-las-12.06.45.mp4.mp4"></video></figure>



<p>Another requested feature was to allow users to perform inline edits. <a href="https://documentation.xojo.com/api/user_interface/web/weblistbox.html#">WebListBox</a> received some new methods and events to handle this:</p>



<ul class="wp-block-list">
<li><strong>ColumnTypeAt:</strong> To make a whole column editable</li>



<li><strong>CellTypeAt:</strong> To override the ColumnTypeAt on specific cells</li>



<li><strong>EditCellAt:</strong> A method you can use to begin the edit on specific cells</li>



<li><strong>CellAction Event:</strong> Allowing you to persist the changes made by the user</li>
</ul>



<p>This is also supported when using a WebDataSource.</p>



<p>And not only are TextField and TextArea supported, CheckBox is also part of the WebListBox.CellTypes enumeration, to match what DesktopListBox supports:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="794" src="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-13-a-las-11.52.16-1024x794.png" alt="" class="wp-image-14682" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-13-a-las-11.52.16-1024x794.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-13-a-las-11.52.16-300x233.png 300w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-13-a-las-11.52.16-768x596.png 768w, https://blog.xojo.com/wp-content/uploads/2025/03/Captura-de-pantalla-2025-03-13-a-las-11.52.16.png 1318w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Last, but not least, we&#8217;ve decided to split CellTextAt into two different methods. Until now, you could get and set the caption of a cell using CellTextAt, but also a WebListBoxCellRenderer. This could cause trouble because a Variant was being returned, that could be either a String or a WebListBoxCellRenderer so, when not being used carefully, it could raise IllegalCastException at runtime.</p>



<p>From now on, CellTextAt will only support String. If you want to get or set a cell renderer, you will have to use CellRendererAt instead. This makes the API more obvious.</p>



<p>If you were using CellTextAt for getting and setting cell renderers, you will need to update your code to use CellRendererAt instead.</p>



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



<p>This release empowers Xojo Web projects to meet more user needs, no JavaScript required. Drag and drop finally joins the party, filling a critical gap from the old Web 1 framework.</p>



<p>Be sure to dig into the <a href="https://documentation.xojo.com/resources/release_notes/2025r1.html#">release notes</a>, as 2025r1 packs over 40 changes for the web target alone.</p>



<p>I’d love to hear how you’re weaving these updates into your projects! Drop some screenshots or screen recordings in a new forum thread or shoot me a private message if you prefer.</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/03/kanban-board-demo-1.mp4" length="710061" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2025/03/Grabacion-de-pantalla-2025-03-13-a-las-12.06.45.mp4.mp4" length="378839" type="video/mp4" />

			</item>
		<item>
		<title>Xojo Web Improvements in 2024r4</title>
		<link>https://blog.xojo.com/2024/12/10/xojo-web-improvements-in-2024r4/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 10 Dec 2024 16:36:35 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[2024r4]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo IDE]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14138</guid>

					<description><![CDATA[Making the Web Framework more robust is something we&#8217;ve been working on for years. This release doesn&#8217;t brings too many shiny new toys to play&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Making the Web Framework more robust is something we&#8217;ve been working on for years. This release doesn&#8217;t brings too many shiny new toys to play with, it comes with bug fixes instead that were tricky to fix. Here are some highlights.</p>



<h2 class="wp-block-heading"><strong>Using a WebPopupMenu with a Keyboard</strong></h2>



<p>2024r4 comes with keyboard full support for <a href="https://documentation.xojo.com/api/user_interface/web/webpopupmenu.html#webpopupmenu">WebPopupMenu</a>. We&#8217;ve been gradually improving this control to allow your users to select a field using the arrow keys, for example. What&#8217;s new is being able to go directly to one of the item just by starting to type its name.</p>



<figure class="wp-block-video"><video height="1250" style="aspect-ratio: 1376 / 1250;" width="1376" controls src="https://blog.xojo.com/wp-content/uploads/2024/12/WebPopupMenu-with-keyboard.mp4"></video></figure>



<h2 class="wp-block-heading"><strong>Memory Usage Improvements</strong></h2>



<p>Everyone does their best to avoid leaking memory but, sometimes, that&#8217;s just not enough.</p>



<p><a href="https://blog.xojo.com/2022/12/06/the-versatility-of-xojo/">Jérémie Leroy</a> is known for the success of the mobile apps he makes with Xojo. When one of these successful app requires a Web Service, receiving 1000s of requests, it needs to be as lightweight as possible.</p>



<p>Thanks to his reports, the visual controls will be creating Tooltip and WebCSSClasses instances only when being used. For many projects this won&#8217;t make a difference, but having a Web project with hundreds of concurrent users will surely lead to less memory pressure, allowing to run Web apps in cheaper servers.</p>



<p>This task never ends. Upcoming releases will continue improving memory usage and performance.</p>



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



<p>The library we use to display maps, MapLibre, has been upgraded from 3.2.0 to 4.7.1, which will make much easier to implement some of the features we want to introduce in upcoming releases. Stay tuned!</p>



<p>This control also received 4 additional bug fixes. One of them was causing the Zoom to be modified, when updating another control property, for example.</p>



<h2 class="wp-block-heading"><strong>Some New Features</strong></h2>



<p>While Web received mostly bug fixes this time, it also comes with some hidden gems.</p>



<p>Popover position can be adjusted now when displaying it. The positioning is relative to its parent control. Additionally, you can now use a WebPage as the parent control, instead of one of the page children, to place your Popover exactly where you need.</p>



<p>Last, but not least, my favorite new feature. We&#8217;ve added CallLater method to WebTimer. It works exactly the same as Timer.CallLater, but it&#8217;s Session aware. This means you will be able to access the Session from its callback, without having to do anything special.</p>



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



<p>We are saying goodbye to a 2024 packed with improvements for the Web target, with a release dedicated (more than usual) to bug fixing and to make everything more stable. Make sure to check <a href="https://documentation.xojo.com/resources/release_notes/2024r4.html" data-type="link" data-id="https://documentation.xojo.com/resources/release_notes/2024r4.html">Xojo 2024r4 Release Notes</a>, so you don&#8217;t miss anything.</p>



<p>Thanks to everyone reporting bugs, making feature requests and collaborating in the forum!</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/2024/12/WebPopupMenu-with-keyboard.mp4" length="330684" type="video/mp4" />

			</item>
		<item>
		<title>Introducing Named Color and CSS Classes in Xojo Web</title>
		<link>https://blog.xojo.com/2024/10/01/introducing-named-color-and-css-classes-in-xojo-web/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 01 Oct 2024 15:32:13 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[2024r3]]></category>
		<category><![CDATA[Bootstrap]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo IDE]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13668</guid>

					<description><![CDATA[The latest Xojo release is a big leap forward in terms of design options for Xojo Web users. Xojo 2024r3 comes with new tools for&#8230;]]></description>
										<content:encoded><![CDATA[
<p>The latest Xojo release is a big leap forward in terms of design options for Xojo Web users. Xojo 2024r3 comes with new tools for making beautiful web applications with less effort.</p>



<h2 class="wp-block-heading">A Quick Reminder About What Bootstrap Is</h2>



<p>As I will be mentioning it during this post, let me take a moment to remind readers what Bootstrap is, and what are we using it for at Xojo.</p>



<p>Bootstrap is the library we use for the visual part of web applications made with Xojo. You can think about it as Gtk on Linux, or UIKit on iOS.</p>



<p>While there is a vast amount of alternative libraries, it&#8217;s been probably the most popular framework for the last decade. You can check the <a href="https://getbootstrap.com" data-type="link" data-id="https://getbootstrap.com" target="_blank" rel="noreferrer noopener nofollow">Bootstrap website</a> for more information.</p>



<h2 class="wp-block-heading">ColorGroup Named Colors</h2>



<p>Until this release, the Named option when configuring a ColorGroup was not available on web projects. 2024r3 brings the ability to choose from the Web Basic colors, Web Extended colors and, what I find more interesting, Bootstrap colors, which also support dark mode out of the box.</p>



<figure class="wp-block-video"><video height="908" style="aspect-ratio: 1448 / 908;" width="1448" controls src="https://blog.xojo.com/wp-content/uploads/2024/09/named-colors-from-the-ide.mp4"></video></figure>



<p>As you can expect, if you drop a custom Bootstrap 5.3 theme with another set of colors, the IDE will automatically update in order to preview them.</p>



<figure class="wp-block-video"><video height="908" style="aspect-ratio: 1436 / 908;" width="1436" controls src="https://blog.xojo.com/wp-content/uploads/2024/09/named-colors-bootstrap-theme-support.mp4"></video></figure>



<h2 class="wp-block-heading">Using Named Colors by Code</h2>



<p>When a dynamic need arises, it is also possible to use Bootstrap Named colors programmatically, if you find it easier. Here is an example:</p>



<pre class="wp-block-code"><code>Var colorName As String

If paymentCardIsValid Then
  colorName = "success"
Else
  colorName = "danger"
End If

Rectangle1.BackgroundColor = ColorGroup.NamedColor(colorName)</code></pre>



<p>Or in a <code>WebCanvas.Paint</code> event:</p>



<pre class="wp-block-code"><code>Var colorName As String = If(paymentCardIsValid, "success", "danger")
g.DrawingColor = ColorGroup.NamedColor(colorName)
g.FillRectangle(0, 0, g.Width, g.Height)</code></pre>



<p>You can check the list of available colors in the <a href="https://getbootstrap.com/docs/5.3/customize/color/" data-type="link" data-id="https://getbootstrap.com/docs/5.3/customize/color/" target="_blank" rel="noreferrer noopener nofollow">Color section of the official Bootstrap documentation</a>. Basic and Extended Web Colors will work as well.</p>



<h2 class="wp-block-heading">Using Bootstrap CSS Classes</h2>



<p>Bootstrap comes with a set of utility CSS classes for a variety of visual things. You probably won&#8217;t need them all, as the Xojo IDE will get you there in most of the cases, and we work hard improving the IDE to make it easier, release by release.</p>



<p>That said, if you are an advanced user, and you have previous experience working with Bootstrap, you may find it useful to add CSS classes directly from the Inspector.</p>



<p>Go to the Advanced tab, add some Bootstrap CSS classes, separated by spaces&#8230; and voilà!</p>



<p>Here is a demo:</p>



<figure class="wp-block-video"><video height="910" style="aspect-ratio: 1652 / 910;" width="1652" controls src="https://blog.xojo.com/wp-content/uploads/2024/09/css-classes-demo.mp4"></video></figure>



<p>We have included a new example, called &#8220;Applying Bootstrap CSS classes to controls&#8221;, that you can find under Platforms &gt; Web. Please give it a try.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="807" src="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-18-a-las-10.56.29-1024x807.png" alt="" class="wp-image-13672" srcset="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-18-a-las-10.56.29-1024x807.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-18-a-las-10.56.29-300x236.png 300w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-18-a-las-10.56.29-768x605.png 768w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-18-a-las-10.56.29.png 1267w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>CSS Classes are not limited to Bootstrap, if you have added styles in the HTML Header section, you can use them as well.</p>



<p>You can also add and remove them using the new <code>CSSClasses</code> property, which is available in every WebUIControl subclass.</p>



<h2 class="wp-block-heading">WebRectangle Got Some Love</h2>



<p>You won&#8217;t need to setup the border color, border thickness or the corner size, for WebRectangle, in the Opening event anymore.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="702" height="853" src="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-18-a-las-11.02.31.png" alt="" class="wp-image-13673" srcset="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-18-a-las-11.02.31.png 702w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-18-a-las-11.02.31-247x300.png 247w" sizes="auto, (max-width: 702px) 100vw, 702px" /><figcaption class="wp-element-caption">Xojo 2024r2.1 on the left, Xojo 2024r3 on the right</figcaption></figure>
</div>


<p>When designing web applications, I found myself using a lot of WebRectangle controls and, by default, they have a rounded border.</p>



<p>The side-effect is subtle, but now that you can control the border radius directly from the Inspector, the IDE preview will be closer to how it will look in the browser. And you are going to avoid writing a few lines of code!</p>



<p>In addition, some Bootstrap themes define a different Corner Size. Setting this property to &#8220;-1&#8221; will honor that Bootstrap theme&#8217;s default border radius.</p>



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



<p>As always, the release comes with much more than I can tell you about in one blog post. With over 30 Bug fixes and 9 Feature Requests implemented in the Web target alone, make sure to take a look at the <a href="https://documentation.xojo.com/resources/release_notes/2024r3.html" data-type="link" data-id="https://documentation.xojo.com/resources/release_notes/2024r3.html" target="_blank" rel="noreferrer noopener">Xojo 2024r3 Release Notes</a> to see the whole picture.</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/2024/09/named-colors-from-the-ide.mp4" length="837283" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/09/named-colors-bootstrap-theme-support.mp4" length="429757" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/09/css-classes-demo.mp4" length="721074" type="video/mp4" />

			</item>
		<item>
		<title>Cosmic Trader: A Game Built with Xojo Web</title>
		<link>https://blog.xojo.com/2024/09/17/cosmic-trader-a-game-built-with-xojo-web/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 17 Sep 2024 20:09:12 +0000</pubDate>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[Container]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[WebListBox]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13618</guid>

					<description><![CDATA[I truly enjoy creating things with Xojo. This time, I built a little game with Xojo Web just to see if it was possible. In&#8230;]]></description>
										<content:encoded><![CDATA[
<p>I truly enjoy creating things with Xojo. This time, I built a little game with Xojo Web just to see if it was possible. In this post, I will talk about what I liked and what I had difficulties with while programming it.</p>



<p>The reason to create this kind of project, as the maintainer of the Xojo Web framework, is to find pain points and bugs in larger projects, as the issue reports I normally work with are very specific sample projects demonstrating a bug. The next Xojo release, 2024r3, will come with some bug fixes I found while building Cosmic Trader.</p>



<h2 class="wp-block-heading">Final Result</h2>



<p>Let&#8217;s begin at the end. Give the game a try and then come back to this blog post. It&#8217;s a very simple space trading game, don&#8217;t expect too much from it, but I hope you enjoy it.</p>



<p>It can be played from the following URL:<br><a href="https://cosmictrader.rcruz.es" target="_blank" rel="noreferrer noopener nofollow">https://cosmictrader.rcruz.es</a></p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="625" src="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-8.53.16-1024x625.png" alt="" class="wp-image-13619" srcset="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-8.53.16-1024x625.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-8.53.16-300x183.png 300w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-8.53.16-768x469.png 768w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-8.53.16.png 1252w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="625" src="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-8.53.32-1024x625.png" alt="" class="wp-image-13620" srcset="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-8.53.32-1024x625.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-8.53.32-300x183.png 300w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-8.53.32-768x469.png 768w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-8.53.32.png 1252w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



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



<p>Create a simple game using Xojo Web, without writing a line of JavaScript, or even using the Web SDK.</p>



<p>In addition, while all this could be just a couple of WebListBox and WebButton controls, I really wanted this game to look like an actual game. As you can see in the screenshots, unless you check the code, nobody will notice (or care!) it&#8217;s a Xojo Web application.</p>



<p>As you can imagine, Xojo Web was not created with the idea of building web based games. In order to make it easier for the developer, everything is processed server side: When you press a button, the browser will send a notification to the server, your code written in Xojo will be executed and, finally, the response will be sent back to the browser.</p>



<p>That&#8217;s the known knowns. I knew the latency would be a problem, but I&#8217;ve found more.</p>



<h2 class="wp-block-heading">What I&#8217;ve Enjoyed</h2>



<p>Implementing the first prototype was really easy using the tools Xojo Web offers. For example, in the prototype, instead of the custom popover I ended up building for buying and selling, I just used some contextual menus:</p>



<figure class="wp-block-video"><video height="732" style="aspect-ratio: 1072 / 732;" width="1072" controls src="https://blog.xojo.com/wp-content/uploads/2024/09/cosmic-trader-early-prototype.mp4"></video></figure>



<p>You can go very far and prototype your idea very quickly this way. This helped me to deploy and share the game with a few friends and gather some initial feedback.</p>



<p>Once you have the game mechanics, you can iterate as much as you want until the game is ready. The welcome screen with the game logo wasn&#8217;t added until very late. Just so you can compare, this is how the current version looks:</p>



<figure class="wp-block-video"><video height="598" style="aspect-ratio: 946 / 598;" width="946" controls src="https://blog.xojo.com/wp-content/uploads/2024/09/cosmic-trader-current-version.mp4"></video></figure>



<p>Much better! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f60e.png" alt="😎" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>I&#8217;ve really enjoyed being able to use Containers for building custom controls and reusing them. Also, being able to just drop some images into the IDE and assign them to image viewers is very pleasant.</p>



<p>From the IDE preview, it&#8217;s deadly easy to identify where my ship entity is, click on it, then edit the code if needed:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="720" src="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-9.32.10-1024x720.png" alt="" class="wp-image-13624" srcset="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-9.32.10-1024x720.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-9.32.10-300x211.png 300w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-9.32.10-768x540.png 768w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-9.32.10-1536x1080.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-9.32.10-2048x1440.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Navigating through the project is a joy compared to jumping through piles of code in plain text files.</p>



<p>I&#8217;ve also found having Control Sets useful, allowing me to implement the Pressed event just once for all the planets, for example.</p>



<h2 class="wp-block-heading">Roadblocks and How I Handled Them</h2>



<p>That said, I found some difficulties. All of them were due the nature of web projects. When you travel from one planet to another, you will hear an engine sound. It would be much (much!) easier to know when I should stop the sound in a Desktop or a Mobile project.</p>



<p>Having to deal with latency means I had to use a timer and guess more or less how many milliseconds is reasonable before stopping the sound. Using the same amount of time as the animation would cause the sound to continue playing after the ship had arrived at its destination, again due the latency.</p>



<p>Where I spent most of the time was optimizing the images. Specifically, delivering the images. When you play the game locally, everything works pretty fast. I found this flickering issue once I deployed the game for the first time using the custom popovers:</p>



<figure class="wp-block-video"><video height="670" style="aspect-ratio: 1276 / 670;" width="1276" controls src="https://blog.xojo.com/wp-content/uploads/2024/09/cosmic-trader-flickering-issue.mp4"></video></figure>



<p>This is something that you just don&#8217;t need to think about with the typical database application you normally build with Xojo Web. But if you build a lot of images on the fly, it will mean the browser will have to download them again and again.</p>



<p>In order to optimize it, instead of using a WebImageViewer.Image property, you could store WebImage instances. Using WebImageViewer.URL pointing to the WebImage.URL property of those instances will make the browser first check if it has downloaded that URL before. If so, bingo! It will reuse the image without having to re-download it again.</p>



<p>If you go back to the game, cache is the reason behind the &#8220;New Game&#8221; button, from the welcome screen, and the &#8220;Sell Everything&#8221; button having the same width. It wasn&#8217;t a coincidence, that means a browser cache hit.</p>



<p>Last but not least, when I shared the URL with some friends, they told me it didn&#8217;t look great on mobile. So I had to change the stats a bit so they fit in a mobile screen. While in this case it wasn&#8217;t a big deal, at Xojo we know making responsive web applications must be easier, and we will improve the workflow in future releases.</p>



<p>It would be much easier to use the Web SDK for some of those controls. If I was creating a game seriously, I&#8217;d 100% personally prefer creating some custom controls to allow some code to run on the browser side, using the Web SDK with JavaScript or TypeScript, to avoid dealing with latency or round-trips.</p>



<h2 class="wp-block-heading">Using AI for Creativity</h2>



<p>I personally don&#8217;t find any joy using AI for coding. I always end up frustrated by how it hallucinates and keep proposing, very confidently, things that just don&#8217;t exist. I understand some might like it but, in the end, I just like coding.</p>



<p>But for a second brain and helping me with (my lack of) creativity&#8230; oh boy, that&#8217;s another story. The game idea came from a conversation with Claude AI. Initially, it came up with tons of features and ideas that would require me (and a team of another 100 people) to work on it for several years. I kept asking it to simplify it until I felt it was approachable:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="415" src="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-10.19.09-1024x415.png" alt="" class="wp-image-13625" srcset="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-10.19.09-1024x415.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-10.19.09-300x121.png 300w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-10.19.09-768x311.png 768w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-10.19.09-1536x622.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-09-16-a-las-10.19.09.png 1768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>After implementing the game mechanics, I felt the game didn&#8217;t make any sense. I mean, why 30 turns exactly? Why 5 planets? Why can&#8217;t I go somewhere else to trade? Why do I have to trade at all?&#8230; While it is still fiction, the AI wrote a reasonable background story that added some depth to the game. That&#8217;s what you will be reading when playing Cosmic Trader.</p>



<p>No spoilers, but there are still a few features and game mechanics, recommended by the AI, that I left for future releases.</p>



<p>While working on this game, I even had a little ant invasion at home. The AI came up with a multiplayer ant colony simulator game idea that I will probably never implement, but who knows!</p>



<p>For the logo, I had some spare credits to use with DreamStudio. I had to retouch it using Affinity Photo, but that&#8217;s it:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="256" src="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-07-30-a-las-12.32.26-1024x256.png" alt="" class="wp-image-13626" srcset="https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-07-30-a-las-12.32.26-1024x256.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-07-30-a-las-12.32.26-300x75.png 300w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-07-30-a-las-12.32.26-768x192.png 768w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-07-30-a-las-12.32.26-1536x385.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/09/Captura-de-pantalla-2024-07-30-a-las-12.32.26-2048x513.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>All in all, and while a team of real humans will always be much better, I reckon AI helped me a lot with this experiment.</p>



<h2 class="wp-block-heading">Credits and Acknowledgements</h2>



<p>I could focus on building the game thanks to using the <a href="https://kenney.nl" target="_blank" rel="noreferrer noopener nofollow">Kenney game assets</a>. The background music author is <a href="https://pixabay.com/users/the_mountain-3616498/" target="_blank" rel="noreferrer noopener nofollow">Dmitrii Kolesnikov</a>, make sure to check his profile.</p>



<p>Thanks to Claude for being my second brain for this project. And, of course, thanks to Xojo. It wouldn&#8217;t be as fun without it.</p>



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



<p>I enjoyed building this project a lot. I learned things, and I fixed some bugs I found. Did you know you couldn&#8217;t add a WebStyle CSS transition without adding other styles? Me neither, but it will be fixed in Xojo 2024r3.</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>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/09/cosmic-trader-early-prototype.mp4" length="970692" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/09/cosmic-trader-current-version.mp4" length="776410" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/09/cosmic-trader-flickering-issue.mp4" length="295405" type="video/mp4" />

			</item>
		<item>
		<title>Using a WebDataSource to Display Millions of Rows in a WebListBox</title>
		<link>https://blog.xojo.com/2024/08/01/using-a-webdatasource-to-display-millions-of-rows-in-a-weblistbox/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Thu, 01 Aug 2024 18:31:45 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[SQLiteDatabase]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WebListBox]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13373</guid>

					<description><![CDATA[If you are wondering why you would use a WebDataSource for your WebListBox, this post will give you some arguments and tips for making that decision and implementing it.]]></description>
										<content:encoded><![CDATA[
<p>If you are wondering why you would use a WebDataSource for your WebListBox, this post gives you some arguments and tips for making that decision and implementing it.</p>



<h2 class="wp-block-heading">Why would you need a WebDataSource, isn’t AddRow enough?</h2>



<p>If you are making a quick prototype, or for small data sets that won&#8217;t grow too much, yes, you can absolutely place a WebListBox into your WebPage and fill it using AddRow. If your WebListBox displays a fixed, small amount of data, say around 500~1000 rows, WebDataSource can be overkill.<br><br>However, for data that comes from a large database, it&#8217;s a different story. You could waste precious server resources duplicating the same data you have in your database into your app’s memory. And even worse, the data would be duplicated in every Session seeing that WebListBox.<br><br>In this tutorial, this is the WebListBox we are going to build:</p>



<figure class="wp-block-video"><video height="1416" style="aspect-ratio: 1368 / 1416;" width="1368" controls src="https://blog.xojo.com/wp-content/uploads/2024/07/Grabacion-de-pantalla-2024-06-18-a-las-14.42.03.mp4.mp4"></video></figure>



<h2 class="wp-block-heading">Let’s prepare a million records database to play with.</h2>



<p>In this example we will use a humble SQLite database, but keep in mind a WebDataSource can be anything. For example you could display the result of calling an external API, or your hard drive filesystem.</p>



<p>The following SQL creates a table called “things”, with three columns: “foo”, “bar” and “baz” with one million rows:</p>



<pre class="wp-block-code"><code>CREATE TABLE things (
  id    INTEGER PRIMARY KEY AUTOINCREMENT,
  foo TEXT,
  bar TEXT,
  baz TEXT
);

-- Time to populate that table
WITH RECURSIVE cnt(x) AS 
(
   SELECT
      1 
   UNION ALL
   SELECT
      x + 1 
   FROM
      cnt LIMIT 1000000
)
INSERT INTO things (foo, bar, baz)
SELECT
    'foo_' || x AS foo,
    'bar_' || x  AS bar,
    'baz_' || x AS baz
FROM cnt;

-- Finally, let's create some indexes, so we can sort the columns quickly
CREATE INDEX "idx_foo" ON things (
    foo, id, bar, baz
);

CREATE INDEX "idx_bar" ON things (
    bar, id, foo, baz
);

CREATE INDEX "idx_baz" ON things (
    baz, id, foo, bar
);

VACUUM;</code></pre>



<p>We just need to store this SQL as a string constant, for convenience. Let’s create one, called <code>kDatabaseSetupSQLite</code> in your Application class, and paste it above the SQL code.</p>



<h2 class="wp-block-heading">First Time Setup</h2>



<p>The first time we launch the application, we need to make sure our database file has been created and populated. It won&#8217;t take too much to generate the database, but we&#8217;ll try to do it just once anyway.</p>



<p>Create a new method in your App class, called DBFile, that returns a FolderItem, pointing to the place we want to store the DataBase. Make it Public, as we will use this method later from the Session. The contents:</p>



<pre class="wp-block-code"><code>Return SpecialFolder.Desktop.Child("test-db.sqlite")</code></pre>



<p>Nothing fancy. Use another path if you want. It will be around ~200MB, just remember to delete it when you don&#8217;t need it anymore.</p>



<p>Let&#8217;s create another App method, called SetupDatabase. It will be in charge of creating and populating the database just once, so if you restart the server, the data will still be there:</p>



<pre class="wp-block-code"><code>Var db As New SQLiteDatabase
db.DatabaseFile = DBFile
db.WriteAheadLogging = True

// The file is already there, no need to build it again
If db.DatabaseFile.Exists Then
  Return
End If

db.CreateDatabase
db.Connect
db.ExecuteSQL(kDatabaseSetupSQLite)</code></pre>



<p>Lastly, implement the App.Opening event and add a method call to SetupDatabase:</p>



<pre class="wp-block-code"><code>SetupDatabase</code></pre>



<p>That should do the trick.</p>



<h2 class="wp-block-heading">Preparing the Session</h2>



<p>It&#8217;s recommended to have a Database instance for each Session. Add a new public Property to your Session class called Database of type SQLiteDatabase.</p>



<p>Then, add a handler for the Opening event with the following code:</p>



<pre class="wp-block-code"><code>Database = New SQLiteDatabase
Database.DatabaseFile = App.DBFile
Database.WriteAheadLogging = True
Database.Connect</code></pre>



<p>Every time a user arrives to the web application, a new isolated SQLiteDatabase connection will be created.</p>



<h2 class="wp-block-heading">Implementing the WebDataSource Interface</h2>



<p>Since Xojo 2024r2, the amount of methods you need in order to implement WebDataSource has been reduced.</p>



<p>Create a new class called DatabaseDataSource. Then, in the inspector panel, select the WebDataSource interface:</p>



<figure class="wp-block-video"><video height="1528" style="aspect-ratio: 2560 / 1528;" width="2560" controls src="https://blog.xojo.com/wp-content/uploads/2024/07/Grabacion-de-pantalla-2024-06-18-a-las-11.48.19.mp4.mp4"></video></figure>



<p>This includes the three required methods: ColumnData, RowCount and RowData.</p>



<p><strong>ColumnData</strong><br>In this method, you need to return an array of <a href="https://documentation.xojo.com/api/web/weblistboxcolumndata.html#weblistboxcolumndata">WebListBoxColumnData</a>. We have four columns in this example, here is the code:</p>



<pre class="wp-block-code"><code>Var result() As WebListBoxColumnData
result.Add(New WebListBoxColumnData("ID", "id"))
result.Add(New WebListBoxColumnData("Foo", "foo"))
result.Add(New WebListBoxColumnData("Bar", "bar"))
result.Add(New WebListBoxColumnData("Baz", "baz"))

Return result</code></pre>



<p><strong>RowCount</strong><br>Xojo needs to know the amount of data your data source has. Returning an Integer is enough, but we will query our database.</p>



<pre class="wp-block-code"><code>Try
  Var rows As RowSet = Session.Database.SelectSQL("SELECT COUNT(*) AS counter FROM things")
  Return rows.Column("counter").IntegerValue
Catch DatabaseException
  Return 0
End Try</code></pre>



<p><strong>RowData</strong><br>This is the place where you need to return the row contents. As you can see, there is a rowCount and a rowOffset parameter, meaning that we won&#8217;t need to return 1 million records. The control just loads a subset. The amount is dynamically calculated, and varies depending on the height of your WebListBox and the height of the rows.</p>



<p>A sortColumns parameter is also provided. If you allow your users to sort the columns, you need to use it to know the column and direction. Fortunately, this example has sortable columns. Here is the code to comply with the WebDataSource Interface:</p>



<pre class="wp-block-code"><code>Var sql As String = "SELECT id, foo, bar, baz FROM things"
If sortColumns &lt;&gt; "" Then
  sql = sql + " ORDER BY " + sortColumns
End If
sql = sql + " LIMIT " + rowOffset.ToString + ", " + rowCount.ToString

Var result() As WebListBoxRowData
Var rows As RowSet = Session.Database.SelectSQL(sql)

// This isn't needed, it's just to demonstrate how to use cell renderers
Var style As New WebStyle
style.Bold = True
style.BackgroundColor = Color.Teal
style.ForegroundColor = Color.White

For Each row As DatabaseRow In rows
  Var newRowData As New WebListBoxRowData
  newRowData.PrimaryKey = row.Column("id").IntegerValue
  newRowData.Value("id") = row.Column("id")
  newRowData.Value("foo") = row.Column("foo")
  newRowData.Value("bar") = New WebListBoxStyleRenderer(style, row.Column("bar"))
  newRowData.Value("baz") = row.Column("baz")
  result.Add(newRowData)
Next

Return result</code></pre>



<h2 class="wp-block-heading">Preparing the User Interface</h2>



<p>You&#8217;ve reached the easiest part, building the interface takes less than a minute.</p>



<ol class="wp-block-list">
<li>Drop a DatabaseDataSource control into your WebPage</li>



<li>Drop a WebListBox control into your WebPage</li>



<li>In the WebListBox Opening event, configure the DataSource</li>
</ol>



<p>If you name your DataSource instance &#8220;MyDataSource&#8221;, this is the line of code required in the WebListBox Opening event:</p>



<pre class="wp-block-code"><code>Me.DataSource = MyDataSource</code></pre>



<p>Here is a short video:</p>



<figure class="wp-block-video"><video height="1682" style="aspect-ratio: 2800 / 1682;" width="2800" controls src="https://blog.xojo.com/wp-content/uploads/2024/07/Grabacion-de-pantalla-2024-06-18-a-las-12.21.41.mp4.mp4"></video></figure>



<h2 class="wp-block-heading">That&#8217;s It!</h2>



<p>The WebListBox control, when combined with a WebDataSource, is a very robust and performant solution for displaying a large set of data.</p>



<p>Download the project:</p>



<div class="wp-block-file"><a id="wp-block-file--media-6f1fe487-dbb0-4d6e-a5c9-3a89f0f2fb9b" href="https://blog.xojo.com/wp-content/uploads/2024/07/weblistbox-million-rows.xojo_binary_project-1.zip">weblistbox-million-rows.xojo_binary_project</a></div>



<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/2024/07/Grabacion-de-pantalla-2024-06-18-a-las-14.42.03.mp4.mp4" length="2629948" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/07/Grabacion-de-pantalla-2024-06-18-a-las-11.48.19.mp4.mp4" length="1234967" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/07/Grabacion-de-pantalla-2024-06-18-a-las-12.21.41.mp4.mp4" length="2146506" type="video/mp4" />

			</item>
		<item>
		<title>What&#8217;s New in Xojo Web in 2024r2</title>
		<link>https://blog.xojo.com/2024/06/26/whats-new-in-xojo-web-in-2024r2/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Wed, 26 Jun 2024 15:00:00 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[2024r2]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo IDE]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13201</guid>

					<description><![CDATA[We're excited about Xojo 2024r2. Performance, control sets, improvements for current controls and bug fixes. You will love this release.]]></description>
										<content:encoded><![CDATA[
<p>We&#8217;re excited about Xojo 2024r2. Performance, control sets, improvements for current controls and bug fixes. You will love this release.</p>



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



<p>There are cases where you have a bunch of controls with the same functionality. Imagine you are coding a calculator and you&#8217;ve just added the WebButtons for each digit. It would be repetitive and error prone to add the same code to Pressed events, on each button when the only thing that changes is the numeric value.</p>



<p>A set of controls can be grouped, so you can think about them like if you were using an array. You can add event handlers to the group itself. Events will be enhanced with an &#8220;index&#8221; parameter, to help you decide what to do, depending on the element.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="982" src="https://blog.xojo.com/wp-content/uploads/2024/06/Session-1024x982.png" alt="" class="wp-image-13202" srcset="https://blog.xojo.com/wp-content/uploads/2024/06/Session-1024x982.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/06/Session-300x288.png 300w, https://blog.xojo.com/wp-content/uploads/2024/06/Session-768x736.png 768w, https://blog.xojo.com/wp-content/uploads/2024/06/Session.png 1116w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Create Tabs and Embed Controls at Runtime in WebTabPanel and WebPagePanel</h2>



<p>Same as with Control Sets, this is something that was already present in Desktop projects and we wanted to include it for Web. From now on, you will be able to create and remove tabs and pages in WebTabPanel and WebPagePanel controls, respectively. Controls can also be added and removed at runtime, or move controls between tabs or pages whenever you need.</p>



<p>This opens a new world of possibilities for your applications, where you can provide your end users a way to have multiple contexts open at the same time.</p>



<figure class="wp-block-video"><video height="902" style="aspect-ratio: 1648 / 902;" width="1648" controls src="https://blog.xojo.com/wp-content/uploads/2024/06/Grabacion-de-pantalla-2024-06-16-a-las-13.05.26.mp4.mp4"></video></figure>



<h2 class="wp-block-heading"><strong>WebListBox: Configurable Header and Row Height, Border and Line Style</strong></h2>



<p>You will be able to configure the height of WebListBox headers and rows with the same API you are used to using in your Desktop projects. You won&#8217;t need to tweak them with CSS anymore.</p>



<figure class="wp-block-video"><video height="1018" style="aspect-ratio: 1648 / 1018;" width="1648" controls src="https://blog.xojo.com/wp-content/uploads/2024/06/Grabacion-de-pantalla-2024-06-16-a-las-13.08.01.mp4.mp4"></video></figure>



<p><a href="https://documentation.xojo.com/versions/2024r2/api/user_interface/web/weblistbox.html#weblistbox-hasborder">HasBorder</a> and <a href="https://documentation.xojo.com/versions/2024r2/api/user_interface/web/weblistbox.html#weblistbox-gridlinestyle">GridLineStyle</a> has also been added to Web projects, allowing you to remove the outside border, display only vertical lines between the columns&#8230; or just remove them.</p>



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



<p>Speaking of WebListBox improvements, you&#8217;ll find that the WebDataSource is easier to implement. You won&#8217;t need to implement SortedPrimaryKeys and UnsortedPrimaryKeys methods anymore.</p>



<p>There are only three methods required now:</p>



<ul class="wp-block-list">
<li><strong>ColumnData</strong>: Where you will define the amount of columns, names, and configure if they are sortable</li>



<li><strong>RowCount</strong>: So the control can now the amount of space it will need</li>



<li><strong>RowData</strong>: This is where you return an array of rows</li>
</ul>



<p>WebListBox lazy load rows, meaning that it will only ask your DataSource for the amount of rows being displayed on screen. It will only fetch more when needed.</p>



<h2 class="wp-block-heading"><strong>WebListBox Improvements When Using a WebDataSource</strong></h2>



<p>Using a WebListBox with a DataSource makes it possible to display very large amounts of data. Until now, you were able to display thousands of rows very quickly. This release improves the way Xojo uses your DataSource, without having to change a line of code in your projects.</p>



<p>Scrolling through the data will display the rows much faster than before. Just for comparison, 2024r1.1 was able to display 1 million rows in about 6 seconds in my computer. The same project, using 2024r2, can display them in less than 100ms.</p>



<p>But is not just the speed that has been improved. Its memory footprint has been dramatically reduced as well. Displaying 1 million records in 2024r1.1 used about 1 GB of RAM, where 2024r2 will use just a few MB instead.</p>



<p>I can&#8217;t imagine a use case where you need to display millions of rows and scroll through them. But if you find one, you will be able to implement it with Xojo <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<h2 class="wp-block-heading"><strong>WebButtons Can be Resized Now</strong></h2>



<p>In order to make it easier to migrate your Web 1 projects, you will be able to modify the height of your WebButtons. The web framework will also take care to reduce the font size if needed when the button is smaller.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="844" src="https://blog.xojo.com/wp-content/uploads/2024/06/Press-me-1024x844.png" alt="" class="wp-image-13205" srcset="https://blog.xojo.com/wp-content/uploads/2024/06/Press-me-1024x844.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/06/Press-me-300x247.png 300w, https://blog.xojo.com/wp-content/uploads/2024/06/Press-me-768x633.png 768w, https://blog.xojo.com/wp-content/uploads/2024/06/Press-me.png 1425w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading"><strong>Individual Indicator for Each Segment of WebSegmentedButton</strong></h2>



<p>There are situations where you want to mix different &#8220;indicators&#8221; (different colors) in a single WebSegmentedButton control. For example, pressing on one of the segments can be a destructive action, so you could use the Danger indicator. By default, segments will use the indicator you set in the Inspector panel, but you will be able now to individually override one of them.</p>



<pre class="wp-block-code"><code>Me.Indicator = WebUIControl.Indicators.Primary
Me.SegmentAt(1).Indicator = WebUIControl.Indicators.Danger
Me.SegmentAt(2).Indicator = WebUIControl.Indicators.Success</code></pre>



<p>Having 4 segments, this will be the result of above example at runtime:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="724" height="220" src="https://blog.xojo.com/wp-content/uploads/2024/07/Captura-de-pantalla-2024-06-16-a-las-12.34.38.png" alt="" class="wp-image-13331" srcset="https://blog.xojo.com/wp-content/uploads/2024/07/Captura-de-pantalla-2024-06-16-a-las-12.34.38.png 724w, https://blog.xojo.com/wp-content/uploads/2024/07/Captura-de-pantalla-2024-06-16-a-las-12.34.38-300x91.png 300w" sizes="auto, (max-width: 724px) 100vw, 724px" /></figure>



<h2 class="wp-block-heading">Outlined WebButton and WebSegmentedButton</h2>



<p>Some GUIs could become overwhelming, when every button looks like a call to action. The new Outlined property, available in WebButton and WebSegmentedButton controls, can help with heavily loaded interfaces. Here is how it looks like:</p>



<figure class="wp-block-video"><video height="822" style="aspect-ratio: 1648 / 822;" width="1648" controls src="https://blog.xojo.com/wp-content/uploads/2024/06/Grabacion-de-pantalla-2024-06-16-a-las-12.40.05.mp4.mp4"></video></figure>



<h2 class="wp-block-heading"><strong>Performance, Memory Leaks, Bug Fixes</strong></h2>



<p>Last, but not least, 2024r2 comes with great performance improvements. We&#8217;ve been improving the web server to handle even more requests per second. If you are using Xojo Web for exposing an API, it will be able to serve more requests in less time. For regular Xojo Web applications, it means it will be able to handle more events and reply to them faster.</p>



<p>Here is a comparison of the same project during the different releases of Xojo:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="810" src="https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1024x810.png" alt="" class="wp-image-13207" srcset="https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1024x810.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-300x237.png 300w, https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-768x608.png 768w, https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic.png 1407w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Latency has also been improved, Xojo is able already to reply in less than 2ms:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="810" src="https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1-1024x810.png" alt="" class="wp-image-13208" srcset="https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1-1024x810.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1-300x237.png 300w, https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1-768x608.png 768w, https://blog.xojo.com/wp-content/uploads/2024/06/Pasted-Graphic-1.png 1422w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>If you are still serving Web APIs with Web 1, this is a good opportunity to migrate:</p>



<figure class="wp-block-table"><table><tbody><tr><td><br></td><td><strong>2019r3.2</strong></td><td><strong>2024r2</strong></td></tr><tr><td>Average Latency</td><td>133.4 ms</td><td>1.98 ms</td></tr><tr><td>Max Latency</td><td>287.3 ms</td><td>143.52 ms</td></tr><tr><td>Requests per second</td><td>76</td><td>8900</td></tr><tr><td>Transfer Rate</td><td>9.89 KB/s</td><td>1.5 MB/s</td></tr></tbody></table></figure>



<h2 class="wp-block-heading"><strong>That&#8217;s a Wrap!</strong></h2>



<p>As usual, I&#8217;d like to send a big thank you to everyone taking the time creating bug reports, feature requests and testing beta releases. This wouldn&#8217;t be possible without your support.</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/2024/06/Grabacion-de-pantalla-2024-06-16-a-las-13.05.26.mp4.mp4" length="172691" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/06/Grabacion-de-pantalla-2024-06-16-a-las-13.08.01.mp4.mp4" length="300122" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2024/06/Grabacion-de-pantalla-2024-06-16-a-las-12.40.05.mp4.mp4" length="156104" type="video/mp4" />

			</item>
		<item>
		<title>Improvements to Xojo Web in Xojo 2024r1</title>
		<link>https://blog.xojo.com/2024/03/26/popovers-and-other-improvements-in-xojo-web/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 26 Mar 2024 15:27:06 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[2024r1]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo IDE]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12684</guid>

					<description><![CDATA[Our web framework continues improving, with interesting new features and tons of bug fixes. Let’s take a look to some highlighted 2024r1 changes!]]></description>
										<content:encoded><![CDATA[
<p>Our web framework continues improving, with interesting new features and tons of bug fixes. Let’s take a look to some highlighted 2024r1 changes!</p>



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



<p>Similar to WebDialogs, popovers give you the opportunity to improve your apps’ UX. They are ephemeral screens where you can place text and controls.</p>



<p>Unlike the WebDialog, which is always centered and prevents the user to interact with other controls, Popovers can be placed on specific controls, where that information matters.</p>



<p>Think about them as enhanced “contextual menus” but, instead of just plain text menus, you can add anything you like. Have you ever dreamed of adding a WebMapViewer into some sort of contextual menu? Now you can!</p>



<p>The API is very simple. Create a container, add some controls and that’s it, really. You will just have to create a new instance of that container and show it as a Popover, specifying the control it should be pointing to.</p>



<p>Let’s say you have a container, called “MyTextFieldContainer”, and you want to display it below a WebLabel called “MyLabel”. Here is the code:</p>



<pre class="wp-block-code"><code>Var c As New MyTextFieldContainer
c.ShowPopover(MyLabel)</code></pre>



<p>By default, it will be shown below the specified control, but if you want to show it in a different place, you can use the new DisplaySides enumeration. As easy as this:</p>



<pre class="wp-block-code"><code>Var c As New TextFieldContainer
c.ShowPopover(MyLabel, WebContainer.DisplaySides.Top)</code></pre>



<p>As you can see, Web Projects’ Popovers are just container instances that you will show dynamically. That gives you the opportunity to raise events, add custom computed properties or implement the Observer interface. If you are already familiar with Containers, you already know how to use Popovers. Learn more about <a href="https://blog.xojo.com/2024/03/26/popovers-for-xojo-desktop-web-and-ios/">Popovers</a>.</p>



<h2 class="wp-block-heading">Displaying contextual menus programmatically</h2>



<p>Sometimes Popovers could be overkill for the task. If you just want to display a menu with some textual items inside, a contextual menu might be enough.</p>



<p>Imagine you have a WebTextLabel where you want to display the contextual menu whenever the user Presses on it. In its Opening event you could define the ContextualMenu:</p>



<pre class="wp-block-code"><code>Var menu As New WebMenuItem
menu.AddMenuItem("Foo")
menu.AddMenuItem("Bar")
menu.AddMenuItem("Baz")

Me.ContextualMenu = menu</code></pre>



<p>Implement the WebLabel.Pressed event and add this code:</p>



<pre class="wp-block-code"><code>Me.ContextualMenu.PopUp</code></pre>



<p>As easy as that.</p>



<h2 class="wp-block-heading">New RemoveControl method</h2>



<p>WebViews controls, like WebPage and WebContainer, now supports removing controls. This gives you the missing piece to create GUIs programmatically, as AddControl was already supported .</p>



<p>This can be useful when you are presenting a form to your end user with an unknown amount of fields.</p>



<p>For example, your user is filling the profile and you want to support having multiple contact fields. Some users will want to add 1 phone, others 2, and others would prefer to be contacted just by email.</p>



<p>Adding and removing controls dynamically gives you the opportunity to build this kind of features. Instead of adding a fixed amount of contact methods, you can adapt your app to what your user really needs.</p>



<h2 class="wp-block-heading">Performance and memory usage improvements</h2>



<p>We’re landing at my favorite part, improvements that nobody will see… unless you want to share your server monitoring stats, which is cool.</p>



<p>2024r1 comes with less Disk I/O usage. In my own benchmarks, Xojo Web is now able to serve about 1200 requests per second via the WebApplication.HandleURL event. That’s around a nice 20% more, compared to the previous version.</p>



<p>Also, thanks to Jeremie Leroy (one of our Xojo MVPs) and Bruno Fréchette, we’ve managed to identify and fix some memory leaks. In 2024r1, your web application will be doing a better job at cleaning up after processing requests.</p>



<h2 class="wp-block-heading">Bug fixes</h2>



<p>The list of fixes is big, you can inspect the whole list in the <a href="https://documentation.xojo.com/resources/release_notes/2024r1.html">2024r1 Release Notes</a> page.</p>



<p><strong>Web fixes by category:</strong></p>



<ul class="wp-block-list">
<li>Compiler: 1</li>



<li>IDE: 7</li>



<li>Framework: 40</li>
</ul>



<p>18 extra regressions were reported and fixed during the beta period. A huge thank you to everyone taking the time to test our releases and reporting issues before the final release becomes available.</p>



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



<p>We hope you are as excited as we are for this release. I’m personally looking forward to see what you’re building, please remember to mention us on your favorite social network so we all can see what you’re working on.</p>



<p>In the meantime, we are already working hard preparing our next release, 2024r2. Spoilers: You will love it!</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>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Performance Improvements in Xojo Web</title>
		<link>https://blog.xojo.com/2023/12/12/performance-improvements-in-xojo-web/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 12 Dec 2023 14:30:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[2023r4]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo IDE]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12313</guid>

					<description><![CDATA[The last big Xojo release in 2023 comes with a lot of performance improvements everywhere. The Xojo IDE itself is faster, which gives you Time to Reflect on Stack Optimization. In this post, I want to detail those improvements in Xojo 2023r4 that target Xojo Web including faster HandleURL responses, faster transfer rates in Windows and Linux, static assets cache control, Events improvements and a new experimental option.]]></description>
										<content:encoded><![CDATA[
<p>The last big Xojo release in 2023 comes with a lot of performance improvements everywhere. The Xojo IDE itself is <a href="https://blog.xojo.com/2023/12/12/small-and-simple-changes-to-speed-up-the-xojo-ide/">faster</a>, which gives you <a href="https://blog.xojo.com/2023/12/12/time-to-reflect-on-stack-optimization/">Time to Reflect on Stack Optimization</a>. In this post, I want to detail those improvements in Xojo 2023r4 that target Xojo Web including faster HandleURL responses, faster transfer rates in Windows and Linux, static assets cache control, Events improvements and a new experimental option.</p>



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



<h3 class="wp-block-heading">Faster HandleURL Responses</h3>



<p>With Xojo Web you can create APIs backing your Mobile or Desktop applications. Just by updating to Xojo 2023r4, your web services will get the benefit of much faster responses and the ability to handle many more requests per second.</p>



<p>Just to compare between different Xojo versions, we’ve created some benchmarks using Xojo Web 1 (with Xojo 2019r3.2) and some Xojo Web 2 releases, 2023r3.1 and the latest one, 2023r4.</p>



<p>Here are the results, returning plain text:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="897" height="1024" src="https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-897x1024.png" alt="" class="wp-image-12314" srcset="https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-897x1024.png 897w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-263x300.png 263w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-768x877.png 768w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1346x1536.png 1346w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms.png 1726w" sizes="auto, (max-width: 897px) 100vw, 897px" /></figure>
</div>


<p>And the same test, but this time returning a string generated by JSONItem:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="916" height="1024" src="https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1-916x1024.png" alt="" class="wp-image-12315" srcset="https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1-916x1024.png 916w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1-268x300.png 268w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1-768x859.png 768w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1-1374x1536.png 1374w, https://blog.xojo.com/wp-content/uploads/2023/12/Avg-Latency-ms-1.png 1764w" sizes="auto, (max-width: 916px) 100vw, 916px" /></figure>
</div>


<p>Xojo 2023r4 is capable of serving around 20x more requests per second compared to Web 1, and around 4x compared to Xojo 2023r3.1. And thanks to the reduced latency time, your API will return the contents much faster.</p>



<h3 class="wp-block-heading">Faster Transfer Rates in Windows and Linux</h3>



<p>While working on performance, we’ve found that applications deployed on Windows and Linux were serving large files much slower than those deployed on macOS servers.</p>



<p>William improved the low level code for sockets on those targets, allowing the server to transfer large files at a much faster speed. During my tests, I’ve seen 10x faster transfer rates.</p>



<p>But this doesn’t affect only our Web target! If you are using a ServerSocket with TCPSocket classes, your Console and Desktop applications will also benefit from these improved transfer rates.</p>



<h3 class="wp-block-heading">Static Assets Cache Control</h3>



<p>In this release, we’ve also improved how the framework interacts with the browser. When your user visits your web application for the first time, it will store all of the required JavaScript and CSS files.</p>



<p>This was already happening in previous releases but with a subtle difference. From now on, the browser won’t even need to check with the server if the file has changed since the last visit. This translates to faster load times for your users and less server load for you since the server won’t need to handle all those requests anymore.</p>



<h3 class="wp-block-heading">Improved Compile Time</h3>



<p>In this release, Xojo Web will compile your projects a few seconds faster. The first time you compile your project, it will cache the result of some processes that are only changing between Xojo releases.</p>



<p>Here is a comparison between 2023r3.1 and 2023r4, both are running a debug session of a blank project:</p>



<figure class="wp-block-video aligncenter"><video height="672" style="aspect-ratio: 2558 / 672;" width="2558" controls src="https://blog.xojo.com/wp-content/uploads/2023/12/web-blank-project-compile-time.mp4"></video></figure>



<p>That’s around 3-4 seconds faster every time a project compiles.</p>



<h3 class="wp-block-heading">Events Improvements</h3>



<p>Some web controls were sending information from the browser to the server more frequently than needed. For example, a WebContainer.Scrolled event was being sent for every scrolled pixel, causing unnecessary server load.</p>



<p>We’ve been reviewing these controls and have made some improvements:</p>



<ul class="wp-block-list">
<li>WebCombobox</li>



<li>WebContainer</li>



<li>WebSearchField</li>



<li>WebTextArea</li>



<li>WebTextField</li>



<li>WebUploader</li>
</ul>



<p>All of them will continue communicating their state updates, but the framework will focus on delivering the latest value available.</p>



<p>For example, in a WebSearchField, if the user writes &#8220;hello&#8221;, the framework will send the first key press (&#8220;h&#8221;) as soon as it happens. The next event it will send will depend on how fast the user types, so it can be either &#8220;hel&#8221; or maybe directly &#8220;hello&#8221;. What is guaranteed is the TextChanged event will be fired for the final value (&#8220;hello&#8221; in this example).</p>



<h3 class="wp-block-heading">New Experimental Option</h3>



<p>WebSession has a new experimental option available, disabled by default. “<a href="https://documentation.xojo.com/api/web/websession.html#websession-sendeventsinbatches">Send Events in Batches</a>”:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="596" height="714" src="https://blog.xojo.com/wp-content/uploads/2023/12/Interfaces.png" alt="" class="wp-image-12317" srcset="https://blog.xojo.com/wp-content/uploads/2023/12/Interfaces.png 596w, https://blog.xojo.com/wp-content/uploads/2023/12/Interfaces-250x300.png 250w" sizes="auto, (max-width: 596px) 100vw, 596px" /></figure>
</div>


<p>Turning it on will make our JavaScript framework group different event notifications in a single request. Projects that contain complex layouts that show and hide several controls at once may benefit from snappier GUIs.</p>



<p>As a side effect, it will also ensure the events arrive to the server in the correct order. Think about a login screen where the user has an email field, a password and a “Login” button with the Default setting turned on (to allow the user to trigger the Pressed event by pressing the Enter key). When sending the events in different requests, because of network latencies, the WebButton.Pressed event could arrive at the server before the last WebTextField.TextChanged.</p>



<p>We would love to hear your experiences when turning on this experimental option. If you find an issue, <a href="https://tracker.xojo.com/xojoinc/xojo/-/issues/new" target="_blank" rel="noreferrer noopener">please report it</a>.</p>



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



<p>As always, while Xojo 2023r4 comes with a lot of performance improvements, it also comes with bug fixes and feature requests. I want to again thank everyone who took the time to create new Bug reports and Feature Requests, and tested the pre-releases.</p>



<p>We’re looking forward to see what you build with it!</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/2023/12/web-blank-project-compile-time.mp4" length="538605" type="video/mp4" />

			</item>
		<item>
		<title>Introducing Xojo&#8217;s New WebMapViewer Renderer</title>
		<link>https://blog.xojo.com/2023/10/10/introducing-xojos-new-webmapviewer-renderer/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 10 Oct 2023 13:30:00 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[2023r3]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[WebMapViewer]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12103</guid>

					<description><![CDATA[Xojo 2023r3 comes with a new map renderer for your map driven web applications. MapLibre is a robust Open Source mapping library alternative that Xojo is using under the hood now. With this update, you can create truly interactive maps with Xojo supporting multiple markers and customization.]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2023r3 comes with a new map renderer for your map driven web applications. Let&#8217;s take a look.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="743" src="https://blog.xojo.com/wp-content/uploads/2023/10/WebMapViewer-renderer-1024x743.png" alt="WebMapViewer screenshot showing a driving route." class="wp-image-12175" srcset="https://blog.xojo.com/wp-content/uploads/2023/10/WebMapViewer-renderer-1024x743.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/10/WebMapViewer-renderer-300x218.png 300w, https://blog.xojo.com/wp-content/uploads/2023/10/WebMapViewer-renderer-768x558.png 768w, https://blog.xojo.com/wp-content/uploads/2023/10/WebMapViewer-renderer-1536x1115.png 1536w, https://blog.xojo.com/wp-content/uploads/2023/10/WebMapViewer-renderer-2048x1487.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<h3 class="wp-block-heading"><strong>Some Background</strong></h3>



<p>Xojo has been using Google Maps Embed as our map renderer for a while. Google Maps is a really nice product, but an API key is required nowadays for almost anything. Noticeably, in Xojo&#8217;s Eddie&#8217;s Electronics web example, the map in the customer list was only displayed if you had a valid API key for Google Maps.</p>



<p><a href="https://maplibre.org" data-type="link" data-id="https://maplibre.org">MapLibre</a> is a robust Open Source mapping library alternative that Xojo is using under the hood now. With this update, you can create truly interactive maps with Xojo supporting multiple markers and customization.</p>



<p>While you can still use Google Maps Embed as the renderer, MapLibre is our preferred option and will be Xojo&#8217;s default going forward.</p>



<h3 class="wp-block-heading"><strong>Map Tile Providers</strong></h3>



<p>When switching to another library, we wanted to make sure you, as a developer, have more control. WebMapViewer comes with a new property, StyleURL, pointing to an endpoint that returns a Style file.</p>



<p>Style files are JSON documents following the <a href="https://maplibre.org/maplibre-style-spec/" data-type="link" data-id="https://maplibre.org/maplibre-style-spec/">MapLibre Style Spec</a>. The easiest way to create a customized map is to register in one of the providers that supports this format. These providers will give you a style URL that you can use with your map. Some of them:</p>



<ul class="wp-block-list">
<li><a href="https://www.maptiler.com">https://www.maptiler.com</a></li>



<li><a href="https://www.mapbox.com/">https://www.mapbox.com</a></li>



<li><a href="https://stadiamaps.com">https://stadiamaps.com</a></li>



<li><a href="https://www.arcgis.com">https://www.arcgis.com</a></li>
</ul>



<p>By default, Xojo uses <a href="https://www.openstreetmap.org/">OpenStreetMap</a> raster tiles which should be OK for development or little web applications.</p>



<p>But you aren&#8217;t limited to using third party providers anymore. In projects where privacy is important or when you don&#8217;t want to be worried about monthly limits or prices, you can use software installed on premises to serve your own map vector tiles!</p>



<p><a href="https://github.com/maplibre/martin" data-type="link" data-id="https://github.com/maplibre/martin">Martin</a> is Open Source, but you can also use a commercial solution like <a href="https://www.maptiler.com/server/" data-type="link" data-id="https://www.maptiler.com/server/">MapTiler Server</a>.</p>



<h3 class="wp-block-heading"><strong>Address Lookup</strong></h3>



<p>Same as with map tiles, by default your maps will be using a free to use Geocoding service, <a href="https://nominatim.org">Nominatim</a>. If you hit a limit or if, for example, you are working on a project with privacy limitations, you can install Nominatim on premises.</p>



<p>Using WebMapLocation.LookupProviderURL, you can point to your own Nominatim server.</p>



<h3 class="wp-block-heading"><strong>Retrieving and Drawing Routes</strong></h3>



<p>Last, but not least, you can retrieve and render routes, using OpenStreetMap. No matter what map tile provider you are using, you can draw routes on the map. When you use the Directions mode, all you have to do is add locations to your map.</p>



<p>But if you need more control, switch your WebMapViewer to View mode and use the new methods for getting and drawing routes. When using the method to retrieve the route, you will obtain a <code>MapRoute</code> object with distance and duration information. You can also use this object for things like serializing it and storing the result in a database. This allows you to skip sending a new routing request to the service and just render it.</p>



<p>While driving will be the default, the <code>transportType</code> parameter supports Car, Bike and Walking.</p>



<p>Make sure to check the updated <a href="https://documentation.xojo.com/api/user_interface/web/webmapviewer.html">WebMapViewer</a> in the Xojo programming documentation.</p>



<h3 class="wp-block-heading"><strong>That&#8217;s a Wrap!</strong></h3>



<p>We are already working on new features for this control that will come in upcoming releases, and we can&#8217;t wait to see what you create with this new version of WebMapViewer.</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>
					
		
		
			</item>
		<item>
		<title>Adding Icon Badges and a Manifest to Xojo Web Applications</title>
		<link>https://blog.xojo.com/2023/10/05/adding-icon-badges-and-a-manifest-to-xojo-web-applications/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Thu, 05 Oct 2023 18:27:17 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12140</guid>

					<description><![CDATA[With macOS Sonoma, users can add a Xojo web app to the Home / Dock. That brings icon badges and manifest files to Xojo web apps starting with Xojo 2023r2. Let’s see how you can use them to make your web apps more accessible and useful.]]></description>
										<content:encoded><![CDATA[
<p>With macOS Sonoma, users can add a Xojo web app to the Home / Dock. That brings icon badges and manifest files to Xojo web apps starting with Xojo 2023r2. Let’s see how you can use them to make your web apps more accessible and useful.</p>



<p>Before we jump into the topic, it’s worth mentioning that this is new in Safari 17, but it is a W3C Standard that might work with other combinations of browser and operating system.</p>



<p>One of the biggest advantages of creating a web app is that users won’t need to update it manually. Once a new version is deployed, a browser refresh will be enough to update- which Xojo handles that automatically. If we are talking about a large company with hundreds of computers, it’s easy to see how having a web-based Intranet, for example, would reduce maintenance costs.</p>



<p>Step by step, browser vendors are allowing developers to access APIs that are traditionally reserved for native desktop or  mobile developers.</p>



<h3 class="wp-block-heading">Adding Icon Badges</h3>



<p>When users add a web application to the Dock, developers have the opportunity to set a numerical badge. This helps let the user know the amount of items requiring attention.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="478" height="202" src="https://blog.xojo.com/wp-content/uploads/2023/10/xojo-badge.png" alt="" class="wp-image-12148" srcset="https://blog.xojo.com/wp-content/uploads/2023/10/xojo-badge.png 478w, https://blog.xojo.com/wp-content/uploads/2023/10/xojo-badge-300x127.png 300w" sizes="auto, (max-width: 478px) 100vw, 478px" /></figure>
</div>


<p>Missed calls, unread message notifications or the minutes pending in a Pomodoro session. The meaning of the badge value is determined by you.</p>



<p>This Web API is pretty easy to use in Xojo. Add a few new public methods to the Session object, called <code>SetBadge</code> and <code>ClearBadge</code>, respectively.</p>



<h4 class="wp-block-heading"><strong>SetBadge (amount As Integer)</strong></h4>



<pre class="wp-block-code"><code>Var js() As String

js.Add("if ('setAppBadge' in navigator) {")
js.Add("  navigator.setAppBadge(" + amount.ToString + ");")
js.Add("}")

ExecuteJavaScript(String.FromArray(js))</code></pre>



<h4 class="wp-block-heading"><strong>ClearBadge</strong></h4>



<pre class="wp-block-code"><code>Var js() As String

js.Add("if ('clearAppBadge' in navigator) {")
js.Add("  navigator.clearAppBadge();")
js.Add("}")

ExecuteJavaScript(String.FromArray(js))</code></pre>



<p>That’s it. Whenever you need to display a badge for that user, call <code>Session.SetBadge(42)</code>, for example.</p>



<h3 class="wp-block-heading">Creating a Manifest File</h3>



<p>While is not required, a web app manifest file will allow you to tweak the look and feel of the application when added to the Home / Dock.</p>



<p>In order to let the OS know there is a Manifest file, add a new HTML header. Go to App -&gt; HTML Header and add this line:</p>



<pre class="wp-block-code"><code>&lt;link rel="manifest" href="/manifest.json" /&gt;</code></pre>



<p>Let’s fill in the contents. We have to handle that “/manifest.json” URL. Add a new Event Handler in the app object, select the “HandleURL” event.</p>



<p>This is an example of how to create that file:</p>



<pre class="wp-block-code"><code>Select Case request.Path
Case "manifest.json"
  Var manifest As New JSONItem
  manifest.Value("display") = "standalone" // Remove back/forward buttons
  manifest.Value("name") = "My Xojo Application"
  manifest.Value("short_name") = "Xojo App"

  response.MIMEType = "application/json"
  response.Status = 200
  response.Write(manifest.ToString)
  Return True
End Select</code></pre>



<p>You can check the whole list of parameters available from this website:<br><a href="https://developer.mozilla.org/en-US/docs/Web/Manifest">Web app manifests</a></p>



<h3 class="wp-block-heading">Debugging Web Apps</h3>



<p>Hey! Where are my Developer Tools!?</p>



<p>You can’t directly debug a web app from the app itself. But if needed, you can still open Safari, press on the Develop menu and, from there, access a Developer Tools instance for any web app that is opened:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="575" src="https://blog.xojo.com/wp-content/uploads/2023/10/Safari17_DevelopMenu@2x-1024x575.png" alt="" class="wp-image-12142" srcset="https://blog.xojo.com/wp-content/uploads/2023/10/Safari17_DevelopMenu@2x-1024x575.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/10/Safari17_DevelopMenu@2x-300x168.png 300w, https://blog.xojo.com/wp-content/uploads/2023/10/Safari17_DevelopMenu@2x-768x431.png 768w, https://blog.xojo.com/wp-content/uploads/2023/10/Safari17_DevelopMenu@2x-1536x863.png 1536w, https://blog.xojo.com/wp-content/uploads/2023/10/Safari17_DevelopMenu@2x.png 1916w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<h3 class="wp-block-heading">That’s All!</h3>



<p>While a web app is far from a native desktop app, changes like this make the the gap a little smaller and the user experience a little better.</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>
					
		
		
			</item>
		<item>
		<title>Updates for Web Projects in Xojo 2023r2</title>
		<link>https://blog.xojo.com/2023/08/09/updates-for-web-projects-in-xojo-2023r2/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Wed, 09 Aug 2023 13:30:00 +0000</pubDate>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Bootstrap]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[DarkMode]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web SDK]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[WebListBox]]></category>
		<category><![CDATA[Xojo IDE]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11671</guid>

					<description><![CDATA[Xojo 2023r2 comes with a lot of updates for Xojo Web. While Dark Mode and Bootstrap 5 are the main feature in this release, we've put a lot of effort into making everything better including: improved accessibility, updates to the WebListBox and WebChart and IDE performance improvements and more.]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2023r2 comes with a lot of updates for Xojo Web. While Dark Mode and Bootstrap 5 are the main feature in this release, we&#8217;ve put a lot of effort into making everything better including: improved accessibility, updates to the WebListBox and WebChart, IDE performance improvements and more.</p>



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



<h3 class="wp-block-heading">Dark Mode Support and Bootstrap 5</h3>



<p>You can now create web applications with Xojo that respects users&#8217; Dark Mode preference with Bootstrap 5.</p>



<p>There is a new WebSession.ColorMode property you can use. It will be set as Auto by default, meaning it will match the user&#8217;s OS appearance preference, but it can also be forced to Light or Dark. It can be changed at runtime and per session.</p>



<p>While not everyone likes Dark Mode, some of your end users will appreciate this. Due to medical circumstances, they might actually need it, so please consider adding support even if you don&#8217;t like dark interfaces.</p>



<p>If you want to enable Dark Mode in your previous projects, you will have to manually enable the setting in the Shared Build Settings section (which is turned on by default on new projects):</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="786" src="https://blog.xojo.com/wp-content/uploads/2023/07/Supports-Dark-Mode-Setting-1024x786.png" alt="" class="wp-image-11672" srcset="https://blog.xojo.com/wp-content/uploads/2023/07/Supports-Dark-Mode-Setting-1024x786.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/07/Supports-Dark-Mode-Setting-300x230.png 300w, https://blog.xojo.com/wp-content/uploads/2023/07/Supports-Dark-Mode-Setting-768x589.png 768w, https://blog.xojo.com/wp-content/uploads/2023/07/Supports-Dark-Mode-Setting.png 1114w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p><a href="https://documentation.xojo.com/api/graphics/colorgroup.html">Color Groups</a> can also be used nearly everywhere, and they will be used in the IDE preview when you toggle between Light and Dark Mode:</p>



<figure class="wp-block-video aligncenter"><video height="1680" style="aspect-ratio: 2786 / 1680;" width="2786" controls src="https://blog.xojo.com/wp-content/uploads/2023/07/ColorGroup-IDE-preview.mp4"></video></figure>



<p>In order get Dark Mode support ready for Web, we had to upgrade our internal <a rel="noreferrer noopener" href="https://getbootstrap.com" data-type="URL" data-id="https://getbootstrap.com" target="_blank">Bootstrap</a> dependency from v4.6.1 to v5.3.0, which is a huge leap by itself. Bootstrap 5 comes with a refreshed color palette, new components, modernized existing controls and bug fixes. Please check our previous <a href="https://blog.xojo.com/2023/01/26/bootstrap-5-is-coming-to-the-xojo-web-framework/" data-type="post" data-id="11198">Bootstrap 5 is Coming to the Xojo Web Framework</a> blog post.</p>



<p>If your application wasn&#8217;t using a custom Bootstrap Theme (bootstrap.min.css), everything should look more or less the same except for the subtle color palette differences and rounder buttons. Bootstrap 4 themes aren&#8217;t supported in Bootstrap 5, please replace it with a v5 theme if needed. Not every theme supports Dark Mode, but the one included in Xojo does.</p>



<p>If you are a theme builder, please check the <a rel="noreferrer noopener" href="https://getbootstrap.com/docs/5.3/customize/color-modes/" target="_blank">Bootstrap&#8217;s Color Modes documentation</a>. You can also find free Bootstrap 5 themes available at&nbsp;<a href="https://bootswatch.com" target="_blank" rel="noreferrer noopener">Bootswatch</a>.</p>



<p>We also want to send a big thank you to our third party developers for their effort adapting their Open Source and Commercial plugins and controls to Bootstrap 5. You can learn about what they offer at the Xojo <a href="https://www.xojo.com/store/#addons">Extras Store</a> and in the <a href="https://documentation.xojo.com/resources/third_party/open_source_projects.html">Open Source Projects</a> page in the Xojo Documentation.</p>



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



<p>Navigating and using web applications with the keyboard makes everyone&#8217;s life easier. In Xojo 2023r2 we&#8217;ve upgraded <a href="https://documentation.xojo.com/api/user_interface/web/webpagination.html#webpagination">WebPagination</a> and <a href="https://documentation.xojo.com/api/user_interface/web/webbreadcrumb.html#webbreadcrumb">WebBreadcrumb</a> controls, which are composed of more than one focusable item. Your users will be able to properly use the tab key to go through them.</p>



<figure class="wp-block-video aligncenter"><video height="998" style="aspect-ratio: 1404 / 998;" width="1404" controls src="https://blog.xojo.com/wp-content/uploads/2023/07/Tab-WebPagination-and-WebBreadcrumb.mp4"></video></figure>



<p>We plan to continue working on improving Accessibility. Please open a new <a href="https://tracker.xojo.com/xojoinc/xojo/-/issues/new" target="_blank" rel="noreferrer noopener">Issue</a> if you find anything that can help you and your end users.</p>



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



<p>DataTables, the internal dependency we use for bringing your tables to life, has been upgraded from v1.10.20 to v1.13.4. This recent version includes support for Bootstrap 5 and a few bug fixes that some users were facing in their web projects.</p>



<p>You can now disable your <a href="https://documentation.xojo.com/api/user_interface/web/weblistbox.html#weblistbox">WebListBox</a> by setting its Enabled property to False so your users won&#8217;t be able to interact with it. And also, if you were missing this feature that&#8217;s in the DesktopListBox, you can now add Variant tags to your columns, using the new WebListBox.ColumnTagAt.</p>



<p>Last but not least, this control comes with a visual Inline Editor, like in its Desktop counterpart:</p>



<figure class="wp-block-video aligncenter"><video height="1806" style="aspect-ratio: 2786 / 1806;" width="2786" controls src="https://blog.xojo.com/wp-content/uploads/2023/07/WebListBox-Inline-Edit.mp4"></video></figure>



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



<p>Chart.js, the underlying library we use for <a href="https://documentation.xojo.com/api/user_interface/web/webchart.html#webchart">WebChart</a>, has been upgraded from v2.9.3 to v4.2.1. Again, we&#8217;ve done everything we could on our side so you don&#8217;t have to do anything.</p>



<p>The only exception is with the WebChart.OverrideOptions event. If you are currently using it, you&#8217;ll have to check the library documentation as the internal options JSON has changed.</p>



<p>You can expect the new DesktopChart features to be working on WebChart, like configuring how the lines look like (including the endpoints), background images or prefix and suffixes. Read <a href="https://blog.xojo.com/2023/07/19/2023r2-new-additions-to-desktopchart-mobilechart-and-webchart">New Additions to DesktopChart, MobileChart and WebChart</a> to learn more.</p>



<h3 class="wp-block-heading">Web SDK</h3>



<p>If you are using third party controls, you will notice some of them now have a custom icon in the IDE Library. But even more important, they will use less memory at runtime.</p>



<p>Are you developing Open Source or Commercial Web SDK controls? Remember there is a dedicated <a rel="noreferrer noopener" href="https://forum.xojo.com/c/sdks/web-sdk/23" target="_blank">Web SDK forum</a> where you can ask any questions you may have. </p>



<h3 class="wp-block-heading">IDE Performance and Improved CSS Support</h3>



<p>Bootstrap 5 makes use of the latest CSS features. We took the opportunity to rethink our CSS parser and improve its performance at the same time. As a result, the IDE preview looks even closer to what you see in the browser, and we render everything faster.</p>



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



<p>Over 50 bug fixes and features were included just for Xojo Web in Xojo 2023r2. Please find a full list in the <a href="https://documentation.xojo.com/resources/release_notes/2023r2.html">Release Notes</a>. read more about <a href="https://blog.xojo.com/2023/08/09/bootstrap-5-in-xojo-web-2023r2/">Bootstrap 5</a> and updates to <a href="https://blog.xojo.com/2023/08/09/new-additions-to-desktopchart-mobilechart-and-webchart/">WebChart</a> on the Xojo Programming Blog.  We are looking forward to hearing your thoughts and seeing what you&#8217;re building with Xojo! See you in the forum!</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>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/07/ColorGroup-IDE-preview.mp4" length="646228" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/07/Tab-WebPagination-and-WebBreadcrumb.mp4" length="202785" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/07/WebListBox-Inline-Edit.mp4" length="737982" type="video/mp4" />

			</item>
		<item>
		<title>Bootstrap 5 in Xojo Web 2023r2</title>
		<link>https://blog.xojo.com/2023/08/09/bootstrap-5-in-xojo-web-2023r2/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Wed, 09 Aug 2023 13:30:00 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Bootstrap]]></category>
		<category><![CDATA[DarkMode]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11762</guid>

					<description><![CDATA[Bootstrap continues to improve and as a result we have upgraded the Web framework to the latest version. For most Xojo users, this update won't require any changes at all to your existing projects.]]></description>
										<content:encoded><![CDATA[
<p><a rel="noreferrer noopener" href="https://getbootstrap.com" target="_blank">Bootstrap</a> is the toolkit the Xojo Web framework uses to create the UI controls for your web projects. Bootstrap continues to improve and as a result we have upgraded the Web framework to the latest version.</p>



<p>For most Xojo users, this update won&#8217;t require any changes at all to your existing projects. For those that create their own controls using the Web SDK, there will likely be a minor bit of work.</p>



<h3 class="wp-block-heading">Dark Mode Support</h3>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="716" src="https://blog.xojo.com/wp-content/uploads/2023/01/BeautyShot-3284-1024x716.png" alt="" class="wp-image-11199" srcset="https://blog.xojo.com/wp-content/uploads/2023/01/BeautyShot-3284-1024x716.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/01/BeautyShot-3284-300x210.png 300w, https://blog.xojo.com/wp-content/uploads/2023/01/BeautyShot-3284-768x537.png 768w, https://blog.xojo.com/wp-content/uploads/2023/01/BeautyShot-3284.png 1237w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Eddie&#8217;s Electronics sample app running with Dark Mode support enabled.</figcaption></figure>



<p>The Web framework is currently the only Xojo framework that doesn&#8217;t support Dark Mode. Fortunately, Bootstrap 5 does. As with Desktop targets, users of your Web projects will be able to decide between the light and dark modes. For Web projects, there is now a Supports Dark Mode Build Setting that will be off by default for existing projects and on by default for new ones.</p>



<h3 class="wp-block-heading">More Than Dark Mode</h3>



<p>Visually, Bootstrap 5 comes with some subtle changes. For example the blue color it uses is still blue… but not that blue, helping to increase the contrast of your buttons.</p>



<p>You may notice that the buttons are a little bit rounder by default, following the latest design trends.</p>



<p>The look and feel of some input controls, like checkboxes and radio buttons, will be more similar between different browsers and operating systems.</p>



<p>Bootstrap 5 also includes new components and features, like <a rel="noreferrer noopener" href="https://getbootstrap.com/docs/5.3/components/accordion/" target="_blank">Accordion</a> and <a rel="noreferrer noopener" href="https://getbootstrap.com/docs/5.3/components/offcanvas/" target="_blank">Offcanvas</a>. These may find their way into future releases via the Web framework or from one of the third-party control developers.</p>



<p>Finally, Bootstrap 5 no longer depends on jQuery and it makes use of the latest CSS features which brings us to the next section.</p>



<h3 class="wp-block-heading">Potential Migration Challenges</h3>



<p>We&#8217;ve made it so most Xojo users won&#8217;t need to make any changes to their web projects. For example, we&#8217;ve adapted the Breadcrumb control to look like Bootstrap 4 by default. Generally speaking, if you are using the default theme and you aren&#8217;t using third-party controls, you won&#8217;t need to do anything special.</p>



<p>However, if you are currently using a custom Bootstrap 4 theme that uses a custom bootstrap.min.css file, it may not work properly. If you&#8217;ve downloaded the theme from a website such as <a rel="noreferrer noopener" href="https://bootswatch.com" target="_blank">Bootswatch</a>, you can download an updated Bootstrap 5 compatible theme from the same site. Bootstrap 5 themes are actually easier to find than those for v4.</p>



<p>If you are still curious about Bootstrap 5 specifically, you can view the <a rel="noreferrer noopener" href="https://getbootstrap.com/docs/5.3/migration/" target="_blank">Bootstrap 5 Migration Guide</a> where you can find an extensive list of changes and improvements since Bootstrap 4.6.</p>



<p>If you have any questions, please feel free to ask on the <a rel="noreferrer noopener" href="https://forum.xojo.com" target="_blank">Forum</a>.</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>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Building a Vertical Navigation for your Web Application</title>
		<link>https://blog.xojo.com/2023/03/29/building-a-vertical-navigation-for-your-web-application/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Wed, 29 Mar 2023 12:41:00 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[Atomic Design Methodology]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo Code]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11472</guid>

					<description><![CDATA[Composing new controls using primitives is something you definitely want to explore. Let’s build a reusable vertical navigation, with animations, for your Xojo Web projects using the Atomic Design Methodology.]]></description>
										<content:encoded><![CDATA[
<p>Composing new controls using primitives is something you definitely want to explore. Let’s build a reusable vertical navigation, with animations, for your Xojo Web projects.</p>



<h2 class="wp-block-heading">Brief introduction to the Atomic Design Methodology</h2>



<p>If you haven&#8217;t heard about Atomic Design before, I really recommend that you dig a bit into this topic. With this way of methodology in mind, we will start building the smallest controls we can. Then, we will compose more complex controls reusing the smallest.</p>



<p>Keep in mind you don&#8217;t really need to blindly follow the Atoms, Molecules and Organisms proposed categories, and don&#8217;t overthink where to categorize them. As long as you can compose controls with other controls, that&#8217;s perfect. Adapt it to your own personal way of building software.</p>



<p>The idea resonates perfectly with Xojo and, while we will create a few web controls in this example, you can apply it to other targets like Desktop or Mobile.</p>



<p>Here is a <a href="https://www.youtube.com/watch?v=W-h1FtNYim4">video</a> from Brad Frost, the person behind Atomic Design Methodology.</p>



<h2 class="wp-block-heading">Containers to the rescue! </h2>



<p>In this case, we won&#8217;t need to use any Web SDK control, CSS or JavaScript. We will be using just plain Xojo Web Containers for creating our Atoms and Molecules.</p>



<p>This is how Twitter&#8217;s navigation sidebar looks like:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="280" height="481" src="https://blog.xojo.com/wp-content/uploads/2023/03/Explore.png" alt="" class="wp-image-11473" srcset="https://blog.xojo.com/wp-content/uploads/2023/03/Explore.png 280w, https://blog.xojo.com/wp-content/uploads/2023/03/Explore-175x300.png 175w" sizes="auto, (max-width: 280px) 100vw, 280px" /><figcaption class="wp-element-caption">Twitter Vertical Navigation</figcaption></figure>
</div>


<p>We will create something similar. Using Atomic Design, let&#8217;s break it down it into a few new reusable controls:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="700" height="525" src="https://blog.xojo.com/wp-content/uploads/2023/03/components-atomic-design.png" alt="" class="wp-image-11474" srcset="https://blog.xojo.com/wp-content/uploads/2023/03/components-atomic-design.png 700w, https://blog.xojo.com/wp-content/uploads/2023/03/components-atomic-design-300x225.png 300w" sizes="auto, (max-width: 700px) 100vw, 700px" /><figcaption class="wp-element-caption">Individual Controls</figcaption></figure>
</div>


<p>Each Atom, Molecule and Organism will be a Container. In the above image, we have identified each of them.</p>



<ul class="wp-block-list">
<li>There is a &#8220;Navigation Link Icon&#8221;, an Atom, which will show one of the available <a rel="noreferrer noopener" href="https://icons.getbootstrap.com" data-type="URL" data-id="https://icons.getbootstrap.com" target="_blank">Bootstrap Icons</a>. As you notice in the Twitter example, if the link is active, the icon will be filled.</li>



<li>For the label Atom, we can just use the WebLabel built-in control. There is no need to wrap it in a Container, in this case.</li>



<li>The navigation link will be a Molecule, combining the icon and the label.</li>



<li>The Active Link Indicator will move to the active link, using an animation.</li>



<li>Finally, the Vertical Navigation Control will be the Organism, combining everything into one.</li>
</ul>



<h2 class="wp-block-heading">Navigation Link Icon</h2>



<p>This Control is basically a Container, with an ImageViewer inside. Technically, this could be just an ImageViewer subclass, but using a WebContainer we can also specify its default width and height.</p>



<p>It will have two computed properties:</p>



<ul class="wp-block-list">
<li>Active As Boolean</li>



<li>IconName As String</li>
</ul>



<p>There will also be a private ShowIcon method. Whenever you change either the Active property or IconName, the computed property will call ShowIcon.</p>



<p>The magic is inside ShowIcon:</p>



<pre class="wp-block-code Xojo"><code><code>Var iconColor As Color = If(mActive, Color.Black, Color.LightGray)
Var icon As String = If(mActive, mIconName + "-fill", mIconName)
IconImageViewer.Picture = WebPicture.BootstrapIcon(icon, iconColor)</code></code></pre>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="716" src="https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-13.55.04-1024x716.png" alt="" class="wp-image-11475" srcset="https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-13.55.04-1024x716.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-13.55.04-300x210.png 300w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-13.55.04-768x537.png 768w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-13.55.04.png 1381w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">NavigationLinkIcon in the IDE</figcaption></figure>
</div>


<p>The icon color will be either LightGray or Black, depending if it&#8217;s active or not. There are also a lot of Bootstrap Icons with the &#8220;-fill&#8221; suffix so we&#8217;ll use them. This will force us to only use icons which have that suffix, but we will have to live with that.</p>



<p>The final trick is to use the Inspector Behavior and expose our Active and IconName computed properties. Right click on NavigationLinkIcon, then click on Inspector Behavior:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="400" height="508" src="https://blog.xojo.com/wp-content/uploads/2023/03/Open-in-New-Tab.png" alt="" class="wp-image-11476" srcset="https://blog.xojo.com/wp-content/uploads/2023/03/Open-in-New-Tab.png 400w, https://blog.xojo.com/wp-content/uploads/2023/03/Open-in-New-Tab-236x300.png 236w" sizes="auto, (max-width: 400px) 100vw, 400px" /><figcaption class="wp-element-caption">How to open the Inspector Behavior</figcaption></figure>
</div>


<p>From there you can enable the checkboxes and define their default value:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="716" src="https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-14.00.49-1024x716.png" alt="" class="wp-image-11477" srcset="https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-14.00.49-1024x716.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-14.00.49-300x210.png 300w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-14.00.49-768x537.png 768w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-14.00.49.png 1381w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Enabling properties in the Inspector Behavior</figcaption></figure>
</div>


<p>Now that we have the Control ready, let&#8217;s see how it works on its own:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="716" src="https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-13.51.02-1024x716.png" alt="" class="wp-image-11478" srcset="https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-13.51.02-1024x716.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-13.51.02-300x210.png 300w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-13.51.02-768x537.png 768w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-13.51.02.png 1381w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">NavigationLinkIcon demo</figcaption></figure>
</div>


<figure class="wp-block-video aligncenter"><video height="488" style="aspect-ratio: 660 / 488;" width="660" controls src="https://blog.xojo.com/wp-content/uploads/2023/03/NavigationLinkIcon-demo.mp4"></video><figcaption class="wp-element-caption">NavigationLinkIcon demo</figcaption></figure>



<p>Neat! You can reuse this Atom everywhere, including other projects.</p>



<h2 class="wp-block-heading">Navigation Link Control</h2>



<p>Combining our fresh NavigationLinkIcon, a built-in WebLabel and exposing an API, we&#8217;ll create our NavigationLink Molecule.</p>



<p>Create a new Container and place the items inside. Then add some computed properties:</p>



<ul class="wp-block-list">
<li>Active</li>



<li>Caption</li>



<li>IconName</li>
</ul>



<p>Whenever the property changes, just update the underlying control.</p>



<p>One trick, to make the control clickable, is to add a WebCanvas on top of the other controls. Implement its Pressed event and forward it as a new &#8220;Pressed&#8221; Event Definition.</p>



<p>If you want to show a pointer cursor when the user moves the mouse over your control, add this line of code into the container&#8217;s Opening event:</p>



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



<p>This is how it looks like in the IDE:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="716" src="https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-14.28.18-1024x716.png" alt="" class="wp-image-11480" srcset="https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-14.28.18-1024x716.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-14.28.18-300x210.png 300w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-14.28.18-768x537.png 768w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-14.28.18.png 1381w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">NavigationLink in the IDE</figcaption></figure>
</div>


<p>Let&#8217;s quickly test it:</p>



<figure class="wp-block-video aligncenter"><video height="488" style="aspect-ratio: 660 / 488;" width="660" controls src="https://blog.xojo.com/wp-content/uploads/2023/03/NavigationLink-demo.mp4"></video><figcaption class="wp-element-caption">NavigationLink demo</figcaption></figure>



<p>We are getting there.</p>



<h2 class="wp-block-heading">Active Link Indicator</h2>



<p>We have most of the Atoms and Molecules created already. The Navigation Link Indicator is so simple and so tied to the Sidebar, that I don&#8217;t think creating an individual Atom for it is worth the effort.</p>



<p>Using a WebRectangle, with a line of two of code in its Opening event, will be enough. This is completely up to you!</p>



<h2 class="wp-block-heading">Vertical Navigation Control</h2>



<p>Now it&#8217;s time to glue the Atoms and Molecules together to make our first Organism. Create a new Container called VerticalNavigation.</p>



<p>Drop a WebRectangle on it. Set its Left and Top to 0, and implement its Opening event with these lines of code:</p>



<pre class="wp-block-code Xojo"><code><code>Me.Style.BorderThickness = 0
Me.Style.AddTransition("top", 0.2)</code></code></pre>



<p>That will remove the border that comes by default with this control. It will also tell the browser to animate the rectangle whenever we change the Top position.</p>



<p>The rectangle background color will be a light gray, but this is again up to you.</p>



<p>For the API we want to expose, add these Methods:</p>



<ul class="wp-block-list">
<li>AddLink(caption As String, icon As String, active As Boolean = False)</li>



<li>HandleLinkPressed(sender As NavigationLink)</li>



<li>SetActiveLink(index As Integer)</li>
</ul>



<p>AddLink and SetActiveLink can be left Public, HandleLinkPressed will be a Private Method.</p>



<p>AddLink code:</p>



<pre class="wp-block-code Xojo"><code><code>// We will create a new NavigationLink instance
// and set the properties we're receiving.
Var link As New NavigationLink
link.Caption = caption
link.IconName = icon

// For its pressed event, we will handle it
// internally in the HandleLinkPressed method.
AddHandler link.Pressed, WeakAddressOf HandleLinkPressed

// We will place it programatically in  the container.
Const padding = 10
Var linkTop As Integer = mLinks.Count * (link.Height + padding)
link.EmbedWithin(Self, padding, linkTop, Self.Width - padding, link.Height)

// A reference for this NavigationLink will be
// needed later, so we will store it internally.
mLinks.Add(link)

// Finally, if the item is active, we will
// handle it just like if it's been pressed
// by the user.
If active Then
  SetActiveLink(mLinks.LastIndex)
End If</code></code></pre>



<p>HandleLinkPressed code:</p>



<pre class="wp-block-code xojo"><code><code>SetActiveLink(mLinks.IndexOf(sender))
RaiseEvent Pressed(sender)</code></code></pre>



<p>And, finally, SetActiveLink:</p>



<pre class="wp-block-code xojo"><code><code>// Here we will loop through the NavigationLink
// references we have and enable or disable the
// Active property, depending on the index
// comparison.
For i As Integer = 0 To mLinks.LastIndex
  mLinks(i).Active = i = index
Next

// Move the visual active indicator to the
// NavigationLink position.
ActiveLinkIndicator.Top = mLinks(index).Top</code></code></pre>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="714" src="https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-17.48.51-1024x714.png" alt="" class="wp-image-11482" srcset="https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-17.48.51-1024x714.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-17.48.51-300x209.png 300w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-17.48.51-768x535.png 768w, https://blog.xojo.com/wp-content/uploads/2023/03/Captura-de-Pantalla-2023-03-27-a-las-17.48.51.png 1485w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">VerticalNavigation in the IDE</figcaption></figure>
</div>


<h2 class="wp-block-heading">Final Result</h2>



<p>Everything is ready, drop your VerticalNavigation somewhere in your WebPage and add a few links inside its Opening event:</p>



<pre class="wp-block-code xojo"><code><code>// Setting the third parameter to "True" will set that link as Active.
Me.AddLink("Home", "house")
Me.AddLink("Explore", "binoculars", True)
Me.AddLink("Notifications", "bell")</code></code></pre>



<p>You should see something similar to this:</p>



<figure class="wp-block-video aligncenter"><video height="488" style="aspect-ratio: 660 / 488;" width="660" controls src="https://blog.xojo.com/wp-content/uploads/2023/03/result-demo.mp4"></video><figcaption class="wp-element-caption">Final result!</figcaption></figure>



<p>Congratulations! You&#8217;ve built a vertical navigation, with nice transitions, using some Atomic Design principles.</p>



<p>Code repository: <a rel="noreferrer noopener" href="https://github.com/piradoiv/vertical-navigation-example" target="_blank">https://github.com/piradoiv/vertical-navigation-example</a><br>Download the project: <a rel="noreferrer noopener" href="https://github.com/piradoiv/vertical-navigation-example/archive/refs/heads/main.zip" target="_blank">vertical-navigation-example</a></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>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/03/NavigationLinkIcon-demo.mp4" length="55146" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/03/NavigationLink-demo.mp4" length="210022" type="video/mp4" />
<enclosure url="https://blog.xojo.com/wp-content/uploads/2023/03/result-demo.mp4" length="90366" type="video/mp4" />

			</item>
		<item>
		<title>Bootstrap 5 is Coming to the Xojo Web Framework</title>
		<link>https://blog.xojo.com/2023/01/26/bootstrap-5-is-coming-to-the-xojo-web-framework/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Thu, 26 Jan 2023 23:50:06 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Bootstrap]]></category>
		<category><![CDATA[DarkMode]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web SDK]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo API 2.0]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11198</guid>

					<description><![CDATA[Bootstrap is the toolkit the Xojo Web framework uses to create the UI controls for your web projects. Bootstrap continues to improve and as a result we are working to upgrade the Web framework to the latest version. We are currently planning to ship this updated Web framework in Xojo 2023r2.]]></description>
										<content:encoded><![CDATA[
<p><a rel="noreferrer noopener" href="https://getbootstrap.com" target="_blank">Bootstrap</a> is the toolkit the Xojo Web framework uses to create the UI controls for your web projects. Bootstrap continues to improve and as a result we are working to upgrade the Web framework to the latest version. We are currently planning to ship this updated Web framework in Xojo 2023r2.</p>



<p>For most Xojo users, this update won&#8217;t require any changes at all to your existing projects. For those that create their own controls using the Web SDK, there will likely be a minor bit of work.</p>



<h2 class="wp-block-heading">Dark Mode Support</h2>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="716" src="https://blog.xojo.com/wp-content/uploads/2023/01/BeautyShot-3284-1024x716.png" alt="" class="wp-image-11199" srcset="https://blog.xojo.com/wp-content/uploads/2023/01/BeautyShot-3284-1024x716.png 1024w, https://blog.xojo.com/wp-content/uploads/2023/01/BeautyShot-3284-300x210.png 300w, https://blog.xojo.com/wp-content/uploads/2023/01/BeautyShot-3284-768x537.png 768w, https://blog.xojo.com/wp-content/uploads/2023/01/BeautyShot-3284.png 1237w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Eddie&#8217;s Electronics sample app running with Dark Mode support enabled.</figcaption></figure>



<p>The Web framework is currently the only Xojo framework that doesn&#8217;t support Dark Mode. Fortunately,  Bootstrap 5 does. As with Desktop targets, users of your web projects will be able to decide between the light and dark modes. We plan for this to work identically to the way it works for your Desktop projects now. There will be a Supports Dark Mode Build Setting that will be off by default for existing projects and on by default for new ones.</p>



<h2 class="wp-block-heading">More than Dark Mode</h2>



<p>Visually, Bootstrap 5 comes with some subtle changes. For example the blue color it uses is still blue… but not that blue, helping to increase the contrast of your buttons.</p>



<p>You may notice that the buttons are a little bit rounder by default, following the latest design trends.</p>



<p>The look and feel of some input controls, like checkboxes and radio buttons, will be more similar between different browsers and operating systems.</p>



<p>Bootstrap 5 also includes new components and features, like <a rel="noreferrer noopener" href="https://getbootstrap.com/docs/5.3/components/accordion/" target="_blank">Accordion</a> and <a rel="noreferrer noopener" href="https://getbootstrap.com/docs/5.3/components/offcanvas/" target="_blank">Offcanvas</a>. These may find their way into future releases via the Web framework or from one of the third-party control developers.</p>



<p>Finally, Bootstrap 5 no longer depends on jQuery and it makes use of the latest CSS features which brings us to the next section.</p>



<h2 class="wp-block-heading">Potential Migration Challenges</h2>



<p>We&#8217;ve made it so most Xojo users won&#8217;t need to make any changes to their web projects. For example, we&#8217;ve adapted the Breadcrumb control to look like Bootstrap 4 by default. Generally speaking, if you are using the default theme and you aren&#8217;t using third-party controls, you won&#8217;t need to do anything special.</p>



<p>However, if you are currently using a custom Bootstrap 4 theme that uses a custom bootstrap.min.css file, it may not work properly. If you&#8217;ve downloaded the theme from a website such as <a rel="noreferrer noopener" href="https://bootswatch.com" target="_blank">Bootswatch</a>, you can download an updated Bootstrap 5 compatible theme from the same site. Bootstrap 5 themes are actually easier to find than those for v4.</p>



<p>We are announcing this change to v5 in advance to allow third-party library developers the time to adapt their code and make use of the new Bootstrap 5 HTML and JavaScript API. If you rely upon any third-party controls for your web projects, you will need to upgrade them when new Bootstrap 5-compatible versions become available.</p>



<p>To make the migration as smooth as possible for everyone, we will continue including jQuery and provide independent betas, prior to releasing a version of Xojo with Bootstrap 5.</p>



<p>In the <a href="https://getbootstrap.com/docs/5.3/migration/" target="_blank" rel="noreferrer noopener">Bootstrap 5 Migration Guide</a> you can find an extensive list of changes and improvements since Bootstrap 4.6.</p>



<p>If you have any questions, please feel free to ask on the <a rel="noreferrer noopener" href="https://forum.xojo.com" target="_blank">Forum</a>. Users attending the <a rel="noreferrer noopener" href="https://xojo.com/xdc/london/index.html" target="_blank">Xojo Developer Conference</a> can also meet and talk in person with Xojo engineers, about this or any other topic.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>New Web SDK Examples in 2022r4</title>
		<link>https://blog.xojo.com/2022/12/13/new-web-sdk-examples-in-2022r4/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 13 Dec 2022 15:29:53 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web SDK]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<category><![CDATA[Xojo Resources]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11131</guid>

					<description><![CDATA[There are situations where the included controls and widgets aren't enough. Maybe  the specs of the project require the use of one or more of specific JavaScript libraries, or you just need some code to be executed in the browser. The Web SDK can help, giving you the opportunity to build anything. In 2022r4 we are adding more examples, to help you start building your custom controls.]]></description>
										<content:encoded><![CDATA[
<p>There are situations where the included controls and widgets aren&#8217;t enough. Maybe  the specs of the project require the use of one or more of specific JavaScript libraries, or you just need some code to be executed in the browser.</p>



<p>The Web SDK can help, giving you the opportunity to build anything. In 2022r4 we are adding more examples, to help you start building your custom controls.</p>



<p>Here is the list of the new examples we&#8217;ve added in this release.</p>



<h2 class="wp-block-heading">Custom Button</h2>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="629" src="https://blog.xojo.com/wp-content/uploads/2022/12/websdk-custom-button-1-1024x629.png" alt="" class="wp-image-11133" srcset="https://blog.xojo.com/wp-content/uploads/2022/12/websdk-custom-button-1-1024x629.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/12/websdk-custom-button-1-300x184.png 300w, https://blog.xojo.com/wp-content/uploads/2022/12/websdk-custom-button-1-768x472.png 768w, https://blog.xojo.com/wp-content/uploads/2022/12/websdk-custom-button-1.png 1474w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Custom Button Web SDK Example</figcaption></figure>



<p>This is a highly configurable custom button, where you can set any width, height and the border radius.</p>



<p>It is probably the simplest control you can create, but it will help you to practice. This example also demonstrates everything you will need to draw your controls in the Xojo IDE layout editor.</p>



<p>There are plenty of comments in every SDK event to help you get started.</p>



<h2 class="wp-block-heading">Custom Select</h2>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="629" src="https://blog.xojo.com/wp-content/uploads/2022/12/websdk-custom-select-1024x629.png" alt="" class="wp-image-11134" srcset="https://blog.xojo.com/wp-content/uploads/2022/12/websdk-custom-select-1024x629.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/12/websdk-custom-select-300x184.png 300w, https://blog.xojo.com/wp-content/uploads/2022/12/websdk-custom-select-768x472.png 768w, https://blog.xojo.com/wp-content/uploads/2022/12/websdk-custom-select.png 1474w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Custom Select Web SDK Example</figcaption></figure>



<p>This is an alternative to the WebPopupMenu control, built from scratch using the Web SDK. It also makes use of the DrawControlInLayoutEditor event and contains plenty of comments.</p>



<p>It uses the same techniques we are using for the first example, in a more complex control.</p>



<h2 class="wp-block-heading">Bootstrap Toast</h2>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="709" src="https://blog.xojo.com/wp-content/uploads/2022/12/websdk-bootstrap-toast-1024x709.png" alt="" class="wp-image-11135" srcset="https://blog.xojo.com/wp-content/uploads/2022/12/websdk-bootstrap-toast-1024x709.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/12/websdk-bootstrap-toast-300x208.png 300w, https://blog.xojo.com/wp-content/uploads/2022/12/websdk-bootstrap-toast-768x532.png 768w, https://blog.xojo.com/wp-content/uploads/2022/12/websdk-bootstrap-toast-1536x1064.png 1536w, https://blog.xojo.com/wp-content/uploads/2022/12/websdk-bootstrap-toast.png 1637w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Bootstrap Toast Web SDK Example</figcaption></figure>



<p>While in the other examples we are using plain JavaScript, this one demonstrates how to use TypeScript for coding your controls. TypeScript is the language we use to compile our own web controls, and what we also recommend to build them.</p>



<p>As this control needs a folder structure, you can find this example in this path:</p>



<p><strong>Extras &gt; WebSDK &gt; Examples &gt; Bootstrap Toast</strong></p>



<p>This is a special control, as it doesn&#8217;t works like the other visual controls. Like a WebDialog, you will need to drop the control into your WebPage. Whenever you want to display a Toast, you&#8217;ll have to call a method.</p>



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



<p>Building your own controls will open a new world of possibilities. If you want to start with your first one, I recommend you to try to recreate the Custom Button example from scratch, with your own code.</p>



<p>In the Web SDK folder, you can also find the WebSDK Docs PDF document, that will help you to understand better what each event does, when and why.</p>



<p>Are you planning to create your own custom controls? Let us know in the <a href="https://forum.xojo.com" data-type="URL" data-id="https://forum.xojo.com">forum</a>!</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>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Running Xojo Web projects on Raspberry Pi 64-bit ARM boards</title>
		<link>https://blog.xojo.com/2022/12/13/running-xojo-web-projects-on-raspberry-pi-64-bit-arm-boards/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Tue, 13 Dec 2022 15:22:45 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[64-bit]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Raspbian]]></category>
		<category><![CDATA[Remote Debugging]]></category>
		<category><![CDATA[Single Board Computer]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Xojo API 2.0]]></category>
		<category><![CDATA[Xojo Forum]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11065</guid>

					<description><![CDATA[Xojo 2022r4 opens the door for running projects on 64-bit Raspberry Pi ARM boards. Console, Desktop and Web are supported.]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2022r4 opens the door for running projects on 64-bit Raspberry Pi ARM boards. Console, Desktop and Web are supported.</p>



<p>Xojo Web is an excellent way to expose the features of your electronics projects without having to attach any screen to them. It&#8217;s never been easier to build a Web GUI for your smart clocks, drones, POS, domotics, robots or just some automation services. Thinking about building a solar powered server to automate your tweets? Why not!</p>



<p>If you prefer, you can just expose a Web API instead that can be remotely consumed from another device.</p>



<h2 class="wp-block-heading">What Raspberry Pi boards support ARM 64-bit Linux OS?</h2>



<ul class="wp-block-list">
<li>Raspberry Pi Zero 2</li>



<li>Raspberry Pi 3</li>



<li>Raspberry Pi 4</li>



<li>Raspberry Pi 400</li>
</ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="763" src="https://blog.xojo.com/wp-content/uploads/2022/12/raspberry-pi-zero-2-1024x763.png" alt="" class="wp-image-11066" srcset="https://blog.xojo.com/wp-content/uploads/2022/12/raspberry-pi-zero-2-1024x763.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/12/raspberry-pi-zero-2-300x224.png 300w, https://blog.xojo.com/wp-content/uploads/2022/12/raspberry-pi-zero-2-768x573.png 768w, https://blog.xojo.com/wp-content/uploads/2022/12/raspberry-pi-zero-2.png 1336w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">One of my Raspberry Pi Zero 2, running a 64-bit Xojo Web application.</figcaption></figure>



<h2 class="wp-block-heading">Preparing your Raspberry Pi</h2>



<p>The easiest way to get your operating system ready is by using the <a href="https://www.raspberrypi.com/software/" data-type="URL" data-id="https://www.raspberrypi.com/software/" target="_blank" rel="noreferrer noopener">Raspberry Pi Imager</a>.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="690" src="https://blog.xojo.com/wp-content/uploads/2022/12/raspberry-pi-imager-1024x690.png" alt="" class="wp-image-11067" srcset="https://blog.xojo.com/wp-content/uploads/2022/12/raspberry-pi-imager-1024x690.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/12/raspberry-pi-imager-300x202.png 300w, https://blog.xojo.com/wp-content/uploads/2022/12/raspberry-pi-imager-768x518.png 768w, https://blog.xojo.com/wp-content/uploads/2022/12/raspberry-pi-imager.png 1510w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Raspberry Pi Imager v1.7.3.</figcaption></figure>



<p>At the moment of writing this article, it selects the 32-bit flavor by default. If you have one of the supported boards, go ahead and try Raspberry Pi OS (64-bit) or Raspberry Pi OS Lite (64-bit). The later won&#8217;t include any desktop environment, you&#8217;ll have to access by SSH.</p>



<p>Select your SD Card storage and press on Write. Optionally, if you want to set a hostname for your board, enable SSH, or even configure your Wifi, press on the gears icon.</p>



<p>In just a few minutes you will have a ready to boot SD card for your Raspberry Pi.</p>



<h2 class="wp-block-heading">Remotely debugging your projects</h2>



<p>This is one of my favorite features of Xojo.</p>



<p>In your Xojo installation Extras folder, you will find a &#8220;Remote Debugger Console&#8221; and &#8220;Remote Debugger Desktop&#8221;, that also works for your Linux 64-bit OS.</p>



<p>Depending on which flavor of Linux you&#8217;ve selected in the previous step, send the Console or Desktop ZIP to your board, run it and configure the settings.</p>



<p>Inside Xojo, go to Preferences and press on the Debugging tab.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="599" src="https://blog.xojo.com/wp-content/uploads/2022/12/xojo-preferences-debugging-1024x599.png" alt="" class="wp-image-11068" srcset="https://blog.xojo.com/wp-content/uploads/2022/12/xojo-preferences-debugging-1024x599.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/12/xojo-preferences-debugging-300x176.png 300w, https://blog.xojo.com/wp-content/uploads/2022/12/xojo-preferences-debugging-768x449.png 768w, https://blog.xojo.com/wp-content/uploads/2022/12/xojo-preferences-debugging.png 1480w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Xojo Debugging Preferences panel.</figcaption></figure>



<p>That&#8217;s it. Now you will be able to remotely run and debug your applications. Add a few breakpoints and the execution will stop as soon as it reaches it, allowing you to explore the current state.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="667" src="https://blog.xojo.com/wp-content/uploads/2022/12/xojo-remote-debug-1024x667.png" alt="" class="wp-image-11070" srcset="https://blog.xojo.com/wp-content/uploads/2022/12/xojo-remote-debug-1024x667.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/12/xojo-remote-debug-300x195.png 300w, https://blog.xojo.com/wp-content/uploads/2022/12/xojo-remote-debug-768x500.png 768w, https://blog.xojo.com/wp-content/uploads/2022/12/xojo-remote-debug-1536x1000.png 1536w, https://blog.xojo.com/wp-content/uploads/2022/12/xojo-remote-debug.png 1910w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Running your project remotely, to debug.</figcaption></figure>



<h2 class="wp-block-heading">Deploying the final version</h2>



<p>Once you&#8217;re ready to build the final version of your application, all the wires attached and components soldered, the last step is to &#8220;Deploy&#8221; your application.</p>



<p>There is a tutorial covering this step in detail: <a href="https://blog.xojo.com/2021/05/28/tutorial-deploying-web-apps-on-linux/" data-type="post" data-id="8552">Deploying Web Apps on Linux</a>.</p>



<p>If you create a Raspberry Pi project, please make sure you open a <a href="https://forum.xojo.com" data-type="URL" data-id="https://forum.xojo.com" target="_blank" rel="noreferrer noopener">Forum thread</a>. The Xojo community loves seeing this kind of projects!</p>



<p>What will you build?</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>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Super Simple Web Switch Control</title>
		<link>https://blog.xojo.com/2022/11/07/super-simple-web-switch-control/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Mon, 07 Nov 2022 21:20:21 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo API 2.0]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=10952</guid>

					<description><![CDATA[Web Switch controls, you like them or you hate them. The functionality of a Switch control is so similar to a checkbox that we are going to actually "hack" one of them to make a super simple web switch control.]]></description>
										<content:encoded><![CDATA[
<p>Web Switch controls, you like them or you hate them. The functionality of a Switch control is so similar to a checkbox that we are going to actually &#8220;hack&#8221; one of them to make a super simple web switch control.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="599" src="https://blog.xojo.com/wp-content/uploads/2022/11/web-switch-control-1024x599.png" alt="" class="wp-image-10953" srcset="https://blog.xojo.com/wp-content/uploads/2022/11/web-switch-control-1024x599.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/11/web-switch-control-300x175.png 300w, https://blog.xojo.com/wp-content/uploads/2022/11/web-switch-control-768x449.png 768w, https://blog.xojo.com/wp-content/uploads/2022/11/web-switch-control.png 1314w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Place a WebCheckbox into your WebPage. Add the Opening Event Handler to your checkbox.</p>



<p>Inside, paste this code:</p>



<pre class="wp-block-code"><code>Me.ExecuteJavaScript("document.getElementById('" + Me.ControlID + "').classList.add('custom-switch');")
Me.Style.Value("padding-left") = "32px" // Adjust if needed</code></pre>



<p>Run the project. Enjoy!</p>



<p>If you like this control, consider creating a WebCheckbox subclass so you can easily reuse it.</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>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WebUIControl Badges Using Extension Methods</title>
		<link>https://blog.xojo.com/2022/11/03/webuicontrol-badges-using-extension-methods/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Thu, 03 Nov 2022 17:59:19 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Extension Methods]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo API 2.0]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=10934</guid>

					<description><![CDATA[I was having some fun with badges, trying to recreate a design. I’ve ended up writing a few extension methods to use them on almost any WebUIControl. ]]></description>
										<content:encoded><![CDATA[
<p>I was having some fun with badges, trying to recreate a design. I’ve ended up writing a few extension methods to use them on almost any WebUIControl. </p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="1024" height="429" src="https://blog.xojo.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-03-at-9.24.12-AM-1024x429.png" alt="" class="wp-image-10936" srcset="https://blog.xojo.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-03-at-9.24.12-AM-1024x429.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-03-at-9.24.12-AM-300x126.png 300w, https://blog.xojo.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-03-at-9.24.12-AM-768x321.png 768w, https://blog.xojo.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-03-at-9.24.12-AM-1536x643.png 1536w, https://blog.xojo.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-03-at-9.24.12-AM-2048x857.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">But first, what’s an Extension Method anyway? </h3>



<p>There are situations where you want to add functionality to a Xojo Framework class. Let’s say we want to add a method to every visual web control. We know that every visual control inherits from WebUIControl. This class can’t be modified, as it’s part of the framework. One option would be subclassing each control and adding new methods… but that’s so boring… </p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="1024" height="577" src="https://blog.xojo.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-03-at-9.24.21-AM-1024x577.png" alt="" class="wp-image-10937" srcset="https://blog.xojo.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-03-at-9.24.21-AM-1024x577.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-03-at-9.24.21-AM-300x169.png 300w, https://blog.xojo.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-03-at-9.24.21-AM-768x433.png 768w, https://blog.xojo.com/wp-content/uploads/2022/11/Screen-Shot-2022-11-03-at-9.24.21-AM.png 1342w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p><a href="https://documentation.xojo.com/getting_started/using_the_xojo_language/modules.html#extension-methods">Extension Methods</a> are part of the Modules feature, allowing us to extend classes with methods, even if we don’t have access to their source code.</p>



<h3 class="wp-block-heading">Adding SetBadge and RemoveBadge methods to every visual control</h3>



<p>The first thing you need is a Module. Press on the Add button from the toolbar and select Module. The name of the module is up to you, I’ll be using WebExtensions in this example.</p>



<p>Now add a new method into that module, called &#8220;SetBadge&#8221;. Then, in the inspector, ensure its visibility is set to Global, instead of Public or Protected.</p>



<p>The magic happens in the first parameter of this method. “Extends” is the reserved keyword for this feature, for example:</p>



<pre class="wp-block-preformatted">Extends myInstance As ExampleClass</pre>



<p>Above method would be extending an imaginary class called “ExampleClass”, and its instance would be available inside that method, accessible from the variable “myInstance”.</p>



<p>In our case, for SetBadge, we want to use this method signature instead:</p>



<pre class="wp-block-preformatted">Extends control As WebUIControl, caption As String, indicator As String = "danger", top As Integer = -10, right As Integer = -10</pre>



<p>Inside, paste the method contents:</p>



<pre class="wp-block-preformatted">Var classes() As String = Array("xojo-badge", "d-flex", "p-2", _ 
"border", "border-light", "bg-" + indicator) 
classes.Add(If(caption.Length &lt; 2, "rounded-circle", "rounded-pill"))

Var styles() As String = Array("height: 21px", "font-size: 10px", _ 
"align-items: center", "color: white", "position: absolute", _ 
"top: " + top.ToString + "px", "right: " + Right.ToString + "px", _ 
"z-index: 10")

If caption = "" Or caption = " " Then caption = "&amp;nbsp;"
Var html As String = "&lt;span class=""" + String.FromArray(classes) + _
""" style=""" + String.FromArray(styles, ";") + """&gt;" + caption + "&lt;/span&gt;"

Var js() As String
js.Add("$('#" + control.ControlID + " .xojo-badge').remove();") 
js.Add("$('#" + control.ControlID + "').append(`" + html + "`);")
control.ExecuteJavaScript(String.FromArray(js))</pre>



<p>What this little sorcery does is appending a new HTML layer into our control, using some Bootstrap’s component CSS classes. Did you notice we are using &#8220;control&#8221; instead of &#8220;Self&#8221;? It matches the “control” variable from the method definition.</p>



<p>Add another Extension Method for removing the badges, called “RemoveBadge”.</p>



<p>The method definition reads like this:</p>



<pre class="wp-block-preformatted">Extends control As WebUIControl</pre>



<p>The content is a bit easier this time:</p>



<pre class="wp-block-preformatted">Var js As String = "$('#" + control.ControlID + " .xojo-badge').remove();"
control.ExecuteJavaScript(js)</pre>



<p>That’s it. Plumbing done.</p>



<p>Now, if you have a WebButton called&#8230; &#8220;AwesomeButton&#8221;, you can set its badge using this code:</p>



<pre class="wp-block-preformatted">AwesomeButton.SetBadge("Hello!")</pre>



<p>And to remove it:</p>



<pre class="wp-block-preformatted">AwesomeButton.RemoveBadge()</pre>



<p>You can use these badges in different scenarios. From displaying a pending notifications counter in a WebButton, to validation errors in a WebTextField.</p>



<p>Adjust and play with the code to meet your needs!&nbsp;<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>You can download the example from the <a href="https://github.com/piradoiv/xojo-web-badges">GitHub code repository</a>.</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>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Xojo 2022r3 Includes 60 Fixes for Xojo Web</title>
		<link>https://blog.xojo.com/2022/10/12/xojo-2022r3-includes-60-fixes-for-xojo-web/</link>
		
		<dc:creator><![CDATA[Ricardo Cruz]]></dc:creator>
		<pubDate>Wed, 12 Oct 2022 13:45:09 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Bug Bash]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[Xojo IDE]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=10842</guid>

					<description><![CDATA[While we do our best to write software that "just works", bugs happen. Xojo 2022r3 includes 60 bug fixes just for the Web Framework. Twenty-six of them were fixed during the Bug Bash event. Eight Feature Requests were also included in Xojo Web 2022r3. We've been very careful and tried to pick those on the border line between being a bug or a feature.]]></description>
										<content:encoded><![CDATA[
<p>While we do our best to write software that &#8220;just works&#8221;, bugs happen. Xojo 2022r3 includes 60 bug&nbsp;fixes just for the Web Framework. Twenty-six of them were fixed during the Bug Bash event. Eight Feature Requests were also included in Xojo Web 2022r3. We&#8217;ve been very careful and tried to pick those on the border line between being a bug or a feature.</p>



<p>Both server and frontend will have less memory footprint now. The team has been working on finding and fixing memory leaks, and optimizing how the framework cleans up the controls, when pages aren&#8217;t visible anymore.</p>



<p>Paul and Travis made IDE improvements to load projects much faster. If you have a large Web project, you will surely notice the difference.</p>



<p>The WebListBox component got most of the improvements. Visually, you will notice less flickering. Internally, it will make less requests to the web server to display its data. We will continue optimizing its performance release after release. Interacting with this control is now more natural and accessible, as we&#8217;ve made it more compatible with the different OSs and devices. And just like WebListBox, almost every other control received one or more bug fixes. Check the <a href="https://documentation.xojo.com/resources/release_notes/2022r3.html">Release Notes</a> for a detailed list.</p>



<p>I would like to finish this post with a huge thank you to every user that has helped directly or indirectly creating Issues, attaching a sample project, posting on the Forum and testing the beta releases.</p>



<p>The community is the best feature of Xojo <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p><em>Ricardo has always been curious about how things work. Growing up surrounded by computers</em> and became interested in <em>web technologies since 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 &#8230; or crocheting amigurumis. Find Ricardo on Twitter <a rel="noreferrer noopener" href="https://web.archive.org/web/20220805000833/https://www.twitter.com/piradoiv" target="_blank">@piradoiv</a>.</em></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
