Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview

Buy Now

Issue 15.2 ('Xojo Power Tricks')
Instant purchase and download via GumRoad!


Checking Out XFS

Open Source code for Xojo

Issue: 15.2 (March/April 2017)
Author: Scott Boss
Author Bio: Scott Boss is the founder of Nocturnal Coding Monkeys, Llc, who specialize in writing custom software. Scott has been a developer, system administrator, storage engineer, consultant, and architect to businesses from startup to global 100.
Article Description: No description available.
Article Length (in bytes): 5,813
Starting Page Number: 81
Article Number: 15210
Related Web Link(s):


Excerpt of article text...

The inspiration for today's topic actually came from me attending the first "Virtual Xojo Users Group" meeting (http://vxug.org). During the VXUG meeting, Hal Gumbert demoed a product he is working on called Xanadu (http://campsoftware.com/products/xanadu-for-xojo.php). During Hal's demo, he used XFS (http://campsoftware.com/products/xfs-for-xojo.php) for the images.

Now, as a storage expert, that really peaked my interest. I see how you could do a centralized storage of files in a similar way as Amazon S3, Dropbox, and Amazon Drive. Perhaps you are asking yourself, "Why should I care about XFS?"

If you are doing websites and web applications, having a centralized location for files like images is awesome. All the applications being able to share the files is a big bonus. XFS lets us Xojo developers totally control how we serve up the files via API calls and where we deploy them.

The code comes with two sample applications. First is xojo-server.xojo_binary_project. That is the sample code of a Xojo web application that serves as the XFS server. See Figure 1 as it is the screenshot of the application running. It is not very interesting.

The second bit of code is xojo-uploader.xojo_binary_project. It is sample code to show how to upload files to XFS via a web application. See Figure 2, which is a screenshot of the uploader running.

To show how easy it is to expand the XFS functionality. I added the ability to get the MD5 hash of a file. To do so, you add /HASH to the end of the URL of the file. The API strips the /HASH of the URL and processes the file, returning the hash. This would be a good way to validate that the file on the server is the same as what you have locally. Code Listing 1 is the HashServe method. Whereas the Code Listing 2 is the modification to the FileServe method.

...End of Excerpt. Please purchase the magazine to read the full article.