Monday 29 July 2013

Hordes of Inquiries, Pt. 1

Today I've made friends with MDN (the Mozilla Developer Network) and their JavaScript resources - https://developer.mozilla.org/en-US/docs/Web/JavaScript

It's a wonderful place for looking up both syntax and concepts since it gives easily understandable examples and is written concisely and effectively for the most part.

As recommended by CDOT contributors Kieran Sedgwick and fellow team member Carl Desautels, the 5 central concepts that I will be wrapping my head around in the coming weeks will include:

- Objects and Prototypes
- Callbacks
- Closures
- Scope
- Initialization

Node.js also needs to be added to this list in and the resources I found for so far are http://net.tutsplus.com/tutorials/javascript-ajax/this-time-youll-learn-node-js/ and Node.js's API documentation at http://nodejs.org/api

The role of these central aspects of the language play an integral part in the implementation (and in turn, my comprehension) of the logic behind the project, at the very least on the front end of things. As stated earlier, Java will soon have to come into play. Any other relevant libraries and extensions to either of these languages that might be discovered will be noted and appended to this blog as soon as I find out what they are.  

I've also learned that the class design diagram was done using UML conventions and the verb 'realizes' in this context means 'implements'.

I intend on adding to my repository branch a few initial commits of comment injections into the medicalDevicePlugin.js by the end of the week to be reviewed and green lit by the rest of the team. 

'Til then, here's a picture that abstractly represents the way the API looks like right now:


Friday 26 July 2013

Beginning to Dissect the Project

After figuring out and creating the issue of needing to document (or update the existing documentation) and more descriptively comment the most pertinent scripts for the project, more questions arise on an hourly basis -

* According to the class diagram (https://farm9.staticflickr.com/8075/8361841953_4d4a8a58e2_b.jpg),
the logical starting point would be medicalDevicePlugin.js, but how does the variable flow in the initial function (function(window, cordova, undefined)interact with Cordova? What would be the concept behind its nature? Is this a variant of the cordova.exec function cordova.exec(function(winParam) {}, function(error) {}, "service",
             "action", ["firstArgument", "secondArgument", 42,
             false]);? I am currently referring to the Cordova documentation at http://cordova.apache.org/docs/en/2.5.0/guide_plugin-development_index.md.html#Plugin%20Development%20GuideThis partially applies to the next caveat.

** In order to see and interact any of the iOS integration code including elements of phonegap, I would have to at the very least download and install a Linux distribution on VirtualBox due to the constraints of working in Windows. So far there is no loophole around this, since the one project that was meant to add Objective-C capabilities to Eclipse has filter incompatibilities with version Kepler (https://github.com/hemantasapkota/j2objc-eclipse-plugin/commit/7bd9608020044bcea3b5ce73577bea9a0eedb17f). Is there a workaround or alternative for this that I haven't been made aware of yet?

In congruence with the above tasks, I am slowly but surely getting through the reference material, primarily focusing on O'Reilly's "Javascript: The Good Parts" in the meantime. So far, it's quite thorough on the inner workings of JS but the convoluted wording and explanations of certain features such as the apply method and prototypical inheritance are worded in such a way that I require clarification from peers around the office. Nevertheless, I soon plan on including Java reference material so that I can start understanding the native code integration.

Other goals for next couple of weeks are to get the eclipse/ADT environment to successfully compile and execute the default branch (working version) of the app. I appreciate everyone's past and future input and help in pointing me in the right direction throughout this journey.


Monday 22 July 2013

Setting Up at CDOT

Chaos is bound to ensue for any first time user of ADT and the eclipse environment, especially with the joys and wonders of Windows.

Notes and Issues:

- Touchscreen desktops are near useless for a programmer on Win7, save for the novelty aspect.
- Tortoisehg is convoluted and demands use of terminal commands, thus negating the entire point of its gui. Sourcetree was a much better choice
- Headphones will inevitably stop working for no other reason besides the fact that you are using Windows 7.
- There will be at least 3 instances of Eclipse that you will have to rename accordingly on your taskbar or desktop in order to not confuse and frustrate yourself into oblivion. 

Some references currently being used:

http://www.oodesign.com/ - Great for summations of object-oriented design concepts usually covered in books along with implementation examples that are relatively easy to follow.

http://zenit.senecac.on.ca/wiki/index.php/Mobile_Medical_Device_Integration - The go to website for getting started on the project, including links to its contributors and their blogs, logic diagrams and of course links to the repositories.