Web Application vs Web Site

Hello,
I have Xojo Pro but am a complete beginner. I don’t have formal training in software development.

I read that Xojo web is used to develop web applications but can someone please give me a beginners description of the difference between that and a web site.

Ultimately I would like to use Xojo to make a Windows PC based web application where users of an android cellular phone/tablet can access this web application in the browser and read/write the associated SQLite database. The user would need to be able to read records and add some data back into the database. Some of the data from the user would be typed into fields on the Android screen but I would like some of it to be information the user doesn’t type such as date, time, and device sensor values.

I have not started this project and so far don’t know enough but can someone just give me a few beginners tips as to whether this type of thing is possible please.

Thanks,
David

What you have described is a web application. The only thing you might have trouble with is the part about device sensor values. Be default, for security purposes, there is a wall between the web application and the user’s device. There are ways around that provided that the user gives you permission to access device functions.

This might help…
http://developer.xojo.com/webinar-web-app-tutorial

[quote=389456:@David Neil]Hello,
I have Xojo Pro but am a complete beginner. I don’t have formal training in software development.

I read that Xojo web is used to develop web applications but can someone please give me a beginners description of the difference between that and a web site.

Ultimately I would like to use Xojo to make a Windows PC based web application where users of an android cellular phone/tablet can access this web application in the browser and read/write the associated SQLite database. The user would need to be able to read records and add some data back into the database. Some of the data from the user would be typed into fields on the Android screen but I would like some of it to be information the user doesn’t type such as date, time, and device sensor values.

I have not started this project and so far don’t know enough but can someone just give me a few beginners tips as to whether this type of thing is possible please.

Thanks,
David[/quote]

Hi David,

I have several web applications for exactly that purpose (access from Android/Apple mobile devices) and it’s one of the few areas where Xojo makes it easier than other languages that are used to build web sites rather than apps. Here are some tips that might help get you started:

  1. Design each page to be mobile friendly. I set the width/height of each page to be no more than 400x700 as this seems to be the optimal size for a portrait view on a phone. The text and controls are large enough for the user to see and click but not so large as to use all available real estate. You can, of course, use higher resolutions depending on your needs but for most of my apps I like to ensure visibility and useability.

  2. Set the Min Width and Min Height of each web page and dialog to be the same as the actual width/height. If you don’t do this then some devices will not show everything correctly.

  3. Utilize modal Web Dialogs whenever possible for input and messages. I’ve found that switching back and forth between web pages to get input tends to be slower than showing a dialog box. Don’t use the MsgBox to display messages as some browsers will prompt the user to suppress these messages afte the first two on any given page/sheet. Create a generic dialog box for displaying messages to the user.

  4. Assuming the same DB will be used by all users, put all DB related declares in App.Properties and refer to those when reading and writing to the DB. This keeps Xojo from opening multiple copies of the database.

I.E.

In App, create a FolderObject property called “databaseFile” and point it to the SQLite database, next create a SQLIteDatabase property called “db”.

In App.Open:

db = new SQLIteDatabase db.DatabaseFile = databaseFile

Then in the main program:

Dim rs As RecordSet If App.db.Connect then rs = App.db.SQLSelect(“SELECT * FROM table”) If rs <> Nil Then While Not rs.EOF ‘Do something rs.MoveNext Wend End If End If

  1. If you create a WebDialog and then create an instance of it on a page and afterwards change the size of it after you will need to delete the WebDialg instance from the page and re-add it. If you don’t the instance will stay the original size and not be resized to what the actual WebDialog is. This appears to be a long-standing bug.

  2. Put all user-related properties in Session.Properties so that each person who hits your website will inherit the variable but will have their own instance of it.

That’s about all I can think of for now. If it is feasible, I would highly recommend you look at purchasing Anthony Cipher’s GraffitiSuiteWeb package and Christian Schmidt’s (MBS) SQL and Complete packages. I use these in just about every web and desktop application I create as they fill the gap for many of the missing functions/controls in Xojo.

Have fun!

No. Each session should have its own database connection. Sharing a connection between sessions is a recipe for disaster. Sqlite can handle multiple connections from processes on a single machine (the web server). It just cannot handle multiple connections from different machines. Enable WAL mode by setting MultiUser to True in each connection.

Gentlemen,

thank you for all the responses. I need to watch the video mentioned multiple times and progress through it also using the advise you give. I can see it will become quite advanced once I want to send sensor values to the web app. Alternatively, I could write an Android app in Xojo once released and use network communications to send the information to the PC. Either way, it will be a steep learning curve.