CampSoftware is made up of a fantastic team of people who loves developing Apps to solve problems.
Phone: 407-282-5585
Our blog posts in your email:



Stacks Image 1027
Xanadu

Several incarnations of Xanadu have been released over the past few years: Xojo Web Framework 1.0, Xojo with Aloe, and PHP.

At XDC 2018, Xojo demoed a major update to Web Apps which move to Bootstrap responsive apps with faster communications between the app and the browser and all new controls. With that in mind, Xanadu has been rewritten almost from scratch using the Xojo Web Framework 1.0, meant to be a base to build upon when Xojo ships Web Framework 2.0.

When Web Framework 2.0 is available, we hope to update Xanadu:
  • As a responsive Web App.
  • To be able to apply Themes.
  • Label Buttons with Font Awesome Icons to actual Buttons.
  • Controls like Lists, Date, Time, Timestamp, and Photo to the new 2.0 controls.

More info coming soon...



Xanadu Interface

Here's a bit of the Xanadu interface using Xojo Web Framework 1.0 in preparation for Web Framework 2.0.



Xanadu Code

Here's a bit of the Xanadu Code using Xojo Web Framework 1.0 in preparation for Web Framework 2.0.



Requirements

  • Requires Xojo to run, test, and compile.
  • Requires MBS Xojo Complete plugin for many functions.

Getting Started

  • Download and Install Xojo.
  • Download MBS Xojo Complete Plugin and then place the MBS Plugins into the Xojo Plugins Folder.
  • Launch Xojo.
  • Download Xanadu using your Registration Email download link and expand the zip file.

In the Folder

  • htmlpdfer - Folder to store html file and converted pdfs.
  • logs - Folder to store log files.
  • uploads - Folder where uploads are held until moved.
  • Xan Data/Files - Folder containing files related to database records like Contact Photos
  • Xan Data/xanadu.sql - SQL Dump file.
  • Xan Notes.txt - Notes about what changed in each version.
  • Xanadu.xojo_binary_project - Xojo Web Project file.

Database Setup

Xanadu is designed to use MySQL. If you're willing to dig in a bit you could use just about any database type that you'd like.

  • Create a new database on your MySQL server and give it a name like 'Xanadu' or whatever you prefer.
  • Import the 'xanadu.sql' file found in the 'Xan Data' folder within the download folder.
  • Note the Host Name, Port, SSL or Not, User Name, Password, and the database Name.
  • Open the 'Xanadu.xojo_binary_project'. Go to the Xan Module > SQL Class > Connect Method and set the database connection properties. If you run the project, it will automatically stop at the break statement which you can delete.
Code to update in Xan.SQL.Connect:
Break
if Lowercase( DBName ) = "aurora" then
   DB = New MySQLCommunityServer
   DB.Host = ""
   MySQLCommunityServer( DB ).Port = 12345
   MySQLCommunityServer( DB ).SSLMode = True
   DB.DatabaseName = ""
   DB.UserName = ""
   DB.Password = ""
end if


Settings Setup

User your favorite MySQL database tool, connect to your database, and edit the following.

  • ActiveSettings to 'Yes'.
  • AppName to whatever you like.
  • AppURL to your domain name for the app. You can do this later.
  • AppVersion to a version number. We use YYYY.MMDDR where is the revision number.
  • CookieDaysLogin to 7 for 7 days to remember a LoginKey on the User record.
  • CookieDaysLoginName to 7 for 7 days to remember the username.
  • LogoURLLarge and LogoURLMenu are not used right now.
  • SessionTimeoutSeconds to the number of seconds to disconnect idle users.
  • UUIDTenant for the default Tenant Key which is set to 'Xanadu'
  • api settings for GoogleMaps and Stripe are not used right now.
  • api settings for Amazon S3 are used to store files like Contacts Photos.
  • api settings for SMTP are used to send Emails.

File Storage Setup

Xanadu currently uses Amazon S3 to store images like Contacts Photos. If you skip this step, just don't upload any images in the Contacts page. :)

  • Set up your Amazon S3 Bucket.
  • In the Bucket, create a folder with your UUIDTenant like 'Xanadu'.
  • In the 'Xanadu' folder, copy the 'Contacts' folder from the 'Xan Data' folder.
  • You should have something like MyBucketName/Xanadu/Contacts/ with about 500 folders.

Each of the 500 folders represents a Contact record UUIDContact, which contains a PhotoURL folder, which contains an image file. If you look at the Contact table PhotoURL column, you'll see a URL like 'https://s3.amazonaws.com/MyBucketName/Xanadu/Contacts/000D045B-CCDF-4930-B186-483E19517704/PhotoURL/image.png'. This url is created using the Settings table api data along with the Contacts table data.

Run the Project!

If all goes as expected, you can run the project which will take you to a Login page. Click Register to create a new User. You'll receive an email sent using the settings you enter in the Settings table so you can finish the Registration process.



Questions and Answers
Ask a Question!

Q: Can you add a feature for me?
A: That depends on what you need! :) Seriously, just ask and we'll try!