silikondeals.blogg.se

Xojo tutorials
Xojo tutorials









  1. #Xojo tutorials code
  2. #Xojo tutorials download

However, for web services we need to add the HandleSpecialURLevent to our project. If we were writing a Web App, then this would be the event we would use to attend, process and send the requested web pages, for example. This is the one that fires every time a client app (it may be a Web Browser, desktop or mobile app) connects to the URL associated with the IP address and port combinationthat is listeningfor incoming requests. Xojo Web projects offer two ways to handle the request received.

#Xojo tutorials code

If database.Error then MsgBox "Error connecting to the database"Īs you can see, it is pretty much the same code we already use when creating SQLiteDatabaseinstances in our Desktop apps, linkingto our SQLite database file and stablishing the connection so we can operate with the database engine from our app. Write the following code in the resulting Code Editor: dim f as FolderItem = ("test.sqlite") For that, make sure the Appobject is selected and add the Open Event Handlerto it using the Insert > Eventoption. Now is time to create a new SQLiteDatabase instance and assign it to this property, so it will point to the SQLite database file when the app is running. With the new property selected, go to the Inspector to set the name, type and scope using these values: Select the Appobject from the Navigator(the left panel in the Xojo IDE), choosing the Insert > Propertyoption from the contextual menu.

xojo tutorials

Start by adding a new propertyin charge of the reference to our SQLitedatabase (of course, it will work also with PostgreSQLor MySQLengines). In fact this tutorial will put all the logic in the App object. The good part is that you can mix both worlds, adding the webservice part to your regular Web app!. The first thing you’ll notice is that Xojo adds a web page to the project by default – even when our web service does not display a UI. Let’s start creating a web service! Open the Xojo IDE, create a new Web project, and name it WebService.

#Xojo tutorials download

In addition, if you want to follow and reproduce the steps of this tutorial, then you need to download the Chinook Database, named “test.sqlite” in this tutorial. In the second part, we will create a Desktop client to talk with the web service (you may want to add iOS to the list).īefore we start, let me point out that this tutorial leaves out some details related to error checking, validation, data sanitizing and other specifics related to inputs and outputs in order to focus on the central topic. In this two part tutorial you will see how easy it is to create a basic web service using Xojo Web and the Xojo programming language. Learn about APIsand web services with Xojo in the tutorial blog post. Of course, Xojo Webnot only makes it possible to create your own web apps, but it also acts as the perfect middleware that your desktop and iOS apps can communicate with. I’m looking at you: HTML, CSS (is that even a language?), JavaScript, PHP, et al. Using Xojo Web to create complete web apps and solutions means not having to learn a bunch of interpreted languages and dozens of ever-changing frameworks.











Xojo tutorials