HTTP

Serving static content from Xojo Web

Now available on GitHub is open sourced code to help you serve static files from your Xojo Web application. This is especially useful if you are running standalone or load balanced apps and do not want to depend on another web server.

Check it out here: https://github.com/1701software/XojoWeb_StaticContent

For example at ServerWarp we host many load balanced applications for customers. Many will produce PDF reports for users. In order to serve those PDF reports they have often relied on writing those PDF files to another directory of another domain or subdomain because Xojo Web could not natively serve those files. Technically the "WebFile" class works for this purpose but the user and development experience is a bit subpar especially for mobile clients. You can only access files that way if you have an active Xojo Web session. What if you want to email your user a link to the download?

The problem at ServerWarp is we isolate your apps and domain web servers from each other to protect from vulnerabilities and provide the most secure environment. So it requires extra configuration to get your Xojo standalone app to be able to write to a specific folder of another domain. The other obvious downside is you now need a secondary web server and domain/sub-domain to serve these files. It would be great if you could simply write your static files to a sub-folder inside of your app directory and serve those files directly. That is exactly what we deliver here.

The code we are presenting on GitHub today allows you to easily map folders to the Xojo Web application to be served as static content. It is a drop in module that extends the 'App' object of your Xojo Web project making integrating it super simple.

The example project demonstrates two distinct static folders with a PDF, image, and text file. It demonstrates how to map the folders and the Xojo Web app presents links to test the functionality very quickly. To give you an idea of how it is to integrate check out this screenshot of the 'App.HandleURL' event handler:

Introducing Rapid Services for Xojo Web

Rapid Services for Xojo Web allows any developer to build RESTful web services without ever manipulating JSON. You simply construct normal web pages using a few simple steps and you magically get a full RESTful web service at your disposal. Included with the package is the RapidServicesClient class that can be used on all Xojo eligible targets and platforms which makes it super easy to connect to your web services. 

One of the aspects about Rapid Services is it builds right on top of a standard Xojo Web application. So long as you are a licensed developer of Xojo Web you can develop with it. In fact you can integrate it directly into your existing Xojo Web applications while only changing a couple minor properties. It will work alongside any application quite nicely. Alternatively you could build completely unique applications just for the purpose of serving your client applications via web services. The choice is yours.

Rapid Services will literally save you hours of development time. No more hacking at JSON and the HandleURL() events to produce meaningful REST API's. Rapid Services lets you construct web services as quickly as you can program Xojo web pages.

Includes:

  • Three working examples for Desktop and iOS applications.

  • Seventeen page manual with screenshots, code samples, and a step-by-step guide to building a service.

  • Royalty free distribution on unlimited servers and Xojo web applications.

  • Unlimited updates for the life of the product.

Requirements:

  • You must have a Xojo Web license and Xojo 2016r3+

License

  • The encrypted edition requires a license key to be used in production. One will be sent to you within 24 hours of ordering.

  • The source code edition does not require a license key.

 

Click here to download the manual to read more about Rapid Services.

Click here to download a fully working (encrypted) demo of Rapid Services.