<?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>Web 2.0 &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/web-2-0/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Tue, 31 Mar 2026 15:21:49 +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>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>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>Xojo 2024r3 is Now Available!</title>
		<link>https://blog.xojo.com/2024/10/01/xojo-2024r3-is-now-available/</link>
		
		<dc:creator><![CDATA[Xojo]]></dc:creator>
		<pubDate>Tue, 01 Oct 2024 15:29:54 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[2024r3]]></category>
		<category><![CDATA[Code Editor]]></category>
		<category><![CDATA[Preemptive Threads]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13757</guid>

					<description><![CDATA[We are excited to announce the arrival of Xojo 2024 Release 3, a major update to the Xojo development platform. This latest version includes over&#8230;]]></description>
										<content:encoded><![CDATA[
<p>We are excited to announce the arrival of Xojo 2024 Release 3, a major update to the Xojo development platform. This latest version includes over 200 changes and improvements, enhancing the overall user experience and expanding the platform&#8217;s capabilities.</p>



<h2 class="wp-block-heading">What&#8217;s New in Xojo 2024 Release 3</h2>



<p>We&#8217;ve been working hard to bring you the best possible cross-platform development experience, and Xojo 2024 Release 3 delivers. Here are some of the highlights:</p>



<div class="wp-block-columns are-vertically-aligned-top is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow">
<p class="has-text-align-center"><strong>Preemptive Threading</strong></p>



<p class="has-text-align-center">In this highly anticipated feature, take your applications to the next level with preemptive threading. Preemptive threads allow you to create more responsive and efficient code, maximizing the potential of your multi-core systems.</p>



<p class="has-text-align-center"><a href="https://blog.xojo.com/tag/preemptive-threads/" data-type="link" data-id="https://blog.xojo.com/2024/10/01/cooperative-to-preemptive-weaving-new-threads-into-your-apps/" target="_blank" rel="noreferrer noopener">Learn how to take advantage of preemptive threads.</a></p>
</div>



<div class="wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow">
<p class="has-text-align-center"><strong>Improved Code Editor</strong></p>



<p class="has-text-align-center">We&#8217;ve made significant improvements to the Code Editor, including row highlighting, a command bar button for Standardize Format, and Syntax Help area size control, making it easier for you to write and maintain your code.</p>



<p class="has-text-align-center"><a href="https://blog.xojo.com/2024/10/01/xojo-code-editor-changes-line-highlight-syntax-help-area-and-standardize-format/" data-type="link" data-id="https://blog.xojo.com/2024/10/01/xojo-code-editor-changes-line-highlight-syntax-help-area-and-standardize-format/" target="_blank" rel="noreferrer noopener">Learn about the new Code Editor changes.</a></p>
</div>
</div>



<div class="wp-block-columns are-vertically-aligned-top is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow">
<p class="has-text-align-center"><strong>Web Framework Updates</strong></p>



<p class="has-text-align-center">The Web framework now uses Bootstrap v5.3.3 and Bootstrap Icons v1.11.3, and supports adding CSS classes to controls, giving you more flexibility and customization options.</p>



<p class="has-text-align-center"><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/" target="_blank" rel="noreferrer noopener">Read about the Web framework improvements.</a></p>
</div>



<div class="wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow">
<p class="has-text-align-center"><strong>Native Platform Enhancements</strong></p>



<p class="has-text-align-center">macOS Popovers can now be resized, and the Windows HTMLViewer can access the camera and microphone, while the iOS Picture control can access EXIF metadata.</p>



<p class="has-text-align-center"><a href="https://blog.xojo.com/2024/10/01/photos-metadata-and-location-on-ios-pictures/" target="_blank" rel="noreferrer noopener">Check out this post about the iOS picture control enhancements and more.</a></p>
</div>
</div>



<div class="wp-block-columns are-vertically-aligned-top is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow">
<p class="has-text-align-center"><strong>Android Support</strong></p>



<p class="has-text-align-center">Xojo 2024 Release 3 introduces Android tablet support, improved Declare support, and RegEx classes, making it easier for you to create Android apps.</p>



<p class="has-text-align-center"><a href="https://blog.xojo.com/2024/10/01/android-tablet-support/" data-type="link" data-id="https://blog.xojo.com/2024/10/01/android-tablet-support/" target="_blank" rel="noreferrer noopener">Android Tablet Support</a> • <a href="https://blog.xojo.com/2024/10/01/android-declare-and-library-enhancements/" data-type="link" data-id="https://blog.xojo.com/2024/10/01/android-declare-and-library-enhancements/" target="_blank" rel="noreferrer noopener">Enhanced Android Declares &amp; Library</a></p>
</div>



<div class="wp-block-column is-vertically-aligned-top is-layout-flow wp-block-column-is-layout-flow">
<p class="has-text-align-center"><strong>Fuzzy Searches with SQLite&#8217;s SOUNDEX</strong></p>



<p class="has-text-align-center">We&#8217;ve added support for SQLite&#8217;s SOUNDEX function, which enables fuzzy searches to help you find similar-sounding words and phrases in your database.</p>



<p class="has-text-align-center"><a href="https://blog.xojo.com/2024/10/01/fuzzy-searches-with-sqlites-soundex/" data-type="link" data-id="https://blog.xojo.com/2024/10/01/fuzzy-searches-with-sqlites-soundex/" target="_blank" rel="noreferrer noopener">Read about SQLite SOUNDEX support.</a></p>
</div>
</div>



<p>These updates and enhancements are designed to make your development experience more efficient, productive, and enjoyable. Whether you&#8217;re building a new application or updating an existing one, Xojo 2024 Release 3 provides you with the tools and capabilities you need to succeed.</p>



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



<p>To learn more about Xojo 2024 Release 3 and to get started with the development process, please visit the <a href="https://documentation.xojo.com/versions/2024r3/resources/release_notes/2024r3.html" data-type="link" data-id="https://documentation.xojo.com/versions/2024r3/resources/release_notes/2024r3.html" target="_blank" rel="noreferrer noopener">Xojo 2024r3 Release Notes</a>. The update can be downloaded right now, from the <a href="https://xojo.com/download/" data-type="link" data-id="https://xojo.com/download/" target="_blank" rel="noreferrer noopener">Xojo downloads page</a>.</p>



<h3 class="wp-block-heading">What&#8217;s Next?</h3>



<p>We&#8217;re always working on new features, updates, and enhancements to our platform. If you have any suggestions or ideas, please don&#8217;t hesitate to add them to the <a href="https://tracker.xojo.com/xojoinc/xojo" data-type="link" data-id="https://tracker.xojo.com/xojoinc/xojo" target="_blank" rel="noreferrer noopener">Xojo tracker</a>. We&#8217;re always looking for ways to improve and expand Xojo.</p>



<p class="has-text-align-center"><strong>Thank you for being part of the Xojo community. We&#8217;re excited to see what you&#8217;ll create with Xojo 2024r3!</strong></p>



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

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

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

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

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Using 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>Develop Database Apps with Xojo</title>
		<link>https://blog.xojo.com/2023/09/26/develop-database-apps-with-xojo/</link>
		
		<dc:creator><![CDATA[Xojo]]></dc:creator>
		<pubDate>Tue, 26 Sep 2023 18:06:00 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Database Applications]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Xojo API 2.0]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=9320</guid>

					<description><![CDATA[After you have designed your interface and begun coding, your next step may be to connect to a database. This blog post tells you the databases supported by Xojo, shows you where to find code samples and examples, plus tutorials and videos that walk you through connecting, updating, querying and managing database, plus, an introduction to Xojo's new DBKit. Get the resources and knowledge you need to get your first database project off the ground today.]]></description>
										<content:encoded><![CDATA[
<p>After you have designed your interface and begun coding, your next step may be to connect to a database. This blog post tells you the databases supported by Xojo, shows you where to find code samples and examples, plus tutorials and videos that walk you through connecting, updating, querying and managing a database, plus, an introduction to Xojo&#8217;s new DBKit. Get the resources and knowledge you need to get your first database project off the ground today.</p>



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



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



<p>Xojo works with a wide variety of databases. SQLite is bundled with your Xojo license and is a great beginner database for desktop, web and mobile apps. Xojo includes direct support for SQLite, PostgreSQL and MySQL. Plus, you can use <a href="https://documentation.xojo.com/topics/databases/supported_engines/odbc.html#odbc">ODBC</a> to connect to just about anything else, such as Oracle, MS-SQL Server, Microsoft Access, Firebird or even IBM iSeries.</p>



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



<p>To help you get started, there are many examples in the Examples/Databases folder included with the Xojo <a href="https://xojo.com/download/">Download</a>, including examples that connect to each of the supported databases. You can find a <a href="https://documentation.xojo.com/resources/examples.html">breakdown of the examples</a> included in the Examples folder in the Xojo Programming Language Documentation.</p>



<p><a href="http://www.xojo.com/blog/en/assets_c/2014/07/DBExamples-429.php"></a>Additionally, you can check out the <a href="https://demos.xojo.com/#customerID">Eddie’s Electronics</a> sample app (located in Examples/Sample Applications/EddiesElectronics) to see how to share database code between Xojo desktop and Xojo web apps.</p>



<p>DBKit is an example project designed to make it easier to build desktop and web applications that are front-ends to databases. Specifically, DBKit makes it easy to connect a database table to the user interface controls on a layout. DBKit also handles a lot of the interface for you.&nbsp;You can read more about <a href="https://documentation.xojo.com/topics/databases/dbkit.html">DBKit</a> in the Xojo Documentation.</p>



<h3 class="wp-block-heading">Read: Documentation</h3>



<p>After you have reviewed the examples, the <a href="https://documentation.xojo.com/topics/databases/database_basics_for_beginners.html">Database Overview</a> in the Xojo Documentation will help with next steps. Remember, Xojo comes bundled with SQLite which is an excellent database for desktop, web and mobile apps. Read more about using <a href="https://documentation.xojo.com/topics/databases/supported_engines/sqlite/overview.html">SQLite</a> in the Xojo Documentation and check out this <a href="https://documentation.xojo.com/topics/databases/supported_engines/sqlite/sqlite_basics.html">SQLite Tutorial</a> for more detail.</p>



<h3 class="wp-block-heading">Watch: Videos</h3>



<p>The Xojo YouTube channel has hundreds of videos on all things Xojo. Here are the most recent Xojo Database videos and playlists:</p>



<ul class="wp-block-list">
<li>Video: <a href="https://youtu.be/GGyu4D0ni28">Connecting to a Database from Xojo</a></li>



<li>Video: <a href="https://youtu.be/JWja37wXz2U">Updating a Database from Xojo</a></li>



<li>Video: <a href="https://youtu.be/8ENtgkzvyS0">Querying a Database from Xojo</a></li>



<li>Video: <a href="https://youtu.be/wVHYk-4XG2o">Managing the UI when Updating a Database</a></li>



<li>Video: <a href="https://youtu.be/3Jjf1Xrnm2w">Using DBKit to easily connect databases to Xojo applications</a></li>



<li>Playlist: <a href="https://www.youtube.com/playlist?list=PLPoq910Q9jXhRoPw0_mHKdVUKPXpL9TKV">Using Databases with Xojo</a> &#8211; A growing, catch-all playlist for videos related to Xojo and databases.</li>



<li>Playlist: <a href="https://www.youtube.com/playlist?list=PLPoq910Q9jXjDBrL3KymUwnagM8d7Xbia">Xojo and SQLite</a> &#8211; SQLite comes bundled with Xojo and is a great database for beginners building desktop, web and mobile apps with Xojo.</li>
</ul>



<h3 class="wp-block-heading">Vendor Documentation</h3>



<p>Lastly, you should always refer to the vendor-specific documentation for the database you are using to learn the specifics about how that database works, including SQL syntax.</p>



<ul class="wp-block-list">
<li><a href="http://www.sqlite.org/docs.html">SQLite</a></li>



<li><a href="http://www.postgresql.org/docs/">PostgreSQL</a></li>



<li><a href="http://dev.mysql.com/doc/">MySQL</a></li>



<li><a href="http://www.oracle.com/technetwork/indexes/documentation/index.html?ssSourceSiteId=ocomen">Oracle Database</a></li>



<li><a href="http://msdn.microsoft.com/en-us/library/bb545450.aspx">Microsoft SQL Server</a></li>
</ul>



<p>Xojo simplifies the development process, reduces complexity and empowers developers to create efficient and functional database applications with relative ease. The Xojo IDE is free to use for development and testing &#8211; design, develop, run and debug your app all without a license. Purchase a license when you are ready to compile your apps, licenses start at $149. Visit the <a href="https://xojo.com/store/">Xojo Store</a> to find the license right for your project.</p>



<p>If you have questions after you have reviewed these materials, the Xojo <a href="https://forum.xojo.com">Forum</a> is an accessible and essential resource for Xojo users of all levels. You can also <a href="https://www.xojo.com/company/contact.php">contact</a> Xojo directly with your questions.</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>Quick Tip: Opening, Shown, Closing and Closed</title>
		<link>https://blog.xojo.com/2023/02/09/quick-tip-opening-shown-closing-and-closed/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Thu, 09 Feb 2023 17:38:29 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=11215</guid>

					<description><![CDATA[Knowing the firing order of the Opening event in Xojo apps, and the Shown event for Xojo Web apps, is important to using these correctly for the control's initialization. The same can be said for Closing and Closed events. Read to for a breakdown of this order for Desktop, Web and Mobile apps developed in Xojo. ]]></description>
										<content:encoded><![CDATA[
<p>Knowing the firing order of the Opening event in Xojo Desktop and Mobile apps, and the Shown event for Xojo Web apps, is important to using these correctly for a control&#8217;s initialization. The same can be said for Closing and Closed events. Read on for a breakdown of this order for Desktop, Web and Mobile apps developed in Xojo. </p>



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



<h3 class="wp-block-heading">Opening in Desktop and Mobile Apps</h3>



<ul class="wp-block-list">
<li>First, the App Opening event will be fired first. </li>



<li>Next, the Opening event on every control of the default Window assigned to the App project. In this case, it will follow the same order in which the controls were added to the Window in the Layout Editor. It is possible to change that order using the Order buttons in the <a href="https://documentation.xojo.com/getting_started/using_the_ide/layout_editor.html#command-bar">Command Bar</a> in the Layout Editor. </li>



<li>Last, the Opening event will be fired on the default Window containing the controls.</li>
</ul>



<h3 class="wp-block-heading">Closing in Desktop Apps</h3>



<p>When a Window is closed in a Desktop app, the Closing event will be fired following this order:</p>



<ul class="wp-block-list">
<li>First, the Closing event will be raised on every control added to the Window, following the same order used when adding the controls to the Window in the Layout Editor. It is possible to change that order using the Order buttons in the Layout Editor toolbar.</li>



<li>Next, the Closing event will be raised in the Window itself.</li>



<li>Last, the Closing event will be raised in the App object of the Desktop app when the user quits the application.</li>
</ul>



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



<p>This is the event firing order for Xojo Web apps:</p>



<ul class="wp-block-list">
<li>First, the Opening event will be raised in the WebApp object.</li>



<li>Next, the Opening event in the WebSession object.</li>



<li>Next, the Opening event on every control added to the by default WebPage set in the WebApp object. In this case, it will follow the same order used when adding the controls to the web page in the Layout Editor. (It is possible to change that order using the Order buttons in the Layout Editor toolbar.)</li>



<li>Next, the Opening event will be raised on the default web page itself.</li>



<li>Next, the app will start to raise the Shown event on every one of the webpage controls following the same order used when they have been added to the page. (It is possible to change that order using the Order buttons in the Layout Editor toolbar.)</li>



<li>Last, the Shown event will be raised in the default webpage.</li>
</ul>



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



<p>Regarding the Closing and Closed events, the Web App will follow this order:</p>



<ul class="wp-block-list">
<li>First, the Closing event will be raised in the WebSession object.</li>



<li>Next, the Closed event will be raised on every one of the default webpages (or the pages shown), following the same order used when adding the controls to the page in the Layout Editor. (It is possible to change that order using the Order buttons in the Layout Editor toolbar.)</li>



<li>Last, the Closed event will be fired in the webpage itself.</li>
</ul>



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



<p>As you can see, Xojo follows the firing same regardless of the target you choose for your project &#8211; Desktop, Web or Mobile apps. Obviously, Web apps do change a bit, because they deal with the WebSession object and also with the Shown event in addition to the Opening event. In Web projects, the Opening event happens on the server side, while the Shown event happens in the client (browser) side.</p>



<p>See related <a href="https://youtu.be/E3iFTJt2V1Y">video</a> at the Xojo Programming Language YouTube Channel.</p>



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



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

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

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

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

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>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>The Versatility of Xojo</title>
		<link>https://blog.xojo.com/2022/12/06/the-versatility-of-xojo/</link>
		
		<dc:creator><![CDATA[Jérémie Leroy]]></dc:creator>
		<pubDate>Tue, 06 Dec 2022 16:49:04 +0000</pubDate>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Xojo Cloud]]></category>
		<category><![CDATA[App Hosting]]></category>
		<category><![CDATA[App Localization]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[GraffitiSuite]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Rapid Application Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Trello]]></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=11006</guid>

					<description><![CDATA[Many people around the world are celebrating the holidays by giving gifts, which means more and more people are organizing Secret Santa events. In November of 2018, Jérémie Leroy had the idea of making a Secret Santa iOS app. 3 years, 32 languages and 6.5 millions downloads later, Jérémie incorporated Xojo Web to improve his highly successful Xojo iOS app. Secret Santa is a prime example of what is possible and how you can leverage your Xojo skills to expand to other platforms when you need to.]]></description>
										<content:encoded><![CDATA[
<p>It is soon time for the end of year festivities. Many people around the world are celebrating the holidays by giving gifts, which means more and more people are organizing Secret Santa events. During these events, members of a group of friends, family, or colleagues will draw names to become someone’s Secret Santa and then give them a holiday gift, usually something fun.</p>



<figure class="wp-block-table aligncenter"><table><tbody><tr><td class="has-text-align-left" data-align="left"><strong>Did you know?</strong></td></tr><tr><td class="has-text-align-left" data-align="left">Secret Santa is known by different names around the world, such as “Amigo Invisible” in Spanish, “Amigo Secreto” in Portuguese, “Тайный Санта” in Russian.</td></tr></tbody></table></figure>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:66.66%">
<p>I first made a desktop Secret Santa app back in 2015 for an event with friends. We were tired of drawing names out of a hat and having couples being paired together. The app I created solved that problem because couples were excluded from offering a gift to each other. And we didn’t need a hat!</p>



<p>In November of 2018, I had the idea of making a <a href="https://apps.apple.com/app/apple-store/id1442673273?pt=118403140&amp;ct=XojoBlog&amp;mt=8">Secret Santa iOS app</a> so that anyone with an iPhone or iPad could benefit from the same features I had been enjoying for the past 3 years.</p>



<p>The app would need to be easy to use, avoid couples getting matched with each other, send notifications by email without letting the organizer know which pairs were matched, and of course make sure no name would be assigned twice.</p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:33.33%"><div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://apps.apple.com/app/apple-store/id1442673273?pt=118403140&amp;ct=XojoBlog&amp;mt=8"><img loading="lazy" decoding="async" src="https://blog.xojo.com/wp-content/uploads/2022/12/Screen-Shot-2022-12-06-at-9.12.28-AM.png" alt="" class="wp-image-11009" width="168" height="352" srcset="https://blog.xojo.com/wp-content/uploads/2022/12/Screen-Shot-2022-12-06-at-9.12.28-AM.png 304w, https://blog.xojo.com/wp-content/uploads/2022/12/Screen-Shot-2022-12-06-at-9.12.28-AM-143x300.png 143w" sizes="auto, (max-width: 168px) 100vw, 168px" /></a></figure>
</div></div>
</div>



<p>After just 8 days of development, the app was ready to ship and sent to the App Store.</p>



<p>Within 5 days, the app had been downloaded from 35 different countries and was my fastest app to reach 1000 downloads!</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img decoding="async" src="https://lh6.googleusercontent.com/U-yY3aE161mfhU3H6k9ODFP4LtuwzFNWzRrvUdRIvs3cLeHG2sydLIDWL1Ic65Lnw9rJvRQ8mGn82ComNHKq2s-pDWIJoGimmA5082pg_IDuI1KCwX9U82FGIkTSFev4LRYR20Tc8Tkgfn9UlL18C2cAraTTFzJKR4Np5fDCtqwc8jDcjeP1D4e2-mPSBg" alt="" width="-43" height="-22"/></figure>
</div>


<p><a href="https://apps.apple.com/app/apple-store/id1442673273?pt=118403140&amp;ct=XojoBlog&amp;mt=8"></a></p>



<p>Having the app translated to English, French, Italian, and Spanish in the initial release helped to reach more users.</p>



<p>Version 1.1 of the app was released a few days later with German and Portuguese translations.</p>



<p>That’s when I realized that Secret Santa is something extremely common in Latin America. Many families draw names for Christmas so that they can give and receive one big gift instead of smaller trivial gifts for each family member.</p>



<p>Most updates of the app came with new localizations, which really helped in realizing more and more downloads. After 3 years of updates, the app is now available in 32 languages.</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img loading="lazy" decoding="async" src="https://lh5.googleusercontent.com/DJt7zuBJxMbga7qB9LWyTwy-ZwnBYIBS4XbqTmOsuBh25vtv3UN1THXY32Z55sxG0arqCOpyKo1ttUT1q7iY5Z0Y1I9XhT8lbv6C_FPMsLPuhAiZ3q0AIdH9RUhBEGiXP4ft3aGzqAyiND3qk7bH4OSXuXNo3jRc4BPFhDmtT5kHLF2w3cgO66QPT6BctQ" alt="" width="895" height="635"/></figure>
</div>


<p>A high quantity of downloads also meant that I received a lot of feedback from users. Many users were happy with the current features, but I started getting feature requests to send the gift pairs by SMS or WhatsApp instead of by email. We all have a parent or grand-parent who isn’t tech-savvy and doesn’t have an email address.</p>



<h2 class="wp-block-heading"><strong>Leveraging the biggest advantage of Xojo &#8211; Sharing code across platforms</strong></h2>



<p>From 2018 until 2022, I had become used to updating the Secret Santa app itself to add new features and new translations while also fixing bugs. This year, I received a message from an unhappy user stating that they really need a wishlist feature and downloaded my app thinking it already had one.</p>



<p>A valid wishlist feature needed to be accessible to anyone with an Internet connection, whether they used a computer, an iPhone, or an Android device.</p>



<p>Using Xojo Web and a coding language I already knew was the obvious choice for this task. Sharing important bits of code from my main iOS project to the web wishlist project was as easy as copy and paste.</p>



<p>As with any Xojo project, copying classes from one project to the other was a real time saver, especially for the API layer required to communicate between Xojo and the online database that holds all the Secret Santa data.</p>



<p>The main difficulty working on a web project came from the UI. Not that Xojo Web’s UI is difficult, but I am so used to designing mobile apps that my brain didn&#8217;t know where to start.</p>



<p>I knew I wanted to display two columns of data:</p>



<ul class="wp-block-list"><li>The user’s wishlist</li><li>The wishlist from the person they are offering a gift to</li></ul>



<p>The layout had to be responsive to be accessible on both mobile and desktop devices.</p>



<p><a href="https://graffitisuite.com">Graffitisuite</a> from Anthony Cyphers came to mind, and within a few minutes of reviewing the online demo, I was convinced to use GraffitiKanban web control. I am a big fan of <a href="https://trello.com">Trello</a> for organizing my work, displaying cards in labeled columns. That&#8217;s exactly what I needed for the wishlist feature.</p>



<p>GraffitiKanban is “responsive” (Web Design term), meaning the display changes to adapt to smaller screens such as mobile devices.</p>



<p>GraffitiSuite also offers a wide variety of UI elements that made me save a lot of time.</p>



<p>7 days after the initial feature request, the wishlist feature was available to all.</p>



<p><strong>Wishlist on a desktop browser:</strong></p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://lh3.googleusercontent.com/idkQ031bZaWEyP1Pj4BULLGJRc-Xz95sl4xlCkYD2KZt1IsMKOvsoP9ywwY5f81wwykuMuWqofDIelJNIiwE0j0IcF93ZXyaXFBmVK991oigNXPmi7W6BR1_b44sWWWKkYO7jAXVbjDC6Io4RVwhVveV8oM4Nu1UOPMXzrcxPL-VtdgVNB3bQ58MtolkmQ" alt=""/></figure>
</div>


<p><strong>Wishlist on a mobile browser:</strong></p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://lh6.googleusercontent.com/9KZB2JwTAt2cLXTb7Es_G2Qdwldmfa1nMRmS7F2s9Pb2iVuz0e4M5Zj_8XfUn97QTUvU-78i8cDq5JZOrMwr-ROe0ihov1R2YDZSVseEky4KwTATMxU2tQHD6TXQpouL37NXEryK86JjTv36A-N-VHSqCXKXYza6M2V8WyWmP7Wie5kY_0GuMaOeixI0" alt=""/></figure>
</div>


<p>Deploying the app to <a href="https://www.xojo.com/cloud">Xojo Cloud</a> was extremely easy.</p>



<p>A single button press in Xojo, a subdomain DNS record, 2 minutes of configuration in Cloudflare, and the web app was up, running, and accessible through HTTPS.</p>



<figure class="wp-block-image"><img decoding="async" src="https://lh6.googleusercontent.com/o76SHsHWThArJFy__WCn9HW8rgFJ2Q0lJqq12o3ReAXRszlJe5VESNgYThKLfHtsU2hfOHrm5IbBVOOjCf4n6hjdUaYMZM0vjhfHGOsVmQkugEHbHHInjG29mDEpOk4-Ef8sg98ZTZp1esNIU4JM1jQ4qTZSdxLcrY_YKlOUKCW2_lWqV84NTyp-vvnnJQ" alt=""/></figure>



<p>Customer use of the wishlist feature has blown-up more than I ever would have expected. So far 30,000 gift ideas have been added to the wishlist (and counting).</p>



<h2 class="wp-block-heading"><strong>The next feature request</strong></h2>



<p>With an app that sees 60,000 new users per month, I receive a lot of feature requests. Most recently, I received a one star review on the app store because my app isn&#8217;t accessible to the Visually Impared. When VoiceOver is activated, all it says is “button”, “button”, “button”, with no explanation.</p>



<p>Adding voice-over capabilities in Xojo is simple. The <a href="https://documentation.xojo.com/api/user_interface/mobile/mobileuicontrol.html#mobileuicontrol">MobileUIControl</a> class has two String properties, AccessibilityHint and AccessibilityLabel.</p>



<p>But it actually is a lengthy task to check each control on each screen and make sure that the translations are correct.</p>



<p>VoiceOver support will soon be released in English and French, but all other localizations will be only ready next year. It is currently a bad time to get 30 different translators to work on the project under such short notice.</p>



<p>Xojo has enabled me to create a business out of developing iOS apps for the App Store. Including all of my apps, I have had over 6.5 million downloads and counting. Secret Santa is a prime example of what is possible and how you can leverage your Xojo skills to expand to other platforms when you need to. I look forward to what’s to come and will be at <a href="https://www.xojo.com/xdc">XDC London</a> to learn more about the future.</p>



<p>If you are organizing a Secret Santa event or just curious to see the app, download Secret Santa on the <a href="https://apps.apple.com/app/apple-store/id1442673273?pt=118403140&amp;ct=XojoBlog&amp;mt=8">App Store.</a></p>



<p><em>Jérémie Leroy has been using Xojo since 2008, he won two Xojo Design Awards in the iOS App category and has released over 13 iOS apps made with Xojo on the App Store. He also released </em><a href="https://github.com/jkleroy/iOSDesignExtensions"><em>iOSDesignExtensions</em></a><em> on Github to help style and polish your Xojo made iOS apps.</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>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>
		<item>
		<title>How To Download and Preview PDFs in Xojo Web Apps</title>
		<link>https://blog.xojo.com/2022/05/31/how-to-download-and-preview-pdfs-in-xojo-web-apps/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Tue, 31 May 2022 18:10:19 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[PDF]]></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=10417</guid>

					<description><![CDATA[Web Apps
How to download and preview PDFs in Xojo Web apps may be one of the most asked questions involving PDFDocument (font handling is a close second) I get. If you are interested in finding the best, and simplest, way to do this, continue reading.]]></description>
										<content:encoded><![CDATA[
<p>How to download and preview PDFs in Xojo Web apps may be one of the most asked questions involving <a href="https://documentation.xojo.com/api/pdf/pdfdocument.html#pdfdocument">PDFDocument</a> (<a href="https://blog.xojo.com/2022/04/05/pdfdocument-font-handling-improvements/">font handling</a> is a close second) I get. If you are interested in finding the best, and simplest, way to do this, continue reading.</p>



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


<div class="wp-block-image is-style-default">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="1024" height="917" src="https://blog.xojo.com/wp-content/uploads/2022/05/Captura-de-Pantalla-2022-05-18-a-las-12.53.12-1024x917.png" alt="" class="wp-image-10418" srcset="https://blog.xojo.com/wp-content/uploads/2022/05/Captura-de-Pantalla-2022-05-18-a-las-12.53.12-1024x917.png 1024w, https://blog.xojo.com/wp-content/uploads/2022/05/Captura-de-Pantalla-2022-05-18-a-las-12.53.12-300x269.png 300w, https://blog.xojo.com/wp-content/uploads/2022/05/Captura-de-Pantalla-2022-05-18-a-las-12.53.12-768x688.png 768w, https://blog.xojo.com/wp-content/uploads/2022/05/Captura-de-Pantalla-2022-05-18-a-las-12.53.12-1536x1375.png 1536w, https://blog.xojo.com/wp-content/uploads/2022/05/Captura-de-Pantalla-2022-05-18-a-las-12.53.12-2048x1833.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p>To start, create a Web project, select <a href="https://documentation.xojo.com/api/user_interface/web/webpage.html#webpage">WebPage1</a> in the Navigator and drop a <a href="https://documentation.xojo.com/api/user_interface/web/webbutton.html#webbutton">WebButton</a> from the Library onto the upper-center of the page in the Layout Editor. In the associated Inspector Panel for the button change the following property:</p>



<ul class="wp-block-list"><li><strong>Caption:</strong> Create PDF</li></ul>



<p>Next, add the <code>Pressed</code> Event Handler to it and type the following snippet of code in the associated Code Editor:</p>



<pre class="wp-block-preformatted">// Nothing really interesting here
// Create a new PDFDocument instance
// and assign its Graphic context to
// a variable
Var d As New PDFDocument
Var g As Graphics = d.Graphics

// The content of the PDF
// not that much, but it works for the
// main topic we are interested in
g.DrawText("Really simple PDF content", 20, 20)

// Here is where the **important** thing starts
// Creating a new WebFile instance and assigning it
// to the wf property added to the WebPage1 page
wf = New WebFile

// This is the thing: the PDFDocument.ToData method
// returns as a MemoryBlock (Direct conversion to String)
// the inner contents of the PDF document at this point
// so assign that to the "data" property of the
// WebFile instance
wf.Data = d.ToData

// It's important to set the right MIMEType for the file
// in this case, it's a PDF file
wf.MIMEType = "application/pdf"

// We assign the file name…
wf.Filename = "SamplePDF.pdf"

// …and set the ForceDownload to true…
wf.ForceDownload = True

// …so the file is, in effect, downloaded when calling
// the Download method on our WebFile instance
Call wf.Download

// Because we want to display the PDF file in an HTMLViewer
// set the ForceDownload property back to False
wf.ForceDownload = False

// And, finally, preview the PDF Document loading it in the
// HTMLviewer added to the WebPage1 page
HTMLViewer1.LoadURL(wf.URL)
</pre>



<p>As you can see here, this simple fragment of code is in charge of creating a sample PDF document, downloading it and also previewing it in an <a href="https://documentation.xojo.com/api/user_interface/web/webhtmlviewer.html#webhtmlviewer">HTMLViewer</a> instance. Now, add an HTMLViewer control to the WebPage1 page.</p>



<p>Select the WebPage1 item in the Navigator again so it is visible in the Layout Editor. Next, drag the HTMLViewer control from the Library and drop it below the WebButton added in the previous step.</p>



<p>With the HTMLViewer1 control selected in the Layout Editor, click on the four lock icons under the Locking section from the associated Inspector Panel so they are closed.</p>



<p>Finally, add the expected <a href="https://documentation.xojo.com/api/web/webfile.html#webfile">WebFile</a> property to the WebPage1 page using the following values in the associated Inspector Panel:</p>



<ul class="wp-block-list"><li><strong>Name:</strong> wf</li><li><strong>Data Type:</strong> WebFile</li><li><strong>Scope:</strong> Private</li></ul>



<p>You&#8217;ll probably want to move this property to the <a href="https://documentation.xojo.com/api/web/websession.html#websession">Session</a> object in your Web projects so every connected user to the app can handle their own generated PDF documents.</p>



<p>And…&nbsp;that&#8217;s all! Run the project, click the button and see how it works.</p>



<p>Have fun!</p>



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



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

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

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

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

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Web DatePicker Quick Tip: Check Your Settings</title>
		<link>https://blog.xojo.com/2021/09/15/web-datepicker-quick-tip-check-your-settings/</link>
		
		<dc:creator><![CDATA[Wayne Golding]]></dc:creator>
		<pubDate>Wed, 15 Sep 2021 16:16:12 +0000</pubDate>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[DatePicker]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[webdev]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=9214</guid>

					<description><![CDATA[A quick tip I wanted to share about using Web DatePicker. I was using the DatePicker control on a web page and the results didn't look correct. ]]></description>
										<content:encoded><![CDATA[
<p>Read on for a quick tip about using Xojo&#8217;s <a href="https://documentation.xojo.com/api/user_interface/web/webdatepicker.html">Web DatePicker</a>. I was using the DatePicker control on a web page and the results didn&#8217;t look correct. </p>



<figure class="wp-block-image size-medium is-resized is-style-default"><img loading="lazy" decoding="async" src="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.41.44-AM-300x143.png" alt="" class="wp-image-9230" width="563" height="268" srcset="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.41.44-AM-300x143.png 300w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.41.44-AM-1024x489.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.41.44-AM-768x367.png 768w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.41.44-AM.png 1046w" sizes="auto, (max-width: 563px) 100vw, 563px" /></figure>



<p>You can see that the DatePicker is rendering the date in M/D/Y format, but here in New Zealand (and a lot of other places) we use D/M/Y as seen in the Locale.Current text field.</p>



<p>I then looked at WorldTimeServer.com and I can see that this site that is dedicated to dates and times is also rendering dates in M/D/Y format.</p>



<figure class="wp-block-image size-medium is-resized is-style-default"><img loading="lazy" decoding="async" src="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.00-AM-300x246.png" alt="" class="wp-image-9232" width="472" height="387" srcset="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.00-AM-300x246.png 300w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.00-AM-768x629.png 768w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.00-AM.png 918w" sizes="auto, (max-width: 472px) 100vw, 472px" /></figure>



<p>This led me to believe that my browser wasn’t giving the correct language code to these sites. I did a little digging and found that my browser has a Languages setting and mine was defaulting to English (United States).  And the United States, unlike New Zealand, uses M/D/Y.</p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="1024" height="314" src="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.26-AM-1024x314.png" alt="" class="wp-image-9233" srcset="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.26-AM-1024x314.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.26-AM-300x92.png 300w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.26-AM-768x236.png 768w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.26-AM.png 1154w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>To fix this I added my language to the browser and set it to be the first in the list.</p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="1024" height="372" src="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.32-AM-1024x372.png" alt="" class="wp-image-9234" srcset="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.32-AM-1024x372.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.32-AM-300x109.png 300w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.32-AM-768x279.png 768w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.32-AM.png 1156w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now WorldTimeServer.com renders dates in D/M/Y format.</p>



<figure class="wp-block-image size-medium is-resized is-style-default"><img loading="lazy" decoding="async" src="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.43-AM-300x268.png" alt="" class="wp-image-9235" width="482" height="431" srcset="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.43-AM-300x268.png 300w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.43-AM-768x687.png 768w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.43-AM.png 1006w" sizes="auto, (max-width: 482px) 100vw, 482px" /></figure>



<p>And the DatePicker in my Xojo project now renders correctly as well.</p>



<figure class="wp-block-image size-medium is-resized is-style-default"><img loading="lazy" decoding="async" src="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.52-AM-300x115.png" alt="" class="wp-image-9236" width="569" height="218" srcset="https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.52-AM-300x115.png 300w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.52-AM-768x294.png 768w, https://blog.xojo.com/wp-content/uploads/2021/09/Screen-Shot-2021-09-14-at-9.42.52-AM.png 986w" sizes="auto, (max-width: 569px) 100vw, 569px" /></figure>



<p>And I didn’t change a single line of code in my Xojo project to fix it!</p>



<p><em>Wayne Golding has been a Xojo developer since 2005 and is a Xojo MVP. He operates the IT Company <a href="http://www.axisdirect.nz">Axis Direct Ltd </a>which primarily develops applications using Xojo that integrate with Xero www.xero.com. Wayne’s hobby is robotics where he uses Xojo to build applications for his Raspberry Pi, often implementing IoT for remote control.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Web Tip: Blocking the Back Button</title>
		<link>https://blog.xojo.com/2021/08/24/web-tip-blocking-the-back-button/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Tue, 24 Aug 2021 18:47:22 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[Mobile]]></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=9029</guid>

					<description><![CDATA[You are navigating Xojo web 2.0 apps and your use the browser’s back button to return to the previous page of the app. But rather than taking you to the previous page, you get a message that the app lost connection to the sever.  This is even more common on a mobile device where we tend to use the back gesture to return to the previous page.]]></description>
										<content:encoded><![CDATA[<p>If you are developing web apps, you’ve likely run into this before. You are navigating your Xojo web app and you use the browser’s back button to return to the previous page of the app. But rather than taking you to the previous page, you get a message that the app lost connection to the sever.<span class="Apple-converted-space">  </span>This is even more common on a mobile device where we tend to use the back gesture to return to the previous page.</p>
<p>In order to avoid this you can use the following code snippet to block the back button and keep the current webpage displayed. It will reload the current webpage, so you probably will want to combine this technique with the use of cookies to keep track of the data you save and retrieve for the user.</p>
<p>The first step to implement this is adding a value to the <code>HashTag</code> property for the <code>Session</code> object in the <code>Opening</code> Event Handler of the webpage. For example:</p>
<pre>Session.HashTag = "#"</pre>
<p>Next, select the App object and type the following snippet of code under the HTML Header section in the associated Inspector Panel:</p>
<pre>&lt;script&gt;
window.addEventListener('popstate', function(event) {
	history.pushState(null, null, window.location.pathname);
	history.pushState(null, null, window.location.pathname);
	}, false);
&lt;/script&gt;</pre>
<p>That&#8217;s all! You can also watch this simple &#8220;how to&#8221; in a 2 minute <a href="https://youtu.be/BJ0RMMYip1E">video</a> (in English)  (<a href="https://youtu.be/T6-1_NFhppQ">video</a> in Spanish). Questions? Ask me on Twitter <a href="https://twitter.com/xojoes">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary">Xojo Forum</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Running Xojo Web Applications in Docker</title>
		<link>https://blog.xojo.com/2021/05/17/running-xojo-web-applications-in-docker/</link>
		
		<dc:creator><![CDATA[Jürg Otter ]]></dc:creator>
		<pubDate>Mon, 17 May 2021 18:00:00 +0000</pubDate>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Build Automation]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[webdev]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=8472</guid>

					<description><![CDATA[You can package your Xojo Web Apps in a Docker Image. That allows you to run an instance of your applications easily in a Docker Container. Docker provides the infrastructure to host the apps, start/stop them, switch between image versions - and much more.]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">What is Docker?</h2>



<p>If you haven&#8217;t heard of Docker, go ahead and read their excellent Documentation: <a href="https://docs.docker.com/get-started/overview/">Docker &#8211; Overview</a>.</p>



<p>I&#8217;m just going to quote some basics from the Overview to give a brief introduction of Docker, Docker image and Docker container:</p>



<p><strong><em>Docker </em></strong><em>is an open platform for developing, shipping, and running applications. It provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security allow you to run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you do not need to rely on what is currently installed on the host. You can easily share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.</em></p>



<p><em>A </em><strong><em>Docker image </em></strong><em>is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it.</em></p>



<p><em>A </em><strong><em>Docker container </em></strong><em>is a runnable instance of an image. You can create, start, stop, move, or delete a container. By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container’s network, storage, or other underlying subsystems are from other containers or from the host machine. A container is defined by its image as well as any configuration options you provide to it when you create or start it.</em></p>



<p><em>A </em><strong><em>Docker Registry</em></strong><em> is a stateless, highly scalable server side application that stores and lets you distribute Docker images.</em></p>



<h2 class="wp-block-heading">Why use Docker with a Xojo Web App?</h2>



<p>You can package your Xojo Web Apps in a Docker Image. That allows you to run an instance of your applications easily in a Docker Container. Docker provides the infrastructure to host the apps, start/stop them, switch between image versions &#8211; and much more.</p>



<p>The Docker Images containing your Xojo Web Apps can be copied to other machines. This might be some Linux or macOS machine <em>(Windows seems to be a bit more tricky)</em>, a Cloud Service &#8211; or even a Synology NAS. You then can import the Images on the Docker environment of those machines, and serve your apps from there.</p>



<p>If you&#8217;re pushing the Docker Images to a Registry (e.g. Docker Hub), it gets even more convenient. Docker Hub is a service provided by Docker for finding and sharing container images with your team or the public. So you&#8217;ll build the Docker Image with your Xojo Web App, push it to the Registry. After that, you (or your team, or everyone) can just pull the Images to their Docker infrastructure and run them in a Container.</p>



<h2 class="wp-block-heading">How to build a Docker Image containing a Xojo Web App?</h2>



<p>One could answer obviously: it depends. But let me try to explain the basic required steps. For this example we&#8217;re going to use a macOS machine to build the Xojo Web App and Docker Image. Then we&#8217;ll deploy and run a Docker Container on the local developer machine and on a Synology NAS.</p>



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



<ul class="wp-block-list"><li>Xojo with a license allowing you to build a Xojo Web App for Target Linux (Intel, 64Bit). </li></ul>



<p>Docker Desktop installed on the macOS developer machine. Download and install it from here: <a href="https://docs.docker.com/docker-for-mac/install/">Docker for macOS</a>. After that you should have the Docker GUI up and running. And in Terminal.app you should have the command line tools available. You can double check this by entering this command: </p>



<pre class="wp-block-preformatted">docker version</pre>



<ul class="wp-block-list"><li>We&#8217;re going to build a Docker Image based on Ubuntu (Linux). To run a Docker Container with this image, we obviously need a machine supporting this. Both macOS and the Synology NAS will work just fine.</li></ul>



<p>Are you ready and set up? So let&#8217;s go and try this.</p>



<h3 class="wp-block-heading"><strong>Build a Xojo Web App</strong></h3>



<p>Open a Xojo Project with a Web Application. I&#8217;m going to use a CRC Calculator I&#8217;ve written. Debug-Run it locally to make sure the Web App works as expected.</p>



<p>Once we&#8217;re ready to build we should think of what we&#8217;re going to need for the Docker Image. Check the following properties in your Xojo Project:</p>



<ul class="wp-block-list"><li>The most obvious one: Tick the &#8220;<strong>Build Target: Linux, x86-64Bit&#8221;. </strong>Since our Docker Image will run Ubuntu / Linux-64Bit, we need the Xojo Web App to run in such an environment.</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="608" src="https://blog.xojo.com/wp-content/uploads/2021/05/1_Build_Target-1024x608.png" alt="" class="wp-image-8508" srcset="https://blog.xojo.com/wp-content/uploads/2021/05/1_Build_Target-1024x608.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/05/1_Build_Target-300x178.png 300w, https://blog.xojo.com/wp-content/uploads/2021/05/1_Build_Target-768x456.png 768w, https://blog.xojo.com/wp-content/uploads/2021/05/1_Build_Target-1536x912.png 1536w, https://blog.xojo.com/wp-content/uploads/2021/05/1_Build_Target.png 2000w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ul class="wp-block-list"><li>Then in &#8220;Build Settings &#8211; Shared&#8221;, set the &#8220;<strong>Build &#8211; Port: 80</strong>&#8220;. In fact it doesn&#8217;t really matter which Port you&#8217;re choosing. All that is important for now is that you know which one it is.</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="608" src="https://blog.xojo.com/wp-content/uploads/2021/05/2_Build_Port-1024x608.png" alt="" class="wp-image-8509" srcset="https://blog.xojo.com/wp-content/uploads/2021/05/2_Build_Port-1024x608.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/05/2_Build_Port-300x178.png 300w, https://blog.xojo.com/wp-content/uploads/2021/05/2_Build_Port-768x456.png 768w, https://blog.xojo.com/wp-content/uploads/2021/05/2_Build_Port-1536x912.png 1536w, https://blog.xojo.com/wp-content/uploads/2021/05/2_Build_Port.png 2000w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ul class="wp-block-list"><li>That&#8217;s about all we need to do within the Xojo IDE &#8211; so let&#8217;s hit <strong>&#8220;Build&#8221;</strong>. </li></ul>



<p>We now have the built Web App ready. Next step is to package it in a Docker Image.</p>



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



<p>Open the Web App&#8217;s Build Folder in Finder. Next we need to write the instructions to get it in a Docker Image. Open your favourite Text Editor. Create a Text-File with Filename: <em>Dockerfile</em> (no file extension). Save it in the Build folder (next to the application&#8217;s executable file). The Content we&#8217;re saving in Dockerfile is:</p>



<pre class="wp-block-preformatted">#BASE IMAGE
FROM ubuntu:20.04

#INSTALL REQUIRED LIBRARIES
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update &amp;&amp; apt-get install -y libunwind8 libglib2.0

#ADD APPLICATION TO DOCKER IMAGE
ADD / /app/

#EXPOSE PORT AND RUN APPLICATION
EXPOSE 80
WORKDIR /app
CMD /app/CRCCalculatorWeb</pre>



<p>This describes how Docker is going to create the Docker Image. Let&#8217;s briefly explain the steps of this Dockerfile:</p>



<ul class="wp-block-list"><li>We&#8217;re going to use Ubuntu 20.04 as a base image. That about the same as saying: &#8220;Let&#8217;s set up an environment running Ubuntu 20.04 first.&#8221;</li></ul>



<ul class="wp-block-list"><li>We then set an environment variable allowing to install updates without user interaction. Then the system gets updated, and required Libraries installed (libunwind8, libglib2.0).</li></ul>



<ul class="wp-block-list"><li>The whole Content of the Build Folder (or in other words: everything next to the Dockerfile &#8211; that&#8217;s basically our Xojo Web App) is being copied into the image to the location /app</li></ul>



<ul class="wp-block-list"><li>Expose 80: Do you remember? That&#8217;s the &#8220;Build Port&#8221; we&#8217;ve set in the Xojo IDE. So this tells that when running this Image as a Container Instance later we can attach to this &#8220;virtual port&#8221;. It doesn&#8217;t matter if several applications in different Images/Containers use the same port. That&#8217;s because when running an Instance, we can later configure the running Instance to map the Ports, e.g.: &#8220;8088 (external) -&gt; 80 (internal)&#8221;. So a second Web App Instance or App could use e.g.&#8221;8089 (external) -&gt; 80 (internal)&#8221;. That&#8217;s why for our own convenience we can use Port 80 for every of our Xojo Web Apps&#8217;s Docker Image.</li></ul>



<ul class="wp-block-list"><li>Finally, the instructions tell where the working directory is, and with the last command the Xojo Web App is being launched.</li></ul>



<p>Alright &#8211; everything is ready so that we can now create the Docker Image.</p>



<h3 class="wp-block-heading"><strong>Docker Image</strong></h3>



<p>Open Terminal.app and change directory to the Build Folder of the Web App:</p>



<pre class="wp-block-preformatted">cd /path/to/your/xojo-webapp-project/Builds\ -\ CRCCalculatorWeb/Linux\ 64\ bit/CRCCalculatorWeb</pre>



<p>You&#8217;re now in the folder with the Dockerfile and your Web App.</p>



<p>A Docker Image always needs a <strong>Tag</strong>. Such a Tag looks like this:</p>



<pre class="wp-block-preformatted">jotools/crccalculator:1.0.0-dev</pre>



<p>The parts are: (company-name)/(product-name):(version-label-tag)</p>



<p>So&#8230; let&#8217;s build the Docker Image &#8211; enter this in Terminal:</p>



<pre class="wp-block-preformatted">docker build -t jotools/crccalculator:1.0.0-dev .</pre>



<p>What this does is: Build a Docker Image with Tag ___ from &#8220;this current directory&#8221; (the dot at the end).</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" src="https://blog.xojo.com/wp-content/uploads/2021/05/3_Docker-Build-1024x666.png" alt="pastedGraphic_2.png" class="wp-image-8497" width="904" height="588" srcset="https://blog.xojo.com/wp-content/uploads/2021/05/3_Docker-Build-1024x666.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/05/3_Docker-Build-300x195.png 300w, https://blog.xojo.com/wp-content/uploads/2021/05/3_Docker-Build-768x500.png 768w, https://blog.xojo.com/wp-content/uploads/2021/05/3_Docker-Build.png 1140w" sizes="auto, (max-width: 904px) 100vw, 904px" /></figure>



<p><em>Side-Note: If you&#8217;re re-building an Image with the same Tag of an already existing Image, it gets overwritten. You could also first remove an existing image like this:</em></p>



<pre class="wp-block-preformatted"><br>docker image rm jotools/crccalculator:1.0.0-dev</pre>



<p>You can now launch the Docker Desktop .app and find your Image there:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="590" src="https://blog.xojo.com/wp-content/uploads/2021/05/4_Docker-Image-1024x590.png" alt="" class="wp-image-8510" srcset="https://blog.xojo.com/wp-content/uploads/2021/05/4_Docker-Image-1024x590.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/05/4_Docker-Image-300x173.png 300w, https://blog.xojo.com/wp-content/uploads/2021/05/4_Docker-Image-768x442.png 768w, https://blog.xojo.com/wp-content/uploads/2021/05/4_Docker-Image-1536x885.png 1536w, https://blog.xojo.com/wp-content/uploads/2021/05/4_Docker-Image-2048x1180.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>If you prefer to see the image using the command line:</p>



<pre class="wp-block-preformatted">docker image ls</pre>



<h3 class="wp-block-heading"><strong>Run Docker Container</strong></h3>



<p>Let&#8217;s now take the Image and run a new Docker Container using that Image. We will configure the Docker Container Instance to use the local Port 8088. In Docker Desktop GUI:</p>



<ul class="wp-block-list"><li>Select the Image, click on the Button &#8220;Run&#8221;</li></ul>



<ul class="wp-block-list"><li>Expand the optional settings, enter a Container Name of your choice and Map the &#8220;LocalPort: 8088&#8221; to &#8220;Container Port: 80&#8221;</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="590" src="https://blog.xojo.com/wp-content/uploads/2021/05/5_Docker-Container-Setup-1024x590.png" alt="" class="wp-image-8511" srcset="https://blog.xojo.com/wp-content/uploads/2021/05/5_Docker-Container-Setup-1024x590.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/05/5_Docker-Container-Setup-300x173.png 300w, https://blog.xojo.com/wp-content/uploads/2021/05/5_Docker-Container-Setup-768x442.png 768w, https://blog.xojo.com/wp-content/uploads/2021/05/5_Docker-Container-Setup-1536x885.png 1536w, https://blog.xojo.com/wp-content/uploads/2021/05/5_Docker-Container-Setup-2048x1180.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ul class="wp-block-list"><li>Then&#8230; click on &#8220;Run&#8221;</li></ul>



<p>And that&#8217;s it &#8211; we have the Container up and running:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="590" src="https://blog.xojo.com/wp-content/uploads/2021/05/6_Docker-Container-Running-1-1024x590.png" alt="" class="wp-image-8513" srcset="https://blog.xojo.com/wp-content/uploads/2021/05/6_Docker-Container-Running-1-1024x590.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/05/6_Docker-Container-Running-1-300x173.png 300w, https://blog.xojo.com/wp-content/uploads/2021/05/6_Docker-Container-Running-1-768x442.png 768w, https://blog.xojo.com/wp-content/uploads/2021/05/6_Docker-Container-Running-1-1536x885.png 1536w, https://blog.xojo.com/wp-content/uploads/2021/05/6_Docker-Container-Running-1-2048x1180.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>If you prefer the command line:</p>



<pre class="wp-block-preformatted">docker run -d --publish=8088:80 --name crccalculator jotools/crccalculator:1.0.0-dev</pre>



<p>Let&#8217;s access our Xojo built Web App running in the local Docker Container using Safari:</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" src="https://blog.xojo.com/wp-content/uploads/2021/05/7_Safari-Test-1024x651.png" alt="pastedGraphic_6.png" class="wp-image-8500" width="889" height="563"/></figure>



<p><em>Side-Note: If you just want to try this example project then you can pull the image like this in Terminal.app:</em></p>



<pre class="wp-block-preformatted">docker pull jotools/crccalculator:1.0.0</pre>



<h3 class="wp-block-heading"><strong>Export Docker Image</strong></h3>



<p>The easiest way is to push the Image to a Registry such as Docker Hub. That obviously requires a registration &#8211; so we won&#8217;t cover this here and now.</p>



<p>Let&#8217;s export the Image using Terminal.app.</p>



<p>You should still be in the Build &#8211; directory of the Xojo Web App. If not, change to that folder.</p>



<p>Then export the Docker Image to a file like this:</p>



<pre class="wp-block-preformatted">docker save jotools/crccalculator:1.0.0-dev | gzip &gt; ./CRCCalculatorWeb.dockerimage.tgz</pre>



<p>This command is saving the Image/Tag to a .tgz located in the current directory.</p>



<h3 class="wp-block-heading"><strong>Run Docker Image on a Synology NAS</strong></h3>



<p>If you have a Synology NAS supporting Docker &#8211; this is how you can run the exported Image on your NAS:</p>



<ul class="wp-block-list"><li>First of course: Install the Synology Docker Package</li></ul>



<ul class="wp-block-list"><li>Copy the exported <em>CRCCalculatorWeb.dockerimage.tgz</em> to a Share on the NAS</li></ul>



<ul class="wp-block-list"><li>Launch the Docker .app on the NAS</li></ul>



<ul class="wp-block-list"><li>Under &#8220;Images&#8221;: Add -&gt; From File -&gt; (choose your <em>CRCCalculatorWeb.dockerimage.tgz</em>) </li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="662" src="https://blog.xojo.com/wp-content/uploads/2021/05/8_Synology_Docker-Image-1024x662.png" alt="" class="wp-image-8517" srcset="https://blog.xojo.com/wp-content/uploads/2021/05/8_Synology_Docker-Image-1024x662.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/05/8_Synology_Docker-Image-300x194.png 300w, https://blog.xojo.com/wp-content/uploads/2021/05/8_Synology_Docker-Image-768x497.png 768w, https://blog.xojo.com/wp-content/uploads/2021/05/8_Synology_Docker-Image-1536x994.png 1536w, https://blog.xojo.com/wp-content/uploads/2021/05/8_Synology_Docker-Image-2048x1325.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ul class="wp-block-list"><li>Select the imported Image, click on &#8220;Run&#8221;</li></ul>



<ul class="wp-block-list"><li>Enter a Containername of your choice:</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="662" src="https://blog.xojo.com/wp-content/uploads/2021/05/9_Synology_Docker-Container-1-1024x662.png" alt="" class="wp-image-8518" srcset="https://blog.xojo.com/wp-content/uploads/2021/05/9_Synology_Docker-Container-1-1024x662.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/05/9_Synology_Docker-Container-1-300x194.png 300w, https://blog.xojo.com/wp-content/uploads/2021/05/9_Synology_Docker-Container-1-768x497.png 768w, https://blog.xojo.com/wp-content/uploads/2021/05/9_Synology_Docker-Container-1-1536x994.png 1536w, https://blog.xojo.com/wp-content/uploads/2021/05/9_Synology_Docker-Container-1-2048x1325.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ul class="wp-block-list"><li>Click the Button &#8220;Advanced Settings&#8221;: Same story here &#8211; Map the Local&lt;-&gt;Container Port. In this example: Local 8099 &lt;-&gt; Container 80</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="662" src="https://blog.xojo.com/wp-content/uploads/2021/05/10_Synology_Docker-Container-2-1024x662.png" alt="" class="wp-image-8522" srcset="https://blog.xojo.com/wp-content/uploads/2021/05/10_Synology_Docker-Container-2-1024x662.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/05/10_Synology_Docker-Container-2-300x194.png 300w, https://blog.xojo.com/wp-content/uploads/2021/05/10_Synology_Docker-Container-2-768x497.png 768w, https://blog.xojo.com/wp-content/uploads/2021/05/10_Synology_Docker-Container-2-1536x994.png 1536w, https://blog.xojo.com/wp-content/uploads/2021/05/10_Synology_Docker-Container-2-2048x1325.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ul class="wp-block-list"><li>Finish the assistant. The Container should now be up and running:</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="662" src="https://blog.xojo.com/wp-content/uploads/2021/05/11_Synology_Docker-Container-Running-1024x662.png" alt="" class="wp-image-8523" srcset="https://blog.xojo.com/wp-content/uploads/2021/05/11_Synology_Docker-Container-Running-1024x662.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/05/11_Synology_Docker-Container-Running-300x194.png 300w, https://blog.xojo.com/wp-content/uploads/2021/05/11_Synology_Docker-Container-Running-768x497.png 768w, https://blog.xojo.com/wp-content/uploads/2021/05/11_Synology_Docker-Container-Running-1536x994.png 1536w, https://blog.xojo.com/wp-content/uploads/2021/05/11_Synology_Docker-Container-Running-2048x1325.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Let&#8217;s access our Xojo built Web App running in the Docker Container of the Synology NAS using Safari:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="662" src="https://blog.xojo.com/wp-content/uploads/2021/05/12_Safari-Test-1024x662.png" alt="" class="wp-image-8524" srcset="https://blog.xojo.com/wp-content/uploads/2021/05/12_Safari-Test-1024x662.png 1024w, https://blog.xojo.com/wp-content/uploads/2021/05/12_Safari-Test-300x194.png 300w, https://blog.xojo.com/wp-content/uploads/2021/05/12_Safari-Test-768x497.png 768w, https://blog.xojo.com/wp-content/uploads/2021/05/12_Safari-Test-1536x994.png 1536w, https://blog.xojo.com/wp-content/uploads/2021/05/12_Safari-Test-2048x1325.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading"><strong>What next?</strong></h2>



<p>There are a lot of features and possibilities which we won&#8217;t cover here. Let&#8217;s just pick a couple and briefly explain without going into detail. You&#8217;ll find excellent documentation on Docker&#8217;s Website if you want or need to dig in further.</p>



<h3 class="wp-block-heading"><strong>Docker and Persisted Storage</strong></h3>



<p>Note that this example has no persisted storage. Which means that you can save files within a Container &#8211; but once you stop or remove the Container (e.g. to run a new Container with a newer Image version) the created data is gone. That&#8217;s a good thing &#8211; as a Container will always behave the same when deployed, not being cluttered with data that has come from somewhere.</p>



<p>If your Web App requires to store data on the filesystem you should add a Volume. In the Dockerfile add a line like this:</p>



<pre class="wp-block-preformatted">VOLUME /data</pre>



<p>You then can have your WebApp save data to the folder /data.</p>



<p>If you run a Container from such an Image &#8211; have a look at the Advanced Settings. Since the Image exposes a Volume, you can choose a local folder (on the machine where Docker is serving the Container) to be attached to /data. Same story on the Synology NAS.</p>



<p>Once you remove the Docker Container, the Data will still be there. So you can run another Container (e.g. with a newer version of your app), attach the same/existing data-folder. That way you can continue and keep existing data.</p>



<h3 class="wp-block-heading"><strong>Environment Variables</strong></h3>



<p>Especially if you&#8217;re going to Deploy the Docker Image on various environments, you might want some &#8220;settings&#8221;. One approach is to use Environment Variables in the Dockerfile:</p>



<pre class="wp-block-preformatted">ENV MY_CUSTOM_SETTING=4430</pre>



<p>Again in the Advanced options when running a Container you can override these Environment Variables to fit your needs.</p>



<h3 class="wp-block-heading"><strong>Build Automation</strong></h3>



<p>If you&#8217;re building regularly and don&#8217;t want to enter commands in the command line after every build you could think about a Post Build Script which builds the Docker Image and optionally even pushes it to a Registry (e.g. Docker Hub).</p>



<p>An example is available here: <a href="https://www.jo-tools.ch/xojo/xojowebapp2docker/">Example Project &#8211; Xojo Web App 2 Docker</a></p>



<h3 class="wp-block-heading"><strong>Docker Registry</strong></h3>



<p>The easiest way is to distribute a local Docker Image is to use a Registry such as Docker Hub. That obviously requires a registration and your Docker Client to be signed in. You can then push the Docker Image to the Registry, and pull it from there on the Docker Clients.</p>



<pre class="wp-block-preformatted">docker push jotools/crccalculator:1.0.0-dev</pre>



<pre class="wp-block-preformatted">docker pull jotools/crccalculator:1.0.0-dev</pre>



<h3 class="wp-block-heading"><strong>Restart policy</strong></h3>



<p>In order to automatically launch a Docker Container after a reboot (of the host machine; of the Docker daemon): see Docker&#8217;s <a href="https://docs.docker.com/config/containers/start-containers-automatically/">Restart Policy Documentation</a>.&nbsp;</p>



<p>This command changes the restart policy for an already running container named crccalculator:</p>



<pre class="wp-block-preformatted">docker update --restart unless-stopped crccalculator</pre>



<p>And this command will ensure all currently running containers will be restarted unless stopped:</p>



<pre class="wp-block-preformatted">docker update --restart unless-stopped $(docker ps -q)</pre>



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



<p>I hope this brief introduction of how a Xojo built Web Application can be used with Docker has been helpful to some, food for thought to others.</p>



<p>I wish you all the best and I&#8217;m curious if the Xojo Forum will get new posts in the near future with Docker Hub Links to interesting Xojo Web Apps which you do provide to the community.</p>



<p><em><em>Jürg Otter is a long term user of Xojo and working for </em><a href="https://www.cmiag.ch/"><em>CM Informatik AG</em></a><em>. Their Application </em><a href="https://cmi-bildung.ch/"><em>CMI LehrerOffice</em></a><em> is a Xojo Design Award Winner 2018. In his leisure time Jürg provides some </em><a href="https://www.jo-tools.ch/xojo/"><em>bits and pieces for Xojo Developers</em></a><em>.</em></em></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
