Xojo Review: Your Cross-Platform Development Tool

Xojo is a versatile cross-platform development tool that empowers you to create native apps for desktop, mobile, and web environments. Whether you’re a programming newbie or a seasoned developer, Xojo offers the ease of learning and the power you need. In this quick demonstration, we’ll give you a glimpse of what it’s like to build apps using Xojo.

While we’ll be showcasing this on a Mac, rest assured that Xojo runs seamlessly on Windows and Linux as well. Interestingly, Xojo itself is created using Xojo, highlighting its flexibility.

Also Read: How to Create an Android App Using Xojo

Getting Started

When you first launch Xojo, you’ll encounter the “Choose a Project” dialog, where you can select your project type:

  • Desktop App
  • Web App
  • Console App (similar to a desktop app but without a user interface)
  • iOS App

For this demonstration, we’ll start with a desktop app.

The Xojo Interface

Upon selecting a project type, the Xojo window opens with several key components:

  1. Navigator: Located on the left-hand side, it displays the contents of your project, including the app, windows, menus, images, sounds, and more.
  2. Editor: In the middle section, you’ll find the editor that corresponds to the item selected in the navigator. For instance, if you select a window, the window editor will appear.
  3. Library: On the right, you’ll find the library containing various controls that you can use to design your user interface.

Building a Simple Contact List Editor (Desktop App)

Let’s dive into building a straightforward contact list editor. Here’s a step-by-step process:

  1. Add a text field and position it within the window.
  2. Add a button labeled “Add” next to the text field.
  3. Incorporate a list box to display the contacts.
  4. Adjust the list box’s size to fill the window.
  5. Change the text of the button to “Add.”

With these elements in place, we want to ensure that when a user enters a name in the text field and clicks the “Add” button, the name appears in the list box.

Adding Functionality

  1. Rename the controls for clarity: “name field” for the text field, “add button” for the button, and “people list” for the list box.
  2. Implement the code to execute when the “Add” button is pressed. To do this, double-click the “Add” button, select the “Pressed” event, and enter the following code:
peopleList.AddRow(nameField.Text)

This code retrieves the text from the “name field” and adds it as a row in the “people list.”

Testing the Desktop App

Now, you can run your desktop app to see if it works. Click “Run,” and the app will compile and launch. Try entering a name and clicking “Add” to see it added to the list.

Building for Multiple Platforms

Xojo makes it effortless to deploy your app on various platforms. By checking the respective boxes for macOS, Windows, and Linux, you can generate native versions of your app for all three platforms. No need to write platform-specific code or adjust your user interface; Xojo handles it seamlessly.

Creating a Web Version

Now, let’s quickly create a web version of the same app. Watch the process unfold:

  1. Start a new project and choose “Web.”
  2. Replicate the user interface using text fields, buttons, and a list box.
  3. Rename the controls accordingly.
  4. Implement the same code for the “Add” button’s “Pressed” event (you can paste the code from the desktop app).
  5. Run the web app, and it will compile and launch in your browser.
  6. Test the web app by entering a name and clicking “Add.”

Building an iOS App

Finally, let’s create an iOS app for iPhones and iPads. Follow these steps:

  1. In the navigator, you’ll find iOS-specific components like screens, icons, and launch screens.
  2. Add a screen and design the user interface similar to the previous examples.
  3. Rename the controls and implement the same code for the “Add” button’s “Pressed” event.
  4. Run the iOS app, and it will compile and launch in the iOS simulator.
  5. Test the app by entering a name and clicking “Add.”

Conclusion

We explored Xojo’s capabilities by building applications for desktop, web, and mobile platforms. While the apps showcased here are simple, Xojo is equally adept at handling more complex projects. Users have leveraged Xojo to create CAD software, company management solutions, and even scientific applications for NASA. With Xojo, the only limit is your imagination.

You can download Xojo at xojo.com and use it for free. A license is only required when you’re ready to distribute a standalone app. Stay updated by following Xojo on Twitter at @xojo.

Leave a Comment