<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Interface Vision</title>
 <link href="http://bloginterfacevision.github.com/atom.xml" rel="self"/>
 <link href="http://bloginterfacevision.github.com"/>
 <updated>2014-09-21T16:54:42+00:00</updated>
 <id>http://bloginterfacevision.github.com</id>
 <author>
   <name>Eric Hosick</name>
   <email>erichosick@interfacevision.com</email>
 </author>

 
 <entry>
   <title>Javascript and Homoiconicity: Source-code that is a Data-Structure</title>
   <link href="http://bloginterfacevision.github.com/design/design-javascript-and-homoiconicity"/>
   <updated>2014-09-18T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/design-javascript-and-homoiconicity</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;You can mess around with a demo project in &lt;a href=&quot;https://github.com/erichosick/jscriptVision&quot;&gt;github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Homoiconicity&quot;&gt;Homoiconicity&lt;/a&gt; is a feature of a language where the language’s “program code is represented as the language’s fundamental data type” (also see &lt;a href=&quot;http://c2.com/cgi/wiki?HomoiconicLanguages&quot;&gt;Homoiconic Languages&lt;/a&gt; on c2).&lt;/p&gt;

&lt;p&gt;Javascript is a loosely typed language whose fundamental datatypes are primitives (strings, floats, etc.) and functions (lambdas) with properties (meaning functions can also be used as objects). From these fundamental data-types, we will create a single fundamental data type for Javascript (called a message).&lt;/p&gt;

&lt;p&gt;Homoiconic source-code is a data-structure in and of itself. Programming becomes the composition of this single fundamental datatype which results in the new algorithm (the program) and data-structure at the same time.&lt;/p&gt;

&lt;h2 id=&quot;why-is-homoiconicity-so-cool&quot;&gt;Why is Homoiconicity So Cool&lt;/h2&gt;

&lt;p&gt;Programming is the automation of process. We take real world processes and define them in algorithms that operate against data structures.&lt;/p&gt;

&lt;p&gt;Data-structures and algorithms are cool. All the software we see today, and other abstractions like objects and functions, are built from these two abstractions: data-structures and algorithms.&lt;/p&gt;

&lt;p&gt;The cool thing about data-structures is the things you can do with them. You can:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;store them&lt;/li&gt;
  &lt;li&gt;load them&lt;/li&gt;
  &lt;li&gt;traverse them&lt;/li&gt;
  &lt;li&gt;order them&lt;/li&gt;
  &lt;li&gt;duplicate them&lt;/li&gt;
  &lt;li&gt;give them “meaning” in context&lt;/li&gt;
  &lt;li&gt;pass them between algorithms&lt;/li&gt;
  &lt;li&gt;search them&lt;/li&gt;
  &lt;li&gt;splice them&lt;/li&gt;
  &lt;li&gt;MERGE them&lt;/li&gt;
  &lt;li&gt;insert elements&lt;/li&gt;
  &lt;li&gt;delete elements&lt;/li&gt;
  &lt;li&gt;multiple visual representations&lt;/li&gt;
  &lt;li&gt;every element has the same signature (no specialization: it’s just data)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and a lot of other cool things.&lt;/p&gt;

&lt;p&gt;Imagine then a program whose source-code is a data-structure in and of itself. There is a one-to-one mapping of your source-code with the allocated instances of objects on the heap during run-time. This means anything you can do with a data-structure, you can do to a program: even during run time.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Want to inject behavior at any point in a program: even during run-time? Easily done.&lt;/li&gt;
  &lt;li&gt;Want to persist any part of your program? Easily done.&lt;/li&gt;
  &lt;li&gt;Want to check for lack of error handling in a program? Run an agent against the data structure.&lt;/li&gt;
  &lt;li&gt;Want to merge two programs during run-time? Yep! You can easily merge two programs.&lt;/li&gt;
  &lt;li&gt;Want to scale your program to support thousands of users? Just make as many copies of the program as you want and run each one in their own thread (say goodbye to issues like re-entrance).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And this:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;You can display and edit your program using different visual representations!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Just like you can display and edit trees in many &lt;a href=&quot;https://www.google.com/search?q=tree+structure&amp;amp;tbm=isch&quot;&gt;different visual formats&lt;/a&gt;, you can display and edit source code visually. You can have multiple visual representations of the same program: each one tailored towards the reader of your program!&lt;/p&gt;

&lt;p&gt;It really surprises me that we have gone this far without Homoiconicity going main stream.&lt;/p&gt;

&lt;h2 id=&quot;why-is-homoiconicity-hard-to-do-in-languages&quot;&gt;Why is Homoiconicity Hard To Do in Languages?&lt;/h2&gt;

&lt;p&gt;I think I know why it is hard to find languages that are really Homoiconic. However, I have a really hard time articulating the reasons why. Perhaps it could be articulated as follows:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Homoiconic languages don’t need parameterized sub-routines.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you are creating a language, and remove parameterized sub-routines as the core abstraction for communication of data between sub-routines, you end up with a Homoiconic language.&lt;/p&gt;

&lt;p&gt;The fundamental datatypes (messages) take the place of parameterized sub-routines and passing of information between messages becomes an inherent part of the data-structure you create when programming.&lt;/p&gt;

&lt;h2 id=&quot;javascript-and-homoiconicity&quot;&gt;Javascript and Homoiconicity&lt;/h2&gt;

&lt;p&gt;Here is Javascript code that is also a data-structure (both the code and the instances on the heap are a data-structure):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// Write the addition of ((3 + -1) + -1) to the console.
var msgWrite = writeToCon ({
  text: add({
     left: add({
       left: num(3),
       right: num(-1)
     }),
     right: num(-1)
  })
});

msgWrite.go; // invoke the program
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;How about we persist it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var persistIt = persist ({
  fileName: &quot;/somefile&quot;,
  fileType: &quot;json&quot;,
  program: msgWrite
});

persistIt.go; // invoke the program
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;How about we persist it using a file name and file type entered by a user on a form:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var persistIt2 = persist ({
  fileName: formFieldGet ({
    formName: &quot;persist_form&quot;,
    formField: &quot;file_name&quot;
  }),
  fileType: formFieldGet ({
    formName: &quot;persist_form&quot;,
    formField: &quot;file_type&quot;
  }),
  program: msgWrite
});

persistIt2.go; // invoke the program
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;How about we inject behavior to write a message to the console when the file_type form field is accessed:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var persistIt3 = persist ({
  fileName: formFieldGet ({
    formName: &quot;persist_form&quot;,
    formField: &quot;file_name&quot;
  }),
  fileType: writeToCon ({
    text: formFieldGet ({
      formName: &quot;persist_form&quot;,
      formField: &quot;file_type&quot;
    }),
  }),
  program: msgWrite
});

persistIt3.go; // invoke the program
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That’s kinda cool. When the persister-message runs go on the writeToCon-message placed in the fileType property, writeToCon runs the message in the text property.&lt;/p&gt;

&lt;p&gt;That eventually causes the text in the form field to propagate up to the writeToCon-message which then writes that text to the console.&lt;/p&gt;

&lt;p&gt;The writeToCon-message then propagates the text up to the persist-message which uses the text to determine the file type.&lt;/p&gt;

&lt;p&gt;If you look back, you will notice that no matter how complex the program, the interface to it is the exact same. To invoke the behavior of &lt;strong&gt;any program&lt;/strong&gt; you simply call go on that program.&lt;/p&gt;

&lt;p&gt;Standardization of behavioral interface is an emergent property of any Homoiconic language and may be a good litmus test to determine if a language is Homoiconic.&lt;/p&gt;

&lt;h2 id=&quot;but-this-looks-more-like-a-framework-than-a-language&quot;&gt;But This Looks More Like a Framework Than a Language&lt;/h2&gt;

&lt;p&gt;Exactly!&lt;/p&gt;

&lt;p&gt;In a Homoiconic language, there is no way to distinguish the language itself from the software frameworks built in the language because &lt;strong&gt;everything&lt;/strong&gt; is a fundamental datatype (a message): even &lt;strong&gt;scope&lt;/strong&gt; (see Difficult to Read below).&lt;/p&gt;

&lt;p&gt;In my opinion, separation of language and framework is a red-flag that we are doing something wrong.&lt;/p&gt;

&lt;p&gt;Fundamental parts of the language are key words (loop, between, forEach, withEach, doWhile, etc.) but the structure of the code does not give any hint as to what those key words are.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var msgLoop = between {
  from: num(2),
  to: num(8),
  by: num(2)
  do: writeToCon({
    text: str(&quot;Hello world!&quot;)
  })
}

msgLoop.go; // invoke the program
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Traditional code would give us a hint as to what the keywords are:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;for (int i=2; i&amp;lt;=8; i++) {
  Console.WriteLn (&quot;Hello world!&quot;)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&quot;difficult-to-read&quot;&gt;Difficult to Read&lt;/h2&gt;

&lt;p&gt;As pointed out by this &lt;a href=&quot;https://blogs.oracle.com/blue/entry/homoiconic_languages&quot;&gt;great blog post&lt;/a&gt; on the subject by blue, “it is hard for humans to visually parse as the uniformity of the language often removes any visual cues that we are familiar with in most of the languages”.&lt;/p&gt;

&lt;p&gt;You can see an example of a web server configured from scratch &lt;a href=&quot;/design/vision-minimal-webserver&quot;&gt;here&lt;/a&gt; using a Homoiconic language called SipCoffee. In 50 lines of code, we compose a multi-threaded web server that supports socket routing. But it is a little difficult to read at first due to a lack of visual cues. However, remember that since the code is a data-structure, we can display the code in anyway we like: even a visual representation of the code (hint hint).&lt;/p&gt;

&lt;p&gt;Perhaps, some day, we will end up with visual programming languages that, behind the scenes, are simply manipulating code that is a data-structure.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Although there is still &lt;a href=&quot;http://c2.com/cgi/wiki?HomoiconicityClassification&quot;&gt;debate&lt;/a&gt; as to what makes a language Homoiconic, I think we have shown that it is indeed possible to program in Javascript using only a fundamental datatype (a message).&lt;/p&gt;

&lt;p&gt;Our programs are indeed data-structures both in code and when instantiated on the heap.&lt;/p&gt;

&lt;p&gt;Our code being a data-structure gives us the ability to manipulate code just like any data-structure. This means we can join, cut, copy, merge, delete, search, sort, load and save code: even during runtime!&lt;/p&gt;

&lt;p&gt;If you find our work on Homoiconicity interesting, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt;.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Message-Oriented Programming With Javascript</title>
   <link href="http://bloginterfacevision.github.com/design/design-mop-and-javascript"/>
   <updated>2014-09-03T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/design-mop-and-javascript</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;We are going to talk about Javascript and message-oriented programming (MOP). Javascript is a beautiful language and is a perfect candidate for message-oriented programming.&lt;/p&gt;

&lt;h2 id=&quot;why-message-oriented-programming&quot;&gt;Why Message-Oriented Programming&lt;/h2&gt;

&lt;p&gt;The purpose of message-oriented programming is to standardize the behavioral interface of objects. This means, invoking the behavior of any object is the exact same: irrelevant of the behavior we are trying to invoke.&lt;/p&gt;

&lt;p&gt;Invoking the addition of two numbers is the same as invoking the behavior to push data through a socket. As we will see below, this also means programming becomes the composition of data structures.&lt;/p&gt;

&lt;p&gt;Finally, we are able to fully disconnect mechanism (the framework) from the business behavior (using the framework).&lt;/p&gt;

&lt;h2 id=&quot;what-is-message-oriented-programming&quot;&gt;What is Message-Oriented Programming&lt;/h2&gt;

&lt;p&gt;We use abstractions when we program. The types of abstractions we use generally fall under different programming methodologies.&lt;/p&gt;

&lt;p&gt;In object-oriented programming, we use objects as the core abstraction along with attributes, methods, variables and parameters (to name a few).&lt;/p&gt;

&lt;p&gt;In functional programming, the core abstraction is functions along with parameters and variables (to name a few).&lt;/p&gt;

&lt;p&gt;In message-oriented programming (not to be confused with messaging systems and frameworks), messages and properties are the only abstractions. There are no methods, functions, parameters, variables and so on. A property of a message contains a single message or a composition of messages.&lt;/p&gt;

&lt;p&gt;A composition of messages is really a data structure. This means that our programs are actually data structures and, as such, can be manipulated just like you would any data structure. Want to duplicate and run part of a program in it’s own thread? Just copy the program from that point, as you would any data structure, and run it.&lt;/p&gt;

&lt;p&gt;Want to store part of your program? Just point at any part of your program and save it as you would any data structure.&lt;/p&gt;

&lt;h2 id=&quot;why-abstractions-are-important&quot;&gt;Why Abstractions Are Important&lt;/h2&gt;

&lt;p&gt;How we form mental models of the real world is shaped by the abstractions we use to describe the real world. An object-oriented mental model of a real world system will feel very different from a mental model formed by a functional approach to describing a real world system. The same can be said about different maths.&lt;/p&gt;

&lt;p&gt;Messages are, in our opinion, a great way of forming a mental model of real world systems because they are conceptually simpler than functions or objects and require fewer abstractions (no methods, functions, parameters, variables and so on.).&lt;/p&gt;

&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;/h2&gt;

&lt;h3 id=&quot;prototypal-inheritance&quot;&gt;Prototypal Inheritance&lt;/h3&gt;

&lt;p&gt;We need to be able to create instances of messages and we are going to do this using &lt;a href=&quot;http://javascript.crockford.com/prototypal.html&quot;&gt;prototypal inheritance&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The general pattern for prototypal inheritance looks something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function object(o) {
  function F() {}
  F.prototype = o;
  return new F();
};
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;However, the behavioral interface of messages is going to be the exact same so let’s be a little more descriptive of what it means to create a message.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function message(behavior) {
  function Msg() {}
  msg.prototype = behavior;
  return new Msg();
};
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&quot;common-behavior-for-all-messages&quot;&gt;Common Behavior For All Messages&lt;/h3&gt;

&lt;p&gt;In our existing C# framework, we came up with a list of common behavior across all message. In this post, we’ll only provide a few of these common behaviors for brevity.&lt;/p&gt;

&lt;p&gt;For now, let’s consider go, asNum and asStr as our common behavior.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;go - Accessing this property causes the message’s behavior to run.&lt;/li&gt;
  &lt;li&gt;asNum - Accessing this property causes the message’s behavior to run as a numeric message.&lt;/li&gt;
  &lt;li&gt;asStr - Accessing this property causes the message’s behavior to run as a string message.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The behavioral interface for any message will look something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var Message = {
  get go() {
    // code goes here
    return something;
  }
  get asNum {
    // code goes here
    return numeric;
  }
  get asStr {
    // code goes here
    return string;
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can also add data to the interface which will be shared for that message type.&lt;/p&gt;

&lt;h3 id=&quot;data-and-messages&quot;&gt;Data And Messages&lt;/h3&gt;

&lt;p&gt;So, we have a way to define the behavior for all messages in our framework. However, how do we get information required by a message into that message to run the message’s behavior? After all, we aren’t using parameterized functions.&lt;/p&gt;

&lt;p&gt;What if we pass both behavior and data to create a message. Something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function msg(behavior, data) {
  var Msg = function() {}; 
  Msg.prototype = behavior; // shared behavior and data (if any)
  var msg = new Msg();
  msg.data = data; // instance specific data
  return msg;
};
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So, now within one of our behavior properties we could do something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
get asNum {
  return this.data.val; // where example data was { val: 5 }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To create a new Numeric message we could do something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var Num = {
  get go() { return this.asNum; },
  get asNum() { return this.data.val; },
  get asStr() { return this.data.val.toString(); }
};

var newMessage = msg (Num, {val:4})

newMessage.go; // returns 4
newMessage.asNum; // returns 4
newMessage.asStr; // returns &quot;4&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Notice that any data required for a message is located neatly in one property.&lt;/p&gt;

&lt;h3 id=&quot;describing-addition-using-messages&quot;&gt;Describing Addition Using Messages&lt;/h3&gt;

&lt;p&gt;To build up an understanding of message-oriented programming, we’re going to add two numbers using messages.&lt;/p&gt;

&lt;p&gt;This will look like we aren’t gaining anything by using MOP to implement something as simple as addition but just stick with us.&lt;/p&gt;

&lt;p&gt;Programming in MOP is done through the composition of messages. It is very similar to creating a data structure.&lt;/p&gt;

&lt;p&gt;To add we will need two messages. A message that knows how to Add and a message that represents a Numerical data type.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// Behavior for a numerical value (same as above)
var Num = {
  get go() { return this.asNum; },
  get asNum() { return this.data.val; },
  get asStr() { return this.data.val.toString(); }
};

// Behavior for addition
var Add = {
  get go() { return this.asNum; },
  get asNum() { return this.data.left.asNum + this.data.right.asNum; },
  get asStr() { return this.data.left.asStr + this.data.right.asStr; }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To compose addition we do the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var addMsg = msg( Add, {
  left: msg (Num, {val:23} ),
  right: msg( Num, {val:44} )
});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Finally, to use the message we could do one of the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;addMsg.go; // returns 67;
addMsg.asNum; // returns 67;
addMsg.asStr; // returns &quot;2344&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;What is really cool about this is that you can run the same message as different primitives. In this case, we are able to run the Add message as a string or a numeric.&lt;/p&gt;

&lt;p&gt;One more example.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var addMsg = msg( Add, {
  left: msg( Sub, {
    left: msg (Num, {val:0} ),
    right: msg( Num, {val:44} )
  }),
  right: msg( Num, {val:44} )
});
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&quot;adding-two-numbers-entered-into-a-form&quot;&gt;Adding Two Numbers Entered Into a Form&lt;/h3&gt;

&lt;p&gt;Here is where we can start seeing some of the strengths of message-oriented programming.&lt;/p&gt;

&lt;p&gt;Let’s create some messages that are able to access HTML input elements:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// Access an HTML Input Element using JQuery
var FormFieldGet = {
  get go() { return this.asNum; },
  get asNum() { return $(this.data.id).val(); },
  get asStr() { return $(this.data.id).val().toString(); }
};

// Update an HTML Input Element using JQuery
var FormFieldSet = {
  get go() { return $(this.data.id).val(this.data.val.go); },
};
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Please note that these messages are part of a framework. We can look at them as mechanisms that we use to compose business behavior.&lt;/p&gt;

&lt;p&gt;We have html as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;form&amp;gt;
  &amp;lt;input type=&quot;text&quot; name=&quot;left&quot;&amp;gt; +
  &amp;lt;input type=&quot;text&quot; name=&quot;right&quot;&amp;gt; =
  &amp;lt;input type=&quot;text&quot; name=&quot;result&quot;&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When programming using MOP, we will take a different approach to solving problems than we would using traditional OOP or functional programming methodologies. We need to think about composition of behavior. Taking a bunch of small messages and hooking them up to get new types of behavior.&lt;/p&gt;

&lt;p&gt;In this specific case, we need to update a field on a form so we will be using a FormFieldSet message:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;msg( FormFieldSet, {
  id: &quot;result&quot;,
  val: ???
}).go;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Calling go let’s us run the message immediately.&lt;/p&gt;

&lt;p&gt;But what do we put in place of val? What value are we trying to set? The value we want is the addition of two things.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;msg( FormFieldSet, {
  id: &quot;result&quot;,
  val: msg( Add, {
    left: ????,
    right: ????,
  }),
}).go;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The things we want to add are the other two form fields. So, let’s access them and get their values:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;msg( FormFieldSet, {
  id: &quot;result&quot;,
  val: msg( Add, {
    left: msg( FormFieldGet, { id:&quot;left&quot; } ),
    right: msg( FormFieldGet, { id:&quot;right&quot; } ),
  }),
}).go;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// Using custom Prototyes for FormFieldSet, Add,
// FormFieldGet instead of the shared msg Prototye

FormFieldSet ({
  id: &quot;result&quot;,
  val: Add ({
    left: FormFieldGet ({ id:&quot;left&quot; }),
    right: FormFieldGet ({ id:&quot;right&quot; }),
  }),
}).go;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And we are done.&lt;/p&gt;

&lt;p&gt;Please note that what you are looking at is 100% business behavior. The structure of the code itself looks very different form the code we used to create the messages in the first place.&lt;/p&gt;

&lt;p&gt;There is almost a complete disconnect between how we describe business behavior and the mechanisms that do the work for us. We have 100% encapsulation and a 100% decoupled system (because all messages have the exact same behavioral interface). This is the holy grail of object-oriented programming promised so many decades ago.&lt;/p&gt;

&lt;p&gt;Take a moment to look at how clean that Javascript looks. Very consistent in look. Very dry.&lt;/p&gt;

&lt;p&gt;The javascript program itself is also a data-structure that can be easily persisted or even traversed. During run time, we can alter the behavior of our program by changing the message composition (this is actually very different from code generation).&lt;/p&gt;

&lt;p&gt;We could dump that javascript in a key/value store for easy re-use.&lt;/p&gt;

&lt;p&gt;And the code looks so clean. So pure.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Javascript is a very versatile, and awesome, language that supports message-oriented programming. Using MOP, we are able to compose programs that can be manipulated as if they were data-structures.&lt;/p&gt;

&lt;p&gt;There is a lot more we can do with this to clean things up. For example, our msg() function could do boxing of primitive data types for us making our message configurations easier to read. We would place this in a library.&lt;/p&gt;

&lt;p&gt;If you find our work on message-oriented programming interesting, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt;.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>A Simple Webserver That Could Some Day Challenge the Big Names</title>
   <link href="http://bloginterfacevision.github.com/design/vision-minimal-webserver"/>
   <updated>2014-06-23T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/vision-minimal-webserver</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;One question we’ve been asked is how fast is the Vision framework? To answer that, we’ve created parts (aka messages) that can be used to configure a web server from scratch. The results are shown below.&lt;/p&gt;

&lt;h3 id=&quot;the-results&quot;&gt;The Results&lt;/h3&gt;

&lt;p&gt;We ran siege on a single 15” macbook pro (C# mono):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo siege -b -c300 -r50 http://localhost:3050
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;with the following results:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Transactions:             15000 hits
Availability:             100.00 %
Elapsed time:             9.55 secs
Data transferred:         12.47 MB
Response time:            0.13 secs
Transaction rate:         1570.68 trans/sec
Throughput:               1.31 MB/sec
Concurrency:              199.18
Successful transactions:  15000
Failed transactions:      0
Longest transaction:      4.39
Shortest transaction:     0.00
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;the same siege test was ran by &lt;a href=&quot;http://centminmod.com/siegebenchmark_nginx_test1.html&quot;&gt;Centmin Mod&lt;/a&gt; with the following results:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Transactions:             15000 hits
Availability:             100.00 %
Elapsed time:             20.20 secs
Data transferred:         43.89 MB
Response time:            0.27 secs
Transaction rate:         742.57 trans/sec
Throughput:               2.17 MB/sec
Concurrency:              199.77
Successful transactions:  15000
Failed transactions:      0
Longest transaction:      7.43
Shortest transaction:     0.00
&lt;/code&gt;&lt;/pre&gt;

&lt;blockquote&gt;
  &lt;p&gt;We realize the comparison is &lt;strong&gt;not&lt;/strong&gt; apples to apples but we wanted to have something we can start comparing to.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s look at the &lt;a href=&quot;/design/design-composition-based-language&quot;&gt;SipCoffee&lt;/a&gt; message-configuration that gave us these results.&lt;/p&gt;

&lt;h2 id=&quot;quick-introduction-to-sipcoffee&quot;&gt;Quick Introduction to SipCoffee&lt;/h2&gt;

&lt;p&gt;SipCoffee is a message-oriented programming language. By that, we mean that all parts within the language are considered messages. A message contains some specific behavior and an aggregate of named-message (a class (message) with computed properties (named-messages)).&lt;/p&gt;

&lt;p&gt;A program is created by composing messages. This can also be viewed as creating a data structure which contains both data and behavior (behavior and data-structures are inseparable: as they should be).&lt;/p&gt;

&lt;p&gt;When a message is activated, the behavior composed within the message is executed. This may cause named-message (those computed properties of the message) to also active.&lt;/p&gt;

&lt;p&gt;We call SipCoffee programs message-configurations because we’ve completely separated mechanisms from the business domain. Any changes you make in a program are directly related to the business domain.&lt;/p&gt;

&lt;p&gt;In the message-configuration below, you can twiddle with the Web Server at any level. You can change queue sizes, time out periods, the server port and uri, the number of parts in a part pool, and even the cache size of the socket reader.&lt;/p&gt;

&lt;h2 id=&quot;building-a-web-server-from-scratch&quot;&gt;Building A Web Server From Scratch&lt;/h2&gt;

&lt;p&gt;The following is the message-configuration of a very very simple, but complete, WebServer in only &lt;strong&gt;50 lines&lt;/strong&gt; of SipCoffee.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scope ( scopeId -2
  ins (
    File ( named &quot;Http200.Body.Html&quot; fileUriStr &quot;./Html/200.html&quot; )
    ArrayByteBuilder ( named &quot;Http200.Header&quot;
      replace Byte ( byte 120 )
      part ArrayByte ( withArrayByte byte ( 72 84 84 80 47 49 46 49 32 50 48 48 32 79 75 13 10 68 97 116 101 58 32 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 13 10 83 101 114 118 101 114 58 32 86 105 115 105 111 110 13 10 67 111 110 116 101 110 116 45 84 121 112 101 58 32 116 101 120 116 47 104 116 109 108 59 32 99 104 97 114 115 101 116 61 85 84 70 45 56 13 10 67 111 110 110 101 99 116 105 111 110 58 32 107 101 101 112 45 97 108 105 118 101 13 10 67 111 110 116 101 110 116 45 76 101 110 103 116 104 58 32 120 120 120 120 120 120 120 120 120 120 120 120 13 10 13 10 ) )
      items ArrayList (
        ins (
          DateTimeNow ()
          WithLength ( part ScopeGet ( withName &quot;Http200.Body.Html&quot; scopeId -2 ) )
        ) ) ) )
  part SocketRouter ( named &quot;restServ&quot; 
    streamSource SocketListener ( backlogQueueSize 2000 
      ipEndPoint IPEndPoint ( port 3050 
        ipAddress DNSLookup ( hostEntryStr &quot;localhost&quot; )
      )
    )
    socketFactory PartPool ( initialSize 500
      item FactoryInstance (
        part PartPoolDecorator (
          part RunWorkerWithTimeOut ( waitTime 60000
            part Scope (
              ins (
                Socket ( named &quot;socket&quot; )
                ArrayByteBuffered ( named &quot;requestBody&quot; sizeGrowBy 1024 sizeInitial 1024 )
                ScopeGet ( named &quot;respHead&quot; scopeId -2 withName &quot;Http200.Header&quot; )
                ScopeGet ( named &quot;respBody&quot; scopeId -2 withName &quot;Http200.Body.Html&quot; )
                HttpHeader ( named &quot;httpHeader&quot; )
              )
              part Array ( run true
                ins (
                  SocketReaderHeaderBody ( autoOpen true
                    streamSource ScopeGet ( withName &quot;socket&quot; )
                    data ArrayByteBuffered ( sizeGrowBy 1024 sizeInitial 1024 )
                    body ScopeGet ( withName &quot;requestBody&quot; )
                    headerEncoder ScopeGet ( withName &quot;httpHeader&quot; )
                    buffer ArrayByteBuffered ( sizeInitial 1024 sizeGrowBy 1024 )
                    terminator ArrayByte ( withArrayByte byte ( 13 10 13 10 ) )
                  )
                  SocketWrite ( autoOpen false 
                    streamSource ScopeGet ( withName &quot;socket&quot; )
                    data ScopeGet ( withName &quot;respHead&quot; )
                  )
                  SocketWrite ( autoOpen false 
                    streamSource ScopeGet ( withName &quot;socket&quot; )
                    data ScopeGet ( withName &quot;respBody&quot; )
                  )
                  NamedMessageGet ( withName &quot;close&quot; 
                    part ScopeGet ( withName &quot;socket&quot; callBehavior false )
                  ) ) ) ) ) ) ) ) ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Example messages are &lt;strong&gt;Scope&lt;/strong&gt;, &lt;strong&gt;File&lt;/strong&gt;, &lt;strong&gt;ArrayByteBuilder&lt;/strong&gt;, &lt;strong&gt;ArrayByte&lt;/strong&gt; and &lt;strong&gt;Socket&lt;/strong&gt; (all implemented as classes). Example named-messages are &lt;em&gt;ins&lt;/em&gt;, &lt;em&gt;named&lt;/em&gt;, &lt;em&gt;sizeGrowBy&lt;/em&gt; and &lt;em&gt;withName&lt;/em&gt; (all implemented as computed properties).&lt;/p&gt;

&lt;p&gt;Let’s break the message-configuration down into smaller parts we can easily explain.&lt;/p&gt;

&lt;h3 id=&quot;the-socketrouter-message&quot;&gt;The SocketRouter Message&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;SocketRouter&lt;/strong&gt; message, when activated, listens to a data stream on a given port. Any new connections on that data stream are forwarded to another data stream for handling.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;SocketRouter&lt;/strong&gt; has two named-messages:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;streamSource - The source of all data streams.&lt;/li&gt;
  &lt;li&gt;socketFactory - The message-configuration that handles reading from and writing to of any incoming data streams.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The message-configuration for the &lt;em&gt;streamSource&lt;/em&gt; named-message is very simple. &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;streamSource SocketListener ( backlogQueueSize 2000 
  ipEndPoint IPEndPoint ( port 3050 
    ipAddress DNSLookup ( hostEntryStr &quot;localhost&quot; )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;em&gt;streamSource&lt;/em&gt; named-message is a &lt;strong&gt;SocketListener&lt;/strong&gt; message with a &lt;em&gt;backlogQueueSize&lt;/em&gt; named-message of a &lt;strong&gt;2000&lt;/strong&gt; message (Yep! 2000 is also a message) and a configured &lt;em&gt;ipEndPoint&lt;/em&gt; which is easy to figure out.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;socketFactory&lt;/em&gt; named-message is a bit more complicated. We could configure our Web Server to handle one request at a time. However, that isn’t very practical and scales worth shit. We need a way to allow messages to run on multiple threads at the same time.&lt;/p&gt;

&lt;p&gt;To do this, we can use factories and part pools.&lt;/p&gt;

&lt;h3 id=&quot;the-factoryinstance-partpool-and-partpooldecorator-messages&quot;&gt;The FactoryInstance, PartPool and PartPoolDecorator Messages&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;FactoryInstance&lt;/strong&gt; message, when activated, will return a copy of the message-configuration located in the &lt;em&gt;part&lt;/em&gt; named-message.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;part - The message-configuration we’ll make a copy of.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our message-configuration is as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;FactoryInstance (
  part PartPoolDecorator (
    ...
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In the above message-configuration, the &lt;strong&gt;FactoryInstance&lt;/strong&gt; message creates a copy of a &lt;strong&gt;PartPoolDecorator&lt;/strong&gt; and all messages configured in the &lt;strong&gt;PartPoolDecorator&lt;/strong&gt; message. This is one of the advantages of programming using data structures as opposed to parameterized functions. Want to create a copy of a program? Just duplicate it (Functions are great at manipulating data structures but don’t make for very good data-structures in and of themselves).&lt;/p&gt;

&lt;p&gt;We could implement our Web Server using only the &lt;strong&gt;FactoryInstance&lt;/strong&gt; message-configuration. Each time a request comes in, a copy of the message-configuration to handle the request is made and ran in it’s own thread (more on that below). However, why keep making copies of our message-configuration for every request by a client? Allocating and freeing memory are expensive operations. We should be able to re-use our copied message-configurations. This is where the &lt;strong&gt;PartPool&lt;/strong&gt; and &lt;strong&gt;PartPoolDecorator&lt;/strong&gt; messages come into play.&lt;/p&gt;

&lt;p&gt;The messages &lt;strong&gt;PartPool&lt;/strong&gt; and &lt;strong&gt;PartPoolDecorator&lt;/strong&gt;, together, allow any message-configuration to be re-used multiple times throughout the execution of a program.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;PartPool&lt;/strong&gt; message is simple:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;initialSize - The initial number of parts in the pool. If all the parts in the pool are in use, a new item is created and added to the part pool.&lt;/li&gt;
  &lt;li&gt;item - The message-configuration that is pooled by the &lt;strong&gt;PartPool&lt;/strong&gt; message. This is always configured with some kind of factory. The item’s message-configuration is activated initialSize number of times and the result pooled inside the &lt;strong&gt;PartPool&lt;/strong&gt; message.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;strong&gt;PartPoolDecorator&lt;/strong&gt; message, when activated, activates the message contained in the &lt;em&gt;part&lt;/em&gt; named-message. When the configured-message in &lt;em&gt;part&lt;/em&gt; finishes, the &lt;strong&gt;PartPoolDecorator&lt;/strong&gt; message automatically returns itself to it’s part pool.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;part - The configured message to activate. When the message is finished, the &lt;strong&gt;PartPoolDecorator&lt;/strong&gt; places itself back into the &lt;strong&gt;PartPool&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using these two messages in conjunction with a factory, we can take &lt;strong&gt;any&lt;/strong&gt; message-configuration and make it re-usable. This allows us to configure very scalable message-configurations.&lt;/p&gt;

&lt;p&gt;Our specific message-configuration is as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PartPool ( initialSize 500
  item FactoryInstance (
    part PartPoolDecorator (
      part RunWorkerWithTimeOut (
        ... 
      ) ) ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;strong&gt;PartPool&lt;/strong&gt; message starts out with an initialSize named-message of &lt;strong&gt;500&lt;/strong&gt;. When the PartPool is first activated, the &lt;strong&gt;FactoryInstance&lt;/strong&gt; message is activated 500 times (on as many threads as we can) and the results are placed in the &lt;strong&gt;PartPool&lt;/strong&gt; message. The &lt;strong&gt;PartPool&lt;/strong&gt; pulls a single message from it’s pool and activates it.&lt;/p&gt;

&lt;p&gt;In this case, the &lt;strong&gt;PartPoolDecorator&lt;/strong&gt; is configured to contain a &lt;strong&gt;RunWorkerWithTimeOut&lt;/strong&gt; message. This means the &lt;strong&gt;PartPoolDecorator&lt;/strong&gt; is actually activated in a new thread meaning the &lt;strong&gt;PartPool&lt;/strong&gt; returns control, almost immediately, to it’s parent message: the &lt;strong&gt;SocketRouter&lt;/strong&gt; message. The &lt;strong&gt;SocketRouter&lt;/strong&gt; message is now ready to handle the next incoming request.&lt;/p&gt;

&lt;h3 id=&quot;the-runworkerwithtimeout-message&quot;&gt;The RunWorkerWithTimeOut Message&lt;/h3&gt;

&lt;p&gt;Here are where things get even cooler. The &lt;strong&gt;RunWorkerWithTimeOut&lt;/strong&gt; message is able to run &lt;strong&gt;any&lt;/strong&gt; message-configuration in a thread. Yep. Multi-threaded programming in SipCoffee is just that simple.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;waitTime - The time in milliseconds before the worker thread times out.&lt;/li&gt;
  &lt;li&gt;part - The message-configuration to run within the worker thread.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;the-scope-and-scopeget-messages&quot;&gt;The Scope and ScopeGet Messages&lt;/h3&gt;

&lt;p&gt;Take a quick look at the original message-configuration. What you will notice is that there are no functions, parameters or variables. In message-oriented programming, &lt;strong&gt;everything is a message&lt;/strong&gt;. Even the context/scope that a message is activated in, usually defined with a language using { and } (Defining context in a language isn’t very data-structure friendly), is a message.&lt;/p&gt;

&lt;p&gt;To support context, we have a &lt;strong&gt;Scope&lt;/strong&gt; message to define the context a message-configuration runs in.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;part - The configured-message to activate within the context.&lt;/li&gt;
  &lt;li&gt;ins - One or more configured-messages contained within the context of the scope. These can also be viewed as Variables.&lt;/li&gt;
  &lt;li&gt;scopeId - When configured with a negative numeric message, the scope is “global” in nature. When not configured, the scopeId is based on the managed thread id a message-configuration is ran in (this is really powerful and explained below in detail)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In our message-configuration we have the following &lt;strong&gt;Scope&lt;/strong&gt; message configured:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;part Scope (
  ins (
    Socket ( named &quot;socket&quot; )
    ArrayByteBuffered ( named &quot;requestBody&quot; sizeGrowBy 1024 sizeInitial 1024 )
    ScopeGet ( named &quot;respHead&quot; scopeId -2 withName &quot;Http200.Header&quot; )
    ScopeGet ( named &quot;respBody&quot; scopeId -2 withName &quot;Http200.Body.Html&quot; )
    HttpHeader ( named &quot;httpHeader&quot; )
  )
  part Array ( ... )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;em&gt;part&lt;/em&gt; named-message contains an &lt;strong&gt;Array&lt;/strong&gt; message (more on that later). The &lt;em&gt;ins&lt;/em&gt; named-message contains 5 messages, something like variables, each with a unique name within that Scope’s context:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A Socket message named “socket” - The socket we use to read and write to the stream within the current thread.&lt;/li&gt;
  &lt;li&gt;An ArrayByteBuffered message named “requestBody” - The buffer where the body of the request from the client is placed.&lt;/li&gt;
  &lt;li&gt;A ScopeGet message named “respHead” - The header that will be sent to the client.&lt;/li&gt;
  &lt;li&gt;Another ScopeGet message named “respBody” - The message body that will be sent to the client.&lt;/li&gt;
  &lt;li&gt;An HttpHeader message named “httpHeader” - The http header received from the client.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here comes some programming power! A “variable” can be a single message like &lt;strong&gt;Socket&lt;/strong&gt; or it can be another configured message! Yep! Just think of the power you have as a programmer. Variables are actually configured-messages!&lt;/p&gt;

&lt;p&gt;Notice that, for this &lt;strong&gt;Scope&lt;/strong&gt; message, the &lt;em&gt;scopeId&lt;/em&gt; named-message is not defined. This means, the context of the Scope will be based on the current named thread. Yep! Even more &lt;strong&gt;POWER&lt;/strong&gt;! We can run this message-configuration in as many threads as we want and there is no chance of the “variables” being accessed from multiple threads. You no longer need to worry about re-entrance or things being thread safe within this &lt;strong&gt;Scope&lt;/strong&gt; (this isn’t the case when a &lt;strong&gt;Scope&lt;/strong&gt; message is configured to be global).&lt;/p&gt;

&lt;p&gt;In message-oriented programming, accessing a “Variable” is also done using messages. SipCoffee has no equals (=) operator. To access a “Variable” within the current scope, you use the &lt;strong&gt;ScopeGet&lt;/strong&gt; message.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;withName - The name of the “Variable”.&lt;/li&gt;
  &lt;li&gt;named - The unique name of the ScopeGet message (so we can access a ScopeGet message from another ScopeGet message if we like).&lt;/li&gt;
  &lt;li&gt;scopeId - When configured with a negative numeric message, the scope is “global” in nature. When not configured, the scopeId is based on the managed thread id a message-configuration is ran in (this is really powerful and explained below in detail).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ScopeGet ( named &quot;respHead&quot; scopeId -2 withName &quot;Http200.Body.Html&quot; )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;strong&gt;ScopeGet&lt;/strong&gt; message locates and activates a message &lt;em&gt;named&lt;/em&gt; “respHead” in a &lt;em&gt;scopeId&lt;/em&gt; of -2. This is configured as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scope ( scopeId -2
  ins (
    File ( named &quot;Http200.Body.Html&quot; fileUriStr &quot;./Html/200.html&quot; )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Awesome! It looks like we have a “global variable” named ‘Http200.Body.Html’ that, when activated, reads from a file named ‘./Html/200.html’. &lt;/p&gt;

&lt;p&gt;In this example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SocketReaderHeaderBody ( autoOpen true
  streamSource ScopeGet ( withName &quot;socket&quot; )
)  
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;the &lt;em&gt;streamSource&lt;/em&gt; named-message of the &lt;strong&gt;SocketReaderHeaderBody&lt;/strong&gt; is a &lt;strong&gt;ScopeGet&lt;/strong&gt; message. That message is configured to locate a message named “socket” configured as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;part Scope (
  ins (
    Socket ( named &quot;socket&quot; )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Even more Awesome! It looks like we have not configured the scopeId meaning that this Scope is based on the managed thread id. When the &lt;strong&gt;SocketReaderHeaderBody&lt;/strong&gt; is activated within a managed thread, the Scope is also contained within that managed thread.&lt;/p&gt;

&lt;h2 id=&quot;reading-from-and-writing-to-the-stream&quot;&gt;Reading from and Writing to the Stream&lt;/h2&gt;

&lt;p&gt;To activate messages in a given order, we can use an &lt;em&gt;Array&lt;/em&gt; message setting the &lt;em&gt;run&lt;/em&gt; named-message to a &lt;strong&gt;true&lt;/strong&gt; message (Yep, even true is a message).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Array ( run true
  ins ( ... )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Any messages in the &lt;em&gt;ins&lt;/em&gt; named-message of the &lt;em&gt;Array&lt;/em&gt; message are activated in the order they were inserted.&lt;/p&gt;

&lt;p&gt;Let’s look at how the message-configuration works.&lt;/p&gt;

&lt;p&gt;First, we activate a &lt;strong&gt;SocketReaderHeaderBody&lt;/strong&gt; message:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SocketReaderHeaderBody ( autoOpen true
  streamSource ScopeGet ( withName &quot;socket&quot; )
  data ArrayByteBuffered ( sizeGrowBy 1024 sizeInitial 1024 )
  body ScopeGet ( withName &quot;requestBody&quot; )
  headerEncoder ScopeGet ( withName &quot;httpHeader&quot; )
  buffer ArrayByteBuffered ( sizeInitial 1024 sizeGrowBy 1024 )
  terminator ArrayByte ( withArrayByte byte ( 13 10 13 10 ) )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
  &lt;li&gt;autoOpen true - Automatically open the stream source.&lt;/li&gt;
  &lt;li&gt;streamSource ScopeGet ( withName “socket” ) - the source of the stream is located in a Scoped “Variable” named ‘socket’&lt;/li&gt;
  &lt;li&gt;data ArrayByteBuffered ( sizeGrowBy 1024 sizeInitial 1024 ) - The header data of the message is an ArrayByteBuffered with an initial size of 1024 bytes and grows by 1024 bytes to place the header data in.&lt;/li&gt;
  &lt;li&gt;body ScopeGet ( withName “requestBody” ) - The body buffer is located in a Scoped “Variable” named ‘requestBody’&lt;/li&gt;
  &lt;li&gt;headerEncoder ScopeGet ( withName “httpHeader” ) - The message to encode and decode the header is located in a Scoped “Variable” named “httpHeader”&lt;/li&gt;
  &lt;li&gt;buffer ArrayByteBuffered ( sizeInitial 1024 sizeGrowBy 1024 ) - The buffer used directly by the socket is an ArrayByteBuffered with an initial size of 1024 bytes and grows by 1024 bytes to place the header data in.&lt;/li&gt;
  &lt;li&gt;terminator ArrayByte ( withArrayByte byte ( 13 10 13 10 ) ) - The terminator between a message header and body is this ArraByte of 13 10 13 10 which happens to be the terminator between the header and body of html.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Second, we write to the socket the response header:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SocketWrite ( autoOpen false 
  streamSource ScopeGet ( withName &quot;socket&quot; )
  data ScopeGet ( withName &quot;respHead&quot; )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
  &lt;li&gt;autoOpen false - Don’t auto open the data stream because we did that with the read above.&lt;/li&gt;
  &lt;li&gt;streamSource ScopeGet ( withName “socket” ) - the source of the stream is located in a Scoped “Variable” named ‘socket’. Yep. The same streamSource as above.&lt;/li&gt;
  &lt;li&gt;data ScopeGet ( withName “respHead” ) - Oh man! Awesome. We are accessing a Variable named “respHead” which is a ScopeGet message which accesses a “Variable” named “Http200.Header”. Of course, in future message-configurations, the response header to write could change.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Third, we write to the socket the response body:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SocketWrite ( autoOpen false 
  streamSource ScopeGet ( withName &quot;socket&quot; )
  data ScopeGet ( withName &quot;respBody&quot; )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
  &lt;li&gt;autoOpen false - Yep! Still don’t auto open the data stream because we did that with the read above.&lt;/li&gt;
  &lt;li&gt;streamSource ScopeGet ( withName “socket” ) - the source of the stream is located in a Scoped “Variable” named ‘socket’. Yep. The same streamSource as above.&lt;/li&gt;
  &lt;li&gt;data ScopeGet ( withName “respBody” ) - Oh man! Awesome. We are accessing a Variable named “respBody” which is a ScopeGet message which accesses a “Variable” named “Http200.Body.Html”. We are writing to our socket the information located in a file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally, we close the socket:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;NamedMessageGet ( withName &quot;close&quot; 
  part ScopeGet ( withName &quot;socket&quot; callBehavior false )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;strong&gt;NamedMessageGet&lt;/strong&gt; message causes a named message to activate. In this case, the named-message &lt;em&gt;close&lt;/em&gt; (implementation is a calculated property accessed using reflection) of that same socket is activated.&lt;/p&gt;

&lt;p&gt;And, once all of that runs we “fall-up” the message-configuration and the &lt;strong&gt;PartPoolDecorator&lt;/strong&gt; message returns us to the PartPool to be used again!&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Message-oriented programming kicks ass. In 50 lines of code, we are able to create a scalable web server that is able to keep up with the big names. We haven’t even started to optimize our underlying technology and it was written in C#. Imagine if it was implemented in something like &lt;a href=&quot;http://www.rust-lang.org/&quot;&gt;Rust&lt;/a&gt; (aww please add calculated properties rust people!).&lt;/p&gt;

&lt;p&gt;We have a data-structure of messages that is also the behavior of the program. That makes the message-configuration very easily re-used in a multi-threaded environment. We aren’t allocating memory all the time and we are able to activate message-configurations without the overhead of locking and worrying about re-entrance. We get the speed of “single threaded” programming in a multi-threaded environment. Woo hoo!&lt;/p&gt;

&lt;p&gt;If you find our work on message-oriented programming interesting, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>There is No Single Mental Model For Programming</title>
   <link href="http://bloginterfacevision.github.com/info/vpls-and-mental-models"/>
   <updated>2014-03-18T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/info/vpls-and-mental-models</id>
   <content type="html">&lt;h2 id=&quot;forward&quot;&gt;Forward&lt;/h2&gt;

&lt;p&gt;Let’s use &lt;a href=&quot;http://en.wikipedia.org/wiki/Biological_classification&quot;&gt;biological classification&lt;/a&gt; as our taxonomy.&lt;/p&gt;

&lt;p&gt;The way mental models are formed between the three domains of literature, music and art are &lt;strong&gt;very different&lt;/strong&gt;. Similar then is textual programming languages and visual programing languages: both different domains.&lt;/p&gt;

&lt;p&gt;For each domain, there are different ways to form mental models. For example, within the kingdom of textual languages we have functional, declarative, and object oriented. These also greatly differ in how we understand and form mental models of the programs being created.&lt;/p&gt;

&lt;p&gt;This blog is within the context of mental models between different domains. Not different kingdoms.&lt;/p&gt;

&lt;p&gt;If music and art were considered “fringe” and we wanted to talk about mental models at the domain level we could say:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Literature is textual causing people to lean towards a single approach to forming &lt;a href=&quot;http://en.wikipedia.org/wiki/Mental_model&quot;&gt;mental models&lt;/a&gt; within the arts.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;A majority of programmers will make the point that textual languages are &lt;strong&gt;the only&lt;/strong&gt; way to program a computer: noting that textual languages are remarkable in their compactness. &lt;/p&gt;

&lt;p&gt;Textual languages are used to program computers and used by programmers to form mental models. &lt;a href=&quot;http://themetapicture.com/this-is-why-you-shouldnt-interrupt-a-programmer/&quot;&gt;This is why you shouldn’t interrupt a programmer&lt;/a&gt;. However, people form mental models using more than just textual languages.&lt;/p&gt;

&lt;p&gt;The point we are raising is this:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Programming languages are textual causing people to lean towards a single approach to forming &lt;a href=&quot;http://en.wikipedia.org/wiki/Mental_model&quot;&gt;mental models&lt;/a&gt; of programs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/mental_model_babby_03.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;Why have we put some much time and effort into using a single approach to program computers, textual languages, when people form mental models in so many different ways?&lt;/p&gt;

&lt;p&gt;I was lucky to have a chat with &lt;a href=&quot;http://en.wikipedia.org/wiki/John_Paul_Morrison&quot;&gt;Paul Morrison&lt;/a&gt;, the inventor of &lt;a href=&quot;http://en.wikipedia.org/wiki/Flow-based_programming&quot;&gt;flow-based programming&lt;/a&gt;, and he had this to say on the directions computers could have taken (a perspective from 1968):&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Computers evolved out of machines with one instruction counter. Computers could have been anything so if we had trouble giving them instructions it was our fault. We essentially became brainwashed into believing that computers, and computer languages, had to be that way, and generations of programmers were trained to think this way.  But there was a time early on when we could have gone a different way.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So, let’s step back some and see if there are other &lt;strong&gt;practical&lt;/strong&gt; approaches to programming computers.&lt;/p&gt;

&lt;h3 id=&quot;music-math-and-mental-models&quot;&gt;Music, Math and Mental Models&lt;/h3&gt;

&lt;h4 id=&quot;music&quot;&gt;Music&lt;/h4&gt;

&lt;p&gt;I can’t read &lt;a href=&quot;http://en.wikipedia.org/wiki/Sheet_music&quot;&gt;sheet music&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I can imagine that people who read sheet music can not only play a song on instruments but also hear that song in their head by simply looking at the sheet music.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/mental_model_music_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;h6 id=&quot;image-11-sheet-music-image-sourcehttpuploadwikimediaorgwikipediacommons116pachelbel-canon-colorspngid-i1-1&quot;&gt;Image-1.1: Sheet music (&lt;a href=&quot;http://upload.wikimedia.org/wikipedia/commons/1/16/Pachelbel-canon-colors.png&quot;&gt;image source&lt;/a&gt;){#id-i1-1}&lt;/h6&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/mental_model_music_02.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
###### Image-1.2: Tibetan musical score (&lt;a href=&quot;http://upload.wikimedia.org/wikipedia/commons/7/74/Tibetanmusicalscore.jpg&quot;&gt;image source&lt;/a&gt;) {#id-i1-2}&lt;/p&gt;

&lt;p&gt;It is only after years of practice that people are able to build a mental model of music by reading sheet music. Sheet music has been around for hundreds of years remaining basically unchanged. Considering current day technology, is it really the best way to &lt;a href=&quot;http://en.wikipedia.org/wiki/Sheet_music#Current_developments&quot;&gt;represent music today&lt;/a&gt;?&lt;/p&gt;

&lt;p&gt;My guess is that one of the reasons why sheet music is still so prevalent is because millions of people have put a lot of effort into being able to read it.&lt;/p&gt;

&lt;h4 id=&quot;math&quot;&gt;Math&lt;/h4&gt;

&lt;p&gt;An experienced mathematician doesn’t just see an equation when looking at the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pythagorean_theorem&quot;&gt;Pythagorean theorem&lt;/a&gt;. They see much more.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/mental_model_math_02.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
###### Image-1.3: The Pythagorean theorem (&lt;a href=&quot;http://www.codecogs.com/latex/eqneditor.php&quot;&gt;created using Codecogs&lt;/a&gt;) {#id-i1-3}&lt;/p&gt;

&lt;p&gt;A mathematician is able to manipulate the pythagorean theorem in their head building out new ideas and new understandings. They are able to form mental models of what these equations mean. Again, this takes years of study and practice to master. Similar to sheet music, a lot of resources have been invested in training people to use math to build mental models.&lt;/p&gt;

&lt;p&gt;So, if I am an experienced mathematician programming mathematical equations into a computer, which representation would I prefer?&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/mental_model_math_03.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
###### Image-1.4: What if Mathematicians could program a computer using actual mathematical symbols? {#id-i1-4}&lt;/p&gt;

&lt;h4 id=&quot;mental-models-and-textual-languages&quot;&gt;Mental Models and Textual Languages&lt;/h4&gt;

&lt;p&gt;For math and music, people are using different ways to communicate information between their peers. Not only is the representation different, but the understanding built around the mental models is also different.&lt;/p&gt;

&lt;p&gt;To argue that one of these approaches could be used universally would be difficult. How would maths compactness hold up as sheet music?&lt;/p&gt;

&lt;p&gt;Perhaps, then, we should reconsider the argument that textual languages are &lt;strong&gt;the way&lt;/strong&gt; to program because they are so compact. Perhaps there are situations where other representations are much more effective at helping programmers build mental models.&lt;/p&gt;

&lt;p&gt;Perhaps, like sheet music, textual languages are so prevalent because millions of people hours have been spent learning and using textual languages to program computing devices?&lt;/p&gt;

&lt;h3 id=&quot;programming-and-mental-models&quot;&gt;Programming and Mental Models&lt;/h3&gt;

&lt;h4 id=&quot;sql&quot;&gt;SQL&lt;/h4&gt;

&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/SQL&quot;&gt;SQL&lt;/a&gt; is a textual language, an algebra, used to describe relationships between &lt;a href=&quot;http://en.wikipedia.org/wiki/Relation_%28database%29&quot;&gt;relations&lt;/a&gt;. A SQL statement to query the database looks something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SELECT A.*, B.*
FROM A
INNER JOIN B ON B.key = A.key
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Yet, that same statement above can be represented visually using &lt;a href=&quot;http://en.wikipedia.org/wiki/Set_%28mathematics%29&quot;&gt;sets&lt;/a&gt;.&lt;/p&gt;

&lt;div id=&quot;id-i1-5-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/mental_model_sqljoin_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
###### Image-1.5: What if sets could be used to program a computer (&lt;a href=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/9/9d/SQL_Joins.svg/849px-SQL_Joins.svg.png&quot;&gt;Image Source&lt;/a&gt;)? {#id-i1-5}&lt;/p&gt;

&lt;p&gt;It takes a while to master SQL. Often, when people learn SQL, they are shown something like &lt;a href=&quot;#id-i1-5-top&quot;&gt;Image-1.5&lt;/a&gt; to help them form a mental model of what the SQL statement is actually doing (&lt;a href=&quot;http://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins&quot;&gt;Visual Representations of SQL Joins&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Why use sets to teach people how to program only to end up using a textual language, SQL, to actually program the computer? Is the compactness of SQL really so great as to ignore all the prior knowledge and skill people have acquired learning set theory?&lt;/p&gt;

&lt;h4 id=&quot;flow-based-programming&quot;&gt;Flow-based programming&lt;/h4&gt;

&lt;p&gt;Flow-based programming is an approach to programming that uses &lt;a href=&quot;http://en.wikipedia.org/wiki/Asynchronous_system&quot;&gt;asynchronous systems&lt;/a&gt; as opposed to the more synchronous nature of traditional computing devices.&lt;/p&gt;

&lt;p&gt;I wanted to create an image similar to the “which visual representation would mathematicians prefer” but wouldn’t even know where to start in trying to represent asynchronism using a textual language (there are just so many approaches).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#id-i1-6-top&quot;&gt;Image-1.6&lt;/a&gt; is showing more than just a program to list some files. It is showing us a fully scalable, big data-esque, highly asynchronous, highly scalable program to list files.&lt;/p&gt;

&lt;div id=&quot;id-i1-6-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/mental_model_flowbased_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
###### Image-1.6: Flow-based programming is great at representing asynchronous systems (&lt;a href=&quot;http://expressionflow.com/category/flow-based-programming-2/&quot;&gt;image source&lt;/a&gt;). {#id-i1-6}&lt;/p&gt;

&lt;p&gt;In fact, describing asynchronous execution using textual languages is really difficult. Using flow-based programming, and the associated visual representation, we are able to quickly build out a mental model of what is happening within the computer.&lt;/p&gt;

&lt;p&gt;We do need to be careful to not make the mistake of pushing FBP as the “one way” to represent a program. It is a great way to represent asynchronous manipulation of big-data. However, it might not be the best way to represent a mathematical equation: even if that equation could be executed asynchronously.&lt;/p&gt;

&lt;h3 id=&quot;interface-vision-vpls-and-mental-models&quot;&gt;Interface Vision, VPLs and Mental Models&lt;/h3&gt;

&lt;p&gt;It is becoming apparent that there is really no one best way to help people form mental models of what a computer program is doing. In some cases sets may be better, sometimes flow-based programming would do the job, in other cases a mathematical equation and sometimes we need to fall back to textual languages.&lt;/p&gt;

&lt;p&gt;Instead of the “one VPL to rule them all” approach to the representation of a program, Interface Vision is building out a domain-agnostic VPL that is able to represent programs in a multitude of visual representations. A VPL for VPLs.&lt;/p&gt;

&lt;div id=&quot;id-i1-7-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/mental_model_multiple_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;###### Image-1.7: Interface Vision’s VPL is able to show multiple representations of the same program logic. {#id-i1-7}&lt;/p&gt;

&lt;p&gt;The light blueish area of &lt;a href=&quot;#id-i1-7-top&quot;&gt;Image-1.7&lt;/a&gt; contains a mathematical equation (Yes. We are looking for help from UX/UI designers).&lt;/p&gt;

&lt;p&gt;The same blueish area could contain other types of VPLs including a finite state machine, a flow-based program and even source code.&lt;/p&gt;

&lt;p&gt;We are able to build upon our users particular domain experiences as opposed to requiring them to learn one or more textual languages.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;One of the pain points of learning how to program is learning how to form mental models of problems using textual languages. There is no single mental model for programming (something VPLs have also been guilty of by trying to create single representational models).&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/mental_model_babby_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;Providing an environment that allows people to program a computer within their field of expertise opens up computers to more people and is one more step towards the democratization of programming.&lt;/p&gt;

&lt;p&gt;The next pain point to melt away is the technological aspects of creating a VPL for VPLs. The solution is almost as old as computers themselves: &lt;a href=&quot;http://en.wikipedia.org/wiki/Message_passing&quot;&gt;messages&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you find our work interesting and look forward to reading our next post on messaging, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt;.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>The Bay Area Visual Programming Group</title>
   <link href="http://bloginterfacevision.github.com/info/the-visual-programming-group"/>
   <updated>2014-02-27T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/info/the-visual-programming-group</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Please help evangelize Visual Programming Languages by joining &lt;a href=&quot;http://www.meetup.com/The-Bay-Area-Visual-Programming-Group/&quot;&gt;The Bay Area Visual Programming Group&lt;/a&gt; or &lt;a href=&quot;https://secure.meetup.com/create/&quot;&gt;create a Visual Programing Group meetup&lt;/a&gt; in your area.&lt;/p&gt;

&lt;p&gt;It’s a new meetup (please read below on why) so there might not be many people there.&lt;/p&gt;

&lt;h2 id=&quot;why-a-new-meetup-group&quot;&gt;Why a New Meetup Group?&lt;/h2&gt;

&lt;p&gt;I had no idea there would be so much interest in Visual Programming Languages when we made the post &lt;a href=&quot;/design/design-visual-progarmming-languages-snapshots&quot;&gt;Visual Programing Languages - Snapshots&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There didn’t appear to be any groups that focused on Visual Programming Languages in &lt;a href=&quot;http://www.meetup.com&quot;&gt;meetup.com&lt;/a&gt; so we have created one for the Bay Area and Santa Cruz, CA.&lt;/p&gt;

&lt;h2 id=&quot;why-join&quot;&gt;Why Join?&lt;/h2&gt;

&lt;p&gt;VPLs are not new and the computer industry was heading in that direction in the late 60’s and early 70’s. There were a lot of challenges to overcome: many of which have now been solved.&lt;/p&gt;

&lt;p&gt;We are now able to shift back to the VPL/GPL paradigm we strayed from.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Computers can now easily support the load visual programming languages put on them.&lt;/li&gt;
  &lt;li&gt;Children and students are being introduced to programming through visual programming languages (like Sketch). This means there are a large # of people who are starting to become comfortable with VPLs/GPLs and not just coding.&lt;/li&gt;
  &lt;li&gt;There have been technological advantages in the IT industry making VPLs/GPLs feasible.&lt;/li&gt;
  &lt;li&gt;User Experience is a lot better because designers and artists are more involved. Designers are ready to take on the challenges brought about by VPLs/GPLs. Proof? 1990s internet vs 2010s.&lt;/li&gt;
  &lt;li&gt;We have a better understanding of Human Computer Interaction.&lt;/li&gt;
  &lt;li&gt;Computers are ubiquitous.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And really because:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;You want to fix programming. You know, in your heart, that it makes no sense to have something as amazing as computers, and used by practically everyone on the planet, programmed by coding out complex software frameworks in abstract programming languages only understood by a few.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Just do it.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Visual Programming Languages - Snapshots</title>
   <link href="http://bloginterfacevision.github.com/design/design-visual-progarmming-languages-snapshots"/>
   <updated>2014-02-20T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/design-visual-progarmming-languages-snapshots</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Please take a moment to &lt;a href=&quot;/info/the-visual-programming-group&quot;&gt;join a Visual Programming Group&lt;/a&gt; in your area.&lt;/p&gt;

&lt;p&gt;There didn’t seem to be a place on the net where someone could easily see what all the different visual programming languages (Graphical Programming Languages) look like.&lt;/p&gt;

&lt;p&gt;A lot of Snapshots now. It is worth the download wait (I don’t want to split this into multiple pages: it would wreck the experience).&lt;/p&gt;

&lt;p&gt;So, this post is just a lot of really cool screenshots and images of different visual programming languages. Have fun checking them all out.&lt;/p&gt;

&lt;p&gt;If anyone feels we are breaking any copyright and wants us to remove any of these images, please send us an email. We’ve referenced the images.&lt;/p&gt;

&lt;p&gt;If you have a visual language you would like to add to this post, then please send us an email.&lt;/p&gt;

&lt;p&gt;If you find our work interesting, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt; for more posts on visual programming languages.&lt;/p&gt;

&lt;p&gt;Discussion on &lt;a href=&quot;https://news.ycombinator.com/item?id=7274674&quot;&gt;Hacker News&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;visual-programming-languages&quot;&gt;Visual Programming Languages&lt;/h2&gt;

&lt;p&gt;There are a lot of domain specific visual languages available to play with and check out. Over the years, we’ve been collecting a list of different environments that we feel, in one way or another, could be viewed as visual programming languages.&lt;/p&gt;

&lt;p&gt;We aren’t associated with any of the groups below. We just find their solutions interesting. A lot of these were found by browsing Wikipedia’s &lt;a href=&quot;http://en.wikipedia.org/wiki/Visual_programming_language&quot;&gt;Visual Programming Language&lt;/a&gt; entry.&lt;/p&gt;

&lt;p&gt;{#sketchpad}
### SketchPad
&lt;a href=&quot;#sketchpad&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://mydiesel22.blogspot.com/2011/05/vector-and-digital-graphics.html&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Sketchpad&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.youtube.com/watch?v=495nCzxM9PI&amp;amp;feature=player_embedded&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Maybe the first. 1963.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_sketchpad_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#grail}
### GRaIL (Graphical Input Language)
&lt;a href=&quot;#grail&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=y43fI7Dy04A&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=QQhVQ1UG6aM&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;http://www.rand.org/content/dam/rand/pubs/research_memoranda/2005/RM5999.pdf&quot;&gt;Web Site Kinda&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First “iconic” programing ~ 1968&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_grail_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/QQhVQ1UG6aM?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#aardappel}
### Aardappel
&lt;a href=&quot;#aardappel&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://strlen.com/aardappel-language/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://strlen.com/aardappel-language&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_aardappel_01.gif&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#adl}
### ADL
&lt;a href=&quot;#adl&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://tradetalk.tradingtechnologies.com/2013/05/university-program-university-of-virginia.html&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;https://www.tradingtechnologies.com/products/trading-analytics/xtrader/adl/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_adl.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#agentSheets}
### AgentSheets and AgentCubes
&lt;a href=&quot;#agentSheets&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.agentsheets.com/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Agentsheets&quot;&gt;Wikipedia&lt;/a&gt;, &lt;a href=&quot;https://www.youtube.com/watch?v=unDgy6jKpYY&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;http://www.agentsheets.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_agentsheets_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_agentcubes_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/unDgy6jKpYY?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#agilent-vee}
### Agilent VEE
&lt;a href=&quot;#agilent-vee&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://cp.home.agilent.com/upload/cmc_upload/ENA_BW_Search_with_Upper_Lower_Stimulus_IMAGE1.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.home.agilent.com/agilent/editorial.jspx?cc=SG&amp;amp;lc=eng&amp;amp;ckey=2258391&amp;amp;nid=-11143.0.00&amp;amp;id=2258391&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_agilent-vee.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#alice}
### Alice
&lt;a href=&quot;#alice&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.alice.org/index.php&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Alice_%28software%29&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/File:Alice-2-screenshot.jpg&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_alice_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#amici}
### Amici
&lt;a href=&quot;#amici&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://dimeb.informatik.uni-bremen.de/eduwear/about/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://dimeb.informatik.uni-bremen.de/eduwear/about/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_Amici.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#appacitive}
### Appacitive
&lt;a href=&quot;#appacitive&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://vimeo.com/84661858&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://appacitive.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_appacitive_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#apple-shake}
### Apple Shake
&lt;a href=&quot;#apple-shake&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://i1.ytimg.com/vi/RlC9PclVd7Q/maxresdefault.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.apple.com/support/shake/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_AppleShake.jpg &quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;//www.youtube.com/embed/RlC9PclVd7Q&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#appware}
### AppWare
&lt;a href=&quot;#appware&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.prichystal.cz/Archiv_c/Computer/Appware/appware.htm&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/AppWare&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://appacitive.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_appware_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#app-inventor-for-android}
### App Inventor For Android
&lt;a href=&quot;#app-inventor-for-android&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://beta.appinventor.mit.edu/learn/tutorials/whereismycar/whereismycar.html&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/App_Inventor_for_Android&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://appinventor.mit.edu/explore/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_app_inventor_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#analog-box}
### Analog Box
&lt;a href=&quot;#analog-box&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://code.google.com/p/analog-box/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;https://code.google.com/p/analog-box/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_analogbox.jpg &quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#andescotia}
&lt;a href=&quot;#andescotia&quot;&gt;Commercial Use&lt;/a&gt; via &lt;a href=&quot;http://www.andescotia.com/&quot;&gt;Andescotia&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_prograph_andescotia_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#arcgis-model-builder}
### ArcGIS Model Builder
&lt;a href=&quot;#arcgis-model-builder&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.rockware.com/product/featuresLobby.php?id=193&amp;amp;category=615&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://resources.arcgis.com/en/help/main/10.1/index.html#//002w00000001000000&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_app_arcgis_01.gif&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#audulus}
### Audulus
&lt;a href=&quot;#audulus&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.musicappblog.com/audulus-review/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.musicappblog.com/audulus-review/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_app_audulus_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#automagic}
### Automagic
&lt;a href=&quot;#automagic&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://play.google.com/store/apps/details?id=ch.gridvision.ppam.androidautomagic&amp;amp;hl=en&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://automagic4android.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_automagic_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#automator}
### Automator
&lt;a href=&quot;#automator&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.apple.com/remotedesktop/automation.html&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Automator_%28software%29&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.apple.com/osx/apps/#automator&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_automator_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#babuino}
### Babuino
&lt;a href=&quot;#babuino&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://2.bp.blogspot.com/-z0A3QaeBNq0/UUwdPcNWd6I/AAAAAAAAA90/FvID20svfus/s1600/Blocos-Switches-e1291278725603.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://home.teleport.com/~brettn/babuinobot_about/index.html&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_babuino.jpg&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#blender-sverchok-add-on}
### Blender: Sverchok add on 
&lt;a href=&quot;#blender-sverchok-add-on&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://1.bp.blogspot.com/-WIIMCG1aCZo/UtW_-LCF4TI/AAAAAAABF7Y/Dq87oQqYPu0/s1600/Blender+%5BCBLENDER_SVERCHOKtween_005.blend%5D.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.blendernation.com/2013/11/01/sverchok-add-on-new-version-and-hangout-today/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_Sverchok-add-on-Blender.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#blender-textures-nodes}
### Blender: Textures Nodes
&lt;a href=&quot;#blender-textures-nodes&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.blenderguru.com/wp-content/uploads/2009/05/11-full-nodes-540x617.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://wiki.blender.org/index.php/Doc:2.4/Manual/Textures/Types/Nodes&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_BlenderNodeTexture.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#blockly}
### Blockly
&lt;a href=&quot;#blockly&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://i.imgur.com/PfJO2.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;https://code.google.com/p/blockly/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_blockly_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#bloodhound}
### BloodHound
&lt;a href=&quot;#bloodhound&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.sharkindicators.com/bloodhound/bloodhound-features/bloodhound-professional-features/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.sharkindicators.com/bloodhound/bloodhound-features/bloodhound-professional-features/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_bloodhound.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#bounce}
### Bounce
&lt;a href=&quot;#bounce&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.art.net/~hopkins/Don/lang/bounce/SpaceSeedCircuits.gif&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.art.net/~hopkins/Don/lang/bounce/bounce.html&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_bounce_01.gif&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#cognitoy-mindrover}
### Cognitoy’s Mindrover
&lt;a href=&quot;#cognitoy-mindrover&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://gamereviewgroup.com/scrImages/mindrover-the-europa-project_3_orig.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.mindrover.com/mindrover.html&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_cognitoy-mindrover.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#chipwits}
### ChipWits
&lt;a href=&quot;#chipwits&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://chipwits.com/graphics/screen7.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://chipwits.com/index.html&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_ChipWits.jpg&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#copper-thoughts}
### Copper Thoughts
&lt;a href=&quot;#copper-thoughts&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.copperthoughts.com/assets/request-fsm-instance.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.copperthoughts.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_copper_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#coral}
### Coral
&lt;a href=&quot;#coral&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://code.google.com/p/coral-repo/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.blurrypaths.com/post/29898257065/coral-open-source-visual-programming-environment&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_Coral.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#cortex}
### Cortex
&lt;a href=&quot;#cortex&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.edventures.com/media/catalog/product/cache/1/thumbnail/9df78eab33525d08d6e5fb8d27136e95/v/i/visuallogo_testmotor.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.edventures.com/products/by-product/the-brain/cortex-programming-software.html&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_PCS-Cortex.jpg&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#cybertoolbox}
### CyberToolbox
&lt;a href=&quot;#cybertoolbox&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.cybergarage.org/twiki/pub/Main/CyberToolboxForWin32/clockdgm1.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.cybergarage.org/twiki/bin/view/Main/CyberToolboxForWin32&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_CyberToolbox.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#designscript}
### Designscript
&lt;a href=&quot;#designscript&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://forums.autodesk.com/t5/image/serverpage/image-id/61329iD69DA33B7DA9B96B/image-size/original?v=mpbl-1&amp;amp;px=-1&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;https://beta.autodesk.com/callout/?callid=E32D5D18F0C545469AF146D49BE0B31C&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_autodesk-designscript.png &quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#drakon}
### DRAKON
&lt;a href=&quot;#drakon&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/DRAKON&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/DRAKON&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://drakon-editor.sourceforge.net/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_drakon_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#drawfbp}
### DrawFBP
&lt;a href=&quot;#drawfbp&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.jpaulmorrison.com/graphicsstuff/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Flow-based_programming#Software_on_FBP_web_site&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.jpaulmorrison.com/graphicsstuff/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Flow-based_programming&quot;&gt;Flow-based programming&lt;/a&gt; implemented visually by the creator of flow-based programming: &lt;a href=&quot;http://en.wikipedia.org/wiki/John_Paul_Morrison&quot;&gt;John Paul Morrison&lt;/a&gt;.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_drawfbp_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#dream-maker}
### Dream Maker
&lt;a href=&quot;#dream-maker&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.byond.com/forum/?post=120715&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.byond.com/docs/guide/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_dreammaker.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#drupal}
### Drupal
&lt;a href=&quot;#drupal&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://drupal.org/files/images/vvd%20workspace.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;https://drupal.org/project/vvd&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_drupal.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#dynamo}
### Dynamo
&lt;a href=&quot;#dynamo&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://dynamobim.org/dynamo-0-6-3-release-and-0-7-0-alpha/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://autodeskvasari.com/dynamo&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_dynamo.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#engijs}
### Engi JS
&lt;a href=&quot;#engijs&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.engijs.org/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://www.engijs.org/&quot;&gt;Live! Use It Now&lt;/a&gt; and &lt;a href=&quot;https://github.com/engijs/engi&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_engijs_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#etoys}
### Etoys / Squeak
&lt;a href=&quot;#etoys&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/File:Squeak-screenshot.png&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Etoys_%28programming_language%29&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.squeakland.org/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_etoysqueak_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#eyeon-fusion}
### Eyeon Fusion
&lt;a href=&quot;#eyeon-fusion&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://www.fxguide.com/wp-content/uploads/2010/10/09Jun/fusion6/carpaint_shader_comp.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.eyeonline.com/Fusion.html&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_EyeonFusion.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#eyesweb}
### EyesWeb
&lt;a href=&quot;#eyesweb&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://3o3i.pagesperso-orange.fr/bilan/EyesWeb/EyesWebTrack.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.audiovisualizers.com/toolshak/vjprgpix/eyesweb/eyesweb.htm&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_EyesWeb.jpg &quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#field}
### Field
&lt;a href=&quot;#field&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://openendedgroup.com/field/OverviewBanners2.html&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://openendedgroup.com/field/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_field_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#fl-studio}
### FL Studio
&lt;a href=&quot;#fl-studio&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://freaksolid.wordpress.com/2013/05/20/fl-studio-11-patcher-dj-performance-presets/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Fl_studio&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.image-line.com/flstudio/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_flstudiopatcher_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#flowlab}
### FlowLab
&lt;a href=&quot;#flowlab&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://indiestatik.com/2013/01/23/flowlab-takes-visual-game-development-to-the-cloud-free-beta-released/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://flowlab.io/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_flowlab_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;//www.youtube.com/embed/MP50rOae6XQ&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#foundry-modo}
### Foundry Modo
&lt;a href=&quot;#foundry-modo&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.fxguide.com/featured/katana-in-production-changing-the-structure-of-the-workflow/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.thefoundry.co.uk/products/modo/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_FoundryModo.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#flexmonkey}
### ReDiLab:Node
{#redilab-node}
&lt;a href=&quot;#flexmonkey&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://flexmonkey.co.uk/redilab-node-006/ReDiLabNode.html&quot;&gt;Try It Out Here&lt;/a&gt;, &lt;a href=&quot;http://www.flexmonkey.co.uk/calc_v1/NodeRenderer.html&quot;&gt;Calculator&lt;/a&gt;, &lt;a href=&quot;http://flexmonkey.blogspot.com/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://flexmonkey.co.uk/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_flexmonkey_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#flow-hub}
### Flow Hub and NoFlo
&lt;a href=&quot;#flow-hub&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://flowhub.io/&quot;&gt;Image Source 1&lt;/a&gt;, &lt;a href=&quot;http://cdn.thegrid.io.s3.amazonaws.com/noflo/kickstarter/images/UI-03.jpg&quot;&gt;Image Source 2&lt;/a&gt; &lt;a href=&quot;http://noflojs.org/&quot;&gt;Web Site 1&lt;/a&gt; and &lt;a href=&quot;http://flowhub.io/&quot;&gt;Web Site 2&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_flohub_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_noflo_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_noflo_02.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#flowstone}
### FlowStone
&lt;a href=&quot;#flowstone&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/File:FlowStone_Large_Screenshot.png&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=yEIao2tm3WE&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;http://www.dsprobotics.com/flowstone.html&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_flowstone_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/yEIao2tm3WE?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#generativecomponents}
### GenerativeComponents
&lt;a href=&quot;#generativecomponents&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://communities.bentley.com/cfs-file.ashx/__key/telligent-evolution-components-attachments/13-6774-00-00-00-26-95-51/2014_2D00_03_2D00_05_5F00_ScreenCaptureGraph.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.bentley.com/en-US/Promo/Generative+Components/default.htm&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_generativecomponents.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#godot-engine}
### GoDot Engine
&lt;a href=&quot;#godot-engine&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.godotengine.org/wp/wp-content/uploads/2014/01/editor2.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.godotengine.org/wp/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_godot_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#google-web-designer}
### Google Web Designer
&lt;a href=&quot;#google-web-designer&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Google_Web_Designer&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;https://www.google.com/webdesigner/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_webdesigner_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#grasshopper-3d}
### Grasshopper 3D
&lt;a href=&quot;#grasshopper-3d&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://designreform.net/learning/rhino?page=1&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Grasshopper_3d&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.grasshopper3d.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_grasshopper_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#hopscotch}
### Hopscotch
&lt;a href=&quot;#hopscotch&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://www.gethopscotch.com/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Hopscotch_%28programming_language%29&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;https://www.gethopscotch.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_hopscotch_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#houdini}
### Houdini (Node Based Workflow)
&lt;a href=&quot;#houdini&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://a.disquscdn.com/uploads/mediaembed/images/858/46/original.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;https://www.sidefx.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_houdini_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#hypercard}
### HyperCard&lt;/p&gt;

&lt;p&gt;Note: see also &lt;a href=&quot;#livecode&quot;&gt;LiveCode&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#hypercard&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.smackerel.net/black_white_02.html&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/HyperCard&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://hypercard.org/&quot;&gt;Web Site???&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_hypercard_01.gif&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#hypergraph}
### Hypergraph
&lt;a href=&quot;#hypergraph&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.djx.com.au/blog/wp-content/images/layeringShadersInMR/layersHyperGraph.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://download.autodesk.com/global/docs/maya2014/en_us/index.html?url=files/Basics_Windows_and_Editors_Hypergraph_overview.htm,topicNumber=d30e87351&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_maya-hypergraph.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#softimageice}
### ICE (Interactive Creative Environment)
&lt;a href=&quot;#softimageice&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.renderosity.com/autodesk-integrates-face-robot-into-softimage-2010-cms-14693&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Autodesk_Softimage#ICE_Interactive_Creative_Environment&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.autodesk.com/products/autodesk-softimage/features/ice-and-dynamic-simulation/gallery-view&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_softimageice_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#IFTTT}
### IFTTT
&lt;a href=&quot;#IFTTT&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://ifttt.com/recipes&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Ifttt&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;https://ifttt.com/wtf&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_ifttt_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#ilab-neuromorphic-robotics-toolkit}
### iLab Neuromorphic Robotics Toolkit
&lt;a href=&quot;#ilab-neuromorphic-robotics-toolkit&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://robosavvy.com/forum/viewtopic.php?f=1&amp;amp;t=8481&amp;amp;sid=7e4e5d536cb7d12bd3e2d51718f0300b&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://robosavvy.com/forum/viewtopic.php?f=1&amp;amp;t=8481&amp;amp;sid=7e4e5d536cb7d12bd3e2d51718f0300b&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_ilab-neuromorphic-robotics-toolkit.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#illumination-software-creator}
### Illumination Software Creator
&lt;a href=&quot;#illumination-software-creator&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://lunduke.com/2010/06/16/illumination-software-creator-20-beta-2/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Illumination_Software_Creator&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://lunduke.com/2010/06/16/illumination-software-creator-20-beta-2/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_illumination_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#infosphere-streams}
### InfoSphere Streams
&lt;a href=&quot;#infosphere-streams&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://biblogg.no/wp-content/uploads/2011/10/IBM-Big-data-2.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www-03.ibm.com/software/products/en/infosphere-streams/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_InfoSphereStreams.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#intentional-technology}
### Intentional Technology
&lt;a href=&quot;#intentional-technology&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.intentsoft.com/intentional-technology/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.intentsoft.com/intentional-technology/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_IntentionalTech_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#isadora}
### Isadora
&lt;a href=&quot;#isadora&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://lawrenceharvey.files.wordpress.com/2012/05/isadora-audio-trigger-from-stream-patch.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://remotepresence.org/?p=534&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_isadora.png &quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#java-studio}
### Java Studio 1.0
&lt;a href=&quot;#java-studio&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://oldweb.cecm.sfu.ca/~tstanway/tutorial.html&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.oracle.com/us/sun/index.html&quot;&gt;Web Site ???&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_javastudio_01.gif&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#jeskola-buzz}
### Jeskola Buzz
&lt;a href=&quot;#jeskola-buzz&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://blog.livedoor.jp/acid808/archives/cat_693944.html&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Jeskola_Buzz&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.jeskola.net/buzz/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_jeskolabuzz_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#kimono}
### Kimono
&lt;a href=&quot;#kimono&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.kimonolabs.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_kimono_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#klieg}
### Klieg
&lt;a href=&quot;#klieg&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/klieg1.gif&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/index_e.html&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_klieg.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#knime}
### Knime
&lt;a href=&quot;#knime&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.knime.org/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.knime.org/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_knime_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#kodu}
### Kodu (Boku)
&lt;a href=&quot;#kodu&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.interactiveclassroom.net/?p=508&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Kodu&quot;&gt;Wikipedia&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=8-FjskAHgN0&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;http://research.microsoft.com/en-us/projects/kodu/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_kodu_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/8-FjskAHgN0?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#kyma}
### Kyma
&lt;a href=&quot;#kyma&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.symbolicsound.com/UpgradeCommon/Kyma%20XScreenshot%20Large.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.symbolicsound.com/cgi-bin/bin/view/Products/WebHome&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_Kyma.jpg&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#labview}
### LabView
&lt;a href=&quot;#labview&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.ni.com/newsletter/51735/en/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/LabVIEW&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.ni.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_labview_02.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#ladder-logic}
### Ladder Logic
&lt;a href=&quot;#ladder-logic&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Ladder_logic&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Ladder_logic&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_ladderlogic_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#lamdu}
### Lamdu
&lt;a href=&quot;#lamdu&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://peaker.github.io/lamdu/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://peaker.github.io/lamdu/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_lamdu_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#lava}
### Lava
&lt;a href=&quot;#lava&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://lavape.sourceforge.net/Derivation.htm&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Lava_%28programming_language%29&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://lavape.sourceforge.net/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_lava_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#learnable-programming}
### Learnable Programming&lt;/p&gt;

&lt;p&gt;More of a post on different ways to learn programming.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#learnable-programming&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://worrydream.com/#!/LearnableProgramming&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://worrydream.com/#!/LearnableProgramming&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_learnable_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#lily}
### Lily
&lt;a href=&quot;#lily&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://blog.lilyapp.org/lily/demo/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Lily_%28software%29&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://blog.lilyapp.org/lily/demo/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Really cool and hard to describe. You need to visit their demo web page and watch their videos.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_lily_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#limnor-studio}
### Limnor Studio
&lt;a href=&quot;#limnor-studio&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.limnor.com/studio_whatIsIt.html&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Limnor&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.limnor.com/studio_whatIsIt.html&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_limnorstudio_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#little-big-planet}
### Little Big Planet
&lt;a href=&quot;#little-big-planet&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=jWanvKdurU0&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/LittleBigPlanet&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://littlebigplanet.playstation.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Someone built an An &lt;a href=&quot;http://www.youtube.com/watch?v=jWanvKdurU0&quot;&gt;8-bit Mechanical Adder in LittleBigPlanet&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_littlebig_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#livecode}
### LiveCode&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#livecode&quot;&gt;Direct Link&lt;/a&gt;, Image Source, &lt;a href=&quot;http://en.wikipedia.org/wiki/LiveCode&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://runrev.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking for an image.&lt;/p&gt;

&lt;p&gt;{#mamba-fx}
### Mamba FX
&lt;a href=&quot;#mamba-fx&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://postperspective.com/wp-content/uploads/2013/10/MAMBA-FX-Screengrab1.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.mambatutorials.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_MambaFX.png &quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#max-msp-jitter}
### MAX/MSP Jitter&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#max-msp-jitter&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.kx1.us/sites/spacefillingcurve_net//programming/maxmsp/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://cycling74.com/products/max/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_max_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#marten}
### Marten&lt;/p&gt;

&lt;p&gt;Marten is an implementation of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Prograph&quot;&gt;Prograph&lt;/a&gt; language.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#marten&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.andescotia.com/examples/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.andescotia.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_marten_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#metaedit-modeler}
### MetaEdit+ Modeler
&lt;a href=&quot;#metaedit-modeler&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.metacase.com/images/diagrameditor2.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.metacase.com/mep/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_MetaEditModeler.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#miceonabeam}
### MiceOnABeam
&lt;a href=&quot;#miceonabeam&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.miceonabeam.com/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.miceonabeam.com/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_miceonabeam.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#mindplus}
### Mind+
&lt;a href=&quot;#mindplus&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.mindplus.cc/wp-content/uploads/2013/09/button-led-2.gif&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.mindplus.cc/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_mindplus_01.gif&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#mvpl}
### Microsoft Visual Programming Language MVPL
&lt;a href=&quot;#mvpl&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb483088.aspx&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb483088.aspx&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_Microsoft-Visual-Programming-Language.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#mindspider}
### MindSpider
&lt;a href=&quot;#mindspider&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.mistal-research.com/Images/MindSpider/MindSpiderScreenshot.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.mistal-research.com/mindSpider.php&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_MindSpider.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#minecraft}
### Minecraft
&lt;a href=&quot;#minecraft&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=frcr9XYeTW4&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Minecraft&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;https://minecraft.net/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Considering someone has created a &lt;a href=&quot;http://www.youtube.com/watch?v=frcr9XYeTW4&quot;&gt;fully programmable computer&lt;/a&gt; using Minecraft.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_minecraft_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#minibloq}
### Minibloq
&lt;a href=&quot;#minibloq&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/File:ToneWithVariables.png&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Minibloq&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://blog.minibloq.org/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This has a really cool looking interface.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_minibloq_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#minkoshaderLab}
### Minko ShaderLab
&lt;a href=&quot;#minkoshaderLab&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://www.youtube.com/watch?v=yuR1e1PjU8Y&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;https://www.youtube.com/watch?v=yuR1e1PjU8Y&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;http://blog.aerys.in/2012/02/06/new-minko-shaderlab-preview/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_minkoshaderLab_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/yuR1e1PjU8Y?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#modkit-arduino-visual-programming}
### Modkit Arduino Visual Programming
&lt;a href=&quot;#modkit-arduino-visual-programming&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://dangerousprototypes.com/forum/viewtopic.php?f=34&amp;amp;t=1072&amp;amp;sid=3da3289fbd14b423672fafc56c8f8c86&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.modkit.com/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_modkit.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#morphic}
### Morphic
&lt;a href=&quot;#morphic&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.cc.gatech.edu/fac/mark.guzdial/squeak/startingmorphic.html&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Morphic_%28software%29&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.dmoz.org/Computers/Software/Operating_Systems/Graphic_Subsystems/Morphic&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_morphic_01.gif&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#mozilla-appmaker}
### Mozilla Appmaker
&lt;a href=&quot;#mozilla-appmaker&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://2.bp.blogspot.com/-1xD81b5fPso/Uly-amqf9vI/AAAAAAAAC8I/n7ehLipb1CE/s1600/appmaker.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;https://appmaker.mozillalabs.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was discussed quite a bit on &lt;a href=&quot;https://news.ycombinator.com/item?id=6501731&quot;&gt;Ycombinator&lt;/a&gt;.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_appmaker_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#mst-workshop}
### MST  Workshop
&lt;a href=&quot;#mst-workshop&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://home.comcast.net/~tpandolfi/site/?/photos/&amp;amp;PHPSESSID=63621f2035fe55537d794ab0ac795934&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/MST_Workshop&quot;&gt;Wikipedia&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=X6LCaEHYNRE&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;http://home.comcast.net/~tpandolfi/site/?/home/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_mst_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/X6LCaEHYNRE?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#neattools-visual-programming-environment}
### NeatTools Visual Programming Environment
&lt;a href=&quot;#neattools-visual-programming-environment&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.sensyr.com/NeatTools.html&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.neattools.org/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_NeatTools_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#nevo-studio}
### Nevo Studio
&lt;a href=&quot;#nevo-studio&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://worthingtondistribution.com/blog/wp-content/uploads/2010/05/T-Stat-Widget-300x244.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www2.worthingtondistribution.com/blog/?p=66&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_nevo-studio.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#nodebox}
### NodeBox
&lt;a href=&quot;#nodebox&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://nodebox.net/node/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://nodebox.net/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_nodebox_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#nuke}
### Nuke
&lt;a href=&quot;#nuke&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.thefoundry.co.uk/products/nuke-product-family/nuke/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Nuke_%28software%29&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.thefoundry.co.uk/products/nuke-product-family/nuke/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_nuke_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#num3sis}
### Num3sis Composer
&lt;a href=&quot;#num3sis&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://num3sis.inria.fr/blog/wp-content/uploads/actor_fields.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://num3sis.inria.fr/blog/category/composer/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_num3sisComposer.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#NXT-G}
### NXT-G
&lt;a href=&quot;#NXT-G&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.brickshelf.com/cgi-bin/gallery.cgi?i=2051945&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=SpAXlycjrRo&quot;&gt;Youtube&lt;/a&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Lego_Mindstorms_NXT#NXT-G&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.legoengineering.com/program/nxt-g/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Legos!!!&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_nxt-g_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/SpAXlycjrRo?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#openalea-visualea}
### OpenAlea Visualea
&lt;a href=&quot;#openalea-visualea&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://openalea.gforge.inria.fr/doc/openalea/visualea/doc/_build/html/contents.html&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://openalea.gforge.inria.fr/doc/openalea/doc/_build/html/index.html&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_OpenAleaVisualea.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#opendx}
### OpenDX
&lt;a href=&quot;#opendx&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://sven.killig.de/screenshots/OpenDX.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.opendx.org/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_Opendx.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#openflippers}
### OpenFlippers
&lt;a href=&quot;#openflippers&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.openflipper.org/index.php?id=240&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.openflipper.org/index.php?id=240&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_OpenFlippers.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#open-modelica}
### Open Modelica
&lt;a href=&quot;#open-modelica&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.marekgayer.com/en/projects/incfd/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;https://www.openmodelica.org/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_openmodelica_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#open-music}
### Open Music
&lt;a href=&quot;#open-music&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/File:Om_patch.gif&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/OpenMusic&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://repmus.ircam.fr/openmusic/home&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_openmusic_01.gif&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#openwire}
### OpenWire
&lt;a href=&quot;#openwire&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.mitov.com/products/openwire#screenshots&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/OpenWire_%28library%29&quot;&gt;Wikipedia&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=MAuqNjoYuhg&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;http://www.mitov.com/products/openwire#overview&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_openwire_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/MAuqNjoYuhg?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#orange}
### Orange
&lt;a href=&quot;#orange&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://orange.biolab.si/screenshots/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://orange.biolab.si/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_Orange.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#origami}
### Origami
&lt;a href=&quot;#origami&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://a.36krcnd.com/photo/2014/d2878df00bea4bfb782037f1683423e3.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://facebook.github.io/origami/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_origami_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#piet}
### Piet
&lt;a href=&quot;#piet&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Piet_%28programming_language%29#Piet&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Piet_%28programming_language%29#Piet&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.retas.de/thomas/computer/programs/useless/piet/Piet/index.html&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_piet_01.gif&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#pipes}
### Pipes
&lt;a href=&quot;#pipes&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://halfblog.net/2013/02/28/updating-datahole/yahoo-pipes-datahole/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Yahoo!_Pipes&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://pipes.yahoo.com/pipes/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_pipes_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#pypes}
### Pypes
&lt;a href=&quot;#pypes&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.pypes.org/index_files/GraphImg.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.pypes.org/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_pypes_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#praxis-live}
### Praxis LIVE
&lt;a href=&quot;#praxis-live&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.praxislive.org/features&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.praxislive.org/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_praxislive.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#programming-without-coding-technology}
### Programming Without Coding Technology
&lt;a href=&quot;#programming-without-coding-technology&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://sourceforge.net/projects/doublesvsoop/?source=recommended&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://doublesvsoop.sourceforge.net/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_pwct_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#prograph}
### Prograph
&lt;a href=&quot;#prograph&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/File:Prograph_database_operation.PNG&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Prograph&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://c2.com/cgi/wiki?PrographLanguage&quot;&gt;Web Site??&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_prograph_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#pseint}
### PSeint
&lt;a href=&quot;#pseint&quot;&gt;Direct Link&lt;/a&gt;, Image Provided By Email and &lt;a href=&quot;http://pseint.sourceforge.net/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_pseint_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#pure-data}
### Pure Data
&lt;a href=&quot;#pure-data&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/File:Pd_example_3.svg&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Pure_Data&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://puredata.info/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_puredata_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#pygmalion}
### Pygmalion
&lt;a href=&quot;#pygmalion&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://acypher.com/wwid/Chapters/01Pygmalion.html&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://acypher.com/wwid/Chapters/01Pygmalion.html&quot;&gt;Web Site Info Only&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_pygmalion_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#quadrigram}
### Quadrigram
&lt;a href=&quot;#quadrigram&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://blog.quadrigram.com/wp-content/uploads/2012/12/template_2.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.quadrigram.com/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_quadrigram.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#quartz-composer}
### Quartz Composer
&lt;a href=&quot;#quartz-composer&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://mastersofmedia.hum.uva.nl/2011/10/24/finally-it-comes-together/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Quartz_Composer&quot;&gt;Wikipedia&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=kTmqc_At2bY&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;https://developer.apple.com/technologies/mac/graphics-and-animation.html&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_quartz_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/kTmqc_At2bY?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#rapidminer}
### RapidMiner
&lt;a href=&quot;#rapidminer&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://cbokhove.files.wordpress.com/2012/07/rm2.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://rapidminer.com/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_rapidminer.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#reactable}
### Reactable
&lt;a href=&quot;#reactable&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://lh4.ggpht.com/V4U1SCuI_KrSG2OD-rYpgeW7YqnTvJ36W5TYGT2z8qFEeLzxsymZ0OWw6HXroOnMcg=h900&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.reactable.com/products/mobile/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_reactable.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#reaktor}
### Reaktor
&lt;a href=&quot;#reaktor&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://media.soundonsound.com/sos/oct99/images/reaktor5.gif&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Reaktor&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.native-instruments.com/en/products/komplete/synths-samplers/reaktor-5/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_reaktor_01.gif&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#redwire}
### Redwire
&lt;a href=&quot;#redwire&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://redwire.io/#/game/bc2564b4e6b27b88/edit&quot;&gt;Live! Use It Now&lt;/a&gt; and &lt;a href=&quot;http://redwire.io&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_redwire_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#scheme-bricks}
### Scheme Bricks
&lt;a href=&quot;#scheme-bricks&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.pawfal.org/dave/blog/2010/05/scheme-bricks-for-graphics/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.pawfal.org/dave/index.cgi?Projects/Scheme%20Bricks&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_schemebricks_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#scratch}
### Scratch
&lt;a href=&quot;#scratch&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://scratch.mit.edu/projects/11126006/#editor&quot;&gt;Image Source 1&lt;/a&gt;, &lt;a href=&quot;http://scratch.mit.edu/projects/11126006/#editor&quot;&gt;Image Source 2&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Scratch_%28programming_language%29&quot;&gt;Wikipedia&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=4YoGkwV7D9c&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;http://scratch.mit.edu/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_scratch_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_scratch_02.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/4YoGkwV7D9c?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#sextante}
### Sextante
&lt;a href=&quot;#sextante&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.gvsig.com/files/images/screenshots/gvSIG_Sextante_02.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://sextantegis.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_sextante_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#simulink}
### Simulink
&lt;a href=&quot;#simulink&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.mathworks.com/products/simulink/?s_cid=wiki_simulink_8&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Simulink&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.mathworks.com/products/simulink/?s_cid=wiki_simulink_8&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_simlink_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#sikuli}
### Sikuli
&lt;a href=&quot;#sikuli&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://hellotestworld.com/2012/04/27/sikuli-for-all-those-hard-to-reach-places/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Sikuli&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.sikuli.org&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_sikuli_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#snap}
### Snap!
&lt;a href=&quot;#snap&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://snap.berkeley.edu/run&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://snap.berkeley.edu&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_snap_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_snap_02.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_snap_03.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#sprog}
### Sprog
&lt;a href=&quot;#sprog&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://sprog.sourceforge.net/screenshots/images/panther_dilbert.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://sprog.sourceforge.net/index.html&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_sprog.jpg&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#substance-designer}
### Substance Designer
&lt;a href=&quot;#substance-designer&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.psoih.com/wp-content/uploads/2013/11/20131110_EasyUV_Substance_SVG_Graph2.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://store.steampowered.com/video/238710&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_SubstanceDesigner.jpg &quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#synopsis}
### Synopsis
&lt;a href=&quot;#synopsis&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.codemorphis.com/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.codemorphis.com/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_Synopsis.jpg&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#synthedit}
### SynthEdit
&lt;a href=&quot;#synthedit&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://cmt3329m00339944.files.wordpress.com/2012/04/synthedit.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.synthedit.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_synthedit.jpg &quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#sql-server-integration-services}
### SQL Server Integration Services&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#sql-server-integration-services&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://technet.microsoft.com/en-us/library/cc917721.aspx&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/SQL_Server_Integration_Services&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.microsoft.com/en-us/sqlserver/solutions-technologies/enterprise-information-management/integration-services.aspx&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_sqlintegration_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#streamtools}
### Streamtools
&lt;a href=&quot;#streamtools&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://source.opennews.org/en-US/articles/introducing-streamtools/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;https://source.opennews.org/en-US/articles/introducing-streamtools/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_streamtools_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#stroycode}
### StroyCode
&lt;a href=&quot;#stroycode&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://softconstructors.com/en/applications/stroycode/screenshots.html&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://softconstructors.com/en/applications/stroycode/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_stroycode_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#stylus-studio}
### Stylus Studio
&lt;a href=&quot;#stylus-studio&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.stylusstudio.com/xml_brochure.html&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.stylusstudio.com/xml_brochure.html&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_StylusStudio.jpg&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#tersus}
### Tersus
&lt;a href=&quot;#tersus&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.codeproject.com/KB/Tools-IDE/timemachine/v6.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.tersus.com/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_tersus.jpg&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#textit}
### TextIt
&lt;a href=&quot;#textit&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://textit.in/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;https://textit.in/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_textit_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#thyrd}
### Thyrd
&lt;a href=&quot;#thyrd&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://thyrd.org/thyrd/screencast.php?v=04&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://thyrd.org/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_thyrd_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#touchdesigner}
### TouchDesigner
&lt;a href=&quot;#touchdesigner&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://www.derivative.ca/Events/2014/Week01/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Houdini_%28software%29#TouchDesigner&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;https://www.derivative.ca/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_touchdesigner_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#touch-develop}
### Touch Develop
&lt;a href=&quot;#touch-develop&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://handheld.softpedia.com/progScreenshots/TouchDevelop-Screenshot-125731.html&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;https://www.touchdevelop.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From Microsoft research.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_touchdevelop_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#tydlig}
### Tydlig
&lt;a href=&quot;#tydlig&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://tydligapp.com/images/screenshots/1-physics.png&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=xbXaKxxUomE&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;http://tydligapp.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_tydlig_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/xbXaKxxUomE?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#thymio}
### Thymio VPL
&lt;a href=&quot;#thymio&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://thymio.org/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;https://www.youtube.com/watch?v=o0K7Bo3pAFY&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;http://thymio.org/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_thymio_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/o0K7Bo3pAFY?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#tynker}
### Tynker
&lt;a href=&quot;#tynker&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://venturebeat.com/2014/02/18/tynker-launching-its-first-ipad-app-to-teach-kids-to-code-at-sxsw/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=CrviAg8h0Zc&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;http://www.tynker.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_tynker_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/CrviAg8h0Zc?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#udk-kismet}
### UDK Kismet
&lt;a href=&quot;#udk-kismet&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://forums.epicgames.com/threads/603843-Kismet-Abort-Move-action-does-not-work&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.worldofleveldesign.com/categories/wold-members-tutorials/petebottomley/udk-kismet-introduction.php&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_udkkismet_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#udk}
### UDK 
&lt;a href=&quot;#udk&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=0OR63rDN5p8&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.unrealengine.com/en/udk/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_udk_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#unix-tools}
### Unix Tools
&lt;a href=&quot;#unix-tools&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://i.stack.imgur.com/G2Xri.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.dmst.aueb.gr/dds/pubs/jrnl/2001-SPANDE-VUFC/html/vufc.html&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_Unix-Tools.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#vplus}
### V+
&lt;a href=&quot;#vplus&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://southwestjones.com/wp-content/uploads/2013/05/visualLangSamp.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.simphonics.com/products/software/vplus/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_Vplus.jpg&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#videolangpi}
### Video Processing Language for the Raspberry Pi
&lt;a href=&quot;#videolangpi&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;https://raw.githubusercontent.com/CalumJEadie/video-processing-language-for-the-raspberry-pi/master/screenshots/walkthrough-2.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;https://github.com/CalumJEadie/video-processing-language-for-the-raspberry-pi&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_videolangpi.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#vistrails}
### VisTrails
&lt;a href=&quot;#vistrails&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://twiki.ipaw.info/bin/view/Challenge/VisTrails&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://twiki.ipaw.info/bin/view/Challenge/VisTrails&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_VisTrails.png &quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#visual-jforex}
### Visual JForex
&lt;a href=&quot;#visual-jforex&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://i1.ytimg.com/vi/iz5numHchGU/maxresdefault.jpg&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.dukascopy.com/swiss/english/forex/Visual/features/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_jforex_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#viscuit}
### Viscuit
&lt;a href=&quot;#viscuit&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://plus.appgiga.jp/masatolan/2013/12/12/49814/&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://www.youtube.com/watch?v=ZdWyahyNepg&quot;&gt;Youtube&lt;/a&gt; and &lt;a href=&quot;http://www.viscuit.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_viscuit_01.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;
&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/ZdWyahyNepg?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;{#vrl-studio}
### VRL-Studio
&lt;a href=&quot;#vrl-studio&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://vrl-studio.mihosoft.eu/releases/help/resources/img/functionplotter01.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://vrl-studio.mihosoft.eu/&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_vrl-studio.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;p&gt;{#vuo}
### VUO
&lt;a href=&quot;#vuo&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.vjunion.se/2013/03/a-great-start-to-the-new-year/&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://vuo.org/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_vuo_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#vvvv}
### VVVV
&lt;a href=&quot;#vvvv&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://vvvv.org/contribution/vvvv.packs.image&quot;&gt;Image Source 1&lt;/a&gt;, &lt;a href=&quot;http://kristiansmusicproductionblog.com/wp-content/uploads/vvvv.png&quot;&gt;Image Source 2&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Vvvv&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://www.vvvv.org/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_vvvv_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_vvvv_02.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#windows-workflow-foundation}
### Windows Workflow Foundation
&lt;a href=&quot;#windows-workflow-foundation&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://fryerblog.com/post/2179029238/a-windows-workflow-foundation-example&quot;&gt;Image Source&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Windows_Workflow_Foundation&quot;&gt;Wikipedia&lt;/a&gt; and &lt;a href=&quot;http://msdn.microsoft.com/en-us/vstudio/jj684582.aspx&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_winworkflow_01.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#world-machine}
### World machine
&lt;a href=&quot;#world-machine&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://mygaragegame.blogspot.in/2012/08/terrain-tiles.html&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.world-machine.com/&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_worldmachine.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#xpresso}
### Xpresso
&lt;a href=&quot;#xpresso&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.maxon.net/products/cinema-4d-prime/customizing.html&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.maxon.net/products/cinema-4d-prime/customizing.html&quot;&gt;Web Site&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_xpresso.jpg&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;p&gt;{#zaluum}
### Zaluum
&lt;a href=&quot;#zaluum&quot;&gt;Direct Link&lt;/a&gt;, &lt;a href=&quot;http://www.zaluum.com/img/sound-viewsound3.png&quot;&gt;Image Source&lt;/a&gt; and &lt;a href=&quot;http://www.zaluum.com&quot;&gt;Web Site&lt;/a&gt;
&amp;lt;p class=&quot;pagination-centered&quot;&amp;gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/posts/example_visual_language_zaluum.png&quot; /&gt;&lt;img /&gt;&amp;lt;/p&amp;gt;&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;That’s it for now. Please submit any languages you would like to see snapshots of.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>A Ux Layout Engine for a Gui Based Development Environment</title>
   <link href="http://bloginterfacevision.github.com/design/css-layout-engine"/>
   <updated>2014-02-19T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/css-layout-engine</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;We had a difficult choice to make. Use OS native controls for layout or roll our own. We chose to roll our own engine for different reasons. We learned a few things from this:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;This could not have been done without using Behavior and Test Driven Development (around 6,000 lines of code so far).&lt;/li&gt;
  &lt;li&gt;One does not simply try to create an html + css layout engine.&lt;/li&gt;
  &lt;li&gt;It is totally cool having our own ux layout engine based on html + css.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;the-results&quot;&gt;The Results&lt;/h3&gt;

&lt;p&gt;The results themselves aren’t impressive really. This is just an engine to layout elements using CSS and HTML.&lt;/p&gt;

&lt;p&gt;In future posts, we will show what type of UI/UX we can create using the layout engine. After all, the purpose of this is to create a visual programming language. A very robust UI/UX system to display a program visually is really important.&lt;/p&gt;

&lt;h2 id=&quot;building-an-engine-from-scratch&quot;&gt;Building An Engine From Scratch&lt;/h2&gt;

&lt;h3 id=&quot;requirements&quot;&gt;Requirements&lt;/h3&gt;

&lt;p&gt;We aren’t currently trying to implement all of HTML5 + CSS3 as defined within the specifications and we will probably never go for backwards compatibility. However, we have implemented a decent bit of HTML5 + CSS3.&lt;/p&gt;

&lt;p&gt;We drew our ‘requirements’ from &lt;a href=&quot;http://www.w3schools.com/cssref/&quot;&gt;w3schools&lt;/a&gt;. We iteratively built out functionality starting out with a single div and ending up with support of margin, borders, padding, top, bottom, left, right, auto, etc.&lt;/p&gt;

&lt;p&gt;Using these these requirements, we sketched out what a UxControl consists of along with some Pseudo code to get our heads around all of the stuff that needs to happen in a layout engine.&lt;/p&gt;

&lt;div id=&quot;id-f1-1-top&quot;&gt;&amp;nbsp;&lt;/div&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/example_css_layout_001.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;h6 id=&quot;id-s1-1&quot;&gt;Figure-1.1: Sketch of frames required: frame, bounds, content.&lt;/h6&gt;

&lt;div id=&quot;id-f1-2-top&quot;&gt;&amp;nbsp;&lt;/div&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/example_css_layout_002.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;h6 id=&quot;figure-12-sketch-of-layout-when-css-positionabsolute-is-definedid-s1-2&quot;&gt;Figure-1.2: Sketch of layout when css position:absolute; is defined.{#id-s1-2}&lt;/h6&gt;

&lt;h3 id=&quot;test-driven-development&quot;&gt;Test Driven Development&lt;/h3&gt;

&lt;p&gt;We can’t emphasize enough how much &lt;a href=&quot;http://en.wikipedia.org/wiki/Behavior-driven_development&quot;&gt;behavior driven development&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Test-driven_development&quot;&gt;test driven development&lt;/a&gt; helped us with building the layout engine. The engine itself is currently around 850 lines of code with tests running around 6,000 lines of code. It takes around a quarter of a second to run all the tests natively. We have not optimized the layout engine in any way yet but will when needed.&lt;/p&gt;

&lt;p&gt;We also did visual inspection of the results of the layout engine with Google Chrome (some day we will automate this).&lt;/p&gt;

&lt;p&gt;Some of the output of the automated tests are shown below.&lt;/p&gt;

&lt;div id=&quot;id-f1-3-top&quot;&gt;&amp;nbsp;&lt;/div&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/example_css_window_compare.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;h6 id=&quot;figure-13-test-vs-chrome-generated-screensid-s1-3&quot;&gt;Figure-1.3: Test vs Chrome generated screens.{#id-s1-3}&lt;/h6&gt;

&lt;h3 id=&quot;comparing-expected-and-actual-results&quot;&gt;Comparing Expected and Actual Results&lt;/h3&gt;

&lt;p&gt;In a nutshell, BDD basically starts with a given state like “If the window is 768 pixels by 1024 pixels and we have the following ux configuration then all of these things should be true.”&lt;/p&gt;

&lt;p&gt;For a given ux part we need to verify calculations like:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;the top, right, bottom and left position&lt;/li&gt;
  &lt;li&gt;the top, right, bottom and left margin&lt;/li&gt;
  &lt;li&gt;the top, right, bottom and left padding&lt;/li&gt;
  &lt;li&gt;the top, right, bottom and left border-width&lt;/li&gt;
  &lt;li&gt;the x, y, width and height of the frame-area.&lt;/li&gt;
  &lt;li&gt;the x, y, width and height of the content-area.&lt;/li&gt;
  &lt;li&gt;the x, y, width and height of the bounds-area.&lt;/li&gt;
  &lt;li&gt;the correct scaling of the above calculations.&lt;/li&gt;
  &lt;li&gt;the correct calculations when css position is static or absolute&lt;/li&gt;
  &lt;li&gt;margin folding&lt;/li&gt;
  &lt;li&gt;Box sizing of border and content.&lt;/li&gt;
  &lt;li&gt;the way auto affects width, height, margin-left and margin-right and how left and right positions affect auto&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To validate these hundreds of calculations, we will setup a simple configuration. The configuration can run within a Scope expecting an array of properties to test, the expected value and the actual value. We also provide some context info so we can print a nicely formatted message if the values don’t match up.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PartNamedString ( keyStr = &quot;testPart&quot;
  ForEach (
    part PropScopeGet ( nameStr &quot;propToTest&quot; )
    action WhenNot (
      condition IsNearlyEqFloat (
        left PartIndexStringGet ( nameStr &quot;valExp&quot;
          part PropScopeGet ( nameStr &quot;current&quot; ) )
        right PropGet (
          name PartIndexStringGet ( nameStr &quot;propName&quot;
            part PropScopeGet ( nameStr &quot;current&quot; ) )
          part PropScopeGet ( nameStr &quot;uxControl&quot; ) ) )
      action ConsoleWriteLine (
        text TextFormatter (
          text Vision.Core.String (
            withStr &quot;@testName@: The @propName@ of @uxControlName@ should be @valExp@ but was @actualValue@.&quot; )
          parameters ArrayList (
            insert PartNamedString ( keyStr &quot;@testName@&quot;
              part PropScopeGet ( nameStr &quot;testName&quot; ) )
            insert PartNamedString ( keyStr &quot;@propName@&quot;
              part PartIndexStringGet ( nameStr &quot;propName&quot;
                part PropScopeGet ( nameStr &quot;current&quot; ) ) )
            insert PartNamedString ( keyStr &quot;@uxControlName@&quot;
              part PropScopeGet ( nameStr &quot;controlName&quot; ) )
            insert PartNamedString ( keyStr &quot;@valExp@&quot;
              part PartIndexStringGet ( nameStr &quot;valExp&quot;
                part PropScopeGet ( nameStr &quot;current&quot; ) ) )
            insert PartNamedString ( keyStr &quot;@actualValue@&quot;
              part PropGet (
                name PartIndexStringGet ( nameStr &quot;propName&quot;
                  part PropScopeGet ( nameStr &quot;current&quot; ) )
                part PropScopeGet ( nameStr &quot;uxControl&quot; ) ) ) ) ) ) ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Let’s see how we use this configuration.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scope (
  properties HashTable (
    insert PartNamedString ( keyStr &quot;uxControl&quot;
      part PropScopeGet ( nameStr &quot;winNative&quot; ) )
    insert StrKeyStr ( keyStr &quot;controlName&quot; withStr &quot;winNative&quot; )
    insert StrKeyStr ( keyStr &quot;testName&quot; withStr &quot;Test001&quot; )
    insert PartNamedString ( keyStr &quot;propToTest&quot;
      part ArrayList (
        insert HashTable (
          insert StrKeyStr ( keyStr &quot;propName&quot; withStr &quot;marginTop&quot; )
          insert FloatKeyStr ( keyStr &quot;valExp&quot; withFloat 0.0f ) )
        insert HashTable (
          insert StrKeyStr ( keyStr &quot;propName&quot; withStr &quot;marginRight&quot; )
          insert FloatKeyStr ( keyStr &quot;valExp&quot; withFloat 0.0f ) )
        insert HashTable (
          insert StrKeyStr ( keyStr &quot;propName&quot; withStr &quot;marginBottom&quot; )
          insert FloatKeyStr ( keyStr &quot;valExp&quot; withFloat 0.0f ) )
        insert HashTable (
          insert StrKeyStr ( keyStr &quot;propName&quot; withStr &quot;marginLeft&quot; )
          insert FloatKeyStr ( keyStr &quot;valExp&quot; withFloat 0.0f ) ) ) ) )
  part PropScopeGet ( nameStr &quot;testPart&quot; required false ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Our above scope has 4 properties named uxControl, controlName, testName and propToTest. Each of these is a different type:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;uxControl - A PartNamedString part which is a reference to the uxControl we are testing values on.&lt;/li&gt;
  &lt;li&gt;controlName - A String part which is the name of the control. Displayed in the test results if the test doesn’t pass.&lt;/li&gt;
  &lt;li&gt;testName - A String part which is the name of the test running. Displayed in the test results if the test doesn’t pass.&lt;/li&gt;
  &lt;li&gt;propToTest - A PartNamedString part which contains an array of hash tables. Each hash table contains the name of the property to test and the expected value of that property.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The “testPart” configuration is declared somewhere above our test configuration. When this scope runs, it runs whatever is located in the part property which is the “testPart” configuration:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;part PropScopeGet ( nameStr &quot;testPart&quot; required false ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The testPart configuration starts with a ForEach part. This part is defined as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ForEach (
  part ( ... ) // The list of items
  action ( ... ) // The action to run against each part.
)    
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In our testPart configuration, for part we have the following configuration:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;part ( PropScopeGet ( nameStr &quot;propToTest&quot; ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is really cool, because if we look for the scope property named “propToTest” we will see it is the ArrayList of HashTables of each property to test and their values. Ok, so we run through each item of this array. Where do we read the current item from in the ForEach loop?&lt;/p&gt;

&lt;p&gt;The for each loop places it’s current item in a scope property named “current”. This is why you see the following scattered throughout the configuration:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PropScopeGet ( nameStr &quot;current&quot; )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For the action on each item within the “propToTest” array we check if the value within the actual property is equal to the expected value. The IsNearlyEqFloat part&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;IsNearlyEqFloat (
  left ( ... ) // Item on the left of the comparison.
  right ( ... ) // Item on the right of the comparison.
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Since each current part is a HashTable, we want to get one of the elements from the hashtable. We can do this using the PartIndexStringGet Part:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PartIndexStringGet (
  nameStr &quot;...&quot; // The hash code/index
  part ( ... ) // The hash table, array and/or collection
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In the above configuration, we have the left property of IsNearlyEqFloat configured as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;left PartIndexStringGet ( nameStr &quot;valExp&quot;
  part PropScopeGet ( nameStr &quot;current&quot; ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Isn’t that cool? We are saying that we want the part named “valExp” located in the “current” property which happens to be one of our hash code definitions like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;insert HashTable (
  insert StrKeyStr ( keyStr &quot;propName&quot; withStr &quot;marginTop&quot; )
  insert FloatKeyStr ( keyStr &quot;valExp&quot; withFloat 0.0f ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The right configuration is a little more complex. We are using the PropGet part which gives us access to the property of a part instance (using reflection).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PropGet (
  name ( ... ) // A configuration that returns the name of the property
  part ( ... ) // The instance that contains the property.
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is also cool, because the name we want is in our hash table with the hash code “propName”. So, let’s configure the name property as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;name PartIndexStringGet ( nameStr &quot;propName&quot;
  part PropScopeGet ( nameStr &quot;current&quot; ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is also kinda cool! We are getting the item at index “propName” within the hash table located in the “current” scope property.&lt;/p&gt;

&lt;p&gt;When name is accessed by PropGet, withStr of that part is accessed. As we see above, withStr is set to “marginTop”&lt;/p&gt;

&lt;p&gt;So, in this case, the name of the property being used by PropGet is “marginTop”! The actual part is really easy to access and is configured as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;part PropScopeGet ( nameStr &quot;uxControl&quot; ) ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When the expected value does not equal the actual value, we write something to the console using the ConsoleWriteLine part. It is configured with a very interesting part called a TextFormatter part. This part is easy to configure.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;TextFormatter (
  textStr ( ... ) // the text we need to format.
  parameters ( ... ) // Configured with an array of &quot;named&quot; properties used to format text.
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;One of our parameters is configured as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;insert PartNamedString ( keyStr &quot;@testName@&quot;
  part PropScopeGet ( nameStr &quot;testName&quot; ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This configuration, when called, would return the name of the test, which could be something like “Test001”.&lt;/p&gt;

&lt;p&gt;The textStr in this configuration is defined as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&quot;@testName@: The @propName@ of @uxControlName@ should be @valExp@ but was @actualValue@.&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Basically, the TextFormatter goes through each item in the array, gets the value of the item, matches the string in the text with the keyStr of the item and replaces it. In this case, the part named “@testName@” returns a vale of “Test001”. All matched text is then replaced with “Test001” as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&quot;Test001: The @propName@ of @uxControlName@ should be @valExp@ but was @actualValue@.&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and so on.&lt;/p&gt;

&lt;p&gt;Of course, you could use any format you like for keyStr. We could have just as easily done something like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&quot;&amp;lt;&amp;lt;testName&amp;gt;&amp;gt;: The &amp;lt;&amp;lt;propName&amp;gt;&amp;gt; of &amp;lt;&amp;lt;uxControlName&amp;gt;&amp;gt; should be &amp;lt;&amp;lt;valExp&amp;gt;&amp;gt; but was &amp;lt;&amp;lt;actualValue&amp;gt;&amp;gt;.&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and defined our parameters as:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;insert PartNamedString ( keyStr &quot;&amp;lt;&amp;lt;testName&amp;gt;&amp;gt;&quot;
  part PropScopeGet ( nameStr &quot;testName&quot; ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The really cool part is that we can place any configuration we like within our PartNamedString part property: even another TextFormatter. This is kinda cool because we can end up generating very complex text using such a simple part.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;This blog was supposed to be about creating a view that can easily display collections (aggregates). It turns out we don’t need to define such a view within our framework and can, instead, use our layout engine in conjunction with composition to display collections and aggregates.&lt;/p&gt;

&lt;p&gt;We now have a layout engine that can do just that: display lists of items. We’ve built up a new set of tests to go against a better css layout engine.&lt;/p&gt;

&lt;p&gt;We can now start displaying a configurations visually!&lt;/p&gt;

&lt;h2 id=&quot;next-step&quot;&gt;Next Step&lt;/h2&gt;

&lt;p&gt;The next step is to display our current configuration of Interface Vision visually! This will be a big milestone for us.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-templates-and-factories&quot;&gt;prior step&lt;/a&gt; in our goal of creating Interface Vision’s Gui based visual development environment was to dynamically add controls by using factories (instead of ‘hard coding’ our configuration).&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Templates and Factories for a Gui Based Language</title>
   <link href="http://bloginterfacevision.github.com/design/example-templates-and-factories"/>
   <updated>2014-01-28T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/example-templates-and-factories</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;In all our prior examples, our configuration had windows pre-defined within the ‘canvas’. Instead of configuring the windows within the canvas, we need a way to add to our configuration dynamically.&lt;/p&gt;

&lt;p&gt;To add to our configuration dynamically, we’re going to use factories which ‘build’ things from Templates.&lt;/p&gt;

&lt;h3 id=&quot;the-results&quot;&gt;The Results&lt;/h3&gt;

&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/3bs3ZU-TgsY?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;

&lt;h2 id=&quot;templates&quot;&gt;Templates&lt;/h2&gt;

&lt;p&gt;In computing we consider a template to be:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;a preset format for a document or file, used so that the format does not have to be recreated each time it is used.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Traditionally, software frameworks have to code out the Template functionality to add it to the framework.&lt;/p&gt;

&lt;p&gt;In Interface Vision, Templates are an emergent aspect of the framework. How so?&lt;/p&gt;

&lt;p&gt;Any composition of parts, even if that composition contains only one part, can be used as a Template.&lt;/p&gt;

&lt;p&gt;In prior examples, our &lt;a href=&quot;/design/example-window-move/#complete-application&quot;&gt;complete application&lt;/a&gt; had the windows that showed up on our canvas composed within the canvas:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;UxViewDrawNat ( keyString &quot;canvas&quot; styling &quot;.canvasDoc&quot;
  properties HashTable (
    insert StringKeyString ( keyString &quot;Css&quot;
      withString &quot;{ width: 4000px; height: 4000px; scale-width:100%, scale-height:100% }&quot;
    )
  )
  uxActions ArrayList ( callBehavior true
    insert GesturePinchRecognizer ()
  )
  uxControls ArrayList ( callBehavior true
    insert UxViewDrawNat ( keyString &quot;window01&quot; styling &quot;.windowFrame&quot;
      properties HashTable (
        insert StringKeyString ( keyString &quot;Css&quot;
          withString &quot;{ top: 50px; left: 50px; width: 200px; height: 200px; scale-width:100%, scale-height:100% }&quot;
        )
      )
      uxActions ArrayList ( callBehavior true
        insert GesturePanRecognizerNat ( touchesMinNum 1 )
      )
      uxControls ArrayList ( callBehavior true
        insert UxRectRoundNat ( keyString &quot;winBtnMove&quot; styling &quot;.winBtnMove&quot;
          uxControls UxImageNat ( keyString &quot;winBtnMoveImage&quot;
            properties HashTable ( insert StringKeyLong ( keyLong  &quot;draggable&quot; ) )
            image ImageNat ( fileName Vision.Core.String ( withString &quot;list.png&quot; ) )
          )
        )
        insert04 UxRectRoundNat ( keyString &quot;winBtnResize&quot; styling &quot;.winBtnResize&quot;
          uxControls UxImageNat ( keyString &quot;winBtnResizeImage&quot; 
            properties HashTable ( insert StringKeyLong ( keyLong &quot;resizable&quot; ) )
            image ImageNat ( fileName Vision.Core.String ( withString &quot;resize_0.png&quot; ) )
          )
        )
      )
    )
    insert UxViewDrawNat ( keyString &quot;window02&quot; styling &quot;.windowFrame&quot;
      properties HashTable (
        insert StringKeyString ( keyString &quot;Css&quot;
          withString &quot;{ top: 250px; left: 350px; width: 200px; height: 300px; scale-width:100%, scale-height:100% }&quot;
        )
      )
      uxActions ArrayList ( callBehavior true
        insert GesturePanRecognizerNat ( touchesMinNum 1 )
      )
      uxControls ArrayList ( callBehavior true
        insert UxRectRoundNat ( keyString &quot;winBtnMove&quot; styling &quot;.winBtnMove&quot;
          uxControls UxImageNat ( keyString &quot;winBtnMoveImage&quot;
            properties HashTable ( insert StringKeyLong ( keyLong  &quot;draggable&quot; ) )
            image ImageNat ( fileName Vision.Core.String ( withString &quot;list.png&quot; ) )
          )
        )
        insert04 UxRectRoundNat ( keyString &quot;winBtnResize&quot; styling &quot;.winBtnResize&quot;
          uxControls UxImageNat ( keyString &quot;winBtnResizeImage&quot; 
            properties HashTable ( insert StringKeyLong ( keyLong &quot;resizable&quot; ) )
            image ImageNat ( fileName Vision.Core.String ( withString &quot;resize_0.png&quot; ) )
          )
        )
      )
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As you can see, this is problematic because the configurations for window01 and window02 are the exact same (other than the top, left, width and height css values). What we want to do is make window configurations reusable.&lt;/p&gt;

&lt;p&gt;We make our configuration reusable by placing the configuration within a Factory. We don’t need to explicitly define the configuration as a template.&lt;/p&gt;

&lt;h2 id=&quot;factories&quot;&gt;Factories&lt;/h2&gt;

&lt;p&gt;A Factory is used to create new instances of parts during run time.&lt;/p&gt;

&lt;h3 id=&quot;the-factoryinstance-part&quot;&gt;The FactoryInstance Part&lt;/h3&gt;

&lt;p&gt;The FactoryInstance Part, when given a Template, will create an exact copy of the template. For example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;FactoryInstance (
  part ConsoleWrite (
    text String (
      withString &quot;Hello&quot;
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This configuration does not cause “Hello” to be written to the console. Instead, the configuration returns a new ConsoleWrite part pre-configured with a String Part having “Hello” as the text to write. So, in this case, ConsoleWrite is being used as a template.&lt;/p&gt;

&lt;h2 id=&quot;tap-gesture-creates-a-window&quot;&gt;Tap Gesture Creates a Window&lt;/h2&gt;

&lt;p&gt;For this example, every time a user taps somewhere on the ‘canvas’, we will create a new window. This will replace our existing behavior (which is drawing two windows in known locations).&lt;/p&gt;

&lt;h3 id=&quot;tap-gesture-event&quot;&gt;Tap Gesture Event&lt;/h3&gt;

&lt;p&gt;The configuration for adding the Tap Gesture to the &lt;a href=&quot;/design/example-events-basic&quot;&gt;event system&lt;/a&gt; is as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;EventManager (
  properties HashTable (
    // other configured events like pan and pinch
    insert EventMonitor ( eventToMonitor GestureTap ( eventStep &quot;finished&quot; tapsRequiredNum 1 touchesRequiredNum 1 )
      action PropScopeGet ( nameStr &quot;behaviorTap&quot; )
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In this configuration, if a user taps then the ‘behaviorTap’ configuration will run.&lt;/p&gt;

&lt;h2 id=&quot;tap-gesture-behavior&quot;&gt;Tap Gesture Behavior&lt;/h2&gt;

&lt;p&gt;When a user taps on the ‘canvas’, we want to create a window at the position the user tapped. This will require us to:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;1) Create a new instance of the window&lt;/li&gt;
  &lt;li&gt;2) Set the new window’s top position to the y value of the tap position within the view&lt;/li&gt;
  &lt;li&gt;3) Set the new window’s left position to the x value of the tap position within the view&lt;/li&gt;
  &lt;li&gt;4) Add the newly created window to the view.&lt;/li&gt;
  &lt;li&gt;5) Notify the view that it’s contents have changed so it can redraw.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;using-a-factory-to-create-a-window&quot;&gt;Using a Factory to Create a Window&lt;/h3&gt;

&lt;p&gt;Let’s take the window01 (or window02) configuration and use the configuration as a Template by placing it in a FactoryInstance Part.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;insert PropScopeSet ( nameStr &quot;newWindow&quot; 
  source FactoryInstance (
    part UxViewDrawNat ( styling &quot;.windowFrame&quot;
      properties HashTable (
        insert StringKeyString ( keyString &quot;Css&quot;
          withString &quot;{ top: 0px; left: 0px; width: 200px; height: 200px; scale-width:100%, scale-height:100% }&quot;
        )
      )
      uxActions ArrayList ( callBehavior true
        insert GesturePanRecognizerNat ( touchesMinNum 1 )
      )
      uxControls ArrayList ( callBehavior true
        insert UxRectRoundNat ( keyString &quot;winBtnMove&quot; styling &quot;.winBtnMove&quot;
          uxControls UxImageNat ( keyString &quot;winBtnMoveImage&quot;
            properties HashTable ( insert StringKeyLong ( keyLong  &quot;draggable&quot; ) )
            image ImageNat ( fileName Vision.Core.String ( withString &quot;list.png&quot; ) )
          )
        )
        insert UxRectRoundNat ( keyString &quot;winBtnResize&quot; styling &quot;.winBtnResize&quot;
          uxControls UxImageNat ( keyString &quot;winBtnResizeImage&quot; 
            properties HashTable ( insert StringKeyLong ( keyLong &quot;resizable&quot; ) )
            image ImageNat ( fileName Vision.Core.String ( withString &quot;resize_0.png&quot; ) )
          )
        )
      )
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The only changes to the initial Window configuration is that we set the top and left to 0px (because we will be overriding these anyway).&lt;/p&gt;

&lt;p&gt;We use the result of the Factory and place it in a Scope property named ‘newWindow’. You will see, in the next step, that we place the result of the factory in this scope property so we can update the top/left values before placing the window into the view.&lt;/p&gt;

&lt;h3 id=&quot;updating-top-and-left&quot;&gt;Updating Top and Left&lt;/h3&gt;

&lt;p&gt;We’ve created a copy of our window configuration and now we need to set the top and left values to the x,y position of the tap gesture.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;insert PropSet ( nameStr &quot;withFloat&quot;
  part PropDynamicGet ( nameStr &quot;left&quot;
    part PartHold ( part PropScopeGet ( nameStr &quot;newWindow&quot; ) )
  )
  source PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;position&quot; ) )
)
insert PropSet ( nameStr &quot;withFloat&quot;
  part PropDynamicGet ( nameStr &quot;top&quot;
    part PartHold ( part PropScopeGet ( nameStr &quot;newWindow&quot; ) )
  )
  source PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;position&quot; ) )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The most interesting part of this configuration is the usage of PartHold:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PartHold ( part PropScopeGet ( nameStr &quot;newWindow&quot; ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Part’s in our framework automatically run when used. The scope-property ‘newWindow’ contains our newly created window which is a UxViewDrawNat part. The behavior of this part is to add itself to the parent view. We don’t want to actually run the behavior of the part. We just want to get a reference to it so we can update it’s top and left position.&lt;/p&gt;

&lt;p&gt;This is where the PartHold Part comes in. The PartHold part puts a Part’s behavior “on hold” allowing you to access the part without running it.&lt;/p&gt;

&lt;h3 id=&quot;add-the-newly-created-view&quot;&gt;Add the Newly Created View&lt;/h3&gt;

&lt;p&gt;We’ve created the window and updated the windows top,left position. Now we need to place the part into the array of controls of the parent view.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;insert PropSet ( nameStr &quot;insert&quot;
  part PropGet ( nameStr &quot;uxControls&quot; part PropScopeGet ( nameStr &quot;uxViewFocus&quot; ) )
  source PartHold ( part PropScopeGet ( nameStr &quot;newWindow&quot; ) )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&quot;complete-solution&quot;&gt;Complete Solution&lt;/h2&gt;

&lt;p&gt;The complete configuration for the tap event is provided:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scope (
  properties HashTable (
    // other parts within the global scope
    insert PartNamedString ( keyString &quot;behaviorTap&quot;
      part ArrayList ( callBehavior true
        insert When (
          condition IsEqString (
            leftString &quot;canvas&quot; 
            right WithKeyString ( part PropScopeGet ( nameStr &quot;uxViewFocus&quot; ) )
          )
          action Scope (
            properties HashTable (
              insert PartNamedString ( keyString &quot;newWindow&quot; )
            )
            part ArrayList ( callBehavior true
              // 1. Create window
              insert PropScopeSet ( nameStr &quot;newWindow&quot; 
                source FactoryInstance (
                  part UxViewDrawNat ( styling &quot;.windowFrame&quot;
                    properties HashTable (
                      insert StringKeyString ( keyString &quot;Css&quot;
                        withString &quot;{ top: 0px; left: 0px; width: 200px; height: 200px; scale-width:100%, scale-height:100% }&quot;
                      )
  							  	)
                    uxActions ArrayList ( callBehavior true
                      insert GesturePanRecognizerNat ( touchesMinNum 1 )
                    )
                    uxControls ArrayList ( callBehavior true
                      insert UxRectRoundNat ( keyString &quot;winBtnMove&quot; styling &quot;.winBtnMove&quot;
                        uxControls UxImageNat ( keyString &quot;winBtnMoveImage&quot;
                          properties HashTable ( insert StringKeyLong ( keyLong  &quot;draggable&quot; ) )
                          image ImageNat ( fileName Vision.Core.String ( withString &quot;list.png&quot; ) )
                        )
                      )
                      insert UxRectRoundNat ( keyString &quot;winBtnResize&quot; styling &quot;.winBtnResize&quot;
                        uxControls UxImageNat ( keyString &quot;winBtnResizeImage&quot; 
                          properties HashTable ( insert StringKeyLong ( keyLong &quot;resizable&quot; ) )
                          image ImageNat ( fileName Vision.Core.String ( withString &quot;resize_0.png&quot; ) )
                        )
                      )
                    )
                  )
                )
              )

              // 2. Update Left
              insert PropSet ( nameStr &quot;withFloat&quot;
                part PropDynamicGet ( nameStr &quot;left&quot;
                  part PartHold ( part PropScopeGet ( nameStr &quot;newWindow&quot; ) )
                )
                source PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;position&quot; ) )
              )

              // 3. Update Top
              insert PropSet ( nameStr &quot;withFloat&quot;
                part PropDynamicGet ( nameStr &quot;top&quot;
                  part PartHold ( part PropScopeGet ( nameStr &quot;newWindow&quot; ) )
                )
                source PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;position&quot; ) )
              )

              // 4. Add to control
              insert PropSet ( nameStr &quot;insert&quot;
                part PropGet ( nameStr &quot;uxControls&quot; part PropScopeGet ( nameStr &quot;uxViewFocus&quot; ) )
                source PartHold ( part PropScopeGet ( nameStr &quot;newWindow&quot; ) )
              )

              // 5. Get the view to redraw
              insert PropGet ( nameStr &quot;redraw&quot; part PropScopeGet ( nameStr &quot;uxViewFocus&quot; ) required false )
            )
          )
        )
      )
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Configurations within our framework can be used as Templates allowing us to duplicate any configuration we come up with. In our example, we used a Factory to create new windows that were then added to the ‘canvas’.&lt;/p&gt;

&lt;p&gt;If you find our work interesting, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;next-step&quot;&gt;Next Step&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;/design/css-layout-engine&quot;&gt;next step&lt;/a&gt; in our goal of creating Interface Vision’s Gui based visual development environment is to create a view that can easily display collections (aggregates).&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-zoom-in-out&quot;&gt;prior step&lt;/a&gt; in our goal of creating Interface Vision’s Gui based visual development environment was to allow us to zoom in and out of a view using the pinch gesture.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Zooming And Scaling</title>
   <link href="http://bloginterfacevision.github.com/design/example-zoom-in-out"/>
   <updated>2014-01-23T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/example-zoom-in-out</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Visually representing an entire program could start looking really cluttered. A general rule of design is to keep the number of elements in a group to around 5 +/- 2 &lt;a href=&quot;#id-1&quot;&gt;1&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A program may require hundreds of elements. Our plan is to allow our users to zoom-in and zoom-out on different parts of their program: seeing more detail as they zoom in and less as they zoom out.&lt;/p&gt;

&lt;p&gt;Imagine Google maps, but instead of seeing more detail about roads as you zoom in, you see more details about your program.&lt;/p&gt;

&lt;p&gt;So, we needed to add zoom to our demo.&lt;/p&gt;

&lt;h3 id=&quot;the-results&quot;&gt;The Results&lt;/h3&gt;

&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/eiB8Vpltouc?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;

&lt;h2 id=&quot;ios-vs-osx-drawing&quot;&gt;IOS vs OSX Drawing&lt;/h2&gt;

&lt;h3 id=&quot;coordinate-systems&quot;&gt;Coordinate Systems&lt;/h3&gt;

&lt;p&gt;IOS and OSX use different &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/general/conceptual/Devpedia-CocoaApp/CoordinateSystem.html&quot;&gt;coordinate systems&lt;/a&gt;. For OSX, (0,0) defaults in the lower left hand corner. For iOS, Android and Windows, (0,0) is in the upper left hand corner. We can not “flip” iOS but we can “flip” OSX &lt;a href=&quot;#id-2&quot;&gt;2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We are bringing up this difference between the coordinate system because, throughout the vision framework, we need to take into account OSX’s inverted coordinate system (we want to encapsulate this type of minutia within our development framework so our users can focus on making software).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#id-s1-1-top&quot;&gt;Source-1.1&lt;/a&gt; contains the code necessary to flip the OSX coordinate system.&lt;/p&gt;

&lt;div id=&quot;id-s1-1-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;using System;
using System.Xml.Serialization;

namespace Vision.Ux.Gui {

  [Register(&quot;ViewDrawable&quot;)] public class ViewDrawable : MonoMac.AppKit.NSView {

    /// Other Code 

    /// &amp;lt;summary&amp;gt;
    /// True causes the coordinate system to flip with regards to native coordinate system.
    /// False keeps the operating system&#39;s native coordinate system to be used.
    /// &amp;lt;/summary&amp;gt;
    public override bool IsFlipped {
      get { return true; }
    }

  }
} ###### Source-1.1: We need to flip the drawing coordinates for OSX. {#id-s1-1}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Without overriding IsFlipped and returning true, the output is “flipped” as shown in &lt;a href=&quot;#id-f1-1-top&quot;&gt;Figure-1.1&lt;/a&gt;.&lt;/p&gt;

&lt;div id=&quot;id-f1-1-top&quot;&gt;&amp;nbsp;&lt;/div&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/example_zoom_osx_flipped.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;

&lt;h6 id=&quot;id-s1-1&quot;&gt;Figure-1.1: For OSX, (0,0) is in the lower left hand corner.&lt;/h6&gt;

&lt;h3 id=&quot;events&quot;&gt;Events&lt;/h3&gt;

&lt;p&gt;Interface Vision has it’s own &lt;a href=&quot;/design/example-events-basic&quot;&gt;event system&lt;/a&gt; which we need to send all operating system native events to. The coordinate provided in NSEvent of OSX is based on (0,0) being in the lower left hand corner. Overriding IsFlipped and setting it to true only flips the drawing system. It does not ‘flip’ the native iOS event system.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#id-s1-2-top&quot;&gt;Source-1.2&lt;/a&gt; contains the code required to support pinch in OSX.&lt;/p&gt;

&lt;div id=&quot;id-s1-2-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;using System;
using System.Xml.Serialization;

namespace Vision.Ux.Gui {

  [Register(&quot;ViewDrawable&quot;)] public class ViewDrawable : MonoMac.AppKit.NSView {

    /// Other Code 

    public override void MagnifyWithEvent (NSEvent theEvent) {
      // base.MagnifyWithEvent (theEvent); // We will consume the event here.
      NSView parentViewNative = view.parentView.adaptedPart as NSView;
      if ( null != parentViewNative ) {
        // IsFlipped = true (see below) but pos of event is not flipped so we need to flip it
        Pos2fNat posInViewFound = new Pos2fNat {
          native = this.ConvertPointFromView (theEvent.LocationInWindow, null)
          }; 
        Pos2fNat posInWindowFound = new Pos2fNat {
          native = parentViewNative.ConvertPointFromView (theEvent.LocationInWindow, null)
          };
        eventManager.insert = new GesturePinch {
          eventStep = Event.EventStepProcessing,
          posInView = posInViewFound,
          posInWindow = posInWindowFound,
          view = this.view,
          scale = (1 + theEvent.Magnification),
          velocity = theEvent.Magnification };
      }
    }

  }
} ###### Source-1.2: We need to flip the drawing coordinates for OSX. {#id-s1-2}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The value of theEvent.LocationInWindow zooming in the upper left part of the screen returns something like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;( X=37.41797, Y=945.9766 )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We need to use the following code to “flip” the Location sent by the event:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ConvertPointFromView (theEvent.LocationInWindow, null)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;which gives us:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;( X=37.41797, Y=56.02344 )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The ConvertPointFromView also converts the absolute position of the event location to the logical position within the view.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPinchGestureRecognizer_Class/Reference/Reference.html&quot;&gt;Pinch Gesture&lt;/a&gt; in iOS contains both a scale and velocity value.&lt;/p&gt;

&lt;p&gt;The UIPinchGestureRecognizer.Velocity value in iOS is similar to the NSEvent.Magnification value. However, iOS seems to be about 100 times more sensitive than OXS in it’s velocity value.&lt;/p&gt;

&lt;p&gt;An equivalent scale/magnification between iOS and OSX is:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(UIPinchGestureRecognizer.Velocity/100 + 1) ≈ NSEvent.Magnification
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Just for your enjoyment, &lt;a href=&quot;#id-s1-3-top&quot;&gt;Source-1.3&lt;/a&gt; shows the code necessary to turn an iOS gesture event into an Interface Vision event with the velocity adjusted:&lt;/p&gt;

&lt;div id=&quot;id-s1-3-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;using System;
using System.Xml.Serialization;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using MonoTouch.ObjCRuntime;
using MonoTouch.CoreGraphics;

namespace Vision.Ux {

  [Serializable()] public class GesturePinchRecognizer : GesturePinch {

    protected void gestureAction (UIPinchGestureRecognizer theEvent ) {
      if ( null == theEvent ) {
        UIView parentViewNative = view.parentView.adaptedPart as UIView;
        if (null != parentViewNative) {
          Pos2fNat posInViewFound = new Pos2fNat {
            native = theEvent.LocationInView(theEvent.View)
          };
          Pos2fNat posInWindowFound = new Pos2fNat {
            native = theEvent.LocationInView (parentViewNative)
          };
          eventManager.insert = new GesturePinch {
            eventStep = eventStepFound,
            posInView = posInViewFound,
            posInWindow = posInWindowFound,
            view = this.view,
            scale = theEvent.Scale,
            velocity = theEvent.Velocity/100 + 1,
            };
        }
      }
    }

    protected bool initialized = false;
    [XmlIgnore] public override IPart withPart {
      get {
        if (!initialized) {
          initialized = true;

          UIView view = parentView.adaptedPart as UIView;
          if (null != view) {
            UIPinchGestureRecognizer gesture = new UIPinchGestureRecognizer (gestureAction);
            view.AddGestureRecognizer (gesture);
          }
        }
        return base.withPart;
      }
    }
  }
} ###### Source-1.3: Converting iOS events into Vision events.{#id-s1-3}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In this case, we adjust the velocity provided by iOS so it is close to the magnification value of OSX.&lt;/p&gt;

&lt;p&gt;We are also still using theEvent.LocationInView but not for flipping the coordinate system. In this case, we only need it to convert the absolute position of the event location to the logical position within the view.&lt;/p&gt;

&lt;h3 id=&quot;scaling-and-zooming-controls&quot;&gt;Scaling and Zooming Controls&lt;/h3&gt;

&lt;p&gt;There are a few approaches to scale controls:&lt;/p&gt;

&lt;h4 id=&quot;nsviewscaleunitsquaretosize&quot;&gt;NSView.ScaleUnitSquareToSize&lt;/h4&gt;

&lt;p&gt;This is only available in OS X.&lt;/p&gt;

&lt;p&gt;Use:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;NSView.ScaleUnitSquareToSize (scaleWidth, scaleHeight).
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Although this led to a quick solution initially, there were a few issues. Primarily, and this is also the case for Transformations, everything within the view is scaled. If you want to, for example create resize handles, those controls would also scale.&lt;/p&gt;

&lt;p&gt;Resources and information we found:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://apptree.net/gczoomview.htm&quot;&gt;GCZoomView&lt;/a&gt; - “GCZoomView is a simple NSView subclass that adds a set of standard zoom commands, such as Zoom In, Zoom Out, Zoom To Fit, Zoom to any arbitrary scale, etc.”&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://listarc.com/showthread.php?1574653-scaleUnitSquareToSize&quot;&gt;Discussion&lt;/a&gt; - “Yes. Rather than using bounds scaling and leaving your drawables oblivious to zoom, it is commonly helpful to instead build your architecture to support drawing zoomed into a on unscaled bounds coordinate system. Often you’ll want to draw things in unscaled units (resize handles, selection loops, and the like).”&lt;/li&gt;
  &lt;li&gt;[Discussion 2] (https://groups.google.com/forum/#!msg/cocoa-dev/oprMTlUg4-A/FbJjnpCY4LoJ) - Some example code on zooming and keeping the zoom positioned relative to the mouse/finger coordinates.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;use-transformations&quot;&gt;Use Transformations&lt;/h4&gt;

&lt;p&gt;Available for both iOS and OSX.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;NSView p_view = new NSView ();
p_view.WantsLayer = true; // FOR OSX
p_view.Layer.Transform = CATransform3D.MakeScale(scaleWidthFound, scaleHeightFound, 1.0f);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This can lead to fuzzy looking images still requiring some custom logic. However, it does work for both iOS and OSX. This also has the issue of scaling controls like resize handles.&lt;/p&gt;

&lt;h4 id=&quot;roll-out-a-custom-solution&quot;&gt;Roll Out A Custom Solution&lt;/h4&gt;

&lt;p&gt;We wanted to simply use one of the zooming solutions provided by either iOS or OSX. These work great if you are trying to zoom a single entity (say an image). But, when you need to support zooming of a hierarchy of controls, this just doesn’t seem to cut it.&lt;/p&gt;

&lt;p&gt;So, we’ve rolled out our own solution. This isn’t as crazy as it sounds. We had an existing CSS Layout Engine that had hundreds of tests. We added more tests building out scaling as part of the layout engine.&lt;/p&gt;

&lt;h3 id=&quot;the-configuration---scaling&quot;&gt;The Configuration - Scaling&lt;/h3&gt;

&lt;p&gt;We needed to change our configuration to support zoom through the pinch gesture by scaling our controls. Scaling the controls had an affect on our existing move and resize code. When resized or moved, controls scaled by a factor of two would visually move twice as fast as the mouse pointer/finger.&lt;/p&gt;

&lt;p&gt;Even more interesting is that we support scaling within scaling. So, a parent view may be zoomed at 1.5 times while the child view is zoomed at 1.25 times. This means that the controls in the child view need to resize based on the scale factors of all parent controls.&lt;/p&gt;

&lt;p&gt;In the &lt;a href=&quot;/design/example-resize-window/#position-delta-config&quot;&gt;resizing windows&lt;/a&gt; post, we had refactored our code so the configuration to move and resize controls was re-usable. We need to update this configuration so it also takes into account scaling.&lt;/p&gt;

&lt;p&gt;Let’s first update our shared delta configuration to adjust for the scaling.&lt;/p&gt;

&lt;p&gt;the left of the window:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PartNamedString ( nameStr &quot;posDeltaX&quot;
  part Divide (
    left Add (
      left PropDynamicGet ( nameStr &quot;left&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
      right Subtract (
        left PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
        right PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
      )
    )
    right PropScopeGet ( nameStr &quot;curScaleWidth&quot; )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;the top of the window.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PartNamedString ( nameStr &quot;posDeltaY&quot;
  part Divide (
    left Add (
      left PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
      right Subtract (
        left PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
        right PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
      )
    )
    right PropScopeGet ( nameStr &quot;curScaleHeight&quot; )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Basically, we divide our delta by the scale. We get the current scaled width and height from the scope properties named curScaleWidth and curScaleHeight.&lt;/p&gt;

&lt;p&gt;Now all we need to do is figure out how to use the correct scales based on a move or resize action.&lt;/p&gt;

&lt;p&gt;So, how do we define the curScaleWidth and curScaleHeight properties?&lt;/p&gt;

&lt;h4 id=&quot;where-interface-vision-really-shines&quot;&gt;Where Interface Vision Really Shines&lt;/h4&gt;

&lt;p&gt;In our &lt;a href=&quot;/design/example-resize-window/#shared-resize-move&quot;&gt;resizing windows&lt;/a&gt;, we were able to share the configuration to resize and move windows by nesting Scope.&lt;/p&gt;

&lt;p&gt;The behavior to calculate the deltaX and deltaY needs to be altered based on action being taken: move/resize or zoom.&lt;/p&gt;

&lt;p&gt;We add to this nested scope the curScaleWidth and curScaleHeight properties.&lt;/p&gt;

&lt;p&gt;For moving and resizing scaleHeightCalc and scaleWidthCalc are added:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;insert Scope (
  properties HashTable (
    insert StringKeyString ( keyString &quot;scopeHeight&quot; withString = &quot;top&quot; )
    insert StringKeyString ( keyString &quot;scopeWidth&quot; withString = &quot;left&quot; )
			insert PartNamedString ( keyString &quot;curScaleHeight&quot;
      part PropGet ( nameStr &quot;scaleHeightCalc&quot;
        part = new PropGet ( nameStr = &quot;parentUxControl&quot; part PropScopeGet ( nameStr &quot;uxViewFocus&quot; ) )
      )
    )
    insert PartNamedString ( keyString &quot;curScaleHeight&quot;
      part PropGet ( nameStr &quot;scaleWidthCalc&quot;
        part = new PropGet ( nameStr = &quot;parentUxControl&quot; part PropScopeGet ( nameStr &quot;uxViewFocus&quot; ) )
      )
    )
  )
  part PropScopeGet ( nameStr &quot;viewResMov&quot; )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For zooming  scaleHeightCalc and scaleWidthCalc are different:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;insert Scope (
  properties HashTable (
    insert StringKeyString ( keyString &quot;scopeHeight&quot; withString = &quot;top&quot; )
    insert StringKeyString ( keyString &quot;scopeWidth&quot; withString = &quot;left&quot; )
    insert PartNamedString ( keyString &quot;curScaleHeight&quot;
      part PropGet { nameStr = &quot;scaleHeightCalc&quot; part PropScopeGet ( nameStr &quot;uxViewFocus&quot; ) )
    )
			insert PartNamedString ( keyString &quot;curScaleWidth&quot;
      part PropGet { nameStr = &quot;scaleWidthCalc&quot; part PropScopeGet ( nameStr &quot;uxViewFocus&quot; ) )
    )
  )
  part PropScopeGet ( nameStr &quot;viewResMov&quot; )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This may sound a bit too forward, but it is the ability for Interface Vision to do what we just did that makes it just so amazing as a technology and framework.&lt;/p&gt;

&lt;p&gt;The behavior for moving and scaling are different but there are no conditions to choose which behavior to use specific to scaling. We are able to alter the behavior of posDeltaX and posDeltaY by simply configuring different behavior in the curScaleHeight and curScaleWidth scope properties. From the perspective of deltaX and deltaY, the property is just a property with some value. The actual behavior used to calculate the value returned by the property is ‘unknowingly’ used by the deltaX and deltaY configuration.&lt;/p&gt;

&lt;p&gt;Also cool to note, configuration for supporting scaling required no additional conditions: just adjustments to existing configurations. It is advantageous to lower the number of conditions in a program for different reasons (less logic to test, easier to read, etc.). In our case, it is greatly advantageous because it greatly simplifies the visual representation of programs.&lt;/p&gt;

&lt;h3 id=&quot;the-configuration---zooming&quot;&gt;The Configuration - Zooming&lt;/h3&gt;

&lt;p&gt;Finally, we are ready to zoom-in and out using the pinch gesture.&lt;/p&gt;

&lt;p&gt;The configuration of the events within the event manager are very similar to the configuration of panning and resizing.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;EventManager (
  // ... 
  insert EventMonitor (
    eventToMonito GesturePinch ( eventStep &quot;Begin&quot; )
    action PropScopeGet ( nameStr &quot;behaviorPinch&quot; )
  )
  insert EventMonitor (
    eventToMonito GesturePinch ( eventStep &quot;Processing&quot; )
    action PropScopeGet ( nameStr &quot;behaviorPinch&quot; )
  )
  insert EventMonitor (
    eventToMonito GesturePinch ( eventStep &quot;Finished&quot; )
    action PropScopeGet ( nameStr &quot;behaviorPinch&quot; )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Our action, in all three cases, causes the behavior named ‘behaviorPinch’ to run. We don’t need to really worry about the beginning, processing and finished steps of the event.&lt;/p&gt;

&lt;p&gt;The configuration (named behaviorPinch) to handle the actual scaling is also similar to the pan behavior within our global scope.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scope (
  // ... Other configurations
  insert PartNamedString ( keyString &quot;behaviorPinch&quot;
    part ArrayList ( callBehavior true
      insert PropScopeSet ( nameStr &quot;uxViewFocus&quot;
        source PropGet ( nameStr &quot;view&quot;
          part PropScopeGet ( nameStr &quot;eventCurrent&quot; )
        )
      )
      insert PropSet ( nameStr &quot;withFloat&quot;
        part PropDynamicGet ( nameStr &quot;scale-height&quot;
          part PropScopeGet ( nameStr &quot;uxViewFocus&quot; )
        )
        source = new Multiply (
          left PropDynamicGet ( nameStr &quot;scale-height&quot;
            part PropScopeGet ( nameStr &quot;uxViewFocus&quot; )
          ) 
          right PropGet ( nameStr &quot;velocity&quot;
            part PropScopeGet ( nameStr &quot;eventCurrent&quot; )
          )
        )
      )
      insert PropSet ( nameStr &quot;withFloat&quot;
        part PropDynamicGet ( nameStr &quot;scale-width&quot;
          part PropScopeGet ( nameStr &quot;uxViewFocus&quot; )
        )
        source = new Multiply (
          left PropDynamicGet ( nameStr &quot;scale-width&quot;
            part PropScopeGet ( nameStr &quot;uxViewFocus&quot; )
          ) 
          right PropGet ( nameStr &quot;velocity&quot;
            part PropScopeGet ( nameStr &quot;eventCurrent&quot; )
          )
        )
      )
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In this case, we are adjusting the scale-width and scale-height dynamic-properties of the view that has focus:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PropDynamicGet ( nameStr &quot;scale-width&quot; part PropScopeGet ( nameStr &quot;uxViewFocus&quot; ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;These values are used within the CSS Layout engine to scale the final values for width, height, left, top of controls (it also scales margin, border and padding values). There is actually no CSS property for scaling in the official CSS3 standards making the layout engine non-compatible with CSS3.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Although we wanted to use scaling solutions provided by iOS and OSX, we just couldn’t make it work with the features we needed for our customers. That isn’t to say we won’t be enabling our users to use iOS and OSX’s Transformation features within their configurations. That will be provided.&lt;/p&gt;

&lt;p&gt;The solution worked really well by updating the CssLayoutEngine to support scaling.&lt;/p&gt;

&lt;p&gt;If you find our work interesting, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;next-step&quot;&gt;Next Step&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-templates-and-factories&quot;&gt;next step&lt;/a&gt; in our goal of creating Interface Vision’s Gui based visual development environment is to dynamically add controls by using factories (instead of ‘hard coding’ our configuration).&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-resize-window&quot;&gt;prior step&lt;/a&gt; was to do further refactoring and allow resizing of windows.&lt;/p&gt;

&lt;h2 id=&quot;footnotes&quot;&gt;Footnotes&lt;/h2&gt;

&lt;p&gt;{#id-1} 1. You may want to checkout this interesting article on &lt;a href=&quot;http://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two&quot;&gt;The Magical Number Seven Plus Or Minus Two&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;{#id-2} 2. This isn’t exactly true. It is possible to use transformation matrices to “flip” the layer we are drawing on using Apple’s &lt;a href=&quot;https://developer.apple.com/library/ios/documentation/Cocoa/Reference/CoreAnimation_functions/Reference/reference.html&quot;&gt;Core Animation framework&lt;/a&gt;.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Resizing Windows and Configuration Re-Use</title>
   <link href="http://bloginterfacevision.github.com/design/example-resize-window"/>
   <updated>2014-01-16T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/example-resize-window</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;I was planning on blogging about zooming in and out but it’s been a challenge (which I will talk about in detail when we do get it working).&lt;/p&gt;

&lt;p&gt;So, we’ve taken a quick detour and decided to add resizing of windows. This was surprisingly simple in Interface Vision. We also did some refactoring to take advantage of the ability for properties to contain behavior.&lt;/p&gt;

&lt;h3 id=&quot;the-results&quot;&gt;The Results&lt;/h3&gt;

&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/mhfJohCRCrg?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;

&lt;h2 id=&quot;calculating-how-much-we-moved-our-mousefinger&quot;&gt;Calculating How Much We Moved Our Mouse/Finger&lt;/h2&gt;

&lt;p&gt;In our post on &lt;a href=&quot;/design/example-window-move&quot;&gt;draggable controls&lt;/a&gt;, we needed to calculate the difference between where the mouse/finger is and where it was. We could then add this delta to the windows left top corner giving us the new window position.&lt;/p&gt;

&lt;p&gt;Our initial configuration, using &lt;a href=&quot;/design/design-composition-based-language&quot;&gt;SipCoffee&lt;/a&gt; to adjust:&lt;/p&gt;

&lt;p&gt;the left of the window:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Add (
  left PropDynamicGet ( nameStr &quot;left&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
  right Subtract (
    left PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
    right PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;the top of the window.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Add (
  left PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
  right Subtract (
    left PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
    right PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Resizing a window will also require knowing the distance a Mouse/Finger moved. So, let’s turn the delta behavior into something that is re-usable.&lt;/p&gt;

&lt;p&gt;{#position-delta-config}
First, let’s add the delta behavior to the program’s scope calling them ‘posDeltaX’ and ‘posDeltaY’ so they can be re-used in other parts of the configuration:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scope (
  properties HashTable (
    ... // other properites here
    insert PartNamedString ( keyString &quot;posDeltaX&quot;
      part Subtract (
        left PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
        right PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
      )
    )
    insert PartNamedString ( keyString &quot;posDeltaY&quot;
      part Subtract (
        left PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
        right PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
      )
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and now let’s re-factor our Add to use the “named” behavior:&lt;/p&gt;

&lt;p&gt;for left:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Add (
  left PropDynamicGet ( nameStr &quot;left&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
  right PropScopeGet ( nameStr &quot;posDeltaX&quot; )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;for top:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Add (
  left PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
  right PropScopeGet ( nameStr &quot;posDeltaY&quot; )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is looking a lot better. When Add.right is accessed, PropScopeGet is run. ProprScopeGet causes the behavior in posDeltaX or posDeltaY to run causing the subtraction.&lt;/p&gt;

&lt;p&gt;How very interesting. The subtraction behavior has access to posDeltaX and posDeltaY even though it was defined outside of the Scope’s part property. How does that work?&lt;/p&gt;

&lt;h3 id=&quot;the-scope-part-is-nest-able&quot;&gt;The Scope Part Is Nest-able&lt;/h3&gt;

&lt;p&gt;One of the cool things about Scope Parts is that they are nest-able: scopes can contain scope.&lt;/p&gt;

&lt;div id=&quot;id-f1-1-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/example_scope_nesting.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;###### Figure-1.1: Scopes can nest allowing behavior to access properties of any scope ‘above’ them. {#id-f1-1}&lt;/p&gt;

&lt;p&gt;This is really powerful because behavior, even configured outside of the scope, run within a scope has access to that scope’s properties and any scope ‘above’ the behavior.&lt;/p&gt;

&lt;h2 id=&quot;moving-and-resizing-windows&quot;&gt;Moving And Resizing Windows&lt;/h2&gt;

&lt;p&gt;To move a window, we take our deltas (posDeltaX and posDeltaX) and we add them to the top, left corner of the window.
To resize a window, we take that same delta and add it to the width and height of the window.&lt;/p&gt;

&lt;p&gt;We can re-use the exact same logic as we did for moving a window but replace “top” (of the window) with “height” (of the window) and “left” with “width”.&lt;/p&gt;

&lt;p&gt;First, let’s create a configuration, placed within the main scope, that can both resize and move a window:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scope (
  properties HashTable (
    ... // other properites here
    insert PartNamedString ( keyString &quot;viewResMov&quot;
      part ArrayList ( callBehavior true
        insert PropSet ( nameStr &quot;withFloat&quot;
          part PropDynamicGet ( name PropScopeGet ( nameStr &quot;scopeHeight&quot; )
            part PropScopeGet ( nameStr &quot;uxViewFocus&quot; )
          )
          source Add (
            left PropDynamicGet ( name PropScopeGet ( nameStr &quot;scopeHeight&quot; )
              part PropScopeGet ( nameStr &quot;uxViewFocus&quot; )
            )
            right PropScopeGet ( nameStr &quot;posDeltaY&quot; )
          )
        )
        insert PropSet ( nameStr &quot;withFloat&quot;
          part PropDynamicGet ( name PropScopeGet ( nameStr &quot;scopeWidth&quot; )
            part PropScopeGet ( nameStr &quot;uxViewFocus&quot; )
          )
          source Add (
            left PropDynamicGet ( name PropScopeGet ( nameStr &quot;scopeWidth&quot; )
              part PropScopeGet ( nameStr &quot;uxViewFocus&quot; )
            )
            right PropScopeGet ( nameStr &quot;posDeltaX&quot; )
          )
        )
      )
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The interesting part is that original configurations for PropDynamicGet had “hard coded” the name of the property to get: in this case “hard coded” to “top”.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The new configuration gets the name of the property using PropScopeGet:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PropDynamicGet ( name PropScopeGet ( nameStr &quot;scopeHeight&quot; )
  part PropScopeGet ( nameStr &quot;uxViewFocus&quot; )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;{#shared-resize-move}&lt;/p&gt;

&lt;p&gt;All we have to do then is run our configuration within a Scope that has an extended-property named “scopeHeight”. Our original configuration for moving windows was &lt;a href=&quot;/design/example-shared-configuration#configuring-properties&quot;&gt;here&lt;/a&gt;. Let’s see what our changes have done:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;insert PartNamedString ( keyString &quot;behaviorPanProcEnd&quot;
  part ArrayList ( callBehavior true
    insert PropScopeSet ( nameStr &quot;positionPrior&quot;
      source PropGet ( nameStr &quot;posInWindow&quot; part PropScopeGet ( nameStr &quot;eventCurrent&quot; ) )
    )
    insert When (
      condition IsNotNil ( part PropDynamicGet ( nameStr &quot;draggable&quot; required false part PropScopeGet ( nameStr &quot;controlFocus&quot; )) )
      action ArrayList ( callBehavior true
        insert Scope (
          properties HashTable (
            insert StringKeyString ( keyString &quot;scopeHeight&quot; withString = &quot;top&quot; )
            insert StringKeyString ( keyString &quot;scopeWidth&quot; withString = &quot;left&quot; )
          )
          part PropScopeGet ( nameStr &quot;viewResMov&quot; )
        )
      )
    )
    insert When (
      condition IsNotNil ( part PropDynamicGet ( nameStr &quot;draggable&quot; required false part PropScopeGet ( nameStr &quot;controlFocus&quot; )) )
      action ArrayList ( callBehavior true
        insert Scope (
          properties HashTable (
            insert StringKeyString ( keyString &quot;scopeHeight&quot; withString = &quot;height&quot; )
            insert StringKeyString ( keyString &quot;scopeWidth&quot; withString = &quot;width&quot; )
          )
          part PropScopeGet ( nameStr &quot;viewResMov&quot; )
        )
      )
   )
)        
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We can now re-use the “viewResMov” behavior for both moving and resizing windows.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;We’ve been able to further refactor or configuration to improve on re-use by taking advantage of the nesting feature of Scope. We’ll probably write a post on how nesting Scope is so much more awesome than relying on the function calling chain: passing information through parameters all the way down.&lt;/p&gt;

&lt;p&gt;If you find our work interesting, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;next-step&quot;&gt;Next Step&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-zoom-in-out&quot;&gt;next step&lt;/a&gt; in our goal of creating Interface Vision’s Gui based visual development environment is to allow us to zoom in and out of a view using the pinch gesture.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-shared-configuration&quot;&gt;prior step&lt;/a&gt; allows us to ‘re-use’ parts of a configuration.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Configuration re-use</title>
   <link href="http://bloginterfacevision.github.com/design/example-shared-configuration"/>
   <updated>2014-01-14T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/example-shared-configuration</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;A goal of programming is to create code that is re-usable.&lt;/p&gt;

&lt;p&gt;That is, we are able to generalize a behavior required in a software system, write code to implement that behavior, and then re-use that code throughout the software system.&lt;/p&gt;

&lt;p&gt;Interface Vision is able to configure behavior that can be re-used throughout the program.&lt;/p&gt;

&lt;h2 id=&quot;the-approach&quot;&gt;The Approach&lt;/h2&gt;

&lt;p&gt;In our post on &lt;a href=&quot;/design/example-window-move&quot;&gt;draggable controls&lt;/a&gt;, we had some configurations that were redundant. That is, the exact same configuration was found in more than one place within the configuration.&lt;/p&gt;

&lt;p&gt;We want to place this duplicated configuration in some area within our program and make it accessible to other areas of our program. This should allow us to re-use that configuration as needed.&lt;/p&gt;

&lt;p&gt;It turns out we don’t need to do anything to support re-use within Interface Vision. Re-use is an emergent feature (&lt;a href=&quot;http://en.wikipedia.org/wiki/Emergent_behavior&quot;&gt;emergent behavior&lt;/a&gt;) of our technology.&lt;/p&gt;

&lt;p&gt;Let’s see how it works.&lt;/p&gt;

&lt;h2 id=&quot;behavior-re-use-in-interface-vision&quot;&gt;Behavior Re-use in Interface Vision&lt;/h2&gt;

&lt;p&gt;If you recall, we were able to &lt;a href=&quot;/design/example-window-move#declaring-variables&quot;&gt;declare variables&lt;/a&gt; in Interface Vision as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scope (
  properties HashTable (
    insert PartNamedString ( keyString &quot;eventCurrent&quot; )
    // other variables within the scope
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In this case, we have declared a scope variable named eventCurrent.&lt;/p&gt;

&lt;p&gt;What we didn’t mention is that a variable, and really any property for that matter, can contain more than just information. In fact, a variable (or property) can also contain behavior.&lt;/p&gt;

&lt;p&gt;{#configuring-properties}
## Configuring Properties So They Can Contain Behavior&lt;/p&gt;

&lt;p&gt;Let’s take the behavior we want to make re-usable and place that behavior in Scope variables:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scope (
  // .. other scope variables 
  insert PartNamedString ( keyString &quot;behaviorPanBegin&quot;
    part ArrayList ( callBehavior true
      insert PropScopeSet ( nameStr &quot;eventBegin&quot; source PropScopeGet ( nameStr &quot;eventCurrent&quot; ) )
      insert PropScopeSet ( nameStr &quot;eventPrior&quot; source PropScopeGet ( nameStr &quot;eventCurrent&quot; ) )
      insert PropScopeSet ( nameStr &quot;viewFocus&quot;
        source PropGet ( nameStr &quot;view&quot;
          part PropScopeGet ( nameStr &quot;eventCurrent&quot; )
        )
      )
      insert PropScopeSet ( nameStr &quot;positionPrior&quot;
        source PropGet ( nameStr &quot;posInWindow&quot;
          part PropScopeGet ( nameStr &quot;eventCurrent&quot; )
        )
      )
      insert PropScopeSet ( nameStr &quot;controlFocus&quot; sourceRequired false
        source UxControlAtPoint ( returnView false
          position PropGet ( nameStr &quot;posInView&quot;
            part PropScopeGet ( nameStr &quot;eventCurrent&quot;)
          )
          shapes PropScopeGet ( nameStr &quot;viewFocus&quot; )
        )
      )
    )
  )
  insert PartNamedString ( keyString &quot;behaviorPanProcEnd&quot;
    part ArrayList ( callBehavior true
      insert PropScopeSet ( nameStr &quot;positionPrior&quot;
        source PropGet ( nameStr &quot;posInWindow&quot; part PropScopeGet ( nameStr &quot;eventCurrent&quot; ) )
      )
      insert When (
        condition IsNotNil ( part PropDynamicGet ( nameStr &quot;draggable&quot; required false part PropScopeGet ( nameStr &quot;controlFocus&quot; )) )
        action ArrayList ( callBehavior true
          insert PropSet ( nameStr &quot;withFloat&quot;
            part PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
            source Add (
              left PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
              right Subtract (
                left PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
                right PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
              )
            )
          )
          insert PropSet ( nameStr &quot;withFloat&quot;
            part PropDynamicGet ( nameStr &quot;left&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
            source Add (
              left PropDynamicGet ( nameStr &quot;left&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
              right Subtract (
                left PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
                right PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
              )
            )
          )
          insert PropScopeSet ( nameStr &quot;eventPrior&quot; source PropScopeGet ( nameStr &quot;eventCurrent&quot; ) ) 
          insert PropScopeSet ( nameStr &quot;positionPrior&quot; source PropScopeGet ( nameStr &quot;position&quot; ) ) 
        )
      )
    )
  )
  // .. other scope variables       
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We’ve defined two scope variables named ‘behaviorPanBegin’ and ‘behaviorPanProcEnd’. The “Part” contained within the part property of PartNamedString are the same configurations we had defined in our prior post.&lt;/p&gt;

&lt;h2 id=&quot;using-properties-with-behavior&quot;&gt;Using Properties With Behavior&lt;/h2&gt;

&lt;p&gt;Original, the above behavior was configured within our EventManager. Let’s see how we access that behavior now that it is defined outside of the EventManager:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;EventManager ( keyString &quot;PropEventManager&quot;
  properties HashTable {
    insert EventMonitor (
      eventToMonitor GesturePanEventNat ( eventStep &quot;Begin&quot; touchesMinVal 1 )
      action PropScopeGet ( nameStr &quot;behaviorPanBegin&quot; )
    )
    insert EventMonitor (
      eventToMonitor GesturePanEventNat ( eventStep &quot;Processing&quot; touchesMinVal 1 )
      action PropScopeGet ( nameStr &quot;behaviorPanProcEnd&quot; )
    )
    insert EventMonitor (
      eventToMonitor GesturePanEventNat ( eventStep &quot;End&quot; touchesMinVal 1 )
      action PropScopeGet ( nameStr &quot;behaviorPanProcEnd&quot; )
    )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That’s it. All we have to do, for the action of the EventMonitor Part we are defining, is access the scope variable by calling PropScopeGet. Using PropScopeGet causes the configuration located within the part property to run.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Configuring behavior that is re-usable is really easy in Interface Vision. 
If you find our work interesting, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;next-step&quot;&gt;Next Step&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-resize-window&quot;&gt;next step&lt;/a&gt; is to do further refactoring and allow a window to be resized.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-window-move&quot;&gt;prior step&lt;/a&gt; was to create a configuration to allow us to drag controls around on the screen..&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Configurable Dragging of Gui Controls</title>
   <link href="http://bloginterfacevision.github.com/design/example-window-move"/>
   <updated>2014-01-13T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/example-window-move</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;This took a little longer to get working than we thought it would. There really are quite a few differences between iOS and OSX. Getting them to work using the same configuration was a bit of a challenge.&lt;/p&gt;

&lt;p&gt;In this post, we are going to show how we used our [configurable event system] (/design/example-events-basic) to configure the dragging of controls.&lt;/p&gt;

&lt;h3 id=&quot;the-results&quot;&gt;The Results&lt;/h3&gt;

&lt;iframe width=&quot;746&quot; height=&quot;420&quot; src=&quot;http://www.youtube.com/embed/hQPRShW7Qfc?vq=hd1080&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;

&lt;h3 id=&quot;the-approach&quot;&gt;The Approach&lt;/h3&gt;

&lt;p&gt;We want a user to be able to drag controls around on a screen using a button attached to the window.&lt;/p&gt;

&lt;p&gt;We will use the Pan Gesture with a single finger touch and apply the following logic:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;At the beginning of the Pan gesture, we set a prior event to the current event (automatically set by the event system). If there is a control at the position of the current event, we set a reference at this step.&lt;/li&gt;
  &lt;li&gt;During the processing of the Pan gesture, we check if the current control is marked “draggable”. If the control is draggable, we update the view’s frame position based on the distance a mouse/finger moved.&lt;/li&gt;
  &lt;li&gt;We then update the prior position to the current position (for the next pan gesture).&lt;/li&gt;
  &lt;li&gt;During the ending of the Pan gesture, we also update the view’s frame position for that last little movement.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;{#complete-application}
### The Complete Configuration&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#id-s1-1-top&quot;&gt;Configuration-1.1&lt;/a&gt; contains the complete configuration in [SipCoffee] (/design/design-composition-based-language) for an application that runs on iOS and OSX devices that allows controls to be dragged around in a scrollable canvas. The complete configuration is broken down and explained in detail below.&lt;/p&gt;

&lt;p&gt;Please note that this is a complete application, excluding the CSS, that is able to define the entire behavior of a cross platform application with a GUI user experience configured in around 110 lines &lt;a href=&quot;#id-1&quot;&gt;1&lt;/a&gt;. &lt;/p&gt;

&lt;div id=&quot;id-s1-1-top&quot;&gt;&amp;nbsp;&lt;/div&gt;

&lt;pre&gt;&lt;code&gt;Scope (
  properties HashTable ( // Contains the &#39;variables&#39; for this Scope.
    insert PartNamedString ( keyString &quot;eventCurrent&quot; ) // current event
    insert PartNamedString ( keyString &quot;eventPrior&quot; ) // prior event
    insert PartNamedString ( keyString &quot;viewFocus&quot; ) // view with focus
    insert PartNamedString ( keyString &quot;controlFocus&quot; ) // control with focus
    insert PartNamedString ( keyString &quot;position&quot; ) // current event position
    insert PartNamedString ( keyString &quot;positionPrior&quot; ) prior event position
    insert CssManager ( ... )
    insert EventManager ( keyString &quot;PropEventManager&quot;
      properties HashTable (
        insert EventMonitor (
          eventToMonitor GesturePan ( eventStep &quot;Begin&quot; touchesMin 1 )
          action ArrayList ( callBehavior true
            insert PropScopeSet ( nameStr &quot;eventBegin&quot; source PropScopeGet ( nameStr &quot;eventCurrent&quot; ) )
            insert PropScopeSet ( nameStr &quot;eventPrior&quot; source PropScopeGet ( nameStr &quot;eventCurrent&quot; ) )
            insert PropScopeSet ( nameStr &quot;viewFocus&quot;
              source PropGet ( nameStr &quot;view&quot;
                part PropScopeGet ( nameStr &quot;eventCurrent&quot; )
              )
            )
            insert PropScopeSet ( nameStr &quot;positionPrior&quot;
              source PropGet ( nameStr &quot;posInWindow&quot;
                part PropScopeGet ( nameStr &quot;eventCurrent&quot; )
              )
            )
            insert PropScopeSet ( nameStr &quot;controlFocus&quot; sourceRequired false
              source UxControlAtPoint ( returnView false
                position PropGet ( nameStr &quot;posInView&quot;
                  part PropScopeGet ( nameStr &quot;eventCurrent&quot;)
                )
                shapes PropScopeGet ( nameStr &quot;viewFocus&quot; )
              )
            )
          )
        )
        insert EventMonitor (
          eventToMonitor GesturePan ( eventStep &quot;Processing&quot; touchesMin 1 )
          action ArrayList ( callBehavior true
            insert PropScopeSet ( nameStr &quot;positionPrior&quot;
              source PropGet ( nameStr &quot;posInWindow&quot; part PropScopeGet ( nameStr &quot;eventCurrent&quot; ) )
            )
            insert When (
              condition IsNotNil ( part PropDynamicGet ( nameStr &quot;draggable&quot; required false part PropScopeGet ( nameStr &quot;controlFocus&quot; )) )
              action ArrayList ( callBehavior true
                insert PropSet ( nameStr &quot;withFloat&quot;
                  part PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
                  source Add (
                    left PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
                    right Subtract (
                      left PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
                      right PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
                    )
                  )
                )
                insert PropSet ( nameStr &quot;withFloat&quot;
                  part PropDynamicGet ( nameStr &quot;left&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
                  source Add (
                    left PropDynamicGet ( nameStr &quot;left&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
                    right Subtract (
                      left PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
                      right PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
                    )
                  )
                )
                insert PropScopeSet ( nameStr &quot;eventPrior&quot; source PropScopeGet ( nameStr &quot;eventCurrent&quot; ) ) 
                insert PropScopeSet ( nameStr &quot;positionPrior&quot; source PropScopeGet ( nameStr &quot;position&quot; ) ) 
              )
            )
          )
        )
        insert EventMonitor (
          eventToMonitor GesturePan ( eventStep &quot;End&quot; touchesMin 1 )
          action ArrayList ( callBehavior true
            insert PropScopeSet ( nameStr &quot;positionPrior&quot;
              source PropGet ( nameStr &quot;posInWindow&quot; part PropScopeGet ( nameStr &quot;eventCurrent&quot; ) )
            )
            insert When (
              condition IsNotNil ( part PropDynamicGet ( nameStr &quot;draggable&quot; required false part PropScopeGet ( nameStr &quot;controlFocus&quot; )) )
              action ArrayList ( callBehavior true
                insert PropSet ( nameStr &quot;withFloat&quot;
                  part PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
                  source Add (
                    left PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
                    right Subtract (
                      left PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
                      right PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
                    )
                  )
                )
                insert PropSet ( nameStr &quot;withFloat&quot;
                  part PropDynamicGet ( nameStr &quot;left&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
                  source Add (
                    left PropDynamicGet ( nameStr &quot;left&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
                    right Subtract (
                      left PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
                      right PropGet ( nameStr &quot;x&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
                    )
                  )
                )
                insert PropScopeSet ( nameStr &quot;eventPrior&quot; source PropScopeGet ( nameStr &quot;eventCurrent&quot; ) ) 
                insert PropScopeSet ( nameStr &quot;positionPrior&quot; source PropScopeGet ( nameStr &quot;position&quot; ) ) 
              )
            )
          )              
        )
      )
    )
  )
  part AppNat (
    action UxWindowNat (
      titleStr &quot;Interface Vision&quot;
      frame RectanglefFixed ( x 10 y 10 width 768 height 1024 )
      uxControls UxViewPrimaryNat ( styling &quot;.windowNative&quot;
        statusBarHiddenBool true
        uxControls UxViewScrollable ( styling &quot;.canvas&quot;
          scrollVerticalAllowedBool true
          scrollHorizontalAllowedBool true
          uxControls UxViewDrawNat ( styling &quot;.canvasDoc&quot;
            properties HashTable (
              insert StringKeyString ( keyString &quot;Css&quot;
                withString &quot;{ width: 4000px; height: 4000px }&quot;
              )
            )
            uxControls ArrayList ( callBehavior true
              insert UxViewDrawNat ( styling &quot;.windowFrame&quot;
                properties HashTable (
                  insert StringKeyString ( keyString &quot;Css&quot;
                    withString &quot;{ top: 50px; left: 50px; width: 200px; height: 200px }&quot;
                  )
                )
                uxActions GesturePanRecognizerNat ( touchesMinVal 1 )
                uxControls UxRectRoundNat ( styling &quot;.windowButton&quot;
                    uxControls UxImageNat (
                      properties HashTable ( insert StringKeyString ( keyString &quot;draggable&quot; ) )
                      image ImageNat ( fileName Vision.Core.String ( withString &quot;list.png&quot; ) )
                    )
                )
              )
              insert UxViewDrawNat ( styling &quot;.windowFrame&quot;
                properties HashTable (
                  insert StringKeyString ( keyString &quot;Css&quot;
                    withString &quot;{ top: 50px; left: 270px; width: 200px; height: 200px }&quot;
                  )
                )
                uxActions GesturePanRecognizerNat ( touchesMinVal 1 )
                uxControls UxRectRoundNat ( styling &quot;.windowButton&quot;
                    uxControls UxImageNat (
                      properties HashTable ( insert StringKeyString ( keyString &quot;draggable&quot; ) )
                      image ImageNat ( fileName Vision.Core.String ( withString &quot;list.png&quot; ) )
                    )
                )
              )
            )
          )
        )
      )
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;configuration-11-a-configured-ios-and-osx-application-allowing-controls-to-be-draggedid-s1-1&quot;&gt;Configuration-1.1: A configured iOS and OSX application allowing controls to be dragged.{#id-s1-1}&lt;/h6&gt;

&lt;p&gt;There is some redundant configuration code that should be reused: specifically the Processing and End panning events. It is easy to re-use configurations and we’ll write a post on this.&lt;/p&gt;

&lt;p&gt;{#declaring-variables}
### Declaring and Using Variables&lt;/p&gt;

&lt;h4 id=&quot;traditional-approach&quot;&gt;Traditional Approach&lt;/h4&gt;

&lt;p&gt;We need to keep some easily accessible information about the status of our dragging of windows. Traditionally, we would declare variables within some scope: a function, a method or passed as parameters. So, we may have something like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public class MoveWindow {
  Event eventCurrent = null;
  Event eventPrior = null;
  UxControl controlFocus = null;
  Pos2f position = null;
  Pos2f positionPrior = null;
  
  public void MoveWindow {
    // add code here.
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or, maybe we just pass all the information into a function using parameters:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public void MoveWindow ( Event eventCurrent, Event eventPrior, UxControl controlFocus, Pos2f position, Pos2f positionPrior ) {
  // add code here.
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Traditionally, we access variables by reading from them and setting them as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;MoveWindow mw = new MoveWindow;
mw.eventCurrent = // some logic
mw.eventPrior = null;
mw.position = eventCurrent.position;
&lt;/code&gt;&lt;/pre&gt;

&lt;h4 id=&quot;how-we-declare-and-use-variables&quot;&gt;How We Declare and Use Variables&lt;/h4&gt;

&lt;p&gt;Interface Vision is designed to be fully compose-able using Parts. As such, we define scope (see [How We do Scope] (/design/example-window-basic/#id-scope) ) and variables using Parts.&lt;/p&gt;

&lt;h4 id=&quot;scope-properties&quot;&gt;Scope Properties&lt;/h4&gt;

&lt;p&gt;Within our Scope we define variables using different Parts. In this case, we are using the PartNamedString part allowing us to define a part using a string as the variable name. There are also parts like LongKeyLong which allow us to define a long variable with a number as a variable name.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scope (
  properties HashTable ( // Contains the &#39;variables&#39; for this Scope.
    insert PartNamedString ( keyString &quot;eventCurrent&quot; ) // current event
    insert PartNamedString ( keyString &quot;eventPrior&quot; ) // prior event
    insert PartNamedString ( keyString &quot;viewFocus&quot; ) // view with focus
    insert PartNamedString ( keyString &quot;controlFocus&quot; ) // control with focus
    insert PartNamedString ( keyString &quot;position&quot; ) // current event position
    insert PartNamedString ( keyString &quot;positionPrior&quot; ) prior event position
  )
  action TheAction (
    // behavior within the scope
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The purpose of the variables is to allow us to drag a control around using Pan gestures.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;eventCurrent - The current event. This is set automatically when setting the property EventManager.insert to a new event.&lt;/li&gt;
  &lt;li&gt;eventPrior - This contains the prior event.&lt;/li&gt;
  &lt;li&gt;viewFocus - This is the view that had focus when the pan event began.&lt;/li&gt;
  &lt;li&gt;controlFocus - This is the control that had focus, if any, when the pan event began.&lt;/li&gt;
  &lt;li&gt;position - This is the (x,y) position on the view of the current event. This is a temporary variable used to keep the logic easier. This information is also contained within eventCurrent.&lt;/li&gt;
  &lt;li&gt;positionPrior - This is the (x,y) position on the view of the prior event. This is a temporary variable used to keep the logic easier. This information is also contained within eventPrior.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Accessing variables within Interface Vision is also done using Parts &lt;a href=&quot;#id-2&quot;&gt;2&lt;/a&gt;. For reading to and writing from Scope “variables” we have the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PropScopeGet ( nameStr &quot;eventCurrent&quot; required false )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This reads a property defined within the current scope named “eventPrior”. required being set to false will stop any warning from being generated if the variable does not exist.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PropScopeSet ( nameStr &quot;eventPrior&quot; part PropScopeGet ( nameStr &quot;eventCurrent&quot; ) )
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This sets a property defined within the current scope named “eventPrior” to the item located in part. In this case, the item located in part is PropScopeGet which, when used, will return a reference to the current event.&lt;/p&gt;

&lt;p&gt;This is equivalent to the equal operator: destination = source.&lt;/p&gt;

&lt;h4 id=&quot;dynamic-properties&quot;&gt;Dynamic Properties&lt;/h4&gt;

&lt;p&gt;A dynamic property is a property that can be defined on any Part instance: even at run time.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;UxImageNat (
  properties HashTable (
    insert StringKeyString ( keyString &quot;draggable&quot; )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In this case, we have added to a UxImageNat Part a dynamic property named “draggable”.&lt;/p&gt;

&lt;p&gt;To access this dynamic property, we use the PropDynamicGet part:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PropDynamicGet (
  nameStr &quot;draggable&quot;  // the name of the dynamic property
  part SomePart ( ) // the part that contains the dynamic property we want to get
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To set a dynamic property, we use the PropDynamicSet part (not used in our configuration).&lt;/p&gt;

&lt;h4 id=&quot;instance-properties&quot;&gt;Instance Properties&lt;/h4&gt;

&lt;p&gt;To access a property of an instance of a class, we use PropGet.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PropGet ( nameStr &quot;view&quot;
  part PropScopeGet ( nameStr &quot;eventCurrent&quot; )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In this case, we are getting the property named view of the Part located within the current event. The eventCurrent is actually a Part of type EventGesture which contains a view property.&lt;/p&gt;

&lt;p&gt;Traditionally, we would access a property as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;EventGesture someEvent;
object eventView = someEvent.view; // view is a property of someEvent.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To write to a property of an instance of a class, we use PropSet.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PropSet ( nameStr &quot;withFloat&quot;
  part PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
  source PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;nameStr is the name of the property, part contains the instance that we want to write too. Source contains the value we want to place into the property, in this case, named ‘withFloat’.&lt;/p&gt;

&lt;h3 id=&quot;logic-and-flow&quot;&gt;Logic and Flow&lt;/h3&gt;

&lt;p&gt;A goal of Interface Vision is to make our framework really easy to use. If you look at &lt;a href=&quot;#id-s1-1-top&quot;&gt;Configuration-1.1&lt;/a&gt; you’ll note that there really is very little logic and flow defined within the configuration. All the minutia for creating native windows, native view, native images, and allocating memory are “hidden” within our framework. This allows the programmer to focus on the domain specific behavior of the program itself. Programmers don’t have to twiddle with the idiosyncrasies languages and frameworks introduce into the development process.&lt;/p&gt;

&lt;p&gt;That being said, there are cases where logic and flow needs to be supported at the domain level. For these cases, Interface Vision has Parts to deal with logic and flow.&lt;/p&gt;

&lt;p&gt;Controls marked as “draggable” can be dragged. To check if a control is draggable requires some logic and flow within our configuration.&lt;/p&gt;

&lt;p&gt;In &lt;a href=&quot;#id-s1-1-top&quot;&gt;Configuration-1.1&lt;/a&gt; we use When to alter flow and IsNotNil as our Logic.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;When (
  condition IsNotNil ( part PropDynamicGet ( nameStr &quot;draggable&quot; part PropScopeGet ( nameStr &quot;controlFocus&quot; ) required false ) )
  action (
    // do the dragging thing
  )        
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The above could be read as “When condition is not nil property ‘draggable’ part scope ‘controlFocus’”.&lt;/p&gt;

&lt;p&gt;The action is run only if the condition is true: in this case, only if there is a control with focus and it has a dynamic property “draggable”.&lt;/p&gt;

&lt;h3 id=&quot;configuring-domain-specific-behavior&quot;&gt;Configuring Domain Specific Behavior&lt;/h3&gt;

&lt;p&gt;In Interface Vision, the position of a control is determined using two dynamic properties named ‘top’ and ‘left’ (the same as CSS). To move a control, we need to update these two values.&lt;/p&gt;

&lt;p&gt;To do this, we will need to get the current position of our mouse/touch within the current event and subtract it from the prior position of the mouse/touch of the prior event. This gives us the distance the mouse/touch moved between the events. We then add that value to the existing top/left properties of the control.&lt;/p&gt;

&lt;p&gt;Let’s look at the configuration to adjust the top position of the view that has focus:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;PropSet ( nameStr &quot;withFloat&quot;
  part PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
  source Add (
    left PropDynamicGet ( nameStr &quot;top&quot; part PropScopeGet ( nameStr &quot;viewFocus&quot;) )
    right Subtract (
      left PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;position&quot;) )
      right PropGet ( nameStr &quot;y&quot; part PropScopeGet ( nameStr &quot;positionPrior&quot;) )
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The Add Part has a left and right property which are the left and right side of the addition operator similar to:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;left + right
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The value of left is the dynamic property named ‘top’ of the view that has focus.
The value of right is the result of the subtraction of the y property of the current position and the y property of the prior position.&lt;/p&gt;

&lt;p&gt;The result of this addition is placed into the top property of the view that has focus.&lt;/p&gt;

&lt;p&gt;Let’s look at how this might be implemented traditionally by coding out a function:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function void MoveWindow ( Control viewFocus, Pos position, Pos positionPrior ) {
    viewFocus(&quot;top&quot;).withFloat = viewFocus(&quot;top&quot;).withFloat + ( position.y - positionPrior.y );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&quot;running-behavior-in-series&quot;&gt;Running Behavior in Series&lt;/h3&gt;

&lt;p&gt;The last item of interest is causing behavior to happen in series. To do this, we can use an ArrayList setting callBehavior to true.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ArrayList ( callBehavior true
  insert PropScopeSet ( nameStr &quot;eventBegin&quot; source PropScopeGet ( nameStr &quot;eventCurrent&quot; ) )
  insert PropScopeSet ( nameStr &quot;eventPrior&quot; source PropScopeGet ( nameStr &quot;eventCurrent&quot; ) )
  insert PropScopeSet ( nameStr &quot;viewFocus&quot; ... )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Configuring conditions, logic and behavior within Interface Vision is both easy and consistent. The nasty bits that we usually need to worry about within frameworks are taken care of by the Vision Framework (you compose with Vision, you don’t code against it).&lt;/p&gt;

&lt;p&gt;Configurations are consistent throughout. The syntax to describe the creation of parts, declare variables, define behavior, define logic and define flow is the exact same!&lt;/p&gt;

&lt;p&gt;If you find our work interesting, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;next-step&quot;&gt;Next Step&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-shared-configuration&quot;&gt;next step&lt;/a&gt; allows us to ‘re-use’ parts of a configuration.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-events-basic&quot;&gt;prior step&lt;/a&gt; was to create a configurable event system.&lt;/p&gt;

&lt;h2 id=&quot;footnotes&quot;&gt;Footnotes&lt;/h2&gt;

&lt;p&gt;{#id-1} 1. The goal of Interface Vision is to be a Gui based visual development environment so, in the bigger picture, the number of lines of configuration required is not that important. It is probably more important to keep the number of parts manageable.&lt;/p&gt;

&lt;p&gt;{#id-2} 2. We intend on hiding the process of reading from and writing to properties. As such, within the visual development environment, the user will not be aware of parts like PropGet, PropSet, PropScopeGet, PropScopeSet, etc.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Configurable Event System</title>
   <link href="http://bloginterfacevision.github.com/design/example-events-basic"/>
   <updated>2014-01-04T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/example-events-basic</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Most, if not all, frameworks with some kind of User Experience (UX) have some sort of event system to handle events generated from mice, keyboards and other devices. Our goal is to create an event system that can be fully configured.&lt;/p&gt;

&lt;h3 id=&quot;traditional-approaches&quot;&gt;Traditional Approaches&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;#id-s1-1-top&quot;&gt;Source-1.1&lt;/a&gt; shows one way developers handle events in Ux frameworks. In this case, we’ve inherited from a class NSWindow provided by &lt;a href=&quot;http://www.mono-project.com/MonoMac&quot;&gt;MonoMac&lt;/a&gt; and override the method MouseDown.&lt;/p&gt;

&lt;div id=&quot;id-s1-1-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;public partial class MainWindow : NSWindow {
  
  // other code
  
  public override void MouseDown (NSEvent theEvent) {
    base.MouseDown (theEvent);
    // custom code to handle MouseDown event
  }
  
  // other code
  		
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-s1-1&quot;&gt;Source-1.1: Traditional approach to handling events using C# MonoMac.&lt;/h6&gt;

&lt;p&gt;&lt;a href=&quot;#id-s1-2-top&quot;&gt;Source-1.2&lt;/a&gt; shows another way developers handle events in Ux frameworks. In this case, we use delegates and “compose” the handling of the event within a UIButton, provided by &lt;a href=&quot;http://xamarin.com/ios&quot;&gt;MonoTouch&lt;/a&gt;, and override the method MouseDown.&lt;/p&gt;

&lt;div id=&quot;id-s1-2-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;// other code

UIButton button = UIButton.FromType(UIButtonType.RoundedRect);
button.TouchDown += delegate(object sender, EventArgs e) {
  // custom code to handle Button pressed event
};

// other code
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-s1-2&quot;&gt;Source-1.2: Traditional approach to handling events using C# MonoTouch.&lt;/h6&gt;

&lt;p&gt;&lt;a href=&quot;#id-s1-3-top&quot;&gt;Source-1.3&lt;/a&gt; shows another way developers handle events in Ux frameworks. In this case, we register a recognizer with a Ux Control, in this case a UIWindow provided by &lt;a href=&quot;http://xamarin.com/ios&quot;&gt;MonoTouch&lt;/a&gt;, that supports Panning with one or two fingers.&lt;/p&gt;

&lt;div id=&quot;id-s1-3-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;public partial class MainWindow : NSWindow {
  
  // other code

  protected void gestureAction (UIPanGestureRecognizer theAction ) {
    // custom code to handle gesture
  }

  MainWindow() {
    UIPanGestureRecognizer gesture = new UIPanGestureRecognizer (gestureAction);
    gesture.MinimumNumberOfTouches = 1;
    gesture.MaximumNumberOfTouches = 2;
    this.AddGestureRecognizer (gesture);
  }
  
  // other code
  		
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-s1-3&quot;&gt;Source-1.3: Traditional approach to handling events using C# MonoTouch.&lt;/h6&gt;

&lt;p&gt;The recognizer is “attached” to a protected method gestureAction which contains the custom code to handle the gesture.&lt;/p&gt;

&lt;h2 id=&quot;event-handling-in-interface-vision&quot;&gt;Event Handling in Interface Vision&lt;/h2&gt;

&lt;p&gt;We want to provide a consistent way to compose the definition of and handling of events. Not only does it need to be consistent, but it needs to be operating system agnostic.&lt;/p&gt;

&lt;p&gt;We will need to “wrap” the traditional approach to handling events and forward those events to our event handling system described in detail below.&lt;/p&gt;

&lt;h2 id=&quot;our-design&quot;&gt;Our Design&lt;/h2&gt;

&lt;h3 id=&quot;events&quot;&gt;Events&lt;/h3&gt;

&lt;p&gt;We want to be able to handle events at different levels:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Cloud “level” (Across multiple devices - planned)&lt;/li&gt;
  &lt;li&gt;Global to OS (Maybe)&lt;/li&gt;
  &lt;li&gt;Active Application&lt;/li&gt;
  &lt;li&gt;Active Window&lt;/li&gt;
  &lt;li&gt;Active View&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An event can occur in one of the following steps:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;EventStepEmpty - The “empty” step. No step has been defined for the event.&lt;/li&gt;
  &lt;li&gt;EventStepBegin - The start/beginning of an event (Pan, Press, keyPressDown, etc.)&lt;/li&gt;
  &lt;li&gt;EventStepProcessing - The event is still running (Drag/Drop, IsPanning, etc.)&lt;/li&gt;
  &lt;li&gt;EventStepFinished - The event finished (keyPressUp, finger released from screen, etc.)&lt;/li&gt;
  &lt;li&gt;EventStepCancelled - The event was cancelled during the processing phase.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An even has a source. Sources can be native to the operating system such as (few examples):&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;EventSourceWinNatResize - Native window was resized.&lt;/li&gt;
  &lt;li&gt;EventSourceWinNatMove - Native window was moved.&lt;/li&gt;
  &lt;li&gt;EventSourceWinNatScreenFullExit - Native window exited full screen&lt;/li&gt;
  &lt;li&gt;EventSourceWinNatScreenFullEnter - Native window entered full screen&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sources can be gestures such as (few examples):&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;EventSourceGesturePan - The source of the even was a pan gesture.&lt;/li&gt;
  &lt;li&gt;EventSourceGesturePress - The source of the even was a press gesture.&lt;/li&gt;
  &lt;li&gt;EventSourceGestureRotation - The source of the even was a rotation gesture.&lt;/li&gt;
  &lt;li&gt;EventSourceGestureSwipe - The source of the even was a swipe gesture.&lt;/li&gt;
  &lt;li&gt;EventSourceGestureTap - The source of the even was a tap gesture.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sources can be from native physical devices such as (few examples):&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;EventSourceKeyboard - The source was a keyboard&lt;/li&gt;
  &lt;li&gt;EventSourceMouse - The source was a mouse&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A specific Event my require more information. For example, a GesturePan event may require the number of touches required for the event to “fire”. A GesturePress event may require the number of touches and the touch duration for the event to “fire”.&lt;/p&gt;

&lt;h3 id=&quot;unique-events-with-the-event-part&quot;&gt;Unique Events with the Event Part&lt;/h3&gt;

&lt;p&gt;We will need a way to register events, monitor for events and “fire” those events (run the behavior configured for a given event). Let’s first see how we define a unique event to monitor.&lt;/p&gt;

&lt;p&gt;Currently, we identify an event by creating a unique hash code for the event.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public class Event : Part, IEvent {

  public override object keyHashCode {
    get { return this.keyString; }
  }

  public override string keyString {
    get { return eventSource + eventStep; }
  }

  public string eventSource = &quot;SourceEmpty&quot;;
  public string eventStep = &quot;StepEmpty&quot;;

  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In Interface Vision, the Part class has a keyHashCode and keyString properties. We override these properties and return “eventSource + eventStep” as the hashcode. An event instance can now be placed in a HashTable part for quick lookup.&lt;/p&gt;

&lt;p&gt;A GesturePan event has more information provided, the touchesMin, which is used to generate a unique hash code.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public class GesturePan : Event {

  public override string keyString {
    get { return base.keyString + &quot;Touch&quot;+touchesMin.ToString(); }
  }

  public override string eventSource {
    get { return &quot;GesturePan&quot;; }
  }
	
  public int touchesMin = 0;

}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The unique hash code for a GesturePan with 2 for touchesMin with two fingers would be “GesturePanStepEmptyTouch2” &lt;a href=&quot;#id-1&quot;&gt;1&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;attaching-an-action-to-an-event-with-eventmonitor&quot;&gt;Attaching an Action to an Event with EventMonitor&lt;/h3&gt;

&lt;p&gt;When an event “fires” we need to attach a behavior to that event which is what the EventMonitor part does.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public class EventMonitor : PartParent, IEventMonitor {

  public override object keyHashCode {
    get { return keyString; }
  }

  public override string keyString {
    get { return eventToMonitor.keyString; }
  }
	
  public IPart eventToMonitor { get; set; }
  public IPart action { get; set; }

  public override IPart withPart {
    get { return action.withPart; }
  }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The hash code for the EventMonitor part will always be the same as the event it monitors (see the keyString property). The property withPart of our EventMonitor simply calls withPart of the Part located within the action property (see &lt;a href=&quot;/design/design-our-technology&quot;&gt;Our Technology&lt;/a&gt; to understand the trickery behind the withPart property).&lt;/p&gt;

&lt;h3 id=&quot;the-configuration-using-the-eventmanager-part&quot;&gt;The Configuration using the EventManager part&lt;/h3&gt;

&lt;p&gt;Let’s define a few events to monitor. Let’s build on top of the configuration we had in our [prior step] (/design/example-window-basic) - a program to display a native window.&lt;/p&gt;

&lt;p&gt;We add to our Scope an EventManager as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scope (
  properties HashTable ( // Contains the &#39;variables&#39; for this Scope.
    insert CssManager ( ... )
    insert EventManager ( keyString &quot;PropEventManager&quot;
      properties HashTable (
        insert EventMonitor (
          eventToMonitor GesturePan ( eventStep &quot;Begin&quot; touchesMin 1 )
          action ConsoleWriteLine ( text &quot;GesturePan - EventStep Begin - One Finger&quot;)
        )
        insert EventMonitor (
          eventToMonitor GesturePan ( eventStep &quot;Processing&quot; touchesMin 1 )
          action ConsoleWriteLine ( text &quot;GesturePan - EventStep Processing - One Finger&quot;)
        )
        insert EventMonitor (
          eventToMonitor GesturePan ( eventStep &quot;End&quot; touchesMin 1 )
          action ConsoleWriteLine ( text &quot;GesturePan - EventStep End - One Finger&quot;)
        )
      )
    )
  )
  part AppNat (
    ...
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We’ve now configured our application to watch for panning using a single finger for the Begin, Processing and End event steps. In this case, we will write to the console text based on which event is fired.&lt;/p&gt;

&lt;p&gt;Note that we can have more than one action taken by plugging in an ArrayList part for the action.&lt;/p&gt;

&lt;h2 id=&quot;hooking-up-the-old-with-the-new&quot;&gt;Hooking Up The “Old” With The New&lt;/h2&gt;

&lt;p&gt;Hooking up the event systems with the IOS and OSX frameworks is an interesting challenge.&lt;/p&gt;

&lt;h3 id=&quot;standardizing-on-gestures-and-events&quot;&gt;Standardizing on Gestures and Events&lt;/h3&gt;

&lt;p&gt;A gesture on a touch device or screen is a bit different from a Gestures created using something like a [TrackPad] (http://www.apple.com/magictrackpad/) or Mouse.&lt;/p&gt;

&lt;p&gt;Let’s consider Panning. On a gesture device, the first time the user touches the screen and moves their fingers, we know that the beginning of a Gesture has occurred and that we are processing the Gesture. When the user releases their finger, we are at the end of the pan gesture.&lt;/p&gt;

&lt;p&gt;However, with a TrackPad or mouse, we should only consider the Gesture to be panning when the user has pressed down on the Trackpad or one of the mouse buttons. We can track the position of a mouse as the user moves it but we can’t track where a user is going to put their finger on the screen of a touch screen device until they have done so.&lt;/p&gt;

&lt;p&gt;A similar issue comes up with a trackpad where the user can move the cursor on the screen without actually pressing down on the trackpad. This lets the user position the cursor on the screen without “pressing”: similar to the mouse.&lt;/p&gt;

&lt;p&gt;So, we will need to standardize how we represent gestures between different devices like touchable devices, mice and trackpads &lt;a href=&quot;#id-2&quot;&gt;2&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;hooking-up-ios&quot;&gt;Hooking Up IOS&lt;/h3&gt;

&lt;p&gt;Let’s hook up the Interface Vision Event System with the iOS event system. &lt;a href=&quot;#id-s1-3-top&quot;&gt;Source-1.3&lt;/a&gt; shows how iOS’s event system works. Let’s generalize it by creating a part to support Panning.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public class GesturePanRecognizer : GesturePan {

  protected void gestureAction (UIPanGestureRecognizer theAction ) {
    eventManager.insert = new GesturePanEvent { eventStep = eventStep, theAction = theAction, touchesMinVal = this.touchesMinVal };
  }

  [XmlIgnore] public override IPart withPart {
    get {
      UIPanGestureRecognizer gesture = new UIPanGestureRecognizer (gestureAction);
      gesture.MinimumNumberOfTouches = (uint)this.touchesMinVal;
      IPart window = parentLogical;
      window.AddGestureRecognizer (gesture);
      return base.withPart;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The GesturePanRecognizer inherits from GesturePan which is an Event (if you recall). In this way, we can create a UIPanGestureRecognizer based on properties unique to the GesturePan such as touchesMinVal.&lt;/p&gt;

&lt;p&gt;The property withPart of our GesturePanRecognizer creates an instance of the UIPanGestureRecognizer and adds it to the window (see &lt;a href=&quot;/design/design-our-technology&quot;&gt;Our Technology&lt;/a&gt; to understand the trickery behind the withPart property).&lt;/p&gt;

&lt;p&gt;What is interesting to note is that the window is found by calling parentLogical which means we need to configure our Recognizer “under” our MainWindow. Let’s see what this looks like in SipCoffee.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scope (
  ...
  part AppNat (
    action UxWindowNat (
      uxActions ArrayList (
        insert GesturePanRecognizer ( touchesMin 1 )
      )
      ...
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We’ve configured the GesturePanRecognizerNat under our UxWindowNat Part within the uxActions property. We are now ready to receive any single touch pan events in iOS.&lt;/p&gt;

&lt;h3 id=&quot;hooking-up-osx&quot;&gt;Hooking Up OSX&lt;/h3&gt;

&lt;p&gt;OSX is a little more difficult than iOS because OSX does not provide gesture recognizer classes. Instead, we are going to have to “hard code” our idea of a pan gesture into OSX. This is where we have to make that decision on what it means to “pan” in OSX.&lt;/p&gt;

&lt;p&gt;We’ve decided that a single finger press on the TrackPad or the left mouse button on a mouse should generate a pan gesture with a touchesMin of one. Let’s look at the code to do this.&lt;/p&gt;

&lt;p&gt;The implementation of the GesturePanRecognizer in OSX is an empty class (it does nothing) &lt;a href=&quot;#id-3&quot;&gt;3&lt;/a&gt;. Instead, we have to override methods in NSWindow to get the same results.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public class MainWindow : NSWindow {

  public IPart eventManager {
    get { return new EventManagerGet{ }.withPart; }
  }

  protected bool p_draggingTouchOne = false;
  public override void MouseDragged (NSEvent theEvent) {
    base.MouseDragged (theEvent);
    if (false == p_draggingTouchOne) {
      p_draggingTouchOne = true;
      eventManager.insert = new GesturePanEvent {
        eventStep = Event.EventStepBegin,
        touchesMinVal = 1,
      };
    }
    eventManager.insert = new GesturePanEvent {
      eventStep = Event.EventStepProcessing,
      touchesMinVal = 1,
    };
  }

  public override void MouseUp (NSEvent theEvent) {
    base.MouseUp (theEvent);
    if (true == p_draggingTouchOne) {
      p_draggingTouchOne = false;
      eventManager.insert = new GesturePanEvent {
        eventStep = Event.EventStepFinished,
        touchesMinVal = 1,
      };
    }
  }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For OSX, we override the MouseUp and MouseDragged events on NSWindow and generate the different GesturePanEvent’s from within these methods using a flag letting us know if we were “dragging”.&lt;/p&gt;

&lt;h3 id=&quot;eventmanager-and-handling-triggered-events&quot;&gt;EventManager and Handling “Triggered” Events&lt;/h3&gt;

&lt;p&gt;The line of code “eventManager.insert = new GesturePanEvent { … };” seems to cause the event to trigger. Let’s see the code for that in the EventManager.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public class EventManager : PartProperties, IEventManager {

  public override IPart insert {
    set {
      IPart eventFound = properties [value.keyHashCode];

      if ( !eventFound.isEmpty ) {
        IPart ignore = eventFound.withPart;
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Oh wow! There will be a lot more to this later, but for now that is all we need to do to trigger the Event. We use the Hash Code of the event provided (value.keyHashCode) to find the event which is located within the properties of the EventManager.&lt;/p&gt;

&lt;p&gt;We then access the withPart property of the eventFound. Remember, from above, that eventFound will contain an EventMonitor part. The withPart property of EventMonitor calls withPart on the action property. This contains, in our case, ConsoleWriteLine. The property withPart of ConsoleWriteLine causes text to be written to the console.&lt;/p&gt;

&lt;p&gt;That’s it!&lt;/p&gt;

&lt;p&gt;Something to note is that the EventManager has no reference to the Event part, the EventMonitor part or even the GesturePanEvent part. The Event handling system is 100% decoupled from the rest of the event system allowing people to build any kind of event and throw it at the event handling system.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Configuring events within Interface is both easy and consistent. There is no need to code out events nor do you have to deal with all the gory details on how to define events within any given framework or operating system.&lt;/p&gt;

&lt;p&gt;If you find our work interesting, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;next-step&quot;&gt;Next Step&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-window-move&quot;&gt;next step&lt;/a&gt; will be to create a configuration to allow us to move around our “non-native” window.
The [prior step] (/design/example-window-basic) was to get a program to display a native window using SipCoffee.&lt;/p&gt;

&lt;h2 id=&quot;footnotes&quot;&gt;Footnotes&lt;/h2&gt;

&lt;p&gt;{#id-1} 1. We will optimize the hash code at a later time so this is not an issue. However, a real draw back to this approach is that we can not define events with ranges. For example, we can’t fire on all Pans with 1 to 3 fingers.&lt;/p&gt;

&lt;p&gt;{#id-2} 2. At some point, we may make this configurable across OSX, Windows, IOS, Android, etc. However, for the time being, we’ve “hard coded” it into our framework.&lt;/p&gt;

&lt;p&gt;{#id-3} 3. We need to leave the part within our SipCoffee configuration because we use the same configuration between different operating systems: in this case iOS and OSX. That’s why, for OSX, we have recognizer parts but they are empty.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Example - Basic Windows</title>
   <link href="http://bloginterfacevision.github.com/design/example-window-basic"/>
   <updated>2013-12-31T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/example-window-basic</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;#id-f1-1-top&quot;&gt;Figure-1.1&lt;/a&gt; shows a native OSX window, a native IOS window and a “non-native” window contained within each of these native windows.&lt;/p&gt;

&lt;div id=&quot;id-f1-1-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/example_window_basic_1.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;###### Figure-1.1: An OSX native window with a “non-native” window. {#id-f1-1}&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#id-f1-2-top&quot;&gt;Figure-1.2&lt;/a&gt; shows the native IOS window after the device has been rotated.&lt;/p&gt;

&lt;div id=&quot;id-f1-2-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/example_window_basic_2.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;###### Figure-1.2: An iOS native window with a “non-native” window. {#id-f1-2}&lt;/p&gt;

&lt;p&gt;Let’s look at the &lt;a href=&quot;/design/design-composition-based-language&quot;&gt;SipCoffee&lt;/a&gt; ‘code’ to create this program which runs in both iOS and OSX natively.&lt;/p&gt;

&lt;h2 id=&quot;the-css&quot;&gt;The CSS&lt;/h2&gt;

&lt;p&gt;In Interface Vision, the layout of native controls is done using CSS syntax.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#id-c1-1-top&quot;&gt;Css-1.1&lt;/a&gt; contains the css required for our first application.&lt;/p&gt;

&lt;div id=&quot;id-c1-1-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;body {
  background-color: rgba(255, 255, 255, 1); // default background (white)
  color: rgba(0,0,0,1); // default font color (black)
  font-family: &#39;Helvetica Neue Medium&#39; ;
  font-size: 20px;
  text-align: left;
  vertical-align: top;
  border-color: rgba(0,0,0,1); // default border color (black)
  direction: ltr; // default direction (left)
}

// Canvas where windows show up.
.canvas {
  background-color: #F0F0F0;
}

// Window frame for non-native window
.windowFrame {
  position: fixed;
  background-color: #F0F0F0;
  -moz-border-radius: 10px;
}

// Buttons that show up on title bar of window
.windowButton {
  position: fixed;
  background-color: #F7F7F7;
  width: 28px;
  height: 28px;
  padding: 4px;
  margin: 4px;
  -moz-border-radius: 6px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-c1-1&quot;&gt;Css-1.1: The CSS for our window and windowButton.&lt;/h6&gt;

&lt;h2 id=&quot;the-configuration&quot;&gt;The Configuration&lt;/h2&gt;

&lt;p&gt;Programs in Interface Vision are composed. Instead of coding, developers hook up parts either visually (we are developing the Gui based development environment now: starting with this post) or via C# code (how we do it now) or using the &lt;a href=&quot;/design/design-composition-based-language&quot;&gt;SipCoffee&lt;/a&gt; language (the source code in this post).&lt;/p&gt;

&lt;h3 id=&quot;scope&quot;&gt;Scope&lt;/h3&gt;

&lt;h4 id=&quot;about-scope-in-languages&quot;&gt;About Scope In Languages&lt;/h4&gt;

&lt;p&gt;Traditionally, scope is defined using scope operators such as { and } or ( and ). Scope takes place in modules, methods, functions, classes and so on.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#id-s1-1-top&quot;&gt;Source-1.1&lt;/a&gt; is an example of a function named foo using { and } as the scope operators. Anything between the { and } is considered within the Scope of the function foo. For example, the variable named localVar is only available within the scope of the function foo.&lt;/p&gt;

&lt;p&gt;The parameter name is also only available within the function foo. The stuff between { and } is considered the behavior of the function: the behavior contained within the scope.&lt;/p&gt;

&lt;div id=&quot;id-s1-1-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;void function foo ( string name ) {
  string localVar = &quot;Hello &quot;
  WriteLine (scoped + &quot; &quot; + name);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-s1-1&quot;&gt;Source-1.1: Example of defining scope using a function.&lt;/h6&gt;

&lt;p&gt;{#id-scope}
#### How We do Scope&lt;/p&gt;

&lt;p&gt;Interface Vision has no methods, functions or modules. Instead, a Part (called Scope) is used to define the scope of behavior as shown in &lt;a href=&quot;#id-s1-2-top&quot;&gt;Source-1.2&lt;/a&gt;. The Scope class contains a properties property which contains a HashTable. The HashTable can contain one or more Parts with a unique key. For Scope, we use this Unique Key as the name of the property: the name of the variable.&lt;/p&gt;

&lt;div id=&quot;id-s1-2-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;Scope (
  properties HashTable ( // Contains the &#39;variables&#39; for this Scope.
    insert CssManager ( keyString &quot;PropCssManager&quot; // Adding a &#39;variable&#39; named PropCssManager
      ruleSet HashTable (
        insert StringKeyString ( keyString = &quot;default.css&quot;
          withString File ( name = &quot;default.css&quot;)
        )
      )
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-s1-2&quot;&gt;Source-1.2: Our scope has a property named “PropCssManager” which contains all the CSS for our application.&lt;/h6&gt;

&lt;p&gt;Within the Scope, we are inserting a Part with a Unique Key of “PropCssManager”. In this case, the Part is a CssManager and we load the Css ruleSet from a file named “default.css” which is defined in &lt;a href=&quot;#id-c1-1-top&quot;&gt;Css-1.1&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Accessing a property within the Scope is done using a ScopePropGet part we’ll explain later.&lt;/p&gt;

&lt;h4 id=&quot;scope-and-threads&quot;&gt;Scope and Threads&lt;/h4&gt;

&lt;p&gt;Note that Scope is thread aware. This means, if you define a Scope within a Thread part, that Scope is only accessible from the Thread it was defined in. This means you can easily configure thread safe programs.&lt;/p&gt;

&lt;p&gt;A single Scope can be defined on the main thread and is considered the ‘global’ scope.&lt;/p&gt;

&lt;h3 id=&quot;the-native-application-native-window-and-native-ux-controls&quot;&gt;The Native Application, Native Window and Native Ux Controls&lt;/h3&gt;

&lt;p&gt;The AppNat part is the native application. It is contained within a Scope part. Since this Scope runs on the main thread, it is considered the ‘global’ scope making any items located within the Scope’s properties global. This also means that AppNat will run on the main thread.&lt;/p&gt;

&lt;p&gt;The action property of AppNat is set to a UxWindowNat Part. This Part does all the work to create a Native window including the shadow around the native window: as seen in &lt;a href=&quot;#id-f1-1-top&quot;&gt;Figure-1.1&lt;/a&gt;.&lt;/p&gt;

&lt;div id=&quot;id-s1-3-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;Scope (
  properties ( ... ) // see Source-1.2
  part AppNat (
    action UxWindowNat (
      frame RectanglefFixed ( x 10 y 10 width 600 height 600 )
      HasShadow true
      uxControls UxViewPrimaryNat (
        uxControls UxViewScrollable ( styling &quot;.canvas&quot;
          scrollVerticalAllowedBool true
          scrollHorizontalAllowedBool true
          controlBounds RectanglefFixed ( x 0 y 0 width 4000 height 4000 )
          uxControls UxViewDrawNat (
            controlBounds RectanglefFixed ( x 0 y 0 width 4000 height 4000 )
            uxControls UxViewDrawNat ( styling &quot;.windowFrame&quot;
              properties HashTable (
                insert StringKeyString ( keyString &quot;Css&quot;
                  withString &quot;{ top: 100px; left: 100px; width: 400px; height: 400px }&quot;
                )
              )
              uxControls UxRectRoundNat ( styling &quot;.windowButton&quot;
                  uxControls UxImageNat (
                    image ImageNat ( fileName Vision.Core.String ( withString &quot;list.png&quot; ) )
                  )
              )
            )
          )
        )
      )
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-s1-3&quot;&gt;Source-1.3: The AppNat part is the native application and is defined within a Scope.&lt;/h6&gt;

&lt;p&gt;All User Experience controls for the native window are located in the uxControls property. In most Ux systems, the native window contains only one control which is a “view”. As such, we plug into the uxControl a UxViewPrimaryNat which is the “glue” between the native window and controls that show up within the native window. This is just an industry standard, and we could have implemented it in other ways.&lt;/p&gt;

&lt;p&gt;The UxViewPrimaryNat has a single control added to it of type UxViewScrollable. This is a scrollable view and if we had a video demo of our program, you would see that we could scroll the view vertically and horizontally allowing us to move around within our “canvas”. Which bring up an interesting point, because you will note that the styling of the UxViewScrollable is set to “.canvas” which is defined in our Css located in &lt;a href=&quot;#id-c1-1-top&quot;&gt;Css-1.1&lt;/a&gt;. Yep. It’s that easy to style any Ux control.&lt;/p&gt;

&lt;p&gt;Our UxViewScrollable has a rather large bounds of 4000 by 4000 pixels configured in the controlBounds property.&lt;/p&gt;

&lt;p&gt;The final configured part of interest is the UxViewDrawNat with a styling of type “.windowFrame”. The positioning, border color, border size, etc. is all defined within the Css. However, the coordinates of this “non-native” window could and do change when defining more than one “non-native” windows. As such, we’ve “inlined” Css by adding a property to our UxViewDrawNat.&lt;/p&gt;

&lt;p&gt;Yep! In general, you can add properties to almost any part within Interface Vision: in this case a property named Css.&lt;/p&gt;

&lt;h2 id=&quot;the-entire-program&quot;&gt;The Entire Program&lt;/h2&gt;

&lt;p&gt;Our entire program fits in just 39 lines of &lt;a href=&quot;/design/design-composition-based-language&quot;&gt;SipCoffee&lt;/a&gt; code, 24 if you don’t include lines of ), and 33 lines of CSS.&lt;/p&gt;

&lt;p&gt;That defines everything required to have a native cross platform Gui based application that runs on both OSX and iOS (oh, and that supports rotation of an iOS device too)!&lt;/p&gt;

&lt;div id=&quot;id-s1-5-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;Scope (
  properties HashTable ( // Contains the &#39;variables&#39; for this Scope.
    insert CssManager ( keyString &quot;PropCssManager&quot; // Adding a &#39;variable&#39; named PropCssManager
      ruleSet HashTable (
        insert StringKeyString ( keyString = &quot;default.css&quot;
          withString File ( name = &quot;default.css&quot;)
        )
      )
    )
  )
  part AppNat (
    action UxWindowNat (
      frame RectanglefFixed ( x 10 y 10 width 600 height 600 )
      HasShadow true
      uxControls UxViewPrimaryNat (
        uxControls UxViewScrollable ( styling &quot;.canvas&quot;
          scrollVerticalAllowedBool true
          scrollHorizontalAllowedBool true
          controlBounds RectanglefFixed ( x 0 y 0 width 4000 height 4000 )
          uxControls UxViewDrawNat (
            controlBounds RectanglefFixed ( x 0 y 0 width 4000 height 4000 )
            uxControls UxViewDrawNat ( styling &quot;.windowFrame&quot;
              properties HashTable (
                insert StringKeyString ( keyString &quot;Css&quot;
                  withString &quot;{ top: 100px; left: 100px; width: 400px; height: 400px }&quot;
                )
              )
              uxControls UxRectRoundNat ( styling &quot;.windowButton&quot;
                uxControls UxImageNat (
                  image ImageNat ( fileName Vision.Core.String ( withString &quot;list.png&quot; ) )
                )
              )
            )
          )
        )
      )
    )
  )
)
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-s1-5&quot;&gt;Source-1.5: The entire program to show a Native Window in iOS and OSX.&lt;/h6&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Interface Vision’s &lt;a href=&quot;/design/design-composition-based-language&quot;&gt;SipCoffee&lt;/a&gt; language is able to configure complex cross platform applications using 100% composition. Our next example will extend our existing program by allowing us to move the “non-native” window within our “canvas” (the Scrollable view).&lt;/p&gt;

&lt;p&gt;If you find our work interesting, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;next-step&quot;&gt;Next Step&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-events-basic&quot;&gt;next step&lt;/a&gt; is to create a configurable event system. We were planning on creating the configuration to allow us to move around our “non-native” window but we got ahead of ourselves.&lt;/p&gt;

&lt;p&gt;The [prior step] (/design/design-composition-based-language) was to create a language based on composition.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>A Programming Language Based on Composition of Messages</title>
   <link href="http://bloginterfacevision.github.com/design/design-composition-based-language"/>
   <updated>2013-12-19T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/design-composition-based-language</id>
   <content type="html">&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Interface Vision is a Gui based visual object language and fully composable framework created using Simple Interface Programming (SIP). Programming is done by hooking up messages (not to be confused with messaging frameworks): either visually or coding in C#.&lt;/p&gt;

&lt;p&gt;However, the syntax in C# for hooking up messages looks funky.&lt;/p&gt;

&lt;p&gt;So, we’ve designed a message-oriented language called SipCoffee.&lt;/p&gt;

&lt;p&gt;We uses composition exclusively. There is no specific syntax to describe inheritance, for loops, if/else statements, variables, scope, methods, functions and so on. All of these are replaced with messages.&lt;/p&gt;

&lt;h2 id=&quot;examples&quot;&gt;Examples&lt;/h2&gt;

&lt;h3 id=&quot;hello-world&quot;&gt;Hello World&lt;/h3&gt;

&lt;p&gt;Hello world in SipCoffee:&lt;/p&gt;

&lt;div id=&quot;id-s1-1-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;Application {
  do WriteLine { text &quot;Hello World&quot; }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-s1-1&quot;&gt;Source-1.1: Hello World in SipCoffee.&lt;/h6&gt;

&lt;h3 id=&quot;hello-world-explained&quot;&gt;Hello World Explained&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;#id-s1-1-top&quot;&gt;Source-1.1&lt;/a&gt; contains two messages named Application and WriteLine. &lt;/p&gt;

&lt;p&gt;Application has the property do. The do property contains an instance of WriteLine.&lt;/p&gt;

&lt;p&gt;WriteLine has a text property, which is the text to write, and has the value “Hello World”.&lt;/p&gt;

&lt;h3 id=&quot;hello-world-10-times&quot;&gt;Hello World 10 Times&lt;/h3&gt;

&lt;p&gt;Hello World written 10 times on separate lines.&lt;/p&gt;

&lt;div id=&quot;id-s1-2-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;Application {
  do For { start 1 end 20 by 2 
    do WriteLine { text &quot;Hello World&quot; }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-s1-2&quot;&gt;Source-1.2: Hello written 10 times in SipCoffee.&lt;/h6&gt;

&lt;h3 id=&quot;a-foreach&quot;&gt;A ForEach&lt;/h3&gt;

&lt;p&gt;The numbers 1, 2, 4, 8, 16 and 32 written on separate lines.&lt;/p&gt;

&lt;div id=&quot;id-s1-3-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;Application {
  do ForEach {
    item List [ 1 2 4 8 16 32 ]
    do WriteLine { text CurrentItem {} }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-s1-3&quot;&gt;Source-1.3: A for each in SipCoffee.&lt;/h6&gt;

&lt;h3 id=&quot;another-foreach&quot;&gt;Another ForEach&lt;/h3&gt;

&lt;p&gt;Write out the first name of users Jane, Smith and Joe: each on a new line.&lt;/p&gt;

&lt;div id=&quot;id-s1-4-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;Application {
  do ForEach {
    item List [
      Hash [
        KeyPair { key &quot;firstName&quot; value &quot;Jane&quot;}
        KeyPair { key &quot;lastName&quot; value &quot;First&quot;}
      ]
      Hash [
        KeyPair { key &quot;firstName&quot; value &quot;Smith&quot;}
        KeyPair { key &quot;lastName&quot; value &quot;Between&quot;}
      ]
      Hash [
        KeyPair { key &quot;firstName&quot; value &quot;Joe&quot;}
        KeyPair { key &quot;lastName&quot; value &quot;Last&quot;}
      ]
    ]
    do WriteLine {
      text HashRead { hash CurrentItem{} key &quot;firstName&quot; }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-s1-4&quot;&gt;Source-1.4: A for each in SipCoffee.&lt;/h6&gt;

&lt;h3 id=&quot;foreach-using-sql&quot;&gt;ForEach Using Sql&lt;/h3&gt;

&lt;p&gt;Write out the first name of users with data coming from a database: each on a new line.&lt;/p&gt;

&lt;div id=&quot;id-s1-4-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;Application {
  do ForEach {
    item SqlConnect {
      database &quot;someDatabase&quot;
      command SqlQuery {
        sql &quot;SELECT firstName, lastName FROM users&quot;
      }
    }
    do WriteLine {
      text HashRead { hash CurrentItem{} key &quot;firstName&quot; }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-s1-4&quot;&gt;Source-1.4: A for each in SipCoffee.&lt;/h6&gt;

&lt;h3 id=&quot;foreach-using-sql-explained&quot;&gt;ForEach Using Sql Explained&lt;/h3&gt;

&lt;p&gt;A ForEach message contains an item property. The item property contains a SqlConnect message configured with a database (named “someDatabase”) and a command (a SqlQuery message with sql “SELECT firstName, lastName FROM users”).&lt;/p&gt;

&lt;p&gt;The ForEach message invokes the SqlConnect message. The SqlConnect message connects to the database and invokes the message located in the command property. This causes SqlQuery to invoke which runs the sql and returns a list of records to SqlConnect. Each record is a hash table with a key/value pair for each field.&lt;/p&gt;

&lt;p&gt;SqlConnect passes that list back up to the ForEach message. The ForEach message is now able to iterate through the list of records.&lt;/p&gt;

&lt;p&gt;The ForEach message, internally, stores the current item in the list. It then invokes the message located in the do property. In this case, ForEach invokes the WriteLine message.&lt;/p&gt;

&lt;p&gt;We want to write out the first name of each user. This means we need to access that field within the current item (which happens to be a HashTable message).&lt;/p&gt;

&lt;p&gt;This means we use the HashRead message in the text property of WriteLine. What hash table are we reading from? Well, the CurrentItem message is able to retrieve the current item from the ForEach message. This then becomes the hash table that the HashRead message uses. The key is then used to locate an entry in the hash table: in this case “firstName”.&lt;/p&gt;

&lt;p&gt;HashRead passes up to WriteLine the result of reading from the hash table (in this case a string) and the WriteLine message writes the final value of text to the console.&lt;/p&gt;

&lt;h2 id=&quot;the-syntax&quot;&gt;The Syntax&lt;/h2&gt;

&lt;p&gt;Syntactically, the language is simple.&lt;/p&gt;

&lt;p&gt;Messages are upper case and properties of messages are lower case. A property contains a message or composition of messages.&lt;/p&gt;

&lt;p&gt;We use {} to define the contents of a message. We use [] to define special messages which manage collections of data (Hash, List and Array are examples of just such a Message).&lt;/p&gt;

&lt;h2 id=&quot;parsing-expression-grammar&quot;&gt;Parsing Expression Grammar&lt;/h2&gt;

&lt;p&gt;A pseudo parsing expression grammar is as follows:&lt;/p&gt;

&lt;div id=&quot;id-g1-1-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;a} PROPERTY &amp;lt;- property primitive+
b} PROPERTY &amp;lt;- property MESSAGE+
c} MESSAGE &amp;lt;- Message { PROPERTY* } // Could also be () if people prefered that.
d} MESSAGE &amp;lt;- Message [ MESSAGE ]
&lt;/code&gt;&lt;/pre&gt;

&lt;h6 id=&quot;id-g1-1&quot;&gt;Grammar-1.1: Parsing expression grammar for SipCoffee.&lt;/h6&gt;

&lt;h3 id=&quot;primitives-are-messages&quot;&gt;Primitives are Messages&lt;/h3&gt;

&lt;p&gt;Primitives are things like string, numbers and dates (to name a few). Primitives are actually messages.&lt;/p&gt;

&lt;p&gt;Examples being:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Strings - “Hello” (String message)&lt;/li&gt;
  &lt;li&gt;Floats - 34.56f (Float message)&lt;/li&gt;
  &lt;li&gt;Reals - 3.456 (Real message)&lt;/li&gt;
  &lt;li&gt;Integers - 34 (Int message)&lt;/li&gt;
  &lt;li&gt;Longs - 56l (Long message)&lt;/li&gt;
  &lt;li&gt;Dates - 1994-11-05T08:15:30-05:00 (Date message - Considering only allowing UTC dates to be stored)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;collections&quot;&gt;Collections&lt;/h3&gt;

&lt;p&gt;A collection is defined by simply listing the item in the array separated by white space (we could also separate items using commas).&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;array of strings - [ “Hello” “And” “GoodBye” ]&lt;/li&gt;
  &lt;li&gt;array of integers - [ 1 2 5 6 12 656 ]&lt;/li&gt;
  &lt;li&gt;array of floats - [ 23.0f 345.4f 63.346f ]&lt;/li&gt;
  &lt;li&gt;array of Messages - [ User { name “Jane” } User { name “Toan” } User { name “Frank” } ]&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;availability&quot;&gt;Availability&lt;/h2&gt;

&lt;p&gt;SipCoffee works with the Interface Vision framework. We’ve created an initial persister that is able to save a program configured in Interface Vision as SipCoffee. The persister will itself be written in SipCoffee. When we get to that point, we will blog about it.&lt;/p&gt;

&lt;p&gt;In the mean time, please follow us &lt;a href=&quot;http://www.twitter.com/interfaceVision&quot;&gt;@interfaceVision&lt;/a&gt; and/or &lt;a href=&quot;http://www.twitter.com/erichosick&quot;&gt;@erichosick&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;That’s it. A very simple message-oriented language based on composition.&lt;/p&gt;

&lt;h2 id=&quot;next-step&quot;&gt;Next Step&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;/design/example-window-basic&quot;&gt;next step&lt;/a&gt; was to get a program to display a native window using SipCoffee.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Why We Don't Need Overloading</title>
   <link href="http://bloginterfacevision.github.com/design/design-overloading-sip"/>
   <updated>2013-12-10T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/design-overloading-sip</id>
   <content type="html">&lt;h1 id=&quot;why-we-dont-use-overloading&quot;&gt;Why We Don’t Use Overloading&lt;/h1&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;We don’t use overloading because our framework has no subroutines to overload. This is because the rules of Simple Interface Programming (SIP) don’t allow subroutines with explicit parameters.&lt;/p&gt;

&lt;p&gt;Instead of overloading, we use Parts that are able to operate on all primitives. Currently, we have chosen Part (aka object), string, boolean, integer, long, float, double, byte array, int array, long array and float array as the primitives we support.&lt;/p&gt;

&lt;h2 id=&quot;example-of-traditional-overloading&quot;&gt;Example of Traditional Overloading&lt;/h2&gt;

&lt;p&gt;The following is how, traditionally, the function add would be defined:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
int add (int left, int right ) { return left + right }
long add (long left, int right) { return left = right }
long add (long left, long right) { return left + right }
...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and so on. The left and right parameters for add vary based on the primitives we need to add.&lt;/p&gt;

&lt;h2 id=&quot;the-with-properties&quot;&gt;The “With” Properties&lt;/h2&gt;

&lt;p&gt;Our Part part use “with” Properties: each “with” property being of a different primitive data type. Here is the pseudo-code for our Part part (note we are only showing withPart, withLong and withFloat).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Serializable] public class Part : IPart {
  ...
  [XmlIgnore] public virtual IPart   withPart { get; set; }
  [XmlIgnore] public virtual int    withLong { get; set; }
  [XmlIgnore] public virtual float   withFloat { get; set; }
  ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;By default, these properties do nothing for the set scope and return a “default value” for the get scope: usually 0, false, empty string, empty part and 0 length arrays.&lt;/p&gt;

&lt;p&gt;Every Part that inherits from the Part class can optionally implement a “with” property.&lt;/p&gt;

&lt;p&gt;Note: The Part class is our framework’s “object” from which everything inherits. At some point, we will update the C# object class to contain “with” properties.&lt;/p&gt;

&lt;h2 id=&quot;example-primitive-parts&quot;&gt;Example Primitive Parts&lt;/h2&gt;

&lt;p&gt;Let’s look at pseudo-code for the Float and Integer part. Our Float and Integer parts implements the “with” properties as follows:&lt;/p&gt;

&lt;h3 id=&quot;float-part&quot;&gt;Float Part&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;namespace Vision.Core {

  [Serializable] public class Float : Part {
    protected float p_value = 0.0f;
    [XmlElement(&quot;value&quot;)] public override float withFloat {
      get { return p_value; }
      set { p_value = value; }
    }

    [XmlIgnore] public override int withInt {
      get { return (int)p_value; }
      set { p_value = value; }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Our Float Part is able to convert to different primitive types automatically (note this is pseudo-code and more validation occurs in the actual source code).&lt;/p&gt;

&lt;p&gt;Note: At some point we will update object of C# to contain with properties. The example Float part would be removed and the float type would be updated. This allows us to take advantage of boxing, etc.&lt;/p&gt;

&lt;h3 id=&quot;integer-part&quot;&gt;Integer Part&lt;/h3&gt;

&lt;p&gt;The Integer Part looks almost similar to the Float part.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;namespace Vision.Core {
  [Serializable] public class Integer : Part {

    protected int p_value = 0;
    [XmlElement(&quot;value&quot;)] public override int withInt {
      get { return p_value; }
      set { p_value = value; }
    }

    [XmlIgnore] public override float withFloat {
      get { return (float)withInt; }
      set { withInt = (int)value; }
    }

  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&quot;operations&quot;&gt;Operations&lt;/h2&gt;

&lt;p&gt;So, we have our primitives defined. Let’s look at how we bypass the need for Overloading by implementing an Add Part.&lt;/p&gt;

&lt;h3 id=&quot;add-part&quot;&gt;Add Part&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;namespace Vision.Core {
  [Serializable] public class Add : OpArgDual {

    [XmlElement(&quot;argLeft&quot;)] public Part argLeft { get; set; }
    [XmlElement(&quot;argRight&quot;)] public Part argRight { get; set; }

    [XmlIgnore] public override int withInt {
      get { return argLeft.withInt + argRight.withInt; }
    }

    [XmlIgnore] public override float withFloat {
      get {
        return argLeft.withFloat + argRight.withFloat;
      }
    }

  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;What is most interesting to note is that each “with” Property calls the associated “with” property of argLeft and argRight and then adds them. For example, withFloat is implemented as:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;return argLeft.withFloat + argRight.withFloat;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&quot;putting-it-all-together&quot;&gt;Putting it All Together&lt;/h2&gt;

&lt;p&gt;Let’s see how we are able to use operations on different primitive types without Overloading. First, we will setup a few variables:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
IPart integerA = new Integer { withInt = 3 };
IPart integerB = new Integer { withInt = 4 };
IPart floatA = new Float { withFloat = 3.0f };
IPart floatB = new Float { withFloat = 3.0f };

IPart addTwoInts = new Add { argLeft = integerA, argRight = integerB };
IPart addTwoFloats = new Add { argLeft = floatA, argRight = floatB };

	IPart addTwoThings = new Add { argLeft = floatA, argRight = integerA };
...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Adding two floats:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;float floatResult = addTwoFloats.withFloat;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Adding two integers:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;int integerResult = addTwoInts.withInt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Adding a float and an integer and getting a float:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;float floatResult = addTwoThings.withFloat;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Adding two integers and getting a float:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;float floatResult = addTowInts.withFloat;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We are now able to support any combination of addition between the primitive data types of floats, strings, integers, arrays, and so on.&lt;/p&gt;

&lt;h2 id=&quot;why-we-dont-use-overloading-1&quot;&gt;Why We Don’t Use Overloading&lt;/h2&gt;

&lt;p&gt;Since SIP is supposed to be used with Interface Vision, we want to be able to visually represent operations without focusing on the primitives we are operating on.&lt;/p&gt;

&lt;h3 id=&quot;visual-composition&quot;&gt;Visual Composition&lt;/h3&gt;

&lt;p&gt;Let’s see how addition looks visually.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;featurette-image img-polaroid&quot; src=&quot;/assets/img/doc-overloading-sip-visual-example.png&quot; /&gt; &lt;/p&gt;

&lt;p&gt;What is important to note is that the inputs and outputs to our addition configuration do not care about what primitive types we will be adding. By hooking up our Add, we are able to support &lt;strong&gt;all&lt;/strong&gt; combinations of addition of primitive types. The actual primitive we operate in depends on which “with” property is accessed on the Add part.&lt;/p&gt;

&lt;h2 id=&quot;why-not-use-conversion-inside-operations&quot;&gt;Why Not Use Conversion Inside Operations?&lt;/h2&gt;

&lt;p&gt;We could have had a single withPart property and then provided conversion within operations.&lt;/p&gt;

&lt;p&gt;However, this would require our code to continually validate that the correct type of data was returned before applying an operation. For example, let’s say we wanted to implement adding integers and we only have withPart. We would need to do something as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;namespace Vision.Core {
  [Serializable] public class AddInteger : OpArgDual {

    [XmlElement(&quot;argLeft&quot;)] public object argLeft { get; set; }
    [XmlElement(&quot;argRight&quot;)] public object argRight { get; set; }

    [XmlIgnore] public override object withPart {
      get {
        int result = 0;
        if (( argLeft is int ) &amp;amp;&amp;amp; ( argRight is int )) {
          result = (int)argLeft + (int)argRight;
        } else {
          // Throw an Exception? Just return 0?
        }
        return result
      }
    }

  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We felt this would greatly slow down execution time: especially in math libraries.&lt;/p&gt;

&lt;p&gt;Note: In this pseudo-code, we use object.&lt;/p&gt;

&lt;h3 id=&quot;how-about-conversion-parts&quot;&gt;How About Conversion Parts&lt;/h3&gt;

&lt;p&gt;We could have also created parts to do conversion such as a FloatToInt part. However, we would end up, again, with Part explosion. Also, with a visual integration environment, you would have to use a lot of conversion parts making the program look, visually, messy.&lt;/p&gt;

&lt;h3 id=&quot;subroutine-explosion&quot;&gt;Subroutine Explosion&lt;/h3&gt;

&lt;p&gt;In both examples, conversion within operations and conversion parts, we end up with part explosion: AddLong, AddFloat, AddString, AddFloatLong and so on. Really, if you think about it, overloading is not really the best way to define operations between primitive data types because of this subroutine explosion issue: a real problem in the programming industry.&lt;/p&gt;

&lt;p&gt;People do solve this problem to some extent by using things like Generics.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Interface Vision - The Technology</title>
   <link href="http://bloginterfacevision.github.com/design/design-our-technology"/>
   <updated>2013-11-13T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/design/design-our-technology</id>
   <content type="html">
&lt;h1 id=&quot;about-our-technology&quot;&gt;About Our Technology&lt;/h1&gt;

&lt;h2 id=&quot;our-vision&quot;&gt;Our Vision&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;Eventually, programming will be done by composing software visually: not through coding.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;This is inevitable.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;interface-vision-and-sip&quot;&gt;Interface Vision and SIP&lt;/h2&gt;

&lt;p&gt;Interface Vision is a visual object language and fully composable object framework. Instead of developing software using source code, programmers develop by visually connecting parts &lt;a href=&quot;#id-1&quot;&gt;(1)&lt;/a&gt; together.&lt;/p&gt;

&lt;p&gt;Interface Vision is written in C# using &lt;a href=&quot;http://xamarin.com/&quot;&gt;Xamarin&lt;/a&gt;, &lt;a href=&quot;http://www.mono-project.com/Main_Page&quot;&gt;Mono&lt;/a&gt;, &lt;a href=&quot;http://monodevelop.com/&quot;&gt;Monodevelop&lt;/a&gt;, &lt;a href=&quot;http://xamarin.com/monotouch&quot;&gt;Mono Touch&lt;/a&gt; and &lt;a href=&quot;http://www.microsoft.com/visualstudio/eng&quot;&gt;Visual Studio&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We’re creating Interface Vision using a programming paradigm, we developed in-house, called Simple Interface Programming (SIP).&lt;/p&gt;

&lt;p&gt;Before we delve into Interface Vision, let’s talk about SIP and how it has allowed us to create Interface Vision.&lt;/p&gt;

&lt;h3 id=&quot;how-is-sip-different&quot;&gt;How Is SIP Different&lt;/h3&gt;

&lt;p&gt;SIP does not use functions or methods. Yes. Really. Our framework has tens of thousands of lines of source code and we have &lt;strong&gt;one&lt;/strong&gt; function:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;static int main {
  ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Wait. If we have no functions or methods, then how do we:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;define&lt;/strong&gt; the task of a part?&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;pass&lt;/strong&gt; information to a part?&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;initialize&lt;/strong&gt; a part?&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;where-we-put-tasks&quot;&gt;Where We Put Tasks&lt;/h4&gt;

&lt;p&gt;SIP use properties, instead of methods, to define the tasks a part performs. Notice, in &lt;a href=&quot;#id-s1-1-top&quot;&gt;Source-1.1&lt;/a&gt;, withLong contains the task to add two numbers.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
public long withLong {
  get { return opLeft.withLong + opRight.withLong; }
}
...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;SIP doesn’t allow developers to create subroutines (methods, functions, modules, etc.) which take parameters.&lt;/p&gt;

&lt;h4 id=&quot;how-we-pass-information-to-different-parts&quot;&gt;How We Pass Information To Different Parts&lt;/h4&gt;

&lt;p&gt;In SIP, we don’t really pass information to a part. Instead, we “pull” that information into the part. How do we do this?&lt;/p&gt;

&lt;p&gt;Traditionally, properties and attributes store information internal to a part. External information is provided to parts through parameters.&lt;/p&gt;

&lt;p&gt;This is where SIP differs. Within SIP, a property can contain a reference to external information.&lt;/p&gt;

&lt;p&gt;This “reference” is actually a special type of part, called a locator, which is able to locate information contained within data structures. For example, a HashTable would have a HashTableLocator and an Array would have an ArrayLocator.&lt;/p&gt;

&lt;h4 id=&quot;how-do-we-initialize-parts&quot;&gt;How Do We Initialize Parts?&lt;/h4&gt;
&lt;p&gt;Since Interface Vision is a &lt;a href=&quot;http://en.wikipedia.org/wiki/Visual_programming_language&quot;&gt;visual programming language&lt;/a&gt;, users drag and drop parts to create instanced of them. Usually, a user will attach a new part to the property of an existing part.&lt;/p&gt;

&lt;p&gt;We store and load all of these attached parts in a configuration file using serialization. An example of just such a configuration is shown in &lt;a href=&quot;#id-s1-5-top&quot;&gt;Source-1.5&lt;/a&gt; and &lt;a href=&quot;#id-s1-7-top&quot;&gt;Source-1.7&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It is also possible to initialize parts using source code as shown in &lt;a href=&quot;#id-s1-3-top&quot;&gt;Source-1.3&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;an-example-using-internal-information&quot;&gt;An Example Using Internal Information&lt;/h3&gt;
&lt;p&gt;Let’s say we want to add two numbers (longs, integers, etc.). Addition takes a left operand and a right operand. Traditionally, add is defined as a function (or a method) as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;long add ( long opLeft, long opRight ) {
  return opLeft + opRight;
}

int add ( int opLeft, int opRight ) {
  return opLeft + opRight;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;However, in SIP, you aren’t allowed to use parameters. Instead we use properties.&lt;/p&gt;

&lt;p&gt;We create an Add part with properties as shown &lt;a href=&quot;#id-2&quot;&gt;(2)&lt;/a&gt;:&lt;/p&gt;

&lt;div id=&quot;id-s1-1-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;public interface IPart {
  long withLong { get; set; }
  int withInt { get; set; }
}

public class Add : IPart {
  public IPart opLeft { get; set; }
  public IPart opRight { get; set; }

  public long withLong {
    get { return opLeft.withLong + opRight.withLong; }
  }
  public long withInt {
    get { return opLeft.withInt + opRight.withInt; }
  }
} ###### Source-1.1: The Add Part can add two numbers. {#id-s1-1}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The first thing to note is that the properties opLeft (the left operand of add) and opRight (the right operand of add) are not primitive data types. They are of type IPart.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
  	public IPart opLeft { get; set; }
  	public IPart opRight { get; set; }
...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If we want to add two long or integer primitive data types, we will need to call the withLong or withInt property of IPart. This is seen within the implementation of Add.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
  	public long withLong {
  get { return opLeft.withLong + opRight.withLong; }
  	}
  	public long withInt {
  get { return opLeft.withInt + opRight.withInt; }
  	}
...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This means we will need a Long part and an Int part to hold the value of a primitive data type.&lt;/p&gt;

&lt;div id=&quot;id-s1-2-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;public class Long : IPart {
  public long value { get; set; }
  public long withLong {
    get { return value; }
  }
  public int withInt {
    get { return (int)value; }
  }
}

public class Int : IPart {
  public int value { get; set; }
  public long withLong {
    get { return value; }
  }
  public int withInt {
    get { return value; }
  }
} ###### Source-1.2: A Long and Int part. {#id-s1-2}
&lt;/code&gt;&lt;/pre&gt;

&lt;h4 id=&quot;composing-parts-using-object-initializers&quot;&gt;Composing Parts Using Object Initializers&lt;/h4&gt;

&lt;p&gt;So, let’s see how we compose addition using C# &lt;a href=&quot;http://en.wikipedia.org/wiki/C_Sharp_syntax#Object_initializers&quot;&gt;object initializers&lt;/a&gt;:    &lt;/p&gt;

&lt;div id=&quot;id-s1-3-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;static void main() { 
  IPart program = new Add {
    opLeft = new Long { value = 5 },
    opRight = new Long { value = 7 }
  };
  long result = program.withLong;
} ###### Source-1.3: Our first program simply adds two numbers. {#id-s1-3}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The result of adding two numbers is found by simply calling myProgram.withLong.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;long result = program.withLong;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We could use the same composed part to get the result as an integer.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;int result = program.withInt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h4 id=&quot;composing-parts-visually&quot;&gt;Composing Parts Visually&lt;/h4&gt;

&lt;p&gt;We can visually represent our add configuration using a diagram (NOTE: We’ve come to the conclusion that the best way to represent &lt;strong&gt;Add&lt;/strong&gt; visually is to stick with mathematical equations. The post “&lt;a href=&quot;/info/vpls-and-mental-models&quot;&gt;there is no single mental model for programming&lt;/a&gt;” goes into detail on why we’ve made this decision).&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/technology-system-add-internal-example.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;###### Figure-1.1: An example of adding two numbers internal to a part.&lt;/p&gt;

&lt;p&gt;In this example, the information located in the properties is internal to the add part. Let’s look at an example where the information is external.&lt;/p&gt;

&lt;h3 id=&quot;an-example-configuration-using-external-information&quot;&gt;An Example Configuration Using External Information&lt;/h3&gt;

&lt;p&gt;Figure-1.2 is a form that has two fields. When we press “Add” on the form, two numbers are summed (&lt;a href=&quot;#id-3&quot;&gt;3&lt;/a&gt;).&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/technology-system-add-form.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;###### Figure-1.2: A form which adds two numbers.&lt;/p&gt;

&lt;p&gt;We are only allowed to compose programs and we can’t provide information via a public method with parameters. So, we need to create a part that can locate information on a form. Let’s call it FormValue (&lt;a href=&quot;#id-4&quot;&gt;4&lt;/a&gt;).&lt;/p&gt;

&lt;div id=&quot;id-s1-4-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;public class FormValue : IPart {
  public string nameForm { get; set; }
  public string nameField { get; set; }
  
  public long withLong {
    get { return Ccm.shared[nameForm].field[nameField].withLong; }
  }
  
  public long withInt {
    get { return Ccm.shared[nameForm].field[nameField].withInt; }
  }
} ###### Source-1.4: The FormValue Part is able to retrieve a value from the field of a form. {#id-s1-4}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The example code in &lt;a href=&quot;#id-s1-4-top&quot;&gt;Source-1.4&lt;/a&gt; is almost boilerplate except the global Part called Ccm (which stands for &lt;a href=&quot;#id-composite-centric-memory&quot;&gt;Composite Centric Memory (CCM)&lt;/a&gt; ).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
get { return Ccm.shared[nameForm].field[nameField].withLong; }
...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here is an example usage (&lt;a href=&quot;#id-6&quot;&gt;6&lt;/a&gt;):&lt;/p&gt;

&lt;div id=&quot;id-s1-5-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;static void main() { 
  IPart program = new Add {
    opLeft = new FormValue {
      nameForm = “AddForm”,
      nameField = “opLeft”
    },
    opRight = new FormValue {
      nameForm = “AddForm”,
      nameField = “opRight”
    }
  };
  long result = myProgram.withLong;
} ###### Source-1.5: The values to add are external to the Add part. {#id-s1-4}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A visual representation of this example is shown in Figure-1.3.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/technology-system-add-external-example.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;###### Figure-1.3: An example of adding two numbers external to a part.&lt;/p&gt;

&lt;h3 id=&quot;simplified-interfaces-decoupling-and-code-reuse&quot;&gt;Simplified Interfaces, Decoupling and Code Reuse&lt;/h3&gt;

&lt;p&gt;What is interesting about the parts we have created is that they all have similar interfaces: they all look the same to an external observer. However, internally, these parts are doing completely different things.&lt;/p&gt;

&lt;p&gt;In the first example, when Add calls withLong of the instance plugged into the opLeft (or opRight) property, a value is simply returned from the Long. However, in the second example, Add ends up using a part that reads from a form. Two completely different tasks which, from an external observer, look like they are doing the exact same thing.&lt;/p&gt;

&lt;p&gt;Since the interface is the exact same between Long, Int and FormValue, Add is fully unaware of where the values are coming from. This means that the part which Adds is not “connected” to the part that finds the value on the form: they are decoupled &lt;a href=&quot;#id-7&quot;&gt;(7)&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;standardizing-our-parts&quot;&gt;Standardizing Our Parts&lt;/h3&gt;

&lt;p&gt;Figure-1.4 shows how we can standardize the interface of our parts. &lt;strong&gt;Every part&lt;/strong&gt; has the exact same interface &lt;a href=&quot;#id-8&quot;&gt;8&lt;/a&gt;. This makes them a lot easier to use than traditional objects and modules which have specialized, and thus unique, interfaces.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/technology-system-generalized.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;###### Figure-1.4: All parts have a standardized interface.&lt;/p&gt;

&lt;p&gt;Using traditional programming paradigms, you end up with thousands of objects: each with their own unique method signature/interface. With SIP, you end up with thousands of Parts with the same signature/interface.&lt;/p&gt;

&lt;h3 id=&quot;loading-and-saving-programs-through-persistence&quot;&gt;Loading and Saving Programs Through Persistence&lt;/h3&gt;

&lt;p&gt;If programs are created visually, then how are they saved? Are they compiled or interpreted like traditional programs?&lt;/p&gt;

&lt;p&gt;Programs created using Interface Vision are neither compiled or interpreted. Programs are stored as data in different formats &lt;a href=&quot;#id-8&quot;&gt;8&lt;/a&gt;. The program is loaded from one of the stored data formats and deserialized into parts that form the executable program. The parts have already been written and compiled by us, so there is no need for you to compile the programs you create. In fact, the program is always running: even while you are developing it.&lt;/p&gt;

&lt;p&gt;Here is an example of a program described and stored as json (a standard format used to store the state of a Part).&lt;/p&gt;

&lt;div id=&quot;id-s1-6-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;$type&quot;: &quot;Add&quot;,
  &quot;opLeft&quot;: {
    &quot;$type&quot;: &quot;FormValue&quot;,
    &quot;nameForm&quot;: &quot;AddForm&quot;,
    &quot;nameValue&quot;: &quot;opLeft&quot;,
  },
  &quot;opRight&quot;: {
    &quot;$type&quot;: &quot;FormValue&quot;,
    &quot;nameForm&quot;: &quot;AddForm&quot;,
    &quot;nameValue&quot;: &quot;opRight&quot;,
  },
} ###### Source-1.6: A Configuration using json. {#id-s1-6}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;What is really interesting about this json is that it looks very similar to the example C# in &lt;a href=&quot;#id-s1-6-top&quot;&gt;Source-1.6&lt;/a&gt;. In fact, there is an almost one-to-one relationship between the persisted version a program and the program written using C# object initializers.&lt;/p&gt;

&lt;h4 id=&quot;parts-and-relational-databases&quot;&gt;Parts and Relational Databases&lt;/h4&gt;

&lt;p&gt;Our parts have no methods: only properties. This greatly simplifies database usage (both Sql and non-sql solutions). The only difference between traditional objects and relations in a relational databases was that objects have methods and properties whereas relations only have properties. Since our Parts have no methods, they can also be viewed as relations.&lt;/p&gt;

&lt;p&gt;This means any Part can be directly stored in a database without any need to convert the Part.&lt;/p&gt;

&lt;h4 id=&quot;software-layers-using-sip&quot;&gt;Software Layers Using SIP&lt;/h4&gt;

&lt;p&gt;Using SIP, software layers differ slight from traditional programming paradigms as seen in Figure-1.5.&lt;/p&gt;

&lt;p class=&quot;pagination-centered&quot;&gt;&lt;img class=&quot;img-polaroid&quot; src=&quot;/assets/img/technology-system-software-layers.png&quot; /&gt;&lt;img /&gt;&lt;/p&gt;
&lt;p&gt;###### Figure-1.5: Software layers using SIP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 4&lt;/strong&gt; is the software framework. It contains all the Parts that are available to the developer when programming.  A drawback is that if a new type of Part is required, the developer would need to update or add it to the framework.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 5&lt;/strong&gt; is a domain specific program created by visual composition . The result of the program is a data file in the form of json, xml or other format. This file can be stored anywhere: even in the cloud or in a database. It can be loaded in different environments such as iOS, Android, OSX and Windows.&lt;/p&gt;

&lt;p&gt;The domain specific business logic is 100% removed from the programming language and framework. This makes it easier to create cross platform applications (among other advantages).&lt;/p&gt;

&lt;h3 id=&quot;some-advantages-of-interface-vision-and-sip&quot;&gt;Some Advantages Of Interface Vision and SIP&lt;/h3&gt;
&lt;p&gt;Interface Vision has some of the following advantages over traditional methods of development:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A much simpler framework for software integrators to work with: especially from a visual standpoint &lt;a href=&quot;#id-11&quot;&gt;(11)&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;A reduction in complexity and specialization making it easier to learn.&lt;/li&gt;
  &lt;li&gt;Programs can easily work with each other: even if developed by different teams in different companies.&lt;/li&gt;
  &lt;li&gt;A one-to-one relationship when persisting. This includes sql and non-sql stores.&lt;/li&gt;
  &lt;li&gt;100% decoupled parts allowing for much greater code reuse.&lt;/li&gt;
  &lt;li&gt;Removal of domain specific logic/business logic from source code.&lt;/li&gt;
  &lt;li&gt;Programs that are always on: changeable during run-time. This means immediate feedback. Changes are seen instantly. No need to code/compile/test/run.&lt;/li&gt;
  &lt;li&gt;Composing a program is easier for systems analysts. UX designers are also able to mock out actual solutions. Edge cases can be easily filled out by programmers at a later time.&lt;/li&gt;
  &lt;li&gt;Parallel processing is easy to configure.&lt;/li&gt;
  &lt;li&gt;The ability to inject behavior anywhere within your program: anytime and anywhere. You can “grow” programs.&lt;/li&gt;
  &lt;li&gt;For the framework itself, less source code than would be required using traditional programming paradigms.&lt;/li&gt;
  &lt;li&gt;Highly scalable framework that is usable in cloud computing environments.&lt;/li&gt;
  &lt;li&gt;Templates are available which allow for pre-configured tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;id-composite-centric-memory&quot;&gt;Composite Centric Memory&lt;/h3&gt;
&lt;p&gt;The final “secret” of Interface Vision and SIP is composite centric memory. Composite centric memory has the following key aspects:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Data Structures&lt;/strong&gt; - Some parts are created specifically to store information: data structures. They are usually some type of data structure like a list, hashtable, balanced tree, collection, set, etc.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Locators&lt;/strong&gt; - Some parts are created specifically to locate information within data structures &lt;a href=&quot;#id-12&quot;&gt;(12)&lt;/a&gt;. An example of just such a locator is the FormValue type defined in &lt;a href=&quot;#id-s1-4-top&quot;&gt;Source-1.4&lt;/a&gt;. Every data structure must have at least one Part defined that can search that data structure.&lt;/li&gt;
  &lt;li&gt;A program has a root Part that is a hierarchy made up of one or more data structures: this is the root of the CCM.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A developer is required to place parts they compose in composite centric memory. The format of the CCM is not important: it can be any type of data structure or even a collection of different types of data structures. However, for every program there is a single “root” by which all information is accessible. Special locator Parts have been written to find information within CCM.&lt;/p&gt;

&lt;p&gt;Information in CCMs can be stored as follows:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Global Level&lt;/strong&gt; - For information shared across all parts, within a globally accessible static type. This has an associated locator part to find information located within this static CCM.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Thread Level&lt;/strong&gt; - For each thread, a non-static CCM is available. This has an associated locator part to find information located within this thread specific CCM.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Part Level&lt;/strong&gt; - For each call into a part, a message can be passed. This message is a CCM in itself and has an associated locator part.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CCM allows access to all external information required by any part to accomplish that part’s task.&lt;/p&gt;

&lt;p&gt;Note, this is not similar to a global variable in that a part accesses a CCM via locators. Programmers should not access CCM directly (and really they can’t since they are not allowed to code: they can only compose using existing types).&lt;/p&gt;

&lt;h3 id=&quot;miscellaneous-stuff&quot;&gt;Miscellaneous Stuff&lt;/h3&gt;

&lt;h4 id=&quot;thread-safe-code-and-re-entrance&quot;&gt;Thread Safe Code and Re-Entrance&lt;/h4&gt;
&lt;p&gt;One issue that comes up is multi-threaded programs. It is often necessary for a function or method to be used by different threads at the same time. This means any data shared between these programs, even within the method or function, needs to be “protected” in some way. We don’t want two programs updating the same data at the same time.&lt;/p&gt;

&lt;p&gt;We solve this problem in a few ways:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Duplicate a CCM&lt;/strong&gt; - Optimally, we want to remove the need for a developer to make their code thread safe. The most desirable solution, then, is taking advantage of the properties of CCMs. A program is composed of Parts. To create a new instance of an entire program, you just duplicate the CCM for that program and run it in a thread. You are assured that everything within that CCM instance is only accessed by the current thread. You don’t have to even consider thread safe code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mutex A Part&lt;/strong&gt; - A property that needs to be thread safe can be wrapped or decorated with a Mutex type. An example of just such a mutex type is provided below.&lt;/p&gt;

&lt;div id=&quot;id-s1-7-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;public class Mutex : IPart {
  public string nameOfMutex { get; set; }
  public IPart wrappedItem { get; set; }

  public long withLong {
    get {
      long temp = 0;
      Ccm.shared.mutext[nameOfMutex].enter = this;
      temp = wrappedItem.withLong;
      Ccm.shared.mutext[nameOfMutex].exit = this;
      return temp;
    }
    set {
      Ccm.shared.mutext[nameOfMutex].enter = this;
      wrappedItem.withLong = value;
      Ccm.shared.mutext[nameOfMutex].exit = this;
    }
  }

  public long withInt {
    get {
      int temp = 0;
      Ccm.shared.mutext[nameOfMutex].enter = this;
      temp = wrappedItem.withInt;
      Ccm.shared.mutext[nameOfMutex].exit = this;
      return temp;
    }
    set {
      Ccm.shared.mutext[nameOfMutex].enter = this;
      wrappedItem.withInt = value;
      Ccm.shared.mutext[nameOfMutex].exit = this;
    }
  }

} ###### Source-1.7: A Mutex Part. {#id-s1-7}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here is an example usage that makes our above Add json example thread safe:&lt;/p&gt;

&lt;div id=&quot;id-s1-8-top&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;$type&quot;: &quot;Mutex&quot;,
  &quot;nameOfMutex&quot;: &quot;AddMutex&quot;,
  &quot;wrappedItem&quot;: {
    &quot;$type&quot;: &quot;Add&quot;,
    &quot;opLeft&quot;: {
      &quot;$type&quot;: &quot;FormValue&quot;,
      &quot;nameForm&quot;: &quot;AddForm&quot;,
      &quot;nameValue&quot;: &quot;opLeft&quot;,
    },
    &quot;opRight&quot;: {
      &quot;$type&quot;: &quot;FormValue&quot;,
      &quot;nameForm&quot;: &quot;AddForm&quot;,
      &quot;nameValue&quot;: &quot;opRight&quot;,
    }
  }
} ###### Source-1.8: Add configured with a mutex. {#id-s1-8}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Consider for a moment that the example Mutex type is fully re-usable. It can be plugged into any property! The same approach can be used for things like exception handling.&lt;/p&gt;

&lt;h4 id=&quot;minimizing-memory-allocation-during-run-time&quot;&gt;Minimizing Memory Allocation During Run Time&lt;/h4&gt;

&lt;p&gt;Allocating memory can be expensive. Interface Vision is able to minimize memory allocation during run-time. A program is composed solely of Parts. These parts are first loaded when the configuration is deserialized from json, xml, etc. They stay around for the lifetime of the program. This means an entire program can be configured that requires no memory allocation during run time.&lt;/p&gt;

&lt;p&gt;Let’s consider a configuration for logging a user into a web based system. Let’s say we want to have up to 400 people a second logging in and it takes 1 second to log them in. Our configuration is able to login a single user. That configuration is then stored in a Factory part that is able to pre-allocate as many of our log-in programs as we require: 400 in this case.&lt;/p&gt;

&lt;p&gt;For every login, we ask for a login configuration from the Factory, run that login based on some varying information (perhaps username and password), and return that configuration to the factory when we are done. If all 400 programs are in use, the Factory can create a new instance of the entire program which would require memory allocation.&lt;/p&gt;

&lt;p&gt;This leads to faster execution of programs as there is no need to allocate or deallocate memory during run-time.&lt;/p&gt;

&lt;p&gt;This also makes for programs that are cloud friendly as they can be easily scaled. We don’t have to worry about our code being thread safe meaning it will run faster &lt;a href=&quot;#id-13&quot;&gt;13&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;footnotes&quot;&gt;Footnotes&lt;/h2&gt;

&lt;p&gt;{#id-1} 1. We look at parts as being “similar” to systems, objects, classes, modules, functions, subroutines and the such.&lt;/p&gt;

&lt;p&gt;{#id-2} 2. Our example source code is written in C#.&lt;/p&gt;

&lt;p&gt;{#id-3} 3. Note that we do not provide a configuration for the form itself. This was done to keep the example simple.&lt;/p&gt;

&lt;p&gt;{#id-4} 4. We could generalize the idea of locating information within our framework.&lt;/p&gt;

&lt;p&gt;{#id-6} 6. Note that, to keep the example simple, we do not provide a configuration for the form itself. The Form class would be part of the vision framework. Instantiating and defining the form would be done in the exact same manner as was done with the Add program.&lt;/p&gt;

&lt;p&gt;{#id-8} 8. The properties themselves are accessible externally but really only used directly during serialization and deserialization. &lt;/p&gt;

&lt;p&gt;{#id-9} 9. Programs can be stored as json, xml, binary data, and even as key/value pairs in a database.&lt;/p&gt;

&lt;p&gt;{#id-10} 10. Remember, the program could also be created by using C# object initializers and then compiled or someone could “program” in json (although this is frowned upon).&lt;/p&gt;

&lt;p&gt;{#id-11} 11. The framework is specifically designed to be composed visually: not coded against. However, coding is possible using C# object initializers.&lt;/p&gt;

&lt;p&gt;{#id-12} 12. Traditionally, data structure objects support both the structure and the searching of that structure. This does seem to violate the single-responsibility principle.&lt;/p&gt;

&lt;p&gt;{#id-13} 13. Code that is thread safe usually requires some kind of operating system call slowing down the code in general: even when it is not being used in a multi-threaded environment.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>I Now Understand The Importance of Early Adopters</title>
   <link href="http://bloginterfacevision.github.com/startups/early-adopters"/>
   <updated>2012-12-14T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/startups/early-adopters</id>
   <content type="html">
&lt;p&gt;I’ve given a few “pitches” before, but never one like this.&lt;/p&gt;

&lt;p&gt;I asked for a little information on their background and what they needed in educational software: just to make sure I was on the right track.&lt;/p&gt;

&lt;p&gt;While sharing my desktop remotely, I went over the mockups.&lt;/p&gt;

&lt;h3 id=&quot;within-two-minutes&quot;&gt;Within Two Minutes&lt;/h3&gt;

&lt;p&gt;The people on the other side were showing more enthusiasm than I’d ever been able to muster up.&lt;/p&gt;

&lt;h3 id=&quot;within-five-minutes&quot;&gt;Within Five Minutes&lt;/h3&gt;

&lt;p&gt;They had a better understanding of what we had than I did.&lt;/p&gt;

&lt;h3 id=&quot;within-ten-minutes&quot;&gt;Within Ten Minutes&lt;/h3&gt;

&lt;p&gt;I was ready to buy our product from them.&lt;/p&gt;

&lt;h3 id=&quot;within-24-hours&quot;&gt;Within 24 Hours&lt;/h3&gt;

&lt;p&gt;They were asking other potential early adopters their thoughts.&lt;/p&gt;

&lt;p&gt;I now understand what an early adopter really is and how valuable they are to any startup.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Should the Class Object Be Enumerable?</title>
   <link href="http://bloginterfacevision.github.com/framework/object-aggregate"/>
   <updated>2012-11-15T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/framework/object-aggregate</id>
   <content type="html">
&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;We’ve spent a lot of time thinking about framework. One question we asked ourselves was:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Should our class object be enumerable?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Jonathan_Swift&quot;&gt;Jonathan Swift&lt;/a&gt; has something to say on this:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;So nat’ralists observe, a flea
Hath smaller fleas that on him prey;
And these have smaller fleas to bite ‘em.
And so proceeds &lt;a href=&quot;http://en.wikipedia.org/wiki/Ad_infinitum&quot;&gt;Ad infinitum&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3 id=&quot;our-thoughts&quot;&gt;Our Thoughts&lt;/h3&gt;

&lt;p&gt;We started by asking ourselves if all things in the Universe are composed of other things. The answer is apparently a big yes (though it could be that at some point, at some quantum level, this is not the case).&lt;/p&gt;

&lt;div class=&quot;pagination-centered img-polaroid&quot;&gt;
  &lt;p&gt;
    &lt;img src=&quot;/assets/img/object-aggregate-tortugues.jpg&quot; alt=&quot;&quot; /&gt;
  &lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Being that all things in the real world are composed of other things, it made sense for us to add this behavior to our class object.&lt;/p&gt;

&lt;h3 id=&quot;an-example&quot;&gt;An Example&lt;/h3&gt;

&lt;p&gt;Let’s look at what a foreach loop looks like within our framework:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
object information = new Thing();
foreach ( object o in information) {
  o.action = Empty.instance;
}
...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In this case, we have some information of type object. We do not know if that information is an actual aggregate or a single instance (though we do allow you to query if an object is an actual aggregate by calling isAggregate). However, this doesn’t matter and we are able to traverse the returned object instance.&lt;/p&gt;

&lt;p&gt;Traditionally, a developer would have to write something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
object information = new Thing();
if ( information is AggregateThing) {
  foreach ( object o in (information as AggregateThing)) {
    o.action = Empty.instance;
  }
} else {
  o.action = Empty.instance;
}
...
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&quot;we-are-anti-if&quot;&gt;We Are Anti-If&lt;/h3&gt;

&lt;p&gt;From our example usage, you can see that we do not need an if statement.&lt;/p&gt;

&lt;p&gt;Personally, I’m a fan of the &lt;a href=&quot;http://www.antiifcampaign.com/&quot;&gt;Anti-if Campaign&lt;/a&gt;. Treating all objects as aggregates allows us to remove quite a few ifs from our framework and also allows users of our framework to use less ifs.&lt;/p&gt;

&lt;h3 id=&quot;implementation&quot;&gt;Implementation&lt;/h3&gt;

&lt;p&gt;Treating object as an instance is relatively easy.&lt;/p&gt;

&lt;p&gt;The length of object is always 1.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
public virtual int length {
  get { return 1; }
}
...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Making the instance enumerable requires a little extra work (note this is for C#):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public virtual IEnumerable enumerable {
  get {
    IEnumerable result = new ObjectEnumerable() {  
      theEnumerator =  new ObjectEnumerator() { singleItem = this } as IEnumerator
    } as IEnumerable;
    return result;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Implementing the indexers is a little more difficult requiring design decisions.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public virtual IItem this[int position] {
  get {
    return this;
  }
  set {
    throw new Exception(&quot;No can do.&quot;);
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In the example code, for get, we are simply returning the instance. Should we throw an exception if the index is greater than 0? We are of the mind set that exceptions are bad. So, it might be better to just ignore the index itself and always return this.&lt;/p&gt;

&lt;p&gt;Setting also requires some consideration. We really can’t set the single instance. Overwriting the properties of the existing object with the new object’s properties is probably totally out of the question.&lt;/p&gt;

&lt;p&gt;Throwing an exception is an option, as was done, but perhaps simply ignoring the set is the best option.&lt;/p&gt;

&lt;p&gt;Design decisions.&lt;/p&gt;

&lt;h3 id=&quot;systems-thinking&quot;&gt;Systems Thinking&lt;/h3&gt;

&lt;p&gt;In systems thinking, every part of that system must be required to transform some input into a desired output. If you are able to remove any part of that system, and still have the same desired output, then it’s not a system. You have to remove that part of the system.&lt;/p&gt;

&lt;p&gt;Of course, this is based on the context of the system and desired output.&lt;/p&gt;

&lt;p&gt;From the standpoint of systems thinking, a coded object is not necessarily always an aggregate. In this way, we have violated a principal of systems thinking.&lt;/p&gt;

&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;All objects in the Universe are composed of other objects so, within our framework, object should also be enumerable.&lt;/p&gt;

&lt;p&gt;Treating object as an enumerable allowed us to greatly simplify our framework and usage of our framework.&lt;/p&gt;

&lt;h3 id=&quot;references&quot;&gt;References&lt;/h3&gt;

&lt;p&gt;Image from &lt;a href=&quot;http://en.wikipedia.org/wiki/File:Giambologna_tortugues.jpg&quot;&gt;http://en.wikipedia.org/wiki/File:Giambologna_tortugues.jpg&lt;/a&gt;.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Interface Vision Version 0.1</title>
   <link href="http://bloginterfacevision.github.com/interface%20vision/vision-01"/>
   <updated>2012-04-25T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/interface%20vision/vision-01</id>
   <content type="html">
&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Today is a bit of a milestone. We’ve been able to create an iPad/iPhone app using the Interface Vision Framework. The cool thing… The framework requires no coding to use. Ok, that isn’t exactly true but read on…&lt;/p&gt;

&lt;h2 id=&quot;about-the-video&quot;&gt;About the Video&lt;/h2&gt;

&lt;p&gt;The video shows a very simple OpenGl demo program running on an iPad. Nothing new there. The new thing is that everything about the program was created using configuration code: about 460 lines of it. Currently, this involves a lot of calls to constructors and the setting of properties. However, in the future, the configuration will be stored in json and serialization used to create instances (this is when the no coding part is realized).&lt;/p&gt;

&lt;iframe src=&quot;http://player.vimeo.com/video/41001941&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;webkitallowfullscreen&quot; mozallowfullscreen=&quot;mozallowfullscreen&quot; allowfullscreen=&quot;allowfullscreen&quot;&gt; &lt;/iframe&gt;

&lt;h2 id=&quot;example-configuration&quot;&gt;Example Configuration&lt;/h2&gt;

&lt;p&gt;Here is an example configuration. In this case, it is the OpenGl shaders:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ISimpleClass shaderList = new AggregateArrayList {};
shaderList.actionInsert = new ProgramShaderNative {
  shadingScript = new Vision.Core.String {
    withString = @&quot;
      attribute vec4 position;
      attribute vec4 color;
      varying vec4 colorVarying;
      uniform float translate;
      void main() {
        gl_Position = position;
        gl_Position.y += sin(translate) / 2.0;
        colorVarying = color;
      }&quot;
  },
  shaderType = ShaderType.vertexShader
};
shaderList.actionInsert = new ProgramShaderNative {
  shadingScript = new Vision.Core.String {
    withString = @&quot;
      varying lowp vec4 colorVarying;

      void main() {
        gl_FragColor = colorVarying;
      }&quot;
  } ,
  shaderType = ShaderType.fragmentShader
};
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here is an example of the OpenGL “camera”:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ISimpleClass result = new Camera
  sceneToRender = new ProgramGlslNative {
    uniforms = uniformList,
    attributes = attributeList,
    shaders = shaderList
  } ,
  onCameraSetup = new GlClearColorNative {
    color = new Vec4f {
      r = 0.0f,
      g = 0.0f,
      b = 0.0f,
      a = 1.0f
    }
  },
  onSceneRenderBefore = new GlClearNative {
    clearValue = ClearBufferMask.colorBufferBit
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&quot;future&quot;&gt;Future&lt;/h2&gt;

&lt;p&gt;There is a chicken and egg problem with all of this. Eventually, we hope to be able to configure behaviour of Interface Vision within Interface Vision itself. However, for now, we have to resort to the Macintosh to finish out the framework and setup the configuration files.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;For us, this is quite exciting. It is a good test of the framework. The fact it takes so few lines of configuration code to get a program up and running in OpenGL on an iPad with user interaction is a great test of the technology behind Interface Vision.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Feeling Dirty on Hacker News</title>
   <link href="http://bloginterfacevision.github.com/rant/dirty-hn"/>
   <updated>2011-09-19T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/rant/dirty-hn</id>
   <content type="html">
&lt;p&gt;I now feel dirty for trying to work with a startup on Hacker news. Or should I?&lt;/p&gt;

&lt;h2 id=&quot;why&quot;&gt;Why?&lt;/h2&gt;

&lt;p&gt;I ran into a Show HN post about an interesting startup called Tinyproj. I posted a short project on Tinyproj because I like to work with like minded people: entrepreneurs.&lt;/p&gt;

&lt;p&gt;Then comes a post from a pseudonymous named Edward Case (&lt;a href=&quot;http://news.ycombinator.com/item?id=3015677&quot;&gt;http://news.ycombinator.com/item?id=3015677&lt;/a&gt;, &lt;a href=&quot;http://www.betabeat.com/2011/09/19/why-80-percent-of-web-projects-are-total-bullshit-a-freelancers-rant/&quot;&gt;http://www.betabeat.com/2011/09/19/why-80-percent-of-web-projects-are-total-bullshit-a-freelancers-rant/&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;(Edit: Note the short project description was supposed to be private and Edward Case did not have permission to make it public as was done in their blog)&lt;/p&gt;

&lt;h2 id=&quot;im-not-anonymous&quot;&gt;I’m Not Anonymous&lt;/h2&gt;

&lt;p&gt;I have no reason to be anonymous. My name is Eric Hosick. I’ve been programming since I was 13. I’ve written hundreds of thousands of lines of code. I’ve lectured at a college for a few years in IT and BIS. I’ve started a few companies: even a few offshore. I’ve been successful and I’ve failed: both quite a few times now.&lt;/p&gt;

&lt;p&gt;So, when someone, anonymously, says something like this:&lt;/p&gt;

&lt;p&gt;“I’m sure I’m not the only programmer that can sniff out a fake nerd.” – Edward Case&lt;/p&gt;

&lt;p&gt;And tries to oust me call me out as that fake nerd. Well. Ya. You’ve got a lot to learn about people on Hacker News. Generally, we know our shit.&lt;/p&gt;

&lt;h2 id=&quot;the-1000-char-limit&quot;&gt;The 1000 Char Limit&lt;/h2&gt;

&lt;p&gt;I was limited to 1000 characters on Tinyproj. I did have more detailed requirements. The 1000 char limit was a pain, I have to say, and I was going to quickly give up on Tinyproj. But I am going to have to give cudos to Tinyproj for getting out that Minimal Viable Product. Good on you! It was the right move. So, I stuck in there.&lt;/p&gt;

&lt;p&gt;I clipped off most of the requirements. I knew anyone really interested would just ask for more detail.&lt;/p&gt;

&lt;p&gt;And it was worth it, because the entrepreneur has been really helpful.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

&lt;p&gt;If you are interested in working with someone who is and respects programmers, please do drop a line.&lt;/p&gt;

&lt;p&gt;I think I have some rather amazing stuff coming down the pipeline.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>MonoDevelop With A Custom Version of Mono on the Macintosh</title>
   <link href="http://bloginterfacevision.github.com/language/custom-mono"/>
   <updated>2010-12-05T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/language/custom-mono</id>
   <content type="html">
&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;This blog post will tell you how to develop using MonoDevelop with your own custom version of C# Mono.&lt;/p&gt;

&lt;h2 id=&quot;status-and-code-completion&quot;&gt;Status and Code Completion&lt;/h2&gt;

&lt;p&gt;Currently, everything seems to work and I am able to compile programs using my own version of Mono in MonoDevelop. Code completion using a custom compiled Mono seems to be intermittent. I’ve seen code completion include new properties for the object class but many times it doesn’t.&lt;/p&gt;

&lt;h2 id=&quot;what-you-will-need-to-run-monodevelop&quot;&gt;What you Will Need to run MonoDevelop&lt;/h2&gt;

&lt;p&gt;You will need to install mono on your mac if you don’t already have it. Be sure to install the correct binary based on your mac. Intel, PowerPC or Universal. You can get mono here: &lt;a href=&quot;http://www.go-mono.com/mono-downloads/download.html&quot;&gt;http://www.go-mono.com/mono-downloads/download.html&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Of course, you need to install MonoDeveop. You can get MonoDevelop here: &lt;a href=&quot;http://monodevelop.com/Download&quot;&gt;http://monodevelop.com/Download&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;compile-your-own-version-of-mono&quot;&gt;Compile Your Own Version of Mono&lt;/h2&gt;

&lt;p&gt;Follow the directions on getting mono to compile here &lt;a href=&quot;http://www.mono-project.com/SourceCodeRepository&quot;&gt;http://www.mono-project.com/SourceCodeRepository&lt;/a&gt;. &lt;/p&gt;

&lt;h2 id=&quot;setup-where-mono-will-compile-to&quot;&gt;Setup Where Mono Will Compile To&lt;/h2&gt;

&lt;p&gt;Note: When I wrote this, Mono was still supported by Novell. The above process to compile mono may be better than what I’ve provided below.&lt;/p&gt;

&lt;p&gt;You can read here on how to compile mono for the Macintosh – &lt;a href=&quot;http://www.mono-project.com/Compiling_Mono_on_OSX&quot;&gt;http://www.mono-project.com/Compiling_Mono_on_OSX&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will place our version of mono where MonoDevelop also looks for the unmodified version of Mono.&lt;/p&gt;

&lt;p&gt;Create a directory where your mono version will be installed:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo mkdir /Library/Frameworks/Mono.framework/Versions/2.8.1-mine
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You will need to change the owner to get make install to work.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo chown monoUser /Library/Frameworks/Mono.framework/Versions/2.8.1-mine
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We can now configure, make and install our own version of mono.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cd ~/projects/mono/mono-2.8.1
$ ./configure –prefix=/Library/Frameworks/Mono.framework/Versions/2.8.1-mine/ –with-blib=embedded –enable-nls=no
$ make
$ make install
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To verify, change to your new install:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cd /Library/Frameworks/Mono.framework/Versions/2.8.1-mine/bin
$ ./mono -V
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and you should see that your version of mono was compiled today:&lt;/p&gt;

&lt;p&gt;Mono JIT compiler version 2.8.1 (tarball Sun Dec  5 13:04:58 ICT 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com&lt;/p&gt;

&lt;p&gt;NOTE: The mono package comes with everything you need to make and install mono. Make sure you have the correct binary type (Intel, PowerPC or Universal). All libraries need to be compiled using the same binary type. The mono package has done this for you. If you use something like Macports you may end up with a library using the wrong binary type giving you the errors described on the bottom of &lt;a href=&quot;http://www.mono-project.com/Compiling_Mono_on_OSX&quot;&gt;http://www.mono-project.com/Compiling_Mono_on_OSX&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;using-your-version-of-mono&quot;&gt;Using Your Version of Mono&lt;/h2&gt;

&lt;p&gt;Run MonoDevelop and go to MonoDevelop -&amp;gt; Preferences. Select .NET Runtimes and your version will be there automatically! You just need to set it as the default library (this doesn’t seem to stick at the time of the writing of this document).&lt;/p&gt;

&lt;p&gt;If you have a project open you can go to Project -&amp;gt; Active Runtime and see your version listed there. Select this version and you will be using your version of the .NET runtime.&lt;/p&gt;

&lt;h2 id=&quot;what-next&quot;&gt;What Next?&lt;/h2&gt;

&lt;p&gt;Well, go to ~/projects/mono/mono-2.8.1/mcs/class/ or /YOUROOT/projects/mono/mono-2.8.1/mcs/class/corlib/System if you want to start with Object.cs and start hacking!&lt;/p&gt;

&lt;h1 id=&quot;amazement-and-awe&quot;&gt;Amazement and Awe&lt;/h1&gt;

&lt;p&gt;I just want to say that after working with proprietary system for most of my life, I am totally inspired and awed by the ability to take something as big as Mono and simply hack at the root of the system (Object.cs). I really want to thank everyone who has spent their time adding to this amazing product! Thank you!&lt;/p&gt;

&lt;p&gt;Also special thanks to Michael Hutchinson for helping me with this.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Interface Vision and Behaviour Driven Development (BDD)</title>
   <link href="http://bloginterfacevision.github.com/agile/bdd"/>
   <updated>2010-11-18T00:00:00+00:00</updated>
   <id>http://bloginterfacevision.github.com/agile/bdd</id>
   <content type="html">
&lt;h1 id=&quot;where-interface-vision-was-before&quot;&gt;Where Interface Vision Was Before&lt;/h1&gt;

&lt;p&gt;We are a few years into the code base for Interface Vision. An executive decision was made to rewrite the entire system using BDD.&lt;/p&gt;

&lt;p&gt;This isn’t exactly an easy decision because there are many hundreds of thousands of lines of code. Over the years, the code has been re-written as we discovered mistakes in our original approach to engineering Interface Vision. However, the current version is architecturally strong.&lt;/p&gt;

&lt;p&gt;Of course, a lot of the tricky stuff has been solved and the re-write will not be as difficult as the original so I don’t see it taking two years.&lt;/p&gt;

&lt;h1 id=&quot;it-is-well-worth-it&quot;&gt;It Is Well Worth It&lt;/h1&gt;

&lt;p&gt;I’ve just finished my first big step of re-writing Interface Vision using BDD and all I can say is that it is amazing! During this 6 hour session I did not even one time ask myself if I had introduced any bugs. Not one time did I have to debug the code.&lt;/p&gt;

&lt;p&gt;I had one mistake in the Gherkin due to an upper-case/lower-case mistake. Other than that, I am confident that my code base is 100% covered.&lt;/p&gt;

&lt;p&gt;And it is a really nice feeling.&lt;/p&gt;

&lt;h1 id=&quot;feeling-of-oneness&quot;&gt;Feeling of Oneness&lt;/h1&gt;

&lt;p&gt;After programming for decades and even using TDD I never felt confident that I wasn’t breaking my behaviour: I wasn’t breaking how the system worked.&lt;/p&gt;

&lt;p&gt;For the first time ever, I don’t have a single worry in my head that I’ve made a mistake. I don’t have to worry that something isn’t right. I know that within all that code I’ve just added, there will be no horrible debug session waiting for me. I now have a feeling of Oneness with programming. I am not fighting programming anymore! It is really relaxing.&lt;/p&gt;

&lt;h1 id=&quot;i-hate-debugging&quot;&gt;I Hate Debugging&lt;/h1&gt;

&lt;p&gt;I can not even start to describe how much I hate debugging. I’ve been doing it since I was 14 when I wrote my first program. I’ve been doing it up until recently. Now I know I will NEVER have to debug again.&lt;/p&gt;

&lt;p&gt;The worst part about debugging is that it really slows me down. Not because it is more difficult than programming or that I’m not good at it. It slows me down because I always procrastinate when I know I have to start debugging something. Sometimes I’ll stop working on something for days because of it.&lt;/p&gt;

&lt;h1 id=&quot;bdd-is-here-to-stay&quot;&gt;BDD Is Here To Stay&lt;/h1&gt;

&lt;p&gt;As I’ve said before, and if I haven’t then I guess I’ll say it now, BDD is the biggest advancement in 20 years both in terms of the concept and tools that implement it. BDD, conceptually, may have been here for a while. However, it is now so easy to drive your development using it… Well there is no reason not to do it.&lt;/p&gt;

&lt;h1 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h1&gt;

&lt;p&gt;I will never have to debug again! I hope.&lt;/p&gt;
</content>
 </entry>
 
 
</feed>