Wednesday, December 31, 2014

Day 1 - 30 Day Challenge

Day 1: Learning AngularJS (vs Etoys)

So I have decided as I learn AngularJS to compare it to Etoys.  Admittedly not a fair comparison as both server different purposes, but hey its my learning journey and I will go where my strange mind and interests take me (I have found this path mostly useful and a lot of fun).

I am Shaping up with Angular.js from Code School.  I completed the first two levels.

So today I learned about:

  • Modules
  • Controllers
  • some directives
    • ng-repeat
    • ng-show
    • ng-hide
    • ng-src
  • Filters (uppercase, lowercase, currency, date, etc)
  • and some things about Bootstrap
The examples used in the course center around displaying a set of product data on the web.

I found myself thinking about how you do things in AngularJS vs how I would do it in Etoys.  Why you may ask would I want to compare two very different things?  Well while they are different at a very high level they are both tools for expressing ideas and both use MVC (Model View Controller).  Now when I say MVC I am not talking about the "modern" definition and use as found in various web frameworks such as AngularJS etc, but in the original definition from Trygve Reenskaug:
"The essential purpose of MVC is to bridge the gap between the human user's mental model and the digital model that exists in the computer." (see here)

Also I feel by trying to compare two very different approaches and trying to get to the "essense" of what they do and how they go about it I may actually gain some slightly deeper understanding.

I actually spent some time trying to build "directives" in Etoys and and while I created a "toUpperCase directive" and mapped a set of data (in a Holder) to a "Form",  it didn't feel right.  

I then recalled Dan Ingalls. The Live Web - Drag 'n Drop in the Cloud (video, JS CONF USA 2012) talk and thought that using connectors and converts would be a better approach. Basically I really like the idea of "connecting to a data source" then writing a converter to massage the data into a format that can be received by a visualization tool (table, list, graph, etc).


No comments: