Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Google Gears

  • 03-08-2009 5:38pm
    #1
    Registered Users, Registered Users 2 Posts: 66 ✭✭


    I have developed a SaaS web application (PHP/MYSQL) that social care workers will use to do assessments in patients homes. The system isn't live yet, it is more a proof of concept project. Anyway I am encountering problems with very poor internet connectivity in certain areas.

    The app needs to be on line as certain patient data stored in the system will need to be accessible to the care worker doing the assessment in the patients home. Also connectivity will be required to access the web forms too carry out the assessment.

    I have been advised that google gears might be a solution. Apparently it can take a snap shot of the system and store it locally which can then be accessed off line and synchronised with the online system later.

    Has anyone here used Google gears before? Any opinions on it ? Is it difficult to install? Are there good tutorials out there?

    Oh and are there any other options worth looking in to?

    Thanks in advance,

    Derick


Comments

  • Registered Users, Registered Users 2 Posts: 3,141 ✭✭✭ocallagh


    One problem with this approach would be data protection. Gears uses plain text for storage. If you have dozens of nurses downloading data to their laptops (so the app can be used offline) it makes it very hard to comply with data protection laws as you will never have complete control of the whereabouts of all the data. There may be alternative methods to store the data, or I'm sure there are options to extend google gears API to encrypt the data but might be a lot of work!

    A .NET app for offline tasks might be the best option. You could store your data quite securely then with SQL Server. Have the nurses download required profiles for the day, and at the end of the day your system could upload the results and delete the data from the local machine.

    Aside from security, this introduces an additional (rather complicated step) for the nurse which will inevitably lead to problems. Have you tried mobile broadband in these areas?


  • Registered Users, Registered Users 2 Posts: 66 ✭✭derickmc


    Thanks ocallagh, it is just proof of concept we are looking at for at the moment. Wher possible we would like to avoid installing seperate software on the individual PC's. If the existing app could be configured to work offline using Gears that would be a great start.

    Do you is there much work to configuring a web app/site to work with Gears?

    From my initial digging I am only finding detail about updating your client to work with gears enabled sites.


  • Registered Users, Registered Users 2 Posts: 3,141 ✭✭✭ocallagh


    To make an entire application/web site work yes, there is a lot of work. Ideally you would write the entire application with AJAX calls via client side javascript. That way you can interact with GEARS or your app through the same code base. However in reality this is a nightmare to implement and not entirely secure either. If only a small part of your application needs to be accessed offline, you'd be better off (IMO) to write your application as normal, but for components you want to work offline simply create custom GEAR code. It's quite easy to work with.

    For example here would be a few basic javascript examples

    //Setup your DB connection (and create table if not exists) -
    db = google.gears.factory.create('beta.database');
     
          if (db) {
            db.open('databasename');
            db.execute('create table if not exists MyTableName' +
                       ' (MyColName varchar(255)');
          }
    
    You'll need to download the current state of your apps database in the example above. Doing that is simply an AJX call to your server which returns a bunch of CREATE and INSERTS


    Once the DB is setup, you can insert, update, select etc.
    //INSERT Code
    db.execute('insert into MyTableName values (?)', [document.getElementById("xyz").value]); //xyz is an input field
    
    

    //SELECT Code
     var rs = db.execute('select * from MyTableName');
      while (rs.isValidRow()) {
        
          alert( rs.field(0) );
       
        rs.next();
      }
      rs.close();
    
    


Advertisement