Saturday, April 21, 2012

Google Script - What is It?

v 0.2

Said one way ..... Google Script is server-side javascript with Google API extensions that can be used to manipulate Google services and create User Interfaces.  Scripts are typically stored within Google Docs Spreadsheets or Websites and executed within the Google Cloud.

Some examples:
  • Create user functions within a spreadsheet and use them for additional formula functionality
  • Read and write data to spreadsheets
  • Create new spreadsheet menus
  • Create a user dialog or form or other application interface.
  • Create a simple database using an interface and a spreadsheet or Fusion table to store data.
Yes, there is so much more you can do, however if you already know that, then you don't need my description ..

In order to USE Google Script within your Google Account, you really do need to understand how to program Javascript.  In particular, you need to understand Javascript objects, since they are central to the use of Google Script.  Youtube has an extensive list of tutorials and lectures for Javascript, and there is now one book available for Google Script.  Google has full documentation for its API set, though this can be a little hard going for the inexperienced.

Whilst ultimately I want to end up with a complete application, I have found that I've had to go through the Google documentation - work out what I need to do, and then find example routines to do what I want - read and write to spreadsheets, create and re-order sheets, build a dialog etc.  It starts out slowly, but does speed up as you get into it.

One thing I'll say about the GUI techniques - I've found them very similar to those used in the TK interface of TCL/TK, notably the Pack and Grid modes.


Later ....

Friday, April 20, 2012

Stores Filing System - Considerations

v 0.21

When I'm not away on my "real" job, I spend time with a group called "HARS" - the "Historical Aircraft Restoration Society".  One of the projects there is to repair the damage on the replica "Southern Cross" Fokker Tri-Motor (the original is safely housed in a display at Brisbane Airport).  I was asked "Can you come up with a program to allow us to keep track of the parts here - BUT - it has to be SIMPLE!!

No problems I thought - I can just use LibreOffice or a simple database program .. but as I found, it is not quite as simple as that.  Simple programs are not simple.

The first obstacle is that if you use a database program of whatever kind on a single computer, the stores system is useless if you don't have THAT computer available.  Sharing the database file is a kludge that rapidly becomes really scary.

Next, I talked to the guys that looked after the servers there.  They immediately told me that they already had a stores database system there - would I like to look at it and get it going?  Absolutely!  Unfortunately, after a LOT of reading and thinking about it, I realised that this stores system, whilst available over a network was designed for companies that had dedicated and trained people who used it all the time.  A 70 year old Aircraft Engineer who had spent his career with paper and files would not have a hope of walking up to this system and doing what he wanted - especially since he was here to play with aircraft for fun, not learn how to use a complex computer program.  So after a lot of time trying to find out what I'd missed about the program, I realised I hadn't missed anything and that it was quite unsuitable for what we needed.

Perhaps I could get them to install PostgreSQL as a relational database manager and I could then write something to connect to it in LibreOffice, or a scripting language or whatever ...... I was met with looks of suspicion (which I can understand, given some of the "offers" of assistance these people have had in the past).  More street Cred needed before I proceed down that path.

After some thinking, I finally settled on trying a system using Google Docs and Google Script.  The more I looked at it, the better it seemed for what I want.  It was in "The Cloud", it could be accessed from anywhere and on any Internet enabled device.  Now to work out how to implement it.



Later ............