DesignAndCode - Architecturehttp://designandcode.net/
DesignAndCode software development thoughts..en-usDesign And Code, IncMon, 26 Jan 2015 04:12:16 GMTnewtelligence dasBlog 2.0.7226.0MarkMitchell@designandcode.netMarkMitchell@designandcode.nethttp://designandcode.net/Trackback.aspx?guid=c8f06f56-57f7-4a42-bbbd-9211ecdb3559http://designandcode.net/pingback.aspxhttp://designandcode.net/PermaLink,guid,c8f06f56-57f7-4a42-bbbd-9211ecdb3559.aspxMark Mitchellhttp://designandcode.net/CommentView,guid,c8f06f56-57f7-4a42-bbbd-9211ecdb3559.aspxhttp://designandcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=c8f06f56-57f7-4a42-bbbd-9211ecdb3559
I was catching up on my podcasts and on
HerdingCode - heard Scott Koon say that Rob Eisenberg left the angular team
- apparently back in November just after the NG conf post. Here is Rob Eisenbergs blog
entry on his thoughts about it. The Herding code group talked about the way that
Angular changes have really upset the prior users of the framework - and then hearing
about Rob Eisenbergs leaving the team - felt like the right thing for him to do -
not where he wanted to take the web.

So I may be renewing my efforts to dig into how Rob is going forward with his framework
- he has a great standard of development and is extremely bright developer.

Podcasts are a great way to catch up on the community when you have been doing
other things that dont allow you to keep up directly.

Durandal - is being developed againhttp://designandcode.net/PermaLink,guid,c8f06f56-57f7-4a42-bbbd-9211ecdb3559.aspxhttp://designandcode.net/2015/01/26/DurandalIsBeingDevelopedAgain.aspx
Mon, 26 Jan 2015 04:12:16 GMTI was catching up on my podcasts and on HerdingCode -&nbsp; heard Scott Koon say that Rob Eisenberg left the angular team - apparently back in November just after the NG conf post. Here is Rob Eisenbergs <a href="http://eisenbergeffect.bluespire.com/leaving-angular/">blog
entry</a> on his thoughts about it. The Herding code group talked about the way that
Angular changes have really upset the prior users of the framework - and then hearing
about Rob Eisenbergs leaving the team - felt like the right thing for him to do -
not where he wanted to take the web.<br>
<br>
So I may be renewing my efforts to dig into how Rob is going forward with his framework
- he has a great standard of development and is extremely bright developer.<br>
<br>
Podcasts are&nbsp; a great way to catch up on the community when you have been doing
other things that dont allow you to keep up directly.<br>
<br>
<br>
<p>
</p>
<img width="0" height="0" src="http://designandcode.net/aggbug.ashx?id=c8f06f56-57f7-4a42-bbbd-9211ecdb3559" />http://designandcode.net/CommentView,guid,c8f06f56-57f7-4a42-bbbd-9211ecdb3559.aspxArchitectureJavaScriptSoftware Frameworkshttp://designandcode.net/Trackback.aspx?guid=167f3134-d26a-42fe-8365-ec65d42da249http://designandcode.net/pingback.aspxhttp://designandcode.net/PermaLink,guid,167f3134-d26a-42fe-8365-ec65d42da249.aspxMark Mitchellhttp://designandcode.net/CommentView,guid,167f3134-d26a-42fe-8365-ec65d42da249.aspxhttp://designandcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=167f3134-d26a-42fe-8365-ec65d42da249

This was an interesting podcast for me. It felt like I was hearing from someone who
was working on the future design aspects of the browser environment and JavaScript
language features we may find commonplace in 5 years. The spec process that determines
all this is quite slow and in that line Guy Bedford mentioned the date of the
ECMAScript 6 (ES6) spec
completion has now been moved into next year.

The tools that have been built to validate the concepts of the spec, have impacted
the way the spec is written - by seeing what works and what does not work - and corresponding
changes get made based on testing of the concepts being proposed in the spec. The
discussion also highlighted that the hooks that are built into the browser is going
to be a different spec based on the completed ECMAScript 6 spec.

Guy Bedford has been working on some open source libraries to manage the modularity
of JavaScript, which was the topic of my last post. ES6 will have modules; today there
have been two competing formats - AMD and CommonJS.
The Projects that Guy has worked on build upon one another:

The SystemJS will load any of 3 styles of modules (ES6,AMD,CommonJS) which is designed
to work with the ES6 Module Loader - and make them work together.

JSPM - a JavaScript Package manager built on SystemJS. (It sounded like you could
load NPM modules with this too)

Inside of the SystemJS they provide a build process for production systems that will
make the modules CSP-Compliant (Content
Security Policy) so that the systems are less vulnerable to attacks.

There are Transpilers involved in getting the ES6 testing done here and may even work
down to IE8.

The architecture of these ideas feels like a good direction. One of the comments in
the podcast is that it will have to become more complicated before it becomes more
simple. These ideas are being transpiled(Translating ES6 source to ES5 source), and
not built into the browsers yet - but the browsers are changing so fast now that we
may see these features in the next few years in all the browsers - which will also
mean that most browsers(if not all) will be "evergreen" - self updating.

It has also become obvious that Node has become one tool that every web developer
must learn.

ES6 and JavaScript Moduleshttp://designandcode.net/PermaLink,guid,167f3134-d26a-42fe-8365-ec65d42da249.aspxhttp://designandcode.net/2014/08/08/ES6AndJavaScriptModules.aspx
Fri, 08 Aug 2014 10:17:36 GMT<p>
I just listened to the JavaScript Jabber Podcast <a href="http://javascriptjabber.com/115-jsj-the-es6-module-loader-polyfill-systemjs-and-jspm-with-guy-bedford/">episode
115 </a>with <a href="https://github.com/guybedford">Guy Bedford</a>.
</p>
<p>
This was an interesting podcast for me. It felt like I was hearing from someone who
was working on the future design aspects of the browser environment and JavaScript
language features we may find commonplace in 5 years. The spec process that determines
all this is quite slow and in that line Guy Bedford mentioned the date of the
<br>
ECMAScript 6 (ES6) <a href="http://www.2ality.com/2014/06/es6-schedule.html">spec
completion</a> has now been moved into next year.
</p>
<p>
The tools that have been built&nbsp; to validate the concepts of the spec, have impacted
the way the spec is written - by seeing what works and what does not work - and corresponding
changes get made based on testing of the concepts being proposed in the spec. The
discussion also highlighted that the hooks that are built into the browser is going
to be a different spec based on the completed ECMAScript 6 spec.<br>
<br>
Guy Bedford has been working on some open source libraries to manage the modularity
of JavaScript, which was the topic of my last post. ES6 will have modules; today there
have been two competing formats - AMD and CommonJS.<br>
The Projects that Guy has worked on build upon one another:<br>
</p>
<ul>
<li>
<a href="https://github.com/ModuleLoader/es6-module-loader">ES6 Module Loader based
on the Current Spec</a>
</li>
<li>
<a href="https://github.com/systemjs/systemjs">SystemJS</a>
</li>
<li>
<a href="http://jspm.io/">JSPM</a>
</li>
</ul>
<p>
The SystemJS will load any of 3 styles of modules (ES6,AMD,CommonJS) which is designed
to work with the ES6 Module Loader - and make them work together.<br>
</p>
<p>
JSPM - a JavaScript Package manager built on SystemJS. (It sounded like you could
load NPM modules with this too)
</p>
<p>
Inside of the SystemJS they provide a build process for production systems that will
make the modules CSP-Compliant (<a href="https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Introducing_Content_Security_Policy">Content
Security Policy</a>) so that the systems are less vulnerable to attacks.
</p>
<p>
<br>
</p>
<p>
There are Transpilers involved in getting the ES6 testing done here and may even work
down to IE8.
<br>
</p>
<p>
The architecture of these ideas feels like a good direction. One of the comments in
the podcast is that it will have to become more complicated before it becomes more
simple. These ideas are being transpiled(Translating ES6 source to ES5 source), and
not built into the browsers yet - but the browsers are changing so fast now that we
may see these features in the next few years in all the browsers - which will also
mean that most browsers(if not all) will be "evergreen" - self updating.
</p>
<p>
It has also become obvious that Node has become one tool that every web developer
must learn.<br>
</p>
<img width="0" height="0" src="http://designandcode.net/aggbug.ashx?id=167f3134-d26a-42fe-8365-ec65d42da249" />http://designandcode.net/CommentView,guid,167f3134-d26a-42fe-8365-ec65d42da249.aspxArchitectureJavaScriptSoftware FrameworksWebTechniqueshttp://designandcode.net/Trackback.aspx?guid=b3130271-1210-4419-a5fb-5e2e4bcef191http://designandcode.net/pingback.aspxhttp://designandcode.net/PermaLink,guid,b3130271-1210-4419-a5fb-5e2e4bcef191.aspxMark Mitchellhttp://designandcode.net/CommentView,guid,b3130271-1210-4419-a5fb-5e2e4bcef191.aspxhttp://designandcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=b3130271-1210-4419-a5fb-5e2e4bcef191

In looking over my twitter feed a few days ago - I saw the tweet by Rob Eisenbergand
read his post that
Angular and Durandal will converge and he is working with Google to develop AngularJS
version 2.0 - he did write a post on
the angular website too.

Durandal 2.x will be supported and is not going away - however Rob's energy is going
to the new version. The post he wrote explains how this came about and how these two
projects converging will actually benefit developers by putting together some incredible
minds in melding together two of the more impressive frameworks that I have looked
at over last couple of years.

I just wonder how the AngularJS Manning MEAP book I ordered - due in the Fall - will
handle this news - and hope that they change the basis of the book to be AngularJS
version 2 - instead of the current version 1.

The learning that I have been doing with Durandal will still be good - which you can
understand in reading his posts.

The learning that I have been doing will still be valuable. It sounds like the improvements
to Angular with Rob Eisenberg working with them will be a nice team to create a great
framework. I look forward to learning the result.

Durandal and AngularJS Converge into AngularJS 2.0http://designandcode.net/PermaLink,guid,b3130271-1210-4419-a5fb-5e2e4bcef191.aspxhttp://designandcode.net/2014/04/19/DurandalAndAngularJSConvergeIntoAngularJS20.aspx
Sat, 19 Apr 2014 04:08:09 GMT
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
In looking over my twitter feed a few days ago - I saw the tweet by Rob Eisenberg<span style="mso-spacerun:yes">&nbsp; </span>and
read his <a href="http://eisenbergeffect.bluespire.com/angular-and-durandal-converge/">post</a> that
Angular and Durandal will converge and he is working with Google to develop AngularJS
version 2.0 - he did write a <a href="http://blog.angularjs.org/2014/04/angular-and-durandal-converge.html">post</a> on
the angular website too.<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
Durandal 2.x will be supported and is not going away - however Rob's energy is going
to the new version. The post he wrote explains how this came about and how these two
projects converging will actually benefit developers by putting together some incredible
minds in melding together two of the more impressive frameworks that I have looked
at over last couple of years.
<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
I just wonder how the AngularJS Manning MEAP book I ordered - due in the Fall - will
handle this news - and hope that they change the basis of the book to be AngularJS
version 2 - instead of the current version 1.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
The learning that I have been doing with Durandal will still be good - which you can
understand in reading his posts.<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
The learning that I have been doing will still be valuable. It sounds like the improvements
to Angular with Rob Eisenberg working with them will be a nice team to create a great
framework. I look forward to learning the result.
<br>
</p>
<p>
</p>
<img width="0" height="0" src="http://designandcode.net/aggbug.ashx?id=b3130271-1210-4419-a5fb-5e2e4bcef191" />http://designandcode.net/CommentView,guid,b3130271-1210-4419-a5fb-5e2e4bcef191.aspxArchitectureJavaScriptWebTechniqueshttp://designandcode.net/Trackback.aspx?guid=93c22f5b-f071-47bf-88ba-e820500265d1http://designandcode.net/pingback.aspxhttp://designandcode.net/PermaLink,guid,93c22f5b-f071-47bf-88ba-e820500265d1.aspxMark Mitchellhttp://designandcode.net/CommentView,guid,93c22f5b-f071-47bf-88ba-e820500265d1.aspxhttp://designandcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=93c22f5b-f071-47bf-88ba-e820500265d1

A couple of weeks ago, I had some internet connection issues with my ISP providers
equipment. To resolve the issues -I had to make an appointment - and that meant being
at home to wait for them to show up to fix the equipment -without a working internet
connection.

I tried the YouTube App on my phone for
the first time. I saw a
2013 CSSConfUStalk by Pamela
Fox titled "When Bootstrap
Attacks" , where she talked about the work shedid
on the Coursera web site(apparently she is
now at Kahn Academy).

It was a half hour presentation on upgradingthe
Coursera site from mixed versions of Bootstrap to a single version across a mixed
code base - old and new. The work to upgrade to one version was made difficult because
of the Bootstrap class names were in the HTML, the CSS and the JavaScript code - and
the older code was PHP which would have that all mixed with SQL Statements also in
the mix - so identifying just the bootstrap classes within the entire code base was
noteasy.The
Coursera sites new Architecture uses BackboneJS,
and Jade (requires NodeJS)for
templating and Stylus for CSS (a
CSS Preprocessor Library similar to Less and SASS)

Finding things by name in the source code base was problematic, and would have been
easier if there were a namespaces in the CSS.

She said that Bootstrap has an open issue in their backlog to Prefix their classes
- but that they have not made it a priority. She suggests having your own classes
that Extend the BootStrap classes using SASS (even though she really is using Stylus).

She also recommended that you publish your own style guide documents for your team
to use and not use the Bootstrap docs. She suggested moving away from using the Bootstrap
JavaScript and using their own; also not using the Styling CSS Classes in their JavaScript
-they could use a JavaScript targeted CSS class (adding ajs
suffix on the end) - so that the separation of style and functionality can remove
the impacts on the JavaScript dependency to the CSS Class names. With HTML5 you could
use Data Attributes to hook into things instead of using the CSS Classes. Keeping
Styling and functionality concerns separate - reinforced the Separation of Concerns
for these promotes better maintainability.

Pamela Fox also mentioned that she also started to introduce testing to their site
-" if the front end does anything at all - you need to test it" - Mocha , Chai, JsDom and Selenium were
used to start getting testing done on her site. (Needle uses
Selenium + Nose using python
- to do screen shot comparisons from a good state screen shot when pixellayout
can impact functionality if not all of a set of data is visible due to CSS Changes-she
has not actually used it) It is best to start this test development early so that
you have plenty of tests. They have only reached a 2% coverage so far (as of 2013
talk).

You need to test that your separation of these concerns effort has not broken something
and by lessening the dependencies you have a much better overall maintainability with
test coverage automation will ease future maintenance - so if you plan on using Bootstrap
or any other CSS Framework - keep the idea of separation of concerns in mind so that
you do not trap yourself into a maintenance issue corner. That talk was a good followup
on my look at Durandals use of Bootstrap.

Bootstrap markup names and Seperation of Concernshttp://designandcode.net/PermaLink,guid,93c22f5b-f071-47bf-88ba-e820500265d1.aspxhttp://designandcode.net/2014/03/24/BootstrapMarkupNamesAndSeperationOfConcerns.aspx
Mon, 24 Mar 2014 03:10:49 GMT<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
A couple of weeks ago, I had some internet connection issues with my ISP providers
equipment. To resolve the issues -I had to make an appointment - and that meant being
at home to wait for them to show up to fix the equipment -without a working internet
connection.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
<span style="mso-spacerun:yes">&nbsp;</span>I tried the YouTube App on my phone for
the first time<span style="mso-spacerun:yes">. I saw </span><span style="mso-spacerun:yes">a
2013 CSSConfUS<span style="mso-spacerun:yes">&nbsp; </span>talk by<a href="http://www.pamelafox.org/"> Pamela
Fox</a> titled "<a href="http://www.youtube.com/watch?v=xbpnqbM6cRk">When Bootstrap
Attacks</a>" , where she talked about the work she<span style="mso-spacerun:yes">&nbsp; </span>did
on the <a href="https://www.coursera.org/">Coursera</a> web site(apparently she is
now at Kahn Academy).</span>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
<span style="mso-spacerun:yes">
<br>
</span>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
<span style="mso-spacerun:yes"> </span>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
<span style="mso-spacerun:yes">&nbsp;</span>It was a half hour presentation on upgrading<span style="mso-spacerun:yes">&nbsp; </span>the
Coursera site from mixed versions of Bootstrap to a single version across a mixed
code base - old and new. The work to upgrade to one version was made difficult because
of the Bootstrap class names were in the HTML, the CSS and the JavaScript code - and
the older code was PHP which would have that all mixed with SQL Statements also in
the mix - so identifying just the bootstrap classes within the entire code base was
not<span style="mso-spacerun:yes">&nbsp; </span>easy.<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>The
Coursera sites new Architecture uses <a href="http://backbonejs.org/">BackboneJS</a>,
and <a href="http://jade-lang.com/">Jade</a> (requires <a href="http://nodejs.org/">NodeJS</a>)<span style="mso-spacerun:yes">&nbsp; </span>for
templating and <a href="http://learnboost.github.io/stylus/">Stylus</a> for CSS (a
CSS Preprocessor Library similar to<a href="http://lesscss.org/"> Less</a> and<a href="http://sass-lang.com/"> SASS</a>)
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
<span style="mso-spacerun:yes">&nbsp; </span>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
Finding things by name in the source code base was problematic, and would have been
easier if there were a namespaces in the CSS.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
She said that Bootstrap has an open issue in their backlog to Prefix their classes
- but that they have not made it a priority. She suggests having your own classes
that Extend the BootStrap classes using SASS (even though she really is using Stylus).
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
She also recommended that you publish your own style guide documents for your team
to use and not use the Bootstrap docs. She suggested moving away from using the Bootstrap
JavaScript and using their own; also not using the Styling CSS Classes in their JavaScript
-they could use a JavaScript targeted CSS class (adding a<span style="mso-spacerun:yes">&nbsp; </span>js
suffix on the end) - so that the separation of style and functionality can remove
the impacts on the JavaScript dependency to the CSS Class names. With HTML5 you could
use Data Attributes to hook into things instead of using the CSS Classes. Keeping
Styling and functionality concerns separate - reinforced the Separation of Concerns
for these promotes better maintainability.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
Pamela Fox also mentioned that she also started to introduce testing to their site
-" if the front end does anything at all - you need to test it" -<a href="http://visionmedia.github.io/mocha/"> Mocha</a> , <a href="http://chaijs.com/">Chai</a>, <a href="https://github.com/tmpvar/jsdom">JsDom</a> and <a href="https://code.google.com/p/selenium/">Selenium</a> were
used to start getting testing done on her site.&nbsp; (<a href="http://needle.readthedocs.org/en/latest/">Needle</a> uses
Selenium + <a href="https://nose.readthedocs.org/en/latest/">Nose</a> using python
- to do screen shot comparisons from a good state screen shot when pixel<span style="mso-spacerun:yes">&nbsp; </span>layout
can impact functionality if not all of a set of data is visible due to CSS Changes-she
has not actually used it) It is best to start this test development early so that
you have plenty of tests. They have only reached a 2% coverage so far (as of 2013
talk).
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
You need to test that your separation of these concerns effort has not broken something
and by lessening the dependencies you have a much better overall maintainability with
test coverage automation will ease future maintenance - so if you plan on using Bootstrap
or any other CSS Framework - keep the idea of separation of concerns in mind so that
you do not trap yourself into a maintenance issue corner. That talk was a good followup
on my look at Durandals use of Bootstrap.<br>
</p>
<p>
</p>
<img width="0" height="0" src="http://designandcode.net/aggbug.ashx?id=93c22f5b-f071-47bf-88ba-e820500265d1" />http://designandcode.net/CommentView,guid,93c22f5b-f071-47bf-88ba-e820500265d1.aspxArchitectureBestPracticesBootStrapCSSDevelopmentToolsSoftware FrameworksWebTechniqueshttp://designandcode.net/Trackback.aspx?guid=1ac56287-be3d-4c23-b280-86f599006ce0http://designandcode.net/pingback.aspxhttp://designandcode.net/PermaLink,guid,1ac56287-be3d-4c23-b280-86f599006ce0.aspxMark Mitchellhttp://designandcode.net/CommentView,guid,1ac56287-be3d-4c23-b280-86f599006ce0.aspxhttp://designandcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=1ac56287-be3d-4c23-b280-86f599006ce0

During 2013, I attended three developer events - The Orlando
Code Camp in March, and then CodeStock in
July, and DevLink in August-
those later events are held in Tennessee (Knoxville and Chattanooga respectively).

At the Orlando Code camp I heard both John Papa and Rob Eisenberg working with DurandalJS -
which was at version 1 in the spring of 2013. I was impressed with both presentations.

I heard about, and read about JavaScript Frameworks for most of the last couple of
years and my plan was to settle on one of these for my own learning of the Single-Page-Application
style of web development. The question has been which one do you invest limited learning
time into.

AngularJS is the most popular - being a product
out of the Google team - that makes a lot of sense. Backbone,
and EmberJS have had a lot of play in the developer
conferences too.

I attended sessions on various aspects of AngularJS - and heard from some very good
developers that AngularJS had a pattern that fit the way they thought about issues
in their own webdevelopment - which was encouraging to hear as a possible selection.

I Then heard a couple of complaints on AngularJS - and how there was a tendency that
in breaking out of the directives from AngularJS was not easy, and could force you
to rewrite parts of AngularJS to fit your needs - put me to wonder if that was a good
investment of time.

I read more about DurandalJS and it was now in Version 2, and the use of Javascript
Promises seemed good - and if you wanted to use a different library-
sounded like it could easily be replaced. Some of the early Version 1 pieces had been
dropped, and it felt cleaner.

I heard a podcast where Rob Eisenberg was interviewed and the issue of the AngularJS
Directives had brought some people to use DurandalJS as a cleaner - less boiler-plate
type code base.

I looked more at DurandalJS, and started
to go through the Starter Kit - and it was clean code - however it seemed on my machine
the Bootsrap CSS and JavaScript pieces might have been out of Sync - there were some
Screen draw issues for me on the Starter Kit, however the way I got to that point
in the project might have been by using some Nu-Get packages - that perhaps were not
in Sync with what was needed.

I saw a Video on the AngularJS and how they explained coming up with the framework
- which was interesting - but for me - a little off-putting, like the presenters were
a little bit on the presumtive side - and when I compared that to the humble and direct
presentation of Rob Eisenberg - I decided to pick DurandalJS as a place to really
start and dig into the mechanics and architecture of the framework.

So I am going to try to set a goal of a blog post a month, on my learning of DurandalJS.

So there are lots of parts and pieces of frameworks - before you even think of what
you are going to produce.

The clean architecture of the DurandalJS framework - lends itself to the future ES6 module
formats - and the learning that I would do here should be transferrable to any other
framework - with a much better understanding of the challenges.So
the framework as a learning tool is my plan for 2014.

Durandal JavaScript Framework for learning in 2014http://designandcode.net/PermaLink,guid,1ac56287-be3d-4c23-b280-86f599006ce0.aspxhttp://designandcode.net/2014/01/14/DurandalJavaScriptFrameworkForLearningIn2014.aspx
Tue, 14 Jan 2014 23:12:55 GMT<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
During 2013, I attended three developer events - The <a href="http://www.orlandocodecamp.com/">Orlando
Code Camp</a> in March, and then <a href="http://www.codestock.org/">CodeStock</a> in
July, and <a href="http://www.devlink.net/">DevLink </a>in August<span style="mso-spacerun:yes">&nbsp; </span>-
those later events are held in Tennessee (Knoxville and Chattanooga respectively).
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
At the Orlando Code camp I heard both John Papa and Rob Eisenberg working with <a href="http://durandaljs.com/">DurandalJS</a> -
which was at version 1 in the spring of 2013. I was impressed with both presentations.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
I heard about, and read about JavaScript Frameworks for most of the last couple of
years and my plan was to settle on one of these for my own learning of the Single-Page-Application
style of web development. The question has been which one do you invest limited learning
time into.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
<a href="http://angularjs.org/">AngularJS</a> is the most popular - being a product
out of the Google team - that makes a lot of sense. <a href="http://backbonejs.org/">Backbone</a>,
and <a href="http://emberjs.com/">EmberJS</a> have had a lot of play in the developer
conferences too.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
I attended sessions on various aspects of AngularJS - and heard from some very good
developers that AngularJS had a pattern that fit the way they thought about issues
in their own webdevelopment - which was encouraging to hear as a possible selection.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
I Then heard a couple of complaints on AngularJS - and how there was a tendency that
in breaking out of the directives from AngularJS was not easy, and could force you
to rewrite parts of AngularJS to fit your needs - put me to wonder if that was a good
investment of time.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
I read more about DurandalJS and it was now in Version 2, and the use of Javascript
Promises seemed good - and if you wanted to use a different library<span style="mso-spacerun:yes">&nbsp; </span>-
sounded like it could easily be replaced. Some of the early Version 1 pieces had been
dropped, and it felt cleaner.<br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
I heard a podcast where Rob Eisenberg was interviewed and the issue of the AngularJS
Directives had brought some people to use DurandalJS as a cleaner - less boiler-plate
type code base.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
<span style="mso-spacerun:yes">&nbsp;</span>I looked more at DurandalJS, and started
to go through the Starter Kit - and it was clean code - however it seemed on my machine
the Bootsrap CSS and JavaScript pieces might have been out of Sync - there were some
Screen draw issues for me on the Starter Kit, however the way I got to that point
in the project might have been by using some Nu-Get packages - that perhaps were not
in Sync with what was needed.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
I saw a Video on the AngularJS and how they explained coming up with the framework
- which was interesting - but for me - a little off-putting, like the presenters were
a little bit on the presumtive side - and when I compared that to the humble and direct
presentation of Rob Eisenberg - I decided to pick DurandalJS as a place to really
start and dig into the mechanics and architecture of the framework.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
So I am going to try to set a goal of a blog post a month, on my learning of DurandalJS.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
That means Learning DurandalJS, <a href="http://requirejs.org/">RequireJS</a>,<a href="http://knockoutjs.com/"> KnockoutJS</a>, <a href="http://getbootstrap.com/">Bootstrap</a> CSS
and JS and the <a href="http://jquery.com/">jQuery</a> pieces that are used in DurandalJS.<span style="mso-spacerun:yes">&nbsp; </span>Some
of the JavaScript oriented tools used from the DurandalJS website are also <a href="http://nodejs.org/">NodeJS</a>, <a href="http://mimosa.io/">Mimosa</a>, <a href="http://gruntjs.com/">GruntJS</a>,
and <a href="http://www.typescriptlang.org/">TypeScript</a>.
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
So there are lots of parts and pieces of frameworks - before you even think of what
you are going to produce.<span style="mso-spacerun:yes">&nbsp; </span>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
&nbsp;
</p>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">
The clean architecture of the DurandalJS framework - lends itself to the future <a href="http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts">ES6</a> module
formats - and the learning that I would do here should be transferrable to any other
framework - with a much better understanding of the challenges.<span style="mso-spacerun:yes">&nbsp; </span>So
the framework as a learning tool is my plan for 2014.
</p>
<p>
</p>
<img width="0" height="0" src="http://designandcode.net/aggbug.ashx?id=1ac56287-be3d-4c23-b280-86f599006ce0" />http://designandcode.net/CommentView,guid,1ac56287-be3d-4c23-b280-86f599006ce0.aspxArchitectureDevelopmentToolsJavaScriptWebTechniqueshttp://designandcode.net/Trackback.aspx?guid=6f955d92-0a1b-4b69-84f5-fd96848a2456http://designandcode.net/pingback.aspxhttp://designandcode.net/PermaLink,guid,6f955d92-0a1b-4b69-84f5-fd96848a2456.aspxMark Mitchellhttp://designandcode.net/CommentView,guid,6f955d92-0a1b-4b69-84f5-fd96848a2456.aspxhttp://designandcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6f955d92-0a1b-4b69-84f5-fd96848a2456
Quite by accident, I stumbled into Mary
Jo Foley's article that
mentioned the Microsoft Research Project Drawbridge - and a Channel9 video
on this.
From the Channel 9 description:Drawbridge
is a research prototype of a new form of virtualization for application
sandboxing. Drawbridge combines two core technologies: First, a picoprocess,
which is a process-based isolation container with a minimal kernel API surface. Second,
a library OS, which is a version of Windows enlightened to run efficiently
within a picoprocess. Drawbridge combines two ideas from the literature, the picoprocess and
the library OS, to provide a new form of computing, which retains the benefits
of secure isolation, persistent compatibility, and execution continuity, but with
drastically lower resource overheads.

Some time ago, there was an idea of each application having its own Virtual Machine
space to run in - and it looks like this is another step toward that goal. Not sure
it will make it into Windows 8, but it would not surprise me to see this as part of
Windows 9. The Drastically reduced overhead, makes me wonder if they can get this
to run on an ARM processor, or phone.

In the video, the indicate that they performed an experiment of running 25 Windows
2008 R2 web servers on a 16GB machine, and then when the switched the Web Servers
to use the Drawbridge approach, they were getting "north" of 270 on the same hardware
-of course they would have to be very lightly used web sites.

By refactoring the API layers to other modes (pulling Win32k.dll into a user
mode layer - and a usermode version NTUM that communicates through a new "Security
Monitor" that exposes only 35 functions to the NTOSKRNL) they reduced the footprint
of what is needed - and this could be getting small enough to run on a phone.

The Win32K that expects a Keyboard, mouse, and clipboard, ends up communicating
to a version of the Remote Desktop Server process (on the same machine) that emulates
communicating over a network - within the processes - all isolated like a virtual
machine. In fact the GUI requires using RDP to the instance that Drawbridge sets up.

Because this is all running stateless - it can save the state of the Drawbridge application
- compressed, and send the application to another machine - rehydrate the application
state - from any machine that can get to the cloud - due to the sandbox around the
application.

It also reduced the threat surface - so it is also a very strong security play.

It is very much a prototype for a small team, and there is a good deal of work to
get it to work with GPU processing - e.g. not working with IE9 right now. But it is
a very promising direction that I expect to hear more about -hopefully before Windows
10.. :)

New Application Virtualization Sandbox - Drawbridge from Microsoft Researchhttp://designandcode.net/PermaLink,guid,6f955d92-0a1b-4b69-84f5-fd96848a2456.aspxhttp://designandcode.net/2011/10/18/NewApplicationVirtualizationSandboxDrawbridgeFromMicrosoftResearch.aspx
Tue, 18 Oct 2011 01:25:01 GMTQuite by accident, I stumbled into Mary Jo Foley's <a href="http://www.zdnet.com/blog/microsoft/microsoft-goes-public-with-its-drawbridge-operating-system-research-project/11009?tag=mantle_skin;content">article </a>that
mentioned the Microsoft Research Project&nbsp; <i>Drawbridge</i> - and a <a href="http://channel9.msdn.com/Shows/Going+Deep/Drawbridge-An-Experimental-Library-Operating-System">Channel9</a> video
on this.<br>
From the Channel 9 description:<strong>
<br>
<a href="http://research.microsoft.com/en-us/projects/drawbridge/" target="_blank">Drawbridge
is a research prototype</a></strong><em> of a new form of virtualization for application
sandboxing. Drawbridge combines two core technologies: First, a <strong>picoprocess</strong>,
which is a process-based isolation container with a minimal kernel API surface. Second,
a <strong>library OS</strong>, which is a version of Windows enlightened to run efficiently
within a picoprocess. Drawbridge combines two ideas from the literature, the <em>picoprocess</em> and
the <em>library OS</em>, to provide a new form of computing, which retains the benefits
of secure isolation, persistent compatibility, and execution continuity, but with
drastically lower resource overheads. </em>
<br>
<br>
Some time ago, there was an idea of each application having its own Virtual Machine
space to run in - and it looks like this is another step toward that goal. Not sure
it will make it into Windows 8, but it would not surprise me to see this as part of
Windows 9. The Drastically reduced overhead, makes me wonder if they can get this
to run on an ARM processor, or phone.<br>
<br>
In the video, the indicate that they performed an experiment of running 25 Windows
2008 R2 web servers on a 16GB machine, and then when the switched the Web Servers
to use the Drawbridge approach, they were getting "north" of 270 on the same hardware
-of course they would have to be very lightly used web sites.<br>
<br>
By refactoring the API layers to other modes (pulling Win32k.dll&nbsp; into a user
mode layer - and a usermode version NTUM that communicates through a new "Security
Monitor" that exposes only 35 functions to the NTOSKRNL) they reduced the footprint
of what is needed - and this could be getting small enough to run on a phone.
<br>
<br>
The Win32K that expects a Keyboard,&nbsp; mouse, and clipboard, ends up communicating
to a version of the Remote Desktop Server process (on the same machine) that emulates
communicating over a network - within the processes - all isolated like a virtual
machine. In fact the GUI requires using RDP to the instance that Drawbridge sets up.<br>
<br>
Because this is all running stateless - it can save the state of the Drawbridge application
- compressed, and send the application to another machine - rehydrate the application
state - from any machine that can get to the cloud - due to the sandbox around the
application.<br>
<br>
It also reduced the threat surface - so it is also a very strong security play.<br>
<br>
It is very much a prototype for a small team, and there is a good deal of work to
get it to work with GPU processing - e.g. not working with IE9 right now. But it is
a very promising direction that I expect to hear more about -hopefully before Windows
10.. :)<br>
<br>
<br>
<p>
</p>
<img width="0" height="0" src="http://designandcode.net/aggbug.ashx?id=6f955d92-0a1b-4b69-84f5-fd96848a2456" />http://designandcode.net/CommentView,guid,6f955d92-0a1b-4b69-84f5-fd96848a2456.aspxArchitectureVirtualizationhttp://designandcode.net/Trackback.aspx?guid=de6511fb-497f-483a-8ee0-d5ee427172d7http://designandcode.net/pingback.aspxhttp://designandcode.net/PermaLink,guid,de6511fb-497f-483a-8ee0-d5ee427172d7.aspxMark Mitchellhttp://designandcode.net/CommentView,guid,de6511fb-497f-483a-8ee0-d5ee427172d7.aspxhttp://designandcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=de6511fb-497f-483a-8ee0-d5ee427172d7
In 2008, I attended the Microsoft Professionals
meeting (Atlanta) where Shawn Wildermuth gave
a presentation on Domain specific languages or DSL's. The concepts were an introduction
into a Microsoft product development that used the code names "OSLO",
"M", and "Quadrant" that was previewed in part at the PDC2008 (Professional
Developer Conference) which has mostly morphed into something else by PDC2009. Shawn
produced three articles for
MSDN on the topics of "OSLO" and "M". In the 2008 presentation I attended, Shawn introduced
the premise that we use DSL's already today; SQL, XAML, Make, Ant/Nant, MSBuild, regular-expressions,
even musical notation are all examples of DSL's. From that talk, the idea of software
development DSL's was planted - even though the technologies that had prompted
his discussion have been morphed into new forms within Microsoft - the conclusion
from this argument is that a set of text statements ( or specific symbols like music
or regular expressions) can be declared and used to achieve a desired result - and
within programming - results in how executing code processes those results. A concise
grammar and syntax, that declares what you want to do but not how you do accomplish
that - regular expression syntax is a great example. Software development using a
DSL, is an idea that continues to cross my path. I thought I would try to capture
some of the variations I have seen in how various developers and architects approach
the concept of creating and using DSLs.

Martin Fowler wrote the book on Domain
Specific Languages where he describes the 3 types of DSLs.
There are some early Oslo software preview videos out
on the Microsoft site that show the language M being used to generate a DSL grammar
within the tool called Quadrant. This is what Martin Fowler referred to as a "DSL
workbench"- where the tool builds the DSL. Martin Fowler identified two other main
categories of DSL; the External DSL, and the Internal, or Embedded DSL. External DSL's
are often quite complex - and rarely come to general usage. Internal, or Embedded
DSL's are abstractions over an API, or framework, within an application.

The idea of a DSL being used was briefly touched on in the Jan 2009 DotNet Rocks episode with Aslam
Khan a software architect that lives in South Africa. The company he works with
uses this to achieve Domain
Driven Design (DDD). "Write a story that describes a problem", and understand
that little piece, to understand the domain. "Something that describes it completely
- that does not bleed into the other", which build up a dependency graph, it exists
in context to the other things - behind each story. A story about the problem - the
domain. The more you reveal incorrect assumptions in the dependency graphs and correct
them, you don't have to prune source code trees -so you get smaller source code trees,
and designing API's around the stories - means changing the granularity of the stories
- not modules. In the podcast (just after 38:41) they describe a misunderstood story
- that would have produced an incorrect system design - but writing out a story, that
the users can understand - allows for corrections can be made before hand. Understanding
the user's vocabulary, and you can write it in those terms, then you have the basis
to build on(this goes back to the Eric Evan's Domain-Driven-Design "ubiquitous
language"). It helps other people later on to understand the language of the application.
Aslam Khan uses a Wiki to capture that language - and refers to the "Wiki as code"
(about 44:44 in the podcast). He refers to it as "a DSL captured in business terms
- that cannot be executed - but at that point you can start writing code". After listening
to that podcast(in 2009), I went to Aslam's website - and discovered his posting about
using Cucumber and driving it down into Rspec.
That led to my reading of a post about Ruby and the latest on Ruby
testing - using cucumber. (There is a language called Gherkin used
with Cucumber to create a Ruby testing
framework). The dynamic nature of Ruby - and the concept of Metaprogramming -
became connected to the idea of how one could produce a DSL. Aslam Khan stated it,
on his blog, as "the Code is the data" behind a DSL, and he encouraged learning about
AST's (Abstract Syntax Trees) which to me connected directly to .Net Expression Trees
- the basis of Microsoft Dynamic Language Runtime(DLR) in .Net 4.0. DSL's can
become Expression Trees which in turn can become running code in the DLR. At least,
in theory, that would be one Dynamic-Language approach to implementing a DSL(There
may be some limitations on how that can occur).

During 2010, I picked up a copy of Orin Eini's(a.k.a Ayende
Rahein) book called "DSL's
in Boo - Domain Specific Languages in .Net". (he did an interview in
March 2010 with DotNetRocks on this topic).Ayende is known in the .Net development
world for RhinoMocks( a mocking framework), his work on NHibernate(his company makes
a profiler for NHibernate and EntityFrameworks), and now his RavenDB - document database
project. Somehow, he also managed to have written a book on DSL's - the guy
is prolific at producing content - whether you see his coding output(RhinoMocks,RavenDB),
his blog, and now his book. In his book, he describes how he builds his own
DSL's using the .Net language Boo as the foundation,
as it gives him a parser,lexer, and great extensibility points, that compile into
.Net code - that is not based on the DLR. He shows how the Boo language allows for
defining your own expressions that can then be compiled - statically. Boo is
based on the released ECMA
standard for the CLI. Interestingly -both the Boo Language, and the ECMA CLI standard,
had recent updates(at this writing) Boo 0.9.4 was updated Jan 2011, and the ECMA Standard
December 2010. Boo has some capacities that make the language very powerful. It can
be an object oriented language, and it can do functional composition (where functions
are first class citizens like those in F#), it has 'Syntactic
Macros', and it has an extensible compilation pipeline - which is what the creator,
Rodrigo B. de Oliveira, wanted to have in the first place, and it can run on multiple
platforms (Windows CLR and Linux Mono). Boo has its roots based on Python Syntax
and looks like it has some great potential. To use Boo that as the basis for
creating a DSL seems like a very interesting choice - here it would be a statically
typed implementation of a DSL. This could be a way of generating a concise Internal,
or External, DSL that works for the users and programmers alike within a given domain.
Ayende's book gets into the details of using boo for creating your own DSL.

I found a few entries that related how Powershell could be used at the basis of a
DSL. There is a blog post from
Keith Hill on how Powershell's syntax flexibility allows you to create a internal
DSL. Doug Finke, a Powershell MVP, posted something that went back to the
Oslo starting point from a Powershell point of view. Doug Finke shows implementing
an OSLO grammar syntax using Powershell, based on the concepts originally introduced
in that early video of the M Language example. So from Dynamic Languages or Scripting
tools we can find approaches to creating DSL's today. Doug Finke connected the
concepts of DSL, DRL, and Boo; all the ideas together in his post "Creating
a unified programming model on top of .NET" He cites "Trends and Directions
in programming languages" from Anders Hejlsberg. DSL's could certainly be part
of that mix in creating solutions.

Jeffrey Snover, the architect of Powershell, had a discussion in 2008 on DSL's with
Martin Fowler and Neal Ford from Thoughtworks. (recording
on Channel9). In this talk they made the point that a DSL can be an External DSL,
an Internal DSL or a 'workbench' with tools wrapped around it. Martin Fowler made
the point that not many successful DSL's have been done starting from the business
side and working toward the API - but that is where the concept is the most powerful,
they made the point that it is usually an abstraction of an existing API that simplifies
the underlying API - and that DSL can be replaced with the word 'Framework' and mean
the same thing. Jeffrey Snover also posted that
Powershell could be used to create DSL's by limiting the syntax. The key piece he
refers to is the data
segment SupportedCommands - which he alludes to as a way to limit a DSL done in
Powershell.

Karl Prosser referred to the Powerboots library for Powershell as a DSL in a blog
post. It is a Powershell set of commands that are specific to using WPF from within
Powershell - which stays with the concept that it is limited to that specific
domain.

Sometimes the use of a Fluent API - can be used to write code that is very readable
and expressive - such that it becomes an internal DSL within the general purpose language(Steven
Hoisee blog has
some coverage on this). I came accross a paper on how JMock was developed and
how they worked toward incorporating a Fluent API as part of their own Embeded
DSL within the framework.

Martin Fowler, who took the time to write the book on DSL, has a post on BusinessReadableDSLs.
Where the idea is different than business-writeable DSLs. That was the impression
I got from Aslam Khan's use of Cucumber - that the business could read the DSL and
confirm if it was correct or not.
Martin Fowler invokes the comparison to COBOL - which was supposed to be an english
way of telling the computer what to do - and begs the question - how is this one different?
My impression is that the a correct implementation of a DSL is declarative - it describes
what you want to do, now how you do it - and having programmed in COBOL - it is an
imperative approach, not a declarative one.

Developing a DSL, based on the Jeffrey Snover video, leads me to see that in a DSL
you have vocabulary and you have grammar that must be decided on - and the idea of
keeping it small seems to be important. Just enough to keep and simple - and no simpler.

Jeremy Miller(Creator of the IOC container - StructureMap, an MVC framework called
FubuMVC, and a testing tool called StoryTeller) did a presentation on
creating Internal DSL's at Oredev in Oslo - Nov 2010.
He contributed to the Fluent NHibernate project, and incorporated the use of
an Internal DSL in these projects - and in the presentation he goes over some of the
difficulties of using and developing an Internal DSL using the C# 3.0 language features.
He touches on the separation of the Runtime and Configuration model in building a
DSL, and that testing an internal DSL for configuration is very difficult - you can
test the runtime model more easily, and then make sure your configuration model works
correctly. (the video is a bit grainy - and a few of the questions, that came from
the audience, are not heard - but the concepts that were used in creating an internal
DSL are shown pretty well.)

From this set of touch points - on the various flavors of DSL's, it is something that
can be done in a variety of ways. The simplest form is the internal or embedded, perhaps
as a Fluent API approach. This simple form of a DSL can be for a small team that produces
repetitive code, or business rules that are needed in in either a static or dynamic
fashion - but still being an internal abstraction - within a small domain. Then there
is an external DSL - and that would need to have a the same considerations as a full
blown computer language - as the publishing of an External DSL approach tends to get
the syntax set in stone, unless you can absorb breaking changes later on.

I find this an interesting research topic, that may prove to be a practical solution
to some future area of work. Along these lines - I recently purchased a book that
looks promising; Terrence Parr's book
"Language
Implementation Patterns - Create your own Domain Specific and General Programming
Languages". Terrence Parr developed ANTLR and
that tool is used in the Boo compiler. I will have more reading and learning
to do in this area - and, perhaps at some point, the payoff will be when I can see
an area where a DSL can be used to invoke parts of a framework. Ideally this would
be in terms of the users, a readable Business DSL, or an API syntax that developers
for an application can use that brings a higher level of abstraction and makes code
more readable - and perhaps more declarative. The Jeremy Miller video shows
that is not a simple task, however, he shows that it can be used to develop some powerful
solutions too, and that I find to be valuable.

Research - DSL Domain Specific Language concept and applicationhttp://designandcode.net/PermaLink,guid,de6511fb-497f-483a-8ee0-d5ee427172d7.aspxhttp://designandcode.net/2011/01/26/ResearchDSLDomainSpecificLanguageConceptAndApplication.aspx
Wed, 26 Jan 2011 01:05:47 GMTIn 2008, I attended the Microsoft Professionals meeting (Atlanta) where <a href="http://wildermuth.com/">Shawn
Wildermuth</a> gave a presentation on Domain specific languages or DSL's. The concepts
were an introduction into a Microsoft product development that used the code names
&nbsp; "OSLO",&nbsp; "M", and "Quadrant" that was previewed in part at the PDC<a href="http://channel9.msdn.com/Blogs/pdc2008/TL31">2008</a> (Professional
Developer Conference) which has mostly morphed into something else by PDC2009. Shawn
produced three <a href="http://wildermuth.com/2009/06/09/My_Oslo_DSL_Article_Part_1_is_Updated_for_May_2009_CTP">articles</a> for
MSDN on the topics of "OSLO" and "M". In the 2008 presentation I attended, Shawn introduced
the premise that we use DSL's already today; SQL, XAML, Make, Ant/Nant, MSBuild, regular-expressions,
even musical notation are all examples of DSL's. From that talk, the idea of software
development DSL's&nbsp; was planted - even though the technologies that had prompted
his discussion have been morphed into new forms within Microsoft - the conclusion&nbsp;
from this argument is that a set of text statements ( or specific symbols like music
or regular expressions) can be declared and used to achieve a desired result - and
within programming - results in how executing code processes those results. A concise
grammar and syntax, that declares what you want to do but not how you do accomplish
that - regular expression syntax is a great example. Software development using a
DSL, is an idea that continues to cross my path. I thought I would try to capture
some of the variations I have seen in how various developers and architects approach
the concept of creating and using DSLs.<br>
<br>
Martin Fowler wrote the book on <a href="http://www.amazon.com/Domain-Specific-Languages-Addison-Wesley-Signature-Fowler/dp/0321712943/">Domain
Specific Languages</a> where he describes the 3 types of DSLs.<br>
There are some early Oslo software preview <a href="http://msdn.microsoft.com/en-us/data/dd576258.aspx">videos</a> out
on the Microsoft site that show the language M being used to generate a DSL grammar
within the tool called Quadrant. This is what Martin Fowler referred to as a "DSL
workbench"- where the tool builds the DSL. Martin Fowler identified two other main
categories of DSL; the External DSL, and the Internal, or Embedded DSL. External DSL's
are often quite complex - and rarely come to general usage. Internal, or Embedded
DSL's are abstractions over an API, or framework, within an application.
<br>
<br>
The idea of a DSL being used was briefly touched on in the Jan 2009 DotNet Rocks <a href="http://www.dotnetrocks.com/default.aspx?showNum=415">episode</a> with <a href="http://aslamkhan.net/">Aslam
Khan</a> a software architect that lives in South Africa. The company he works with
uses this to achieve <a href="http://domaindrivendesign.org/resources/what_is_ddd">Domain
Driven Design</a> (DDD). "Write a story that describes a problem", and understand
that little piece, to understand the domain. "Something that describes it completely
- that does not bleed into the other", which build up a dependency graph, it exists
in context to the other things - behind each story. A story about the problem - the
domain. The more you reveal incorrect assumptions in the dependency graphs and correct
them, you don't have to prune source code trees -so you get smaller source code trees,
and designing API's around the stories - means changing the granularity of the stories
- not modules. In the podcast (just after 38:41) they describe a misunderstood story
- that would have produced an incorrect system design - but writing out a story, that
the users can understand - allows for corrections can be made before hand. Understanding
the user's vocabulary, and you can write it in those terms, then you have the basis
to build on(this goes back to the Eric Evan's Domain-Driven-Design <a href="http://books.google.com/books?id=7dlaMs0SECsC&amp;pg=PA24&amp;lpg=PA24&amp;dq=eric+evans+domain+driven+design+ubiquitous+language&amp;source=bl&amp;ots=ulHUY1U8s8&amp;sig=jk96fBqxm3-SYbPZPtb8gev_VAk&amp;hl=en&amp;ei=H-JBTZvcLYbagAfM59mWAg&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=8&amp;ved=0CEkQ6AEwBw#v=onepage&amp;q&amp;f=false">"ubiquitous
language"</a>). It helps other people later on to understand the language of the application.
Aslam Khan uses a Wiki to capture that language - and refers to the "Wiki as code"
(about 44:44 in the podcast). He refers to it as "a DSL captured in business terms
- that cannot be executed - but at that point you can start writing code". After listening
to that podcast(in 2009), I went to Aslam's website - and discovered his <a href="http://aslamkhan.net/software-development/heck-we-should-have-paid-attention-that-day/">posting</a> about
using Cucumber and driving it down into <a href="http://www.pragprog.com/titles/achbd/the-rspec-book">Rspec</a>.
That led to my reading of a post about Ruby and the latest on <a href="http://www.rubyinside.com/cucumber-the-latest-in-ruby-testing-1342.html">Ruby
testing - using cucumber</a>. (There is a language called <a href="https://github.com/aslakhellesoy/cucumber/wiki/Gherkin">Gherkin</a> used
with Cucumber to create a <a href="http://bjarte.com/post/228763457">Ruby testing
framework</a>). The dynamic nature of Ruby - and the concept of Metaprogramming -
became connected to the idea of how one could produce a DSL. Aslam Khan stated it,
on his blog, as "the Code is the data" behind a DSL, and he encouraged learning about
AST's (Abstract Syntax Trees) which to me connected directly to .Net Expression Trees
- the basis of Microsoft Dynamic Language Runtime(DLR) in .Net 4.0.&nbsp; DSL's can
become Expression Trees which in turn can become running code in the DLR. At least,
in theory, that would be one Dynamic-Language approach to implementing a DSL(There
may be some limitations on how that can occur).<br>
&nbsp;
<br>
During 2010, I picked up a copy of Orin Eini's(a.k.a <a href="http://www.ayende.com/">Ayende
Rahein</a>) book called "<a href="http://www.amazon.com/DSLs-Boo-Domain-Specific-Languages/dp/1933988606/">DSL's
in Boo</a> - Domain Specific Languages in .Net". (he did an <a href="http://www.dotnetrocks.com/default.aspx?ShowNum=529">interview</a> in
March 2010 with DotNetRocks on this topic).Ayende is known in the .Net development
world for RhinoMocks( a mocking framework), his work on NHibernate(his company makes
a profiler for NHibernate and EntityFrameworks), and now his RavenDB - document database
project. Somehow, he also managed to have written a book on DSL's &nbsp; - the guy
is prolific at producing content - whether you see his coding output(RhinoMocks,RavenDB),
his blog, and now his book.&nbsp; In his book, he describes how he builds his own
DSL's using the .Net language <a href="http://boo.codehaus.org/">Boo</a> as the foundation,
as it gives him a parser,lexer, and great extensibility points, that compile into
.Net code - that is not based on the DLR. He shows how the Boo language allows for
defining your own expressions that can then be compiled - statically.&nbsp; Boo is
based on the released <a href="http://www.ecma-international.org/publications/standards/Ecma-335.htm">ECMA
standard for the CLI</a>. Interestingly -both the Boo Language, and the ECMA CLI standard,
had recent updates(at this writing) Boo 0.9.4 was updated Jan 2011, and the ECMA Standard
December 2010. Boo has some capacities that make the language very powerful. It can
be an object oriented language, and it can do functional composition (where functions
are first class citizens like those in F#), it has '<a href="http://ayende.com/Blog/archive/2008/05/27/The-magic-of-boo--Flexible-syntax.aspx">Syntactic
Macros'</a>, and it has an extensible compilation pipeline - which is what the creator,
Rodrigo B. de Oliveira, wanted to have in the first place, and it can run on multiple
platforms (Windows CLR and Linux Mono). Boo has its roots&nbsp; based on Python Syntax
and looks like it has some great potential.&nbsp; To use Boo that as the basis for
creating a DSL seems like a very interesting choice - here it would be a statically
typed implementation of a DSL. This could be a way of generating a concise Internal,
or External, DSL that works for the users and programmers alike within a given domain.
Ayende's book gets into the details of using boo for creating your own DSL.<br>
<br>
I found a few entries that related how Powershell could be used at the basis of a
DSL. There is a blog <a href="http://keithhill.spaces.live.com/Blog/cns%215A8D2641E0963A97%216944.entry">post</a> from
Keith Hill on how Powershell's syntax flexibility allows you to create a internal
DSL. Doug Finke, a Powershell MVP, posted something that went back to <a href="http://www.dougfinke.com/blog/index.php/2009/07/01/powershell-powerboots-and-an-oslo-dsl-grammar/">the
Oslo starting point</a> from a Powershell point of view. Doug Finke shows implementing
an OSLO grammar syntax using Powershell, based on the concepts originally introduced
in that early video of the M Language example. So from Dynamic Languages or Scripting
tools we can find approaches to creating DSL's today.&nbsp; Doug Finke connected the
concepts of DSL, DRL, and Boo; all the ideas together in his post <a temp_href="Creating a unified programming model on top of .NET" href="Creating%20a%20unified%20programming%20model%20on%20top%20of%20.NET">"<font size="3">Creating
a unified programming model on top of .NET"</font></a> He cites "Trends and Directions
in programming languages" from Anders Hejlsberg.&nbsp; DSL's could certainly be part
of that mix in creating solutions.<br>
<br>
Jeffrey Snover, the architect of Powershell, had a discussion in 2008 on DSL's with
Martin Fowler and Neal Ford from Thoughtworks. (<a href="http://channel9.msdn.com/blogs/charles/jeffrey-snover-martin-fowler-and-neil-ford-domain-specific-languages">recording
on Channel9</a>). In this talk they made the point that a DSL can be an External DSL,
an Internal DSL or a 'workbench' with tools wrapped around it. Martin Fowler made
the point that not many successful DSL's have been done starting from the business
side and working toward the API - but that is where the concept is the most powerful,
they made the point that it is usually an abstraction of an existing API that simplifies
the underlying API - and that DSL can be replaced with the word 'Framework' and mean
the same thing. Jeffrey Snover also <a href="http://blogs.msdn.com/b/powershell/archive/2008/10/09/domain-specific-languages-dsls-in-general-and-how-powershell-relates.aspx">posted</a> that
Powershell could be used to create DSL's by limiting the syntax. The key piece he
refers to is the <a href="http://technet.microsoft.com/en-us/library/dd347678.aspx">data
segment SupportedCommands</a> - which he alludes to as a way to limit a DSL done in
Powershell.<br>
<br>
Karl Prosser referred to the Powerboots library for Powershell as a DSL in a <a href="http://powershell.com/cs/blogs/karl-prosser/archive/2009/02/11/powerboots-a-beautiful-dsl-not-to-mention-useful.aspx">blog
post</a>. It is a Powershell set of commands that are specific to using WPF from within
Powershell - which stays with the concept that it&nbsp; is limited to that specific
domain.<br>
<br>
Sometimes the use of a Fluent API - can be used to write code that is very readable
and expressive - such that it becomes an internal DSL within the general purpose language(Steven
Hoisee <a href="http://www.blog.holsee.com/2009/10/fluent-interfaces-internal-domain-specific-languages/">blog</a> has
some coverage on this).&nbsp; I came accross a paper on how JMock was developed and
how they worked toward incorporating a Fluent API as part of their own <a href="http://static.mockobjects.com/files/evolving_an_edsl.ooplsa2006.pdf">Embeded
DSL</a> within the framework.<br>
<br>
Martin Fowler, who took the time to write the book on DSL, has a post on <a href="http://www.martinfowler.com/bliki/BusinessReadableDSL.html">BusinessReadableDSLs</a>.
Where the idea is different than business-writeable DSLs. That was the impression
I got from Aslam Khan's use of Cucumber - that the business could read the DSL and
confirm if it was correct or not.
<br>
Martin Fowler invokes the comparison to COBOL - which was supposed to be an english
way of telling the computer what to do - and begs the question - how is this one different?&nbsp;
My impression is that the a correct implementation of a DSL is declarative - it describes
what you want to do, now how you do it - and having programmed in COBOL - it is an
imperative approach, not a declarative one.<br>
<br>
Developing a DSL, based on the Jeffrey Snover video, leads me to see that in a DSL
you have vocabulary and you have grammar that must be decided on - and the idea of
keeping it small seems to be important. Just enough to keep and simple - and no simpler.<br>
<br>
Jeremy Miller(Creator of the IOC container - StructureMap, an MVC framework called
FubuMVC, and a testing tool called StoryTeller) did a <a href="http://oredev.org/2010/sessions/patterns-for-building-internal-dsls-in-c-3-0">presentation</a> on
creating Internal DSL's at Oredev in Oslo - Nov 2010.<br>
He&nbsp; contributed to the Fluent NHibernate project, and incorporated the use of
an Internal DSL in these projects - and in the presentation he goes over some of the
difficulties of using and developing an Internal DSL using the C# 3.0 language features.
He touches on the separation of the Runtime and Configuration model in building a
DSL, and that testing an internal DSL for configuration is very difficult - you can
test the runtime model more easily, and then make sure your configuration model works
correctly. (the video is a bit grainy - and a few of the questions, that came from
the audience, are not heard - but the concepts that were used in creating an internal
DSL are shown pretty well.)<br>
<br>
From this set of touch points - on the various flavors of DSL's, it is something that
can be done in a variety of ways. The simplest form is the internal or embedded, perhaps
as a Fluent API approach. This simple form of a DSL can be for a small team that produces
repetitive code, or business rules that are needed in in either a static or dynamic
fashion - but still being an internal abstraction - within a small domain. Then there
is an external DSL - and that would need to have a the same considerations as a full
blown computer language - as the publishing of an External DSL approach tends to get
the syntax set in stone, unless you can absorb breaking changes later on.&nbsp;
<br>
<br>
I find this an interesting research topic, that may prove to be a practical solution
to some future area of work. Along these lines - I recently purchased a book that
looks promising; <a href="http://www.cs.usfca.edu/%7Eparrt/">Terrence Parr</a>'s book
"<a href="http://www.amazon.com/Language-Implementation-Patterns-Domain-Specific-Programming/dp/193435645X">Language
Implementation Patterns</a> - Create your own Domain Specific and General Programming
Languages". Terrence Parr developed&nbsp; <a href="http://www.antlr.org/">ANTLR</a> and
that tool is used in the Boo compiler.&nbsp; I will have more reading and learning
to do in this area - and, perhaps at some point, the payoff will be when I can see
an area where a DSL can be used to invoke parts of a framework. Ideally this would
be in terms of the users, a readable Business DSL, or an API syntax that developers
for an application can use that brings a higher level of abstraction and makes code
more readable - and perhaps more declarative.&nbsp; The Jeremy Miller video shows
that is not a simple task, however, he shows that it can be used to develop some powerful
solutions too, and that I find to be valuable.<br>
<p>
</p>
<img width="0" height="0" src="http://designandcode.net/aggbug.ashx?id=de6511fb-497f-483a-8ee0-d5ee427172d7" />http://designandcode.net/CommentView,guid,de6511fb-497f-483a-8ee0-d5ee427172d7.aspx.NetArchitectureComputerLanguagesCucumberDDDDesignSpecifcLanguage(DSL)DevelopmentToolsGherkinPowershellRubySoftware FrameworksStructuremaphttp://designandcode.net/Trackback.aspx?guid=178a3b4e-7f94-48e2-af66-efe61be00fd2http://designandcode.net/pingback.aspxhttp://designandcode.net/PermaLink,guid,178a3b4e-7f94-48e2-af66-efe61be00fd2.aspxMark Mitchellhttp://designandcode.net/SyndicationService.asmx/GetEntryCommentsRss?guid=178a3b4e-7f94-48e2-af66-efe61be00fd2

Codestock 2009 wrapped up last night.The event was oversold by 1 - 376 attendees.
I enjoyed the selection of talks that were available, and the sessions I attended
were good. Of course I had a favorite.

My Favorite session was delivered Rik Robinson of Wintellect. His talk was on PRISM,
from the Microsoft Patterns and Practice group (PNP), this is a Guidance that can
be used in WPF and Silverlight - and incorporates the Unity IOC framework (but that
can be swapped out if you prefer). He kept it simple, he introduced one thing built
on another, and he got the main concepts of how PRISM can be used to develop applications
that decouple View and ViewModel in a very clean fasion. The session was very interactive
and it must have been a bit of pressure to have the Wintellect CEO sitting in the
session.

Through another acquaintance I got to have dinner with Rik that night(day of his presentation),
and hooked up with him for yet another dinner after the last Codestock session before
driving back (we did not attend the giveaways).

Wintellect is local to Knoxville, and is one of the supporters of Codestock. They
arranged to have to other presentations besides Rik Robinson's. John Robbins and Jeffrey
Richter gave presentations via live meeting - and took questions via cell phone (which
you would hear in the room as an echo - but it worked). I attended the John Robbins
debugging presentation and it too was excellent (he can make technology humourous)
- I picked another session instead of the Jeffrey Richter session - if they recorded
it I am going to go watch it.

I feel a bit responsible for a comment from another attendee about one session I attended.
The session just seemed like there were more examples that were ready - but not shown
- and the session ended earlier than the time slot. I overheard someone else make
that comment about it - and it seemed to fit. I had been fine with how it was -and
only when I heard the comment did it occur to me that not all of the examples had
been touched on. I had sat down to lunch with this speaker before his presentation.
It occurred to me that I may have impacted his preparation, and even the thought that
I did impact his presentation makes me feel sorry for having disturbed his preparation.
I felt it was still a good presentation. I heard how much Rik Robinson prepared and
saw the result - it is a lot of work - and it makes me wonder if my trying to be social
- was just at the wrong time (My apologies to the speaker)

There were several topic areas of interest for me during codestock. WPF,PRISM, MEF,
Debugging, WCF, ORM usage, and TDD. There were sessions that touched on, or spoke
to these - and much more.

Another acquaintance suggested I attend Kevin Hazzard's session on "How I learned
to love Metaprogramming" - which was a very good look into the way that the compiler
creates a dynamic data type in .Net 4.0. The data type of dynamic - is static.
That statement seems at first to be an oxymoron - but the element is treated as static
and how it resolves at runtime is dynamic. The presentation showed how C# and Python
could interact - and gave some examples of dynamically wrapping elements of XML using
C# using the Dynamic elements. His XML Example reminded me of something that Powershell
can do today - and Kevin said that the powershell team did not go down the Dynamic
Language path - which he was not pleased with. Kevin Hazzard is a very good speaker
and he gets into the topic very deeply - and explains it well. I would like to hear
more about his perceptions on Powershell, and how he thinks it might have been done.

There was one connection that I did not expect to occur. At the CodeStock social event,
I was sitting at a table, and a fellow walked over and looked at me and said - I think
I know you. After a moment or two - I recogognized him from a twitter photo. When
I went to Devlink 2008 - I was trying to use Twitter to find out where people were
meeting up, and I had been on twitter for maybe a month at that time. This fellow
was not able to attend the DevLink event - but was trying to follow what was going
on - and he responded to help me figure out where people would be. Between this fellow
and "TheCodeCampJunkie" - I was able to hook up with people at DevLink. So here was
my first time meeting a person face to face - based on using twitter. We talked about
.Net and his getting certified and how it was not helping him get work.

The main focus of these event is the dissemenation of knowledge of what is new and
how to use the technology we deal with. The other part of this is that you are meeting
and speaking with other developers, whom you may have not ever met otherwise.

Several people have posted pictures from CodeStock - Alan Barber got one picture of me at
the Dinner on the night before the event.

Codestock 2009 http://designandcode.net/PermaLink,guid,178a3b4e-7f94-48e2-af66-efe61be00fd2.aspxhttp://designandcode.net/2009/06/28/Codestock2009.aspx
Sun, 28 Jun 2009 12:37:48 GMT<p>
Codestock 2009 wrapped up last night.The event was oversold by 1 - 376 attendees.
I enjoyed the selection of talks that were available, and the sessions I attended
were good. Of course I had a favorite.
</p>
<p>
My Favorite session was delivered Rik Robinson of Wintellect. His talk was on <a href="http://www.codeplex.com/Wiki/View.aspx?ProjectName=CompositeWPF">PRISM</a>,
from the Microsoft Patterns and Practice group (PNP), this is a Guidance that can
be used in WPF and Silverlight - and incorporates the Unity IOC framework (but that
can be swapped out if you prefer). He kept it simple, he introduced one thing built
on another, and he got the main concepts of how PRISM can be used to develop applications
that decouple View and ViewModel in a very clean fasion. The session was very interactive
and it must have been a bit of pressure to have the Wintellect CEO sitting in the
session.
</p>
<p>
Through another acquaintance I got to have dinner with Rik that night(day of his presentation),
and hooked up with him for yet another dinner after the last Codestock session before
driving back (we did not attend the giveaways).
</p>
<p>
Wintellect is local to Knoxville, and is one of the supporters of Codestock. They
arranged to have to other presentations besides Rik Robinson's. John Robbins and Jeffrey
Richter gave presentations via live meeting - and took questions via cell phone (which
you would hear in the room as an echo - but it worked). I attended the John Robbins
debugging presentation and it too was excellent (he can make technology humourous)
- I picked another session instead of the Jeffrey Richter session - if they recorded
it I am going to go watch it.
<p>
I feel a bit responsible for a comment from another attendee about one session I attended.
The session just seemed like there were more examples that were ready - but not shown
- and the session ended earlier than the time slot. I overheard someone else make
that comment about it - and it seemed to fit. I had been fine with how it was -and
only when I heard the comment did it occur to me that not all of the examples had
been touched on. I had sat down to lunch with this speaker before his presentation.
It occurred to me that I may have impacted his preparation, and even the thought that
I did impact his presentation makes me feel sorry for having disturbed his preparation.
I felt it was still a good presentation. I heard how much Rik Robinson prepared and
saw the result - it is a lot of work - and it makes me wonder if my trying to be social
- was just at the wrong time (My apologies to the speaker)
</p>
<p>
There were several topic areas of interest for me during codestock. WPF,PRISM, MEF,
Debugging, WCF, ORM usage, and TDD. There were sessions that touched on, or spoke
to these - and much more.
</p>
<p>
Another acquaintance suggested I attend Kevin Hazzard's session on "How I learned
to love Metaprogramming" - which was a very good look into the way that the compiler
creates a <i>dynamic</i> data type in .Net 4.0. The data type of dynamic - is static.
That statement seems at first to be an oxymoron - but the element is treated as static
and how it resolves at runtime is dynamic. The presentation showed how C# and Python
could interact - and gave some examples of dynamically wrapping elements of XML using
C# using the Dynamic elements. His XML Example reminded me of something that Powershell
can do today - and Kevin said that the powershell team did not go down the Dynamic
Language path - which he was not pleased with. Kevin Hazzard is a very good speaker
and he gets into the topic very deeply - and explains it well. I would like to hear
more about his perceptions on Powershell, and how he thinks it might have been done.
</p>
<p>
There was one connection that I did not expect to occur. At the CodeStock social event,
I was sitting at a table, and a fellow walked over and looked at me and said - I think
I know you. After a moment or two - I recogognized him from a twitter photo. When
I went to Devlink 2008 - I was trying to use Twitter to find out where people were
meeting up, and I had been on twitter for maybe a month at that time. This fellow
was not able to attend the DevLink event - but was trying to follow what was going
on - and he responded to help me figure out where people would be. Between this fellow
and "TheCodeCampJunkie" - I was able to hook up with people at DevLink. So here was
my first time meeting a person face to face - based on using twitter. We talked about
.Net and his getting certified and how it was not helping him get work.
</p>
<p>
The main focus of these event is the dissemenation of knowledge of what is new and
how to use the technology we deal with. The other part of this is that you are meeting
and speaking with other developers, whom you may have not ever met otherwise.
</p>
<p>
Several people have posted pictures from CodeStock - Alan Barber got one picture of <a href="http://cid-67d16e3143fa2957.skydrive.live.com/self.aspx/Codestock%202009/IMG%7C_0135.jpg">me</a> at
the Dinner on the night before the event.
</p>
<ul>
Photo collections from Code Stock Attendees
<li>
<a href="http://cid-67d16e3143fa2957.skydrive.live.com/browse.aspx/Codestock%202009">Alan
Barber</a>
</li>
<li>
<a href="http://www.flickr.com/photos/scoregasm/sets/72157620686419596/">Michael Neel</a>
</li>
<li>
<a href="http://www.flickr.com/photos/29942169@N08/sets/72157620739255234/">David
Giard</a>
</li>
</ul>
<img width="0" height="0" src="http://designandcode.net/aggbug.ashx?id=178a3b4e-7f94-48e2-af66-efe61be00fd2" />http://designandcode.net/CommentView,guid,178a3b4e-7f94-48e2-af66-efe61be00fd2.aspx.NetArchitectureCodeCampDevelopmentToolsInversion-of-ControlProfessionalNetworkSoftware FrameworksTwitter