June’s Year of Code theme is about writing code that works in any type of Xojo project. To demonstrate Xojo’s powerful multi-platform capabilities, this month I’m sharing a practical example: a single data loader and search class you can use—without modification—on Linux, Mac, Windows, Web, Console, iOS, Android or Raspberry Pi!
Introducing dataClass
: Universal Data Fetching for Xojo
Do you ever wish you could just grab some remote JSON data, search through it, and use it in your app, no matter what kind of project you’re building? That’s exactly what this little, pure-Xojo dataClass
allows!
Here’s what it does:
- Loads a list of posts from a web API (using standard
URLConnection
and Xojo’s built-inJSONItem
). - Lets you search by any term within the post’s title or body – case-insensitive.
- Works unchanged in all Xojo project types – all of them!
Why is This Cool?
By using only built-in classes and avoiding platform-specific quirks, you can build business logic and utility classes that drop straight into your app, whatever the deployment target.
The Complete Source Code
You can copy the full dataClass
source from this GitHub repository.
What Will You Build?
Have a favorite cross-platform Xojo technique, class or code module? Show us your own! Share in this month’s Year of Code forum thread.
Stay tuned for more Year of Code 2025 examples, and happy coding!
Gabriel is a digital marketing enthusiast who loves coding with Xojo to create cool software tools for any platform. He is always eager to learn and share new ideas!
Year of Code Project
- Year of Code: Kickoff
- January Project: Desktop Apps | Forum Discussion
- February Project: Database Apps | Forum Discussion
- March Project: Web Apps | Forum Discussion
- April Project: User Interface | Forum Discussion
- May Project: Mobile Apps | Forum Discussion
- June Project: Code Sharing | Forum Discussion
How to Play:
Each month we’ll announce a new theme and share an example project of our own. Share your projects to the Xojo Forum thread for that month via GitHub (all the links you need are posted above ↑ ). Learn how to use Xojo and GitHub.
The Prizes:
Monthly winners get $100 at the Xojo store. Every project submitted is another chance to win the grand prize. The grand prize is $250 cash plus a Xojo Pro license and a year of GraffitiSuite and will be announce in December. Learn more about the prizes.