In my session at XDC 2023, I talked about ways to design your apps so you reuse code across platforms. The first project is JSONReader, so let’s dive in.
In Xojo 2022r4, we have updated our SQLite library to SQLite v3.39.4. I thought I’d highlight a few notable upgrades including: STRICT tables
RIGHT and FULL OUTER JOIN
Built-in JSON support
With just a few lines of code, you can create a Xojo app for iOS and Android that shows a new cat picture each time you launch it. I call this app “CatsUp!”. It’s a play on ketchup/catsup, get it?
There is something that is even better than using Cell Renderers from third parties- building them yourself. In this second part, you will learn how…
Learn how to retrieve the data of an API over a CURL connection and evaluate the JSON to build a weather station. This example uses a free key from the OpenWeather API. The API returns a JSON text containing information such as current weather description, current temperature, pressure, humidity and many more.
The structure is simpler than XML which makes it much smaller and since it does not make use of all the tags you’ll find in XML, it is also significantly easier to read. However, if you open unformatted JSON in a text editor you’ll probably find it a bit dense. Here’s how to get around that.
I love the new Star Trek Discovery and there are a fair amount of Klingons in it, from time to time. It occurred to me that someone has probably built a web service to translate English to Klingon and if so, I needed to build a Xojo app to use it.
A quick Google search turned up an API by FunTranslations: https://funtranslations.com/api/klingon
It has simple usage where you send along the text in English and you get back a JSON result containing the text translated to Klingon. Here’s the result of my 15 minutes of effort to use this in a Xojo desktop app:
For the 10th week of the #JustCode Challenge I took a look at networking. For my project this week I’ve created a networked version of the Combat game, which has two tanks on the screen shooting at each other. The network version allows you to control one tank with the app running on your computer and someone else to control the other tank with the app running on their computer. I call it NetTank.
We’re wrapping up week 9 of #JustCode with a web app that demonstrates a web service, JSON and SQLite. The web app functions as both an app with a UI and a web service. It lets you enter your own quotes which are saved in a SQLite database. The web service randomly fetches a quote and returns it as JSON.
A long, long time ago (1989) one of the first apps I ever made was an app launcher for the Atari ST. I called it JumpSTART. I originally wrote it in GFA BASIC and then later re-implemented it in Pascal (OSS Personal Pascal, technically).
I was reminded of JumpSTART when I saw my dock getting crowed. I thought replicating JumpSTART in Xojo would be a good project for week 8 of #JustCode. Though let’s just call it JumpStart this time around.