We’ve been tasked with implementing a database to allow functionality for a content management system for the iPad application we’ll be developing for the Worcester Art Museum. Our first thoughts were SQLite, integrated into our HTML5 based app utilizing JavaScript. We began with a series of tasks:
- Familarize ourselves with SQL technologies, specifically SQLite.
- Investigate methods to implement SQLite into our HTML5 application.
- Investigate our ability to store both text and also images
- Test a basic application utilizing a database to store and display data.
- Develop a method of storing database content centrally to be shared across clients.
Our tasks appeared to bring us to a very simple and linear path to success – but boy were we wrong! The first 2 tasks were simple, and seemed to provide us promising results. We googled and googled. We read articles, blogs, and forums and found very straight forward information on developing simple JavaScript functions to initialize a SQLite database natively on Web SQL Database enabled browsers, which included the browsers on IOS and Android devices. However, after starting on developing our own test code, we hit a brick wall.
SQLite databases utilized by browsers like Chrome or Safari are initialized in temporary locations at the start of the application. This temporary location is isolated to the browser and cannot be initialzed from any other location. This meant that the application running on the device would not be able to retrieve data from a centralized server, and would need to be created and pre-populated by the application itself. This completely defeated the purpose using SQLite to centrally manage data across multiple devices. In order to still utilize SQLite, we would need to further investigate different method to retrieve data from a server.
We looked into possible work-arounds, and discussed the possiblity of utilizing the Apple AppStore to upload an updated content database file, that would then be overwritten on the new device, however this is a very rudimentary method of deploying new content, and could also be done without the use of a database.
This all brings us back to the idea of utilizing a fully hosted server application instead of a local iPad application. It would give us the ability to centrally store our data on the server, and manage all changes centrally through a proper content management system. The downside to this, is that it cannot be accessed if the iPads do not have access to Wifi, or if they intermittently lose connection. However, there is the possibility of using an application called Kiosk Pro, which also has the ability to store a backup copy of the web application on the local device. We simply do not know how it will handle a database driven application. The only thing we can do at this point is more research. Here are the next set of tasks:
- Investigate a method to download server size SQL data into the local SQLite database.
- Investigate using another method of connecting to server side database.
- Investigate a method of retrieving data centrally without the use of a database (text files, and web directories)
- And finally, testing a server side application with a SQL back end while utilizing an application like Kiosk Pro to test a local backup copy without internet connection.
Generally, the first 3 tasks are really for self-learning so that we understand other methods of storing/retrieving content and their pros vs. cons. I am however biased, and believe that our fourth option is our best – which is why I believe it to be necessary to test all options before concluding.
Unfortunately, I won’t be able to test much without an Apple Developer account. The web SQL database on Chrome and Android appear to be different than on an IOS device, so until I can test properly, I cannot make a conclusion. If I’m unable to retrieve an Apple Developer account through Worcester State, I think I will pursue getting my company, The Training Associates, to invest in one since we will most likely want to release our own IOS apps after I’m done with this course. More to come next week!
From the blog mikesaguirre » cs-wsu by mikeaguirre and used with permission of the author. All other rights reserved by the author.