<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1765823288645515689</id><updated>2026-03-20T12:59:30.824+02:00</updated><category term="JavaScript"/><category term="Js Test Driver"/><category term="SignalR"/><category term="Unit Testing"/><category term="Visual Studio"/><category term="Architecture"/><category term="QUnit"/><category term="Require.JS"/><category term="Sinon.JS"/><category term="Asp.Net Web API"/><category term="PhoneGap"/><category term="NHibernate"/><category term="NServiceBus"/><category term="REST"/><category term="SQL Server"/><category term="WCF"/><category term="Windows Azure"/><title type='text'>UpStruct</title><subtitle type='html'>Yaniv Yechezkel about Software, Architecture, and Best Practices</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.upstruct.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-3332698395938151037</id><published>2013-12-13T13:06:00.000+02:00</published><updated>2014-02-04T22:52:56.928+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SignalR"/><title type='text'>Developing Real-Time Web Applications with SignalR</title><content type='html'>&lt;h2&gt;
Developing Real-Time Web Applications with SignalR&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDubSjE1uzCx3fdUy-CYbi9rNWJs4tcoKHzXhlWVS1dFbG6L2AQFkn1YBHraHRX4IUDmTh8CkLk6xfeB-LI-fAM83RnThOPDKWp_M4fpAG3Z0U_ez1f10uacvHOChCaW_fGRo5GSztho8/s1600/Developing+Real-Time+Web+Applications+with+SignalR.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDubSjE1uzCx3fdUy-CYbi9rNWJs4tcoKHzXhlWVS1dFbG6L2AQFkn1YBHraHRX4IUDmTh8CkLk6xfeB-LI-fAM83RnThOPDKWp_M4fpAG3Z0U_ez1f10uacvHOChCaW_fGRo5GSztho8/s200/Developing+Real-Time+Web+Applications+with+SignalR.png&quot; height=&quot;150&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
This is the second full day session I gave this week. This one was about Building Real-Time Web Applications with ASP.NET SignalR, as part of Expert Days 2013 event, held by E4D at Kfar Hamacabia.&lt;br /&gt;
&lt;br /&gt;
Thanks for everyone who came, participated, and contributed...&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Slide Deck&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
You can download the slide deck from&amp;nbsp;&lt;a href=&quot;http://gdurl.com/Y4mc/download&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, or if you like, view it directly from&amp;nbsp;&lt;a href=&quot;http://gdurl.com/Y4mc/viewer&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Code Demos&lt;/h3&gt;
&lt;br /&gt;
All the demos are available to download from&amp;nbsp;&lt;a href=&quot;http://gdurl.com/nbXc/download&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Enjoy,&lt;br /&gt;
Yaniv&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/3332698395938151037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/12/developing-real-time-web-applications.html#comment-form' title='138 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/3332698395938151037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/3332698395938151037'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/12/developing-real-time-web-applications.html' title='Developing Real-Time Web Applications with SignalR'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDubSjE1uzCx3fdUy-CYbi9rNWJs4tcoKHzXhlWVS1dFbG6L2AQFkn1YBHraHRX4IUDmTh8CkLk6xfeB-LI-fAM83RnThOPDKWp_M4fpAG3Z0U_ez1f10uacvHOChCaW_fGRo5GSztho8/s72-c/Developing+Real-Time+Web+Applications+with+SignalR.png" height="72" width="72"/><thr:total>138</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-4096982832064776864</id><published>2013-12-11T22:45:00.003+02:00</published><updated>2013-12-11T22:47:35.429+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Architecture"/><category scheme="http://www.blogger.com/atom/ns#" term="Asp.Net Web API"/><category scheme="http://www.blogger.com/atom/ns#" term="REST"/><title type='text'>Building RESTful Services with Web API</title><content type='html'>&lt;h2&gt;
Building RESTful Services with Web API&lt;/h2&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO0SUY2Opol8Ry69kuAhFoKlRVkB3Rmp55hOeTYafjJWh2Kcq5twJ6hYC2XUOZwaQtnGLtpGX4yJuMo0Dj2I8fwQAuoNkzzIk3FoEnMhgMqhu5CkbB_09VUQUkBC-lBLe7vwxq-qgKlUo/s1600/Building+RESTful+Services+with+Web+API.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO0SUY2Opol8Ry69kuAhFoKlRVkB3Rmp55hOeTYafjJWh2Kcq5twJ6hYC2XUOZwaQtnGLtpGX4yJuMo0Dj2I8fwQAuoNkzzIk3FoEnMhgMqhu5CkbB_09VUQUkBC-lBLe7vwxq-qgKlUo/s200/Building+RESTful+Services+with+Web+API.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;Early this week I gave a full day lecture about Building RESTful Services with ASP.NET Web API, as part of Expert Days 2013 event, held by E4D at Kfar Hamacabia.&lt;br /&gt;
&lt;br /&gt;
Thanks for everyone who came, participated, and contributed...&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Slide Deck&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
You can download the slide deck from &lt;a href=&quot;http://gdurl.com/xpSX/download&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, or if you like, view it directly from &lt;a href=&quot;http://gdurl.com/xpSX/viewer&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Code Demos&lt;/h3&gt;
&lt;br /&gt;
All the demos are available to download from &lt;a href=&quot;http://gdurl.com/tseI/download&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Enjoy,&lt;br /&gt;
Yaniv&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/4096982832064776864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/12/building-restful-services-with-web-api.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/4096982832064776864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/4096982832064776864'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/12/building-restful-services-with-web-api.html' title='Building RESTful Services with Web API'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO0SUY2Opol8Ry69kuAhFoKlRVkB3Rmp55hOeTYafjJWh2Kcq5twJ6hYC2XUOZwaQtnGLtpGX4yJuMo0Dj2I8fwQAuoNkzzIk3FoEnMhgMqhu5CkbB_09VUQUkBC-lBLe7vwxq-qgKlUo/s72-c/Building+RESTful+Services+with+Web+API.png" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-939930062859754559</id><published>2013-11-30T18:54:00.001+02:00</published><updated>2013-12-04T09:13:13.823+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asp.Net Web API"/><category scheme="http://www.blogger.com/atom/ns#" term="SignalR"/><title type='text'>Expert Days 2013</title><content type='html'>&lt;h2&gt;
Expert Days 2013&lt;/h2&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7zYN6pBSHFfvoAuGKS9ZGeGvPc0lzUa-EC5-AsEgUETbnq0dxC6oECwHlyZ0CZBYvbfKQaeMkhSxRz4xq5W1njup-72t6Ry6PhIWDi0NmhUzLsHcupwVmEcPj1cYLUQEF-KcSNBWA0z0/s1600/E4D+Expert+Days+2013.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;78&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7zYN6pBSHFfvoAuGKS9ZGeGvPc0lzUa-EC5-AsEgUETbnq0dxC6oECwHlyZ0CZBYvbfKQaeMkhSxRz4xq5W1njup-72t6Ry6PhIWDi0NmhUzLsHcupwVmEcPj1cYLUQEF-KcSNBWA0z0/s320/E4D+Expert+Days+2013.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;In the up-coming Expert Days 2013 event, taking place about a week from now, I&#39;m going to give 2 sessions:&lt;br /&gt;
&lt;br /&gt;
1.&amp;nbsp;RESTful Services with Web API&lt;br /&gt;
2.&amp;nbsp;Building Real-Time Web Applications with SignalR&lt;br /&gt;
&lt;br /&gt;
The details can be found here:&lt;br /&gt;
&lt;a href=&quot;http://www.e4d.co.il/Events/ExpertDays2013/Home/Trainer/Yaniv-Yechezkel&quot;&gt;http://www.e4d.co.il/Events/ExpertDays2013/Home/Trainer/Yaniv-Yechezkel&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Hope to see you there,&lt;br /&gt;
Yaniv</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/939930062859754559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/11/expert-days-2013.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/939930062859754559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/939930062859754559'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/11/expert-days-2013.html' title='Expert Days 2013'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7zYN6pBSHFfvoAuGKS9ZGeGvPc0lzUa-EC5-AsEgUETbnq0dxC6oECwHlyZ0CZBYvbfKQaeMkhSxRz4xq5W1njup-72t6Ry6PhIWDi0NmhUzLsHcupwVmEcPj1cYLUQEF-KcSNBWA0z0/s72-c/E4D+Expert+Days+2013.png" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-4343020534409921659</id><published>2013-10-17T11:25:00.000+03:00</published><updated>2013-10-17T11:33:16.067+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Js Test Driver"/><category scheme="http://www.blogger.com/atom/ns#" term="QUnit"/><category scheme="http://www.blogger.com/atom/ns#" term="Require.JS"/><category scheme="http://www.blogger.com/atom/ns#" term="Sinon.JS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unit Testing"/><title type='text'>Quick Tour to Front-End Unit Testing</title><content type='html'>&lt;h2&gt;
Quick Tour to Front-End Unit Testing Presentation&lt;/h2&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB8ZPNqXR7x73t1C9g9t_xMv_uaBjGQ4Dg51rkE4IEQMfwNVOqxx342XlE7-55YLNLv72G3IY5a-LaQk-1tZJ6FbXHOQYm401tPNzIkl721JNRQzjqAVNcESWcV7HOQEW0nz2ILvM3l7s/s1600/front-end-il-logo.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;141&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB8ZPNqXR7x73t1C9g9t_xMv_uaBjGQ4Dg51rkE4IEQMfwNVOqxx342XlE7-55YLNLv72G3IY5a-LaQk-1tZJ6FbXHOQYm401tPNzIkl721JNRQzjqAVNcESWcV7HOQEW0nz2ILvM3l7s/s200/front-end-il-logo.jpeg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;This week I gave a presentation about Java Script Unit Testing at the&lt;a href=&quot;http://www.meetup.com/FrontEnd-IL/events/138093802/&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;Front-End.IL&lt;/a&gt;&amp;nbsp;User Group which was hosted at NICE&#39;s auditorium at Ra`anana.&lt;br /&gt;
&lt;br /&gt;
We&#39;ve talked about the motivations for doing Unit Testing in this era of Single Page Applications with tons of lines of code, and then we drilled down to QUnit, Sinon, and JSTD...&lt;br /&gt;
&lt;br /&gt;
You might find it helpful to go over the series of posts below while you&#39;re going over the demos.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;JavaScript Unit Testing in Visual Studio&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
- &lt;b&gt;&lt;a href=&quot;http://www.upstruct.net/2013/01/javascript-unit-testing-in-visual.html&quot; target=&quot;_blank&quot;&gt;Part I &amp;nbsp; - JavaScript is all around&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
- &lt;b&gt;&lt;a href=&quot;http://www.upstruct.net/2013/02/javascript-unit-testing-in-visual.html&quot; target=&quot;_blank&quot;&gt;Part II &amp;nbsp;- Setting up the Environment for Headless Tests&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
- &lt;b&gt;&lt;a href=&quot;http://www.upstruct.net/2013/02/javascript-unit-testing-in-visual-part-3.html&quot; target=&quot;_blank&quot;&gt;Part III -&amp;nbsp;Testing Require.JS Modules&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&amp;nbsp;&lt;br /&gt;
&lt;h2&gt;
Slide Deck&lt;/h2&gt;
You can download the Slide Deck from&amp;nbsp;&lt;a href=&quot;http://gdurl.com/UoG0/download&quot;&gt;here&lt;/a&gt;, or view it directly from&amp;nbsp;&lt;a href=&quot;http://gdurl.com/UoG0/viewer&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Demos&lt;/h2&gt;
Also, the demos can be downloaded from &lt;a href=&quot;http://gdurl.com/r0uo/download&quot;&gt;here&lt;/a&gt;.
&lt;br /&gt;
&lt;br /&gt;
Thanks to Gil Fink for organizing these meetups. :)&lt;br /&gt;
&lt;br /&gt;
Enjoy,&lt;br /&gt;
Yaniv</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/4343020534409921659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/10/quick-tour-to-front-end-unit-testing.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/4343020534409921659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/4343020534409921659'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/10/quick-tour-to-front-end-unit-testing.html' title='Quick Tour to Front-End Unit Testing'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB8ZPNqXR7x73t1C9g9t_xMv_uaBjGQ4Dg51rkE4IEQMfwNVOqxx342XlE7-55YLNLv72G3IY5a-LaQk-1tZJ6FbXHOQYm401tPNzIkl721JNRQzjqAVNcESWcV7HOQEW0nz2ILvM3l7s/s72-c/front-end-il-logo.jpeg" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-6903315077301277198</id><published>2013-07-04T18:07:00.000+03:00</published><updated>2013-07-05T09:59:23.049+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Architecture"/><category scheme="http://www.blogger.com/atom/ns#" term="NHibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Azure"/><title type='text'>NHibernate HiLo Identity Generator on SQL Azure </title><content type='html'>&lt;h2&gt;
NHibernate POID Generators&lt;/h2&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwUJKlg4iNlPvQRh5_7Kpndwf3Z65o6Krepmb6edDiBAGCysMgwKQMbw6iyH5L4VrvXvErkxLp9SpS-2U8RyCXkTM7UpZk5RSq96mnqmP-8AI2VbxsTU9vlQcymgYnYO9avUUdhmAZCME/s169/nhibernate_and_sql_azure.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwUJKlg4iNlPvQRh5_7Kpndwf3Z65o6Krepmb6edDiBAGCysMgwKQMbw6iyH5L4VrvXvErkxLp9SpS-2U8RyCXkTM7UpZk5RSq96mnqmP-8AI2VbxsTU9vlQcymgYnYO9avUUdhmAZCME/s200/nhibernate_and_sql_azure.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
NHibernate supports several POID (Persistent Object ID) Generators, including: Identity, Guid, Guid.Comb, and HiLo.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
You can find a good explanation &lt;a href=&quot;http://nhforge.org/blogs/nhibernate/archive/2009/03/20/nhibernate-poid-generators-revealed.aspx&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, about the various strategies.&lt;br /&gt;
&lt;br /&gt;
Avoiding Identity and going with Guid.Comb or HiLo is a good practice, but there&#39;s a slight problem when your Database is SQL Azure...&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;
HiLo&amp;nbsp;&lt;/h2&gt;
HiLo, similar to Guid.Comb, generates the Ids disconnect from the Database, but in contrast it takes less space, and is human readable.&lt;br /&gt;
&lt;br /&gt;
You might find &lt;a href=&quot;http://www.codeproject.com/Articles/493081/NHibernateplusHiLoplusIdentityplusGenerator&quot; target=&quot;_blank&quot;&gt;this article&lt;/a&gt; very helpful.&lt;br /&gt;
&lt;br /&gt;
Defining an Entity to work with HiLo using Fluent NHibernate might look something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;public class ProdcutMap: ClassMap&amp;lt;Prodcut&amp;gt;
{
   public ProdcutMap()
   {           
      Id(x =&amp;gt; x.Id).GeneratedBy.HiLo(100);
      ...
   }
}
&lt;/pre&gt;
&lt;br /&gt;
And if you prefer the conventions way, the previous example would translate to something like:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;public class HiLoIdConvention: IIdConvention
{               
   public void Apply(IIdentityInstance instance)
   {
      Id(x =&amp;gt; x.Id).GeneratedBy.HiLo(100);
   }
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;h2&gt;
Problem&lt;/h2&gt;
Out of the box, the NHibernate HiLo Identity Generator will not work with SQL Azure, as SQL Azure will insist on having a &lt;b&gt;Clustered Index&lt;/b&gt; on the table, something that the default implementation doesn&#39;t take into account.&lt;br /&gt;
&lt;br /&gt;
As soon as the schema will be generated on the Database, and it will hit the line where it&#39;s inserting the default value, you&#39;ll get an exception.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Solution&lt;/h2&gt;
I think the preferred solution would be to use an SQL Azure Dialect, but since it&#39;s not built into NHibernate, as long as I know, the second best approach would be to create a custom Identity generator.&lt;br /&gt;
&lt;br /&gt;
Ended up with a &lt;b&gt;Custom Generator&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;class AzureCompliantTableHiLoGenerator: TableHiLoGenerator
{           
    public override string[] SqlCreateStrings(NHibernate.Dialect.Dialect dialect)
    {            
        IList&amp;lt;string&amp;gt; script = new List&amp;lt;string&amp;gt;();

        script.Add(string.Format(&quot;create table {0} ( {1} {2}, {3} varchar(128) not null )&quot;, HiLoIdConvention.NHibernateHiLoIdentityTableName, 
                                                                                            HiLoIdConvention.NextHiValueColumnName, 
                                                                                            dialect.GetTypeName(this.columnSqlType),
                                                                                            HiLoIdConvention.TableColumnName));

        script.Add(string.Format(&quot;create clustered index IX_{0}_{1} on {0} ( {1} asc );&quot;, HiLoIdConvention.NHibernateHiLoIdentityTableName,
                                                                                            HiLoIdConvention.TableColumnName));
                        
        script.Add(&quot;go&quot;);            

        return script.ToArray();            
    }

    public override string[] SqlDropString(NHibernate.Dialect.Dialect dialect)
    {
        return new string[] { dialect.GetDropTableString(HiLoIdConvention.NHibernateHiLoIdentityTableName) };
    }
}
&lt;/pre&gt;
&lt;br /&gt;
An &lt;b&gt;Id Convention&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;public class HiLoIdConvention: IIdConvention
{      
    private const string TableParamName = &quot;table&quot;;
    private const string ColumnParamName = &quot;column&quot;;
    private const string MaxLoParamName = &quot;max_lo&quot;;
    private const string WhereParamName = &quot;where&quot;;
        
    public const string NHibernateHiLoIdentityTableName = &quot;NHibernateHiLoIdentity&quot;;
    public const string NextHiValueColumnName = &quot;NextHiValue&quot;;
    public const string TableColumnName = &quot;Entity&quot;;
    public const int MaxLo = 10;
 
    public void Apply(IIdentityInstance instance)
    {                   
        instance.GeneratedBy.Custom(typeof(AzureCompliantTableHiLoGenerator),
                                    builder =&amp;gt; builder.AddParam(TableParamName, NHibernateHiLoIdentityTableName)
                                                        .AddParam(ColumnParamName, NextHiValueColumnName)
                                                        .AddParam(MaxLoParamName, MaxLo.ToString())
                                                        .AddParam(WhereParamName, string.Format(&quot;{0} = &#39;[{1}]&#39;&quot;, TableColumnName, instance.EntityType.Name)));             
    }

    public static void CreateHiLoScript(NHibernate.Cfg.Configuration config)
    {
        var script = new StringBuilder();

        script.AppendFormat(&quot;delete from {0};&quot;, NHibernateHiLoIdentityTableName);

        script.AppendLine();

        script.AppendLine(&quot;go&quot;);

        script.AppendLine();

        foreach (var tableName in config.ClassMappings.Select(m =&amp;gt; m.Table.Name).Distinct())
        {
            script.AppendFormat(string.Format(&quot;insert into [{0}] ({1}, {2}) values (&#39;[{3}]&#39;,1);&quot;, 
                                                NHibernateHiLoIdentityTableName, 
                                                TableColumnName, 
                                                NextHiValueColumnName, 
                                                tableName));

            script.AppendLine();
        }

        config.AddAuxiliaryDatabaseObject(new SimpleAuxiliaryDatabaseObject(script.ToString(), 
                                                                            null, 
                                                                            new HashedSet&amp;lt;string&amp;gt; 
                                                                            { 
                                                                                typeof(MsSql2000Dialect).FullName, 
                                                                                typeof(MsSql2005Dialect).FullName, 
                                                                                typeof(MsSql2008Dialect).FullName 
                                                                            }));
    }
}
&lt;/pre&gt;
&lt;br /&gt;
And my &lt;b&gt;Bootstrapper &lt;/b&gt;code, removed most of it for brevity, looks something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;public static class Bootstrapper
{    
    private const string ConnectionStringName = &quot;MyDB&quot;;
    
    public static void RegisterTypes(IUnityContainer container)
    {
        CreateAndRegisterSessionFactory(container);
        ...
    }
    
    private static void CreateAndRegisterSessionFactory(IUnityContainer container)
    {
        NHibernate.Cfg.Configuration configuration = Fluently.Configure()                
                                                                .Database(DefineDatabase)
                                                                .Mappings(DefineMappings)
                                                                .ExposeConfiguration(HiLoIdConvention.CreateHiLoScript)                                                                    
                                                                .BuildConfiguration();

        CreateSchema(configuration);

        ISessionFactory sessionFactory = configuration.BuildSessionFactory();

        container.RegisterInstance&amp;lt;ISessionFactory&amp;gt;(sessionFactory);
    }
   
    private static IPersistenceConfigurer DefineDatabase()
    {                
        return MsSqlConfiguration.MsSql2008
                                    .ConnectionString(x =&amp;gt; x.FromConnectionStringWithKey(ConnectionStringName));                                                                 
    }

    private static void DefineMappings(MappingConfiguration mapping)
    {
        mapping.FluentMappings                   
                .AddFromAssemblyOf&amp;lt;ProductMap&amp;gt;()
                .Conventions.Add&amp;lt;HiLoIdConvention&amp;gt;();
    }
    
    private static void CreateSchema(NHibernate.Cfg.Configuration configuration)
    {
        SchemaExport schemaExport = new SchemaExport(configuration);          

        schemaExport.Drop(false, true);
        schemaExport.Create(true, true);                        
    }
}
&lt;/pre&gt;
&lt;br /&gt;
It works fine, no complaints.... But still, would be glad find out that NHibernate supports an Azure Dialect, or that there is already some Library that I can use instead...</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/6903315077301277198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/07/nhibernate-hilo-identity-generator-on.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/6903315077301277198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/6903315077301277198'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/07/nhibernate-hilo-identity-generator-on.html' title='NHibernate HiLo Identity Generator on SQL Azure '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwUJKlg4iNlPvQRh5_7Kpndwf3Z65o6Krepmb6edDiBAGCysMgwKQMbw6iyH5L4VrvXvErkxLp9SpS-2U8RyCXkTM7UpZk5RSq96mnqmP-8AI2VbxsTU9vlQcymgYnYO9avUUdhmAZCME/s72-c/nhibernate_and_sql_azure.png" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-4860037306560398059</id><published>2013-06-20T16:32:00.002+03:00</published><updated>2013-06-20T16:32:58.748+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SignalR"/><title type='text'>Developing Real-Time Web Apps with SignalR</title><content type='html'>&lt;h2&gt;
Developing Real-Time Web Apps with SignalR Presentation&lt;/h2&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgC1OfXDKlCe5d-bL7EEog-cvdagUmmoc4zmk4l3xfFlg-lb6RiqXjtnC4rdPf-difNaWZi5bTzd9whqG9Bv-Wx7uLg2Vb0DeeiO6aPUMPljHbjPCBA_nx1FFYZ9ux9w4ICQBkqX_9M1Q/s1600/Developing+Real-Time+Web+Apps+with+SignalR.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgC1OfXDKlCe5d-bL7EEog-cvdagUmmoc4zmk4l3xfFlg-lb6RiqXjtnC4rdPf-difNaWZi5bTzd9whqG9Bv-Wx7uLg2Vb0DeeiO6aPUMPljHbjPCBA_nx1FFYZ9ux9w4ICQBkqX_9M1Q/s200/Developing+Real-Time+Web+Apps+with+SignalR.png&quot; style=&quot;cursor: move;&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;SignalR is a new async signaling library for .NET developed and maintained by David Fowler and Damian Edwars from Microsoft’s ASP.NET and NuGet teams.&lt;br /&gt;
&lt;br /&gt;
If you ever wanted to push data from the server to clients (and not just browser clients!) in real time with ease, SignalR will be your perfect companion.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Slide Deck&lt;/h2&gt;
This week I gave a presentation about SignalR at the &lt;a href=&quot;http://www.js-il.com/&quot; target=&quot;_blank&quot;&gt;JS-IL Event&lt;/a&gt;, a conference held by E4D.&lt;br /&gt;
You can download the Slide Deck from&amp;nbsp;&lt;a href=&quot;http://gdurl.com/eUhq/download&quot;&gt;here&lt;/a&gt;, or view it directly from&amp;nbsp;&lt;a href=&quot;http://gdurl.com/eUhq/viewer&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Enjoy,&lt;br /&gt;
Yaniv</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/4860037306560398059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/06/developing-real-time-web-apps-with.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/4860037306560398059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/4860037306560398059'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/06/developing-real-time-web-apps-with.html' title='Developing Real-Time Web Apps with SignalR'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgC1OfXDKlCe5d-bL7EEog-cvdagUmmoc4zmk4l3xfFlg-lb6RiqXjtnC4rdPf-difNaWZi5bTzd9whqG9Bv-Wx7uLg2Vb0DeeiO6aPUMPljHbjPCBA_nx1FFYZ9ux9w4ICQBkqX_9M1Q/s72-c/Developing+Real-Time+Web+Apps+with+SignalR.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-6957872248678046498</id><published>2013-06-20T16:30:00.002+03:00</published><updated>2013-06-25T16:40:17.025+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Js Test Driver"/><category scheme="http://www.blogger.com/atom/ns#" term="QUnit"/><category scheme="http://www.blogger.com/atom/ns#" term="Require.JS"/><category scheme="http://www.blogger.com/atom/ns#" term="Sinon.JS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unit Testing"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>Advanced JavaScript Unit Testing</title><content type='html'>&lt;h2&gt;
Advanced JavaScript Unit Testing - Presentation&lt;/h2&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSysd_UeGGLiGizh11v744dqb-ottSC9YRdnfYZX_FjYKZ0g4IGE_9V-2ZrRqZJTgBijVFrftl6QVbhPbAG8BQRANDVFRMayc0ap273FpWNnqj1efZ8aAqYVkLTxbql2fMCkQjte7coXU/s1600/Advanced+JavaScript+Unit+Testing.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSysd_UeGGLiGizh11v744dqb-ottSC9YRdnfYZX_FjYKZ0g4IGE_9V-2ZrRqZJTgBijVFrftl6QVbhPbAG8BQRANDVFRMayc0ap273FpWNnqj1efZ8aAqYVkLTxbql2fMCkQjte7coXU/s200/Advanced+JavaScript+Unit+Testing.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;Unit Testing is an inseparable part of the development process, no matter which methodology you follow, be it TDD, or BDD, you know for sure that this investment is worthwhile, enabling early bug fixes, safe refactoring, and better design.&lt;br /&gt;
&lt;br /&gt;
You want to test your JavaScript code but don’t know where to start? Which tools to pick? And how to integrate it all with your IDE?&lt;br /&gt;
&lt;br /&gt;
Let&#39;s take a look at the tools. Let&#39;s see how to combine them to play nicely together in, and hopefully, try making Testing a breeze.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Slide Deck&lt;/h2&gt;
This week I gave a presentation about Unit Testing at the &lt;a href=&quot;http://www.js-il.com/&quot; target=&quot;_blank&quot;&gt;JS-IL Event&lt;/a&gt;, a conference held by E4D.&lt;br /&gt;
You can download the Slide Deck from&amp;nbsp;&lt;a href=&quot;http://gdurl.com/GvBS/download&quot;&gt;here&lt;/a&gt;, or view it directly from&amp;nbsp;&lt;a href=&quot;http://gdurl.com/GvBS/viewer&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Enjoy,&lt;br /&gt;
Yaniv</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/6957872248678046498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/06/advanced-javascript-unit-testing.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/6957872248678046498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/6957872248678046498'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/06/advanced-javascript-unit-testing.html' title='Advanced JavaScript Unit Testing'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSysd_UeGGLiGizh11v744dqb-ottSC9YRdnfYZX_FjYKZ0g4IGE_9V-2ZrRqZJTgBijVFrftl6QVbhPbAG8BQRANDVFRMayc0ap273FpWNnqj1efZ8aAqYVkLTxbql2fMCkQjte7coXU/s72-c/Advanced+JavaScript+Unit+Testing.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-4892787354735458675</id><published>2013-06-20T16:28:00.003+03:00</published><updated>2013-06-22T08:16:08.146+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Architecture"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Require.JS"/><title type='text'>Building Modular JavaScript Application with AMD and RequireJS</title><content type='html'>&lt;h2&gt;
Building Modular JavaScript Application with AMD and RequireJS Presentation&lt;/h2&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTflQNTukw8WgzldDzNuJ2yALeH2s5NG7I7hYVHDCAeNPMN2GWqaKarNv3SaNR80dCQMe5XDPc6WJPIi-Mm-NefrhRlXPkpbDt6xiGehFN6n56duuOWKuegkDiwpNFLDuhyZcl2mRMAKg/s1600/Building+Modular+JavaScript+Application+with+AMD+RequireJS.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTflQNTukw8WgzldDzNuJ2yALeH2s5NG7I7hYVHDCAeNPMN2GWqaKarNv3SaNR80dCQMe5XDPc6WJPIi-Mm-NefrhRlXPkpbDt6xiGehFN6n56duuOWKuegkDiwpNFLDuhyZcl2mRMAKg/s200/Building+Modular+JavaScript+Application+with+AMD+RequireJS.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;The rule of thumb when things get complex is usually to break it down to smaller, more manageable, and loosely coupled units.&lt;br /&gt;
&lt;br /&gt;
Yet, JavaScript (or say ECMAScript) in its current form, doesn&#39;t provide any so-called concept of Module or Package or any kind of logical unit of deployment.&lt;br /&gt;
&lt;br /&gt;
This is where AMD (Asynchronous Module Definition), and Require.JS comes into play.&lt;br /&gt;
&lt;br /&gt;
With Require.JS, you can lay out a solid, scale-able architecture, and come up with maintainable and testable units of code.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Slide Deck&lt;/h2&gt;
This week I gave a presentation about Require.JS at the &lt;a href=&quot;http://www.js-il.com/&quot; target=&quot;_blank&quot;&gt;JS-IL Event&lt;/a&gt;, a conference held by E4D.&lt;br /&gt;
You can download the Slide Deck from&amp;nbsp;&lt;a href=&quot;http://gdurl.com/JJx3/download&quot;&gt;here&lt;/a&gt;, or view it directly from&amp;nbsp;&lt;a href=&quot;http://gdurl.com/JJx3/viewer&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Enjoy,&lt;br /&gt;
Yaniv</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/4892787354735458675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/06/building-modular-javascript-application.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/4892787354735458675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/4892787354735458675'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/06/building-modular-javascript-application.html' title='Building Modular JavaScript Application with AMD and RequireJS'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTflQNTukw8WgzldDzNuJ2yALeH2s5NG7I7hYVHDCAeNPMN2GWqaKarNv3SaNR80dCQMe5XDPc6WJPIi-Mm-NefrhRlXPkpbDt6xiGehFN6n56duuOWKuegkDiwpNFLDuhyZcl2mRMAKg/s72-c/Building+Modular+JavaScript+Application+with+AMD+RequireJS.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-100510925091205975</id><published>2013-06-20T16:24:00.003+03:00</published><updated>2013-06-20T16:24:41.630+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Architecture"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="PhoneGap"/><title type='text'>Mobile App Development with PhoneGap</title><content type='html'>&lt;h2&gt;
Mobile App Development with PhoneGap Presentation&lt;/h2&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixFu-08KHDTHKgLZzwZHFQZK0OYpiKqSjgwSndajCdiLfB7dZbSHgRBUSFgZQHbZmJNauDg-yy2E6udaJ7EQpjz6D2OwzfYU1RBk0P9XLtGyRpsknhRMWVoIfTQKM6rKN6N1-_MWYwJnE/s1600/Mobile+App+Development+with+PhoneGap.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixFu-08KHDTHKgLZzwZHFQZK0OYpiKqSjgwSndajCdiLfB7dZbSHgRBUSFgZQHbZmJNauDg-yy2E6udaJ7EQpjz6D2OwzfYU1RBk0P9XLtGyRpsknhRMWVoIfTQKM6rKN6N1-_MWYwJnE/s200/Mobile+App+Development+with+PhoneGap.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;The Mobile World certainly have changed the way we consume&amp;nbsp;data and services, and mobile devices have long become an integral part of our everyday life.&lt;br /&gt;
&lt;br /&gt;
PhoneGap is a free and open source framework that allows you to create mobile apps using web standards for 7 different platforms including iOS, Android, Blackberry, and Windows Phone.&lt;br /&gt;
&lt;br /&gt;
With PhoneGap you can cut down on development time by re-using your existing web development skills, frameworks and tools, and get all the benefits of cross-platform development while building apps just the way you like.&lt;br /&gt;
&lt;br /&gt;
Leverage your HTML, CSS and JavaScript skills to create platform-neutral mobile applications with PhoneGap.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Slide Deck&lt;/h2&gt;
This week I gave a presentation about PhoneGap at the &lt;a href=&quot;http://www.js-il.com/&quot; target=&quot;_blank&quot;&gt;JS-IL Event&lt;/a&gt;, a conference held by E4D.&lt;br /&gt;
You can download the Slide Deck from &lt;a href=&quot;http://gdurl.com/pNj3/download&quot;&gt;here&lt;/a&gt;, or view the slide show&amp;nbsp;&lt;a href=&quot;http://gdurl.com/pNj3/viewer&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Enjoy,&lt;br /&gt;
Yaniv</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/100510925091205975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/06/mobile-app-development-with-phonegap.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/100510925091205975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/100510925091205975'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/06/mobile-app-development-with-phonegap.html' title='Mobile App Development with PhoneGap'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixFu-08KHDTHKgLZzwZHFQZK0OYpiKqSjgwSndajCdiLfB7dZbSHgRBUSFgZQHbZmJNauDg-yy2E6udaJ7EQpjz6D2OwzfYU1RBk0P9XLtGyRpsknhRMWVoIfTQKM6rKN6N1-_MWYwJnE/s72-c/Mobile+App+Development+with+PhoneGap.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-6340853735873785773</id><published>2013-04-17T00:11:00.001+03:00</published><updated>2013-04-17T00:14:01.445+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="PhoneGap"/><category scheme="http://www.blogger.com/atom/ns#" term="SignalR"/><title type='text'>Israel JavaScript Conference</title><content type='html'>&lt;h2&gt;
First Israel JavaScript Conference&lt;/h2&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; text-align: right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW71JkdRC8S_DaplV1_r24fnTOab1okK_w_Fk-awW-iY7wEHyIgVeoo3Ex83e0DmFVOhw9mEyHhQXvzMQzkvk5ekArdHS09E3rzdy5XArsHT8c0gJNi4OCLSHCJpB8sEglrl36D-tlLC0/s1600/js-il.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Israel JavaScript Conference&quot; border=&quot;0&quot; height=&quot;58&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW71JkdRC8S_DaplV1_r24fnTOab1okK_w_Fk-awW-iY7wEHyIgVeoo3Ex83e0DmFVOhw9mEyHhQXvzMQzkvk5ekArdHS09E3rzdy5XArsHT8c0gJNi4OCLSHCJpB8sEglrl36D-tlLC0/s200/js-il.jpg&quot; title=&quot;Israel JavaScript Conference&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
JavaScript is all over the place. Client-Side, Server-Side, Mobile...&lt;br /&gt;
And with the boost it has got from HTML 5.0, and the tremendous performance&amp;nbsp;improvements it went through in last couple of years, it is just the right time to get deeper into this language, and get to know it better, because it&#39;s here to stay for a while...&lt;br /&gt;
&lt;br /&gt;
I,&amp;nbsp;personally, think that this conference is a MUST, and I&#39;ve been looking forward to it for a while now...&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;I&#39;m going to give 4 sessions:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Mobile App Development with PhoneGap&lt;br /&gt;
- Building Modular JavaScript Application with AMD/Require.JS&lt;br /&gt;
- Advanced JavaScript Unit Testing integrated with Visual Studio Environment&lt;br /&gt;
- Developing &quot;Real-Time&quot; Web Applications with SignalR&lt;br /&gt;
&lt;br /&gt;
Check out the &lt;a href=&quot;http://js-il.com/&quot; target=&quot;_blank&quot;&gt;conference web-site&lt;/a&gt;. Sure you&#39;ll find some interesting sessions...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/6340853735873785773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/04/israel-javascript-conference.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/6340853735873785773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/6340853735873785773'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/04/israel-javascript-conference.html' title='Israel JavaScript Conference'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW71JkdRC8S_DaplV1_r24fnTOab1okK_w_Fk-awW-iY7wEHyIgVeoo3Ex83e0DmFVOhw9mEyHhQXvzMQzkvk5ekArdHS09E3rzdy5XArsHT8c0gJNi4OCLSHCJpB8sEglrl36D-tlLC0/s72-c/js-il.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-8456687338230132683</id><published>2013-02-26T02:35:00.000+02:00</published><updated>2013-02-26T07:39:01.192+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SignalR"/><title type='text'>A First Look at SignalR</title><content type='html'>&lt;h2&gt;
Introduction&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhciNZPCg3-YuhoJ670ASLPBFhsBHHqhshgwzZ4CilEF8tQ8uUQpRZWWlNf6uOKCVHh-drVcgtarCH0WN4BaB69Nwguy8Fcotr2xKGGQurotC8xuQyZXO0fI7SVl34ZYsGQSH4gV153Pz8/s1600/signalr.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img alt=&quot;SignalR&quot; border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhciNZPCg3-YuhoJ670ASLPBFhsBHHqhshgwzZ4CilEF8tQ8uUQpRZWWlNf6uOKCVHh-drVcgtarCH0WN4BaB69Nwguy8Fcotr2xKGGQurotC8xuQyZXO0fI7SVl34ZYsGQSH4gV153Pz8/s200/signalr.jpg&quot; title=&quot;&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I stumbled upon SignalR just about 2 months ago, while looking for some abstraction over Web-Sockets with a fallback to other transports for older User Agents.&lt;br /&gt;
&lt;br /&gt;
Back then I&#39;ve already heard, and read a little about Socket.IO, and Node.JS, but wanted a .NET library for my upcoming project.&lt;br /&gt;
&lt;br /&gt;
So when I&#39;ve landed on the SignalR project page, and read about what SignalR is all about, and how can it be used, I was VERY exited.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
So, if you are into &quot;Real-Time Web&quot;, and looking for an ASP.NET, IIS hosted solution, then SignalR is the answer for all your prayers, and more (as I&#39;m learning each day I&#39;m diving deeper into it...).&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Getting Started with SignalR&lt;/h2&gt;
In order to put your hands on SignalR and start coding against the API, you&#39;ll first need to set up the environment and get the project&#39;s libraries.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
IIS 8.0&lt;/h3&gt;
&lt;br /&gt;
Although not required for development and testing, pay attention that Web-Sockets are only supported on IIS starting with IIS 8.0. This means that in order to gain the full benefits that SignalR provides you should deploy your solution to Server 2012 (which is of course available for both PaaS and IaaS on Azure).&lt;br /&gt;
&lt;br /&gt;
For development and testing you can use IIS 8.0 Express, which is bundled with Visual Studio 2012.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve used this opportunity, along with the concept of starting a new year, to install Windows 8 and Visual Studio 2012. Windows 7 was great, but Windows 8 is even greater...&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
Visual Studio 2012&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
You&#39;ll need Visual Studio 2012. Or at least the Visual Studio 2012 Express Version, which is free to download from the Asp.Net &lt;a href=&quot;http://www.asp.net/downloads&quot; target=&quot;_blank&quot;&gt;website&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
SignalR Lib&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
2 months ago, I&#39;ve downloaded version RC1, and it was available as a zip package from the project&#39;s &lt;a href=&quot;http://signalr.net/&quot; target=&quot;_blank&quot;&gt;site&lt;/a&gt;.&amp;nbsp;This option is still viable, although it is also available as a Nuget package, or better yet as part of the 2012.2 update. &lt;br /&gt;
&lt;br /&gt;
Earlier this month, on February 18, Scott Guthrie &lt;a href=&quot;http://weblogs.asp.net/scottgu/archive/2013/02/18/announcing-release-of-asp-net-and-web-tools-2012-2-update.aspx&quot; target=&quot;_blank&quot;&gt;announced&lt;/a&gt;&amp;nbsp;the final release of &lt;b&gt;ASP.NET and Web Tools 2012.2 Update&lt;/b&gt;. This update, among other exiting new stuff, contains all the&amp;nbsp;necessary components for SignalR development.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
A Getting Started Tutorial&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
You can find a great step-by-step introductory tutorial on the Asp.Net website, &lt;a href=&quot;http://www.asp.net/signalr&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, along with some great videos&amp;nbsp;demonstrating this new framework. Don&#39;t skip those videos.&lt;br /&gt;
&lt;br /&gt;
So far I&#39;ve done a simple POC, deployed it to a Web-Role on Windows Azure, and it works like charm.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In my upcoming posts I&#39;ll&amp;nbsp;start&amp;nbsp;investigate SignalR, and get a look&amp;nbsp;deeper&amp;nbsp;into the Transports, Scale-Out on Windows Azure, Security issues, and basically look behind the Magic...</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/8456687338230132683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/02/a-first-look-at-signalr.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/8456687338230132683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/8456687338230132683'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/02/a-first-look-at-signalr.html' title='A First Look at SignalR'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhciNZPCg3-YuhoJ670ASLPBFhsBHHqhshgwzZ4CilEF8tQ8uUQpRZWWlNf6uOKCVHh-drVcgtarCH0WN4BaB69Nwguy8Fcotr2xKGGQurotC8xuQyZXO0fI7SVl34ZYsGQSH4gV153Pz8/s72-c/signalr.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-8833893955311343596</id><published>2013-02-23T01:56:00.000+02:00</published><updated>2013-02-23T02:11:37.749+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><title type='text'>The Future of WCF</title><content type='html'>&lt;h2&gt;
A Retrospective&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTv_Ya1HB7Vcr40YwEJb3vqq5Ph7hqSAswy3W2d6iNk2V6bl9YiUSQoZYz6R0hZFYvnuJ-maMBH1UeGLjSdOwCUJEihdFYJP1-tGsPKjomZSIGxI4o4wNkzISSdfOS6l2nTTv6q-u6CLY/s1600/wcf.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img alt=&quot;windows communication foundation&quot; border=&quot;0&quot; height=&quot;121&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTv_Ya1HB7Vcr40YwEJb3vqq5Ph7hqSAswy3W2d6iNk2V6bl9YiUSQoZYz6R0hZFYvnuJ-maMBH1UeGLjSdOwCUJEihdFYJP1-tGsPKjomZSIGxI4o4wNkzISSdfOS6l2nTTv6q-u6CLY/s200/wcf.jpg&quot; title=&quot;&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Back then, somewhere in 2006, when Windows Communication Foundation was born, with the exotic code name &quot;Indigo&quot; I was a .NET trainer. And also 7 years younger... but who counts...&lt;br /&gt;
&lt;br /&gt;
These where the days of Windows Vista, Visual Studio 2005, Web Forms, Ajax, and XML Web Services.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Giving countless&amp;nbsp;training&amp;nbsp;and lecture hours on WCF, I still remember the slide in the MOC showing ASP.Net Web Services, WSE (Web Service Extensions), COM+, DCOM and Remoting, and then the animation minimizing all those putting WCF right in the middle and&amp;nbsp;emphasizing Consolidation.&lt;br /&gt;
&lt;br /&gt;
It was a huge step in evolution, and it let you select one framework to nail all your problems.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
A Snapshot&lt;/h2&gt;
Over time WCF has been bent toward being more RESTFULLY, and with its almost unlimited extensibility we&#39;ve been able to take control over messaging, roll out custom security models to feet our needs, and run it with ASP.Net compatibility to employ the ASP&amp;nbsp;run-time&amp;nbsp;which is more suitable for web.&lt;br /&gt;
&lt;br /&gt;
The WCF REST Starter Kit didn&#39;t get so far, and the WCF Web API has been eventually merged into ASP.Net and became ASP.Net Web API...&lt;br /&gt;
&lt;br /&gt;
Today, it is not that obvious anymore that WCF will play the role of running your endpoints. As ASP.Net with its Controllers, Web API and SignalR Hubs has gone a long way since, as far as it relate to HTTP, REST, and HTML 5.0 standards.&lt;br /&gt;
&lt;br /&gt;
I know there is no breaking news here, but still... &amp;nbsp;I recently started a new project without considering WCF to be part of the stack. It seemed weird, and raised some more questions and wondering regarding the future of WCF...</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/8833893955311343596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/02/the-future-of-wcf.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/8833893955311343596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/8833893955311343596'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/02/the-future-of-wcf.html' title='The Future of WCF'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTv_Ya1HB7Vcr40YwEJb3vqq5Ph7hqSAswy3W2d6iNk2V6bl9YiUSQoZYz6R0hZFYvnuJ-maMBH1UeGLjSdOwCUJEihdFYJP1-tGsPKjomZSIGxI4o4wNkzISSdfOS6l2nTTv6q-u6CLY/s72-c/wcf.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-7855472327539265328</id><published>2013-02-16T03:47:00.000+02:00</published><updated>2013-02-22T20:33:32.400+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Js Test Driver"/><category scheme="http://www.blogger.com/atom/ns#" term="Require.JS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unit Testing"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>JavaScript Unit Testing in Visual Studio Part III</title><content type='html'>&lt;h2&gt;
Testing Require.JS Modules&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgepWrVR3VQp29dK7USA_ixOomZo_mNPOKbPiYHvIeIe3xWrGSCaxCBoAKBtwpK2AG0nua_vobpaCnbuBy8aJTwDu_uPH_htQaTVq8kK_Ngf3PWVag910KifkVmASY4r9f0pERUMNwfO8U/s1600/requirejs.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img alt=&quot;require js&quot; border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgepWrVR3VQp29dK7USA_ixOomZo_mNPOKbPiYHvIeIe3xWrGSCaxCBoAKBtwpK2AG0nua_vobpaCnbuBy8aJTwDu_uPH_htQaTVq8kK_Ngf3PWVag910KifkVmASY4r9f0pERUMNwfO8U/s200/requirejs.jpg&quot; title=&quot;&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
This is the 3rd post in this series, talking about JavaScript Unit Testing in Visual Studio.&lt;br /&gt;
&lt;br /&gt;
In the &lt;a href=&quot;http://www.upstruct.net/2013/01/javascript-unit-testing-in-visual.html&quot;&gt;first &lt;/a&gt;post we&#39;ve set up the expectations, and one of them was compatibility with Require.JS, and in the &lt;a href=&quot;http://www.upstruct.net/2013/02/javascript-unit-testing-in-visual.html&quot;&gt;previous &lt;/a&gt;post, we&#39;ve went all the way from downloading the libraries, to running headless tests against multiple browsers from Visual Studio.&lt;br /&gt;
&lt;br /&gt;
In this post we&#39;ll take it another step toward a modular application, and check out how this can also get tested with the stack we&#39;ve already discussed.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;
Tackling Complexity With Require.JS&lt;/h2&gt;
&lt;br /&gt;
So, if you&#39;re not already using Require.JS and asking yourself how could you go without it, let&#39;s see what problems it solves and why you should use it.&lt;br /&gt;
&lt;br /&gt;
Simply put, Require.JS is a JavaScript file and Module Loader, at least this is what stated on it&#39;s homepage.&lt;br /&gt;
&lt;br /&gt;
Since JavaScript doesn&#39;t provide, yet, a mechanism to define modules, developers usually go with the Module Pattern, or do object nesting to get something that can remind a namespace in other language, like C# for example.&lt;br /&gt;
&lt;br /&gt;
Both techniques are good in the sense that both provide some kind of encapsulation and scope, and keep the global namespace (the Window object) clean.&lt;br /&gt;
&lt;br /&gt;
So what are the benefits you get by moving to Require.JS? Some of them might be:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;First and most important, you get decoupling between modules.&lt;/li&gt;
&lt;li&gt;All the headache of finding the exact order to load script because of dependencies is gone, as it will resolve dependencies&amp;nbsp;automatically.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;If you&#39;re building SPAs (Single Page Applications), you can utilize text plugin to load markup&amp;nbsp;fragments&amp;nbsp;on-demand, compile them and render them on the client. Works great with Underscore and BackBone.JS.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;
I hope it&#39;s enough to get you motivated, so let&#39;s see how to use it. I&#39;ll continue from where we stopped in the previous post, assuming you followed and got the project running...&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Download the Libraries&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Go and download &lt;a href=&quot;http://requirejs.org/docs/download.html&quot; target=&quot;_blank&quot;&gt;Require.JS&lt;/a&gt;.&lt;br /&gt;Although&amp;nbsp;not directly relevant for the&amp;nbsp;purpose&amp;nbsp;of this post, I would really recommend also getting the other plug-ins that come along with it.&lt;/li&gt;
&lt;li&gt;Add Require.JS to the project, and place it under&amp;nbsp;&lt;span style=&quot;background-color: #eefff9; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;Scripts/libs/require.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 21px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;
Defining a Module&lt;/h2&gt;
&lt;div&gt;
The only code we had was the Calculator, residing in the calculator.js file, so go and open the file, and refactor the code to look like the snippet below:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: javascript&quot;&gt;define([
    &quot;jquery&quot;
], function ($) {

    var Calculator = function () {
        this.sum = function (num1, num2) {
            if (num1 == undefined || num2 == undefined) {
                throw &quot;Invalid argument&quot;;
            }
            return num1 + num2;
        }
    };

    return Calculator;
});
&lt;/pre&gt;
&lt;br /&gt;
We&#39;ve defined Calculator as a module, with a dependency on another module, in this case it&#39;s jQuery.&lt;br /&gt;
Also, you can see the module return a closure to Calculator.&lt;br /&gt;
In some cases you might prefer to return an already instantiated object.&lt;br /&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;
Defining the Bootstrapper&lt;/h2&gt;
&lt;div&gt;
Next, will configure the main entry point for Require.JS, so go and append a JavaScript file under the Scripts library, in the root, and call it&amp;nbsp;bootstrapper-js-test-driver.js.&lt;br /&gt;
&lt;br /&gt;
Open the file and copy the code snippet below:&lt;/div&gt;
&lt;pre class=&quot;brush: javascript&quot;&gt;require.config({
    
    // jsTestDriver serves all files from a test directory, so base URL must reflect it by
    // a relative /test prefix.
    baseUrl: &quot;/test/Scripts&quot;,

    paths: {
        jquery: &quot;libs/jquery/jquery-1.8.3.min&quot;,
        domReady: &quot;libs/require/domReady&quot;,
        text: &quot;libs/require/text&quot;,
        order: &quot;libs/require/order&quot;        
    }

});

require([
    &quot;jquery&quot;        
], function ($) {
    
    // Prevent Fake Timers by default.    
    sinon.config.useFakeTimers = false;

});
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Pay attention to the inline comment, regarding the /test prefix.&lt;br /&gt;
Remove any unused libraries from the paths section.&lt;br /&gt;
&lt;br /&gt;
At this point, after adding the libraries and bootstrapper, your project structure is supposed to look similar to the one in the screenshot below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE4Ot8H1i5ZriVjnn-ooZhcCF0nU79SJ86aYEHFde72VgDFEMyHGM6FmooqE5RCHHFJnZ8yRVVoLwhWt2TJGs8lGDjJ1ZiLBlk6S668Wu09SniLoAMkyiUtwYNvTlvrAe6SpFKw2lvZJ0/s1600/solution_explorer.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;visual studio solution explorer&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE4Ot8H1i5ZriVjnn-ooZhcCF0nU79SJ86aYEHFde72VgDFEMyHGM6FmooqE5RCHHFJnZ8yRVVoLwhWt2TJGs8lGDjJ1ZiLBlk6S668Wu09SniLoAMkyiUtwYNvTlvrAe6SpFKw2lvZJ0/s1600/solution_explorer.png&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;h2&gt;
Define the Unit Test as a Module&lt;/h2&gt;
&lt;div&gt;
Next, open the calculator-tests.js file, and also wrap it as a module.&lt;/div&gt;
&lt;div&gt;
The code should be similar to the code snippet below:&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: javascript&quot;&gt;require([
    &quot;jquery&quot;,    
    &quot;modules/calculator&quot;
], function ($, Calculator) {

    module(&quot;Calculator Tests&quot;, {
        setup: function () {    
        },    
        teardown: function () {    
        }
    });

    test(&quot;Sum&quot;, function () {
        // Arrange
        var calculator = new Calculator();
        // Act
        var sum = calculator.sum(2, 3);
        // Assert
        equal(5, sum);
    });

});
&lt;/pre&gt;
&lt;br /&gt;
As you can see, as opppsed to other modules, test modules should be defined with require, and not with define, as they are running as standalone modules, and acts as an entry point for jsTestDriver.&lt;br /&gt;
&lt;br /&gt;
You can see that jQuery and the Calculator module, are now being passed as dependencies.&lt;br /&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;
Configuring JS-Test-Driver&lt;/h2&gt;
Next, load jsTestDriver.conf, and modify it:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Under the load section, add an instruction to load Require.JS, and the boostrapper.&lt;/li&gt;
&lt;li&gt;Add another section , serve, this section is used for static resources.&lt;/li&gt;
&lt;li&gt;Move calculator.js from the load to the serve section.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
After the modification it should look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;server: http://localhost:9876

basepath: &quot;&quot;

load:      
  - Scripts/libs/jquery/jquery-1.8.3.min.js
  - Scripts/libs/qunit/qunit-1.10.0.js
  - Scripts/libs/sinon/sinon-1.5.0.js
  - Scripts/libs/sinon/sinon-qunit-1.0.0.js
  - Scripts/libs/sinon/sinon-ie-1.5.0.js
  - Scripts/libs/js-test-driver/equiv.js
  - Scripts/libs/js-test-driver/QUnitAdapter.js
      
  - Scripts/libs/require/require.js
  - Scripts/bootstrapper-js-test-driver.js

test:    
  - Scripts/tests/calculator-tests.js
  
serve:
  - Scripts/modules/calculator.js
&lt;/pre&gt;
&lt;br /&gt;
Go on and run the tests, and make sure it all works as expected.&lt;br /&gt;
And that&#39;s it, you&#39;ve put all your code, both source and tests, to act as independent, decoupled modules.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Summary&lt;/h2&gt;
You should now be comfortable with writing and running unit tests in Visual Studio, with the knowledge and the confident that you can leverage all your unit testing skills and apply them without any compromise or any limitation set by JavaScript or Visual Studio.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Are you still here? What are you waiting for? Go and write some tests...&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/7855472327539265328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/02/javascript-unit-testing-in-visual-part-3.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/7855472327539265328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/7855472327539265328'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/02/javascript-unit-testing-in-visual-part-3.html' title='JavaScript Unit Testing in Visual Studio Part III'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgepWrVR3VQp29dK7USA_ixOomZo_mNPOKbPiYHvIeIe3xWrGSCaxCBoAKBtwpK2AG0nua_vobpaCnbuBy8aJTwDu_uPH_htQaTVq8kK_Ngf3PWVag910KifkVmASY4r9f0pERUMNwfO8U/s72-c/requirejs.jpg" height="72" width="72"/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-8159954844529305166</id><published>2013-02-12T02:20:00.000+02:00</published><updated>2013-02-26T03:09:42.581+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Js Test Driver"/><category scheme="http://www.blogger.com/atom/ns#" term="QUnit"/><category scheme="http://www.blogger.com/atom/ns#" term="Sinon.JS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unit Testing"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>JavaScript Unit Testing in Visual Studio Part II</title><content type='html'>&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Setting up the Environment for Headless Tests&lt;/span&gt;&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8QzOHDR1-BCkBxksxY_XenklV6wHGUwVqKAX1bS6nmzpWpkZVTpWFMN0E4IVSotRg2h0rQFXyajCPc_0jy2TV6gxdKi15ItGyxH7so9IQkat0yt2iq83jYKQtIwAypd__sOA9T-llCSg/s1600/jstd.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img alt=&quot;js test driver&quot; border=&quot;0&quot; height=&quot;144&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8QzOHDR1-BCkBxksxY_XenklV6wHGUwVqKAX1bS6nmzpWpkZVTpWFMN0E4IVSotRg2h0rQFXyajCPc_0jy2TV6gxdKi15ItGyxH7so9IQkat0yt2iq83jYKQtIwAypd__sOA9T-llCSg/s200/jstd.jpg&quot; title=&quot;js test driver&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In the&amp;nbsp;&lt;a href=&quot;http://upstruct.blogspot.co.il/2013/01/javascript-unit-testing-in-visual.html&quot;&gt;previous&lt;/a&gt; post, we&#39;ve set up the scene, by setting the expectations and picking the libraries &amp;amp; tools for the job.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In this post we will take it step-by-step, so you can follow and get active in the process.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;So here we go...&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Prerequisites&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Visual Studio.&lt;br /&gt;You can even download the &lt;a href=&quot;http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-web&quot; target=&quot;_blank&quot;&gt;Web Express Edition&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;http://www.java.com/en/download/index.jsp&quot; target=&quot;_blank&quot;&gt;Java&amp;nbsp;Run time&lt;/a&gt;.&lt;br /&gt;You&#39;ll need it to run the JS-Test-Driver later, as it&#39;s a Jar file.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Set Up the Project&lt;/b&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;We&#39;ll start by creating an empty Web Project. So, launch your Visual Studio, and create a new Web Project. Select ASP.NET MVC Web Application,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;name it &lt;i&gt;JavaScriptTesting &lt;/i&gt;or whatever makes you happy, and make sure to&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;select an Empty template on the second step in the Wizard.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Feel free to delete all items under the &lt;i&gt;Content &lt;/i&gt;and &lt;i&gt;Scripts &lt;/i&gt;project folders.&lt;br /&gt;Go even&amp;nbsp;further, and delete the packages.config file automatically added by Visual Studio and the packages folder in the solution root on the disk.&lt;br /&gt;Just so we can concentrate on what really matters... (Nothing personal against NuGet).&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Under the Scripts folder,go and create three sub-folders and name them: libs, modules, and tests.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;At the moment your solution tree should look similar to the one in the screenshot below.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Nothing special yet, a naked MVC project with minimal elements.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSprsK4YahLfzMyKMh3hIqVM5_bnVSvDQAX2GbTX2HRRKwdiJhfHfMcWSKdCCsa8ahdm8lC5gI1UrdsIsjoGIwEbVQIcybiG0yaqlVxLCoKlLLqIJq-S2nk1zxW1BSm-w2JOViWXG8QxU/s1600/SolutionExplorer_Step01.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: block; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;visual studio solution explorer &quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSprsK4YahLfzMyKMh3hIqVM5_bnVSvDQAX2GbTX2HRRKwdiJhfHfMcWSKdCCsa8ahdm8lC5gI1UrdsIsjoGIwEbVQIcybiG0yaqlVxLCoKlLLqIJq-S2nk1zxW1BSm-w2JOViWXG8QxU/s1600/SolutionExplorer_Step01.png&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;NOTE: In your development environment you might not like the idea of having the source code and tests under the same project. You can of course place the tests in a&amp;nbsp;separate project, and as the concept of adding a reference to a js file doesn&#39;t exist, and we would not want to duplicate source files, you can accomplish that by defining a pre-build event on the tests project to copy all the stuff you wanna test.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In this post, for brevity, a single project holding both source and tests will suffice...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Download the Libraries&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Let&#39;s go and grab all the libraries.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;QUnit&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li style=&quot;list-style: square; margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;http://qunitjs.com/&quot; style=&quot;color: #888888; text-decoration: initial;&quot; target=&quot;_blank&quot;&gt;QUnit&lt;/a&gt;&amp;nbsp;-&amp;nbsp;Get both js and css, and place them under a Scripts/libs/qunit.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Sinon.JS&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li style=&quot;list-style: square; margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;http://sinonjs.org/&quot; style=&quot;color: #888888; text-decoration: initial;&quot; target=&quot;_blank&quot;&gt;Sinon.JS&lt;/a&gt;&amp;nbsp;-&amp;nbsp;Save the js under a sinon folder beneath&amp;nbsp;Scripts/libs/sinon.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;list-style: square; margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;http://sinonjs.org/qunit/&quot; style=&quot;color: #888888; text-decoration: initial;&quot; target=&quot;_blank&quot;&gt;Sinon Adapter for QUnit&lt;/a&gt;&amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Save it also under the sinon folder.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;list-style: square; margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Make sure to also get the &lt;a href=&quot;http://sinonjs.org/releases/sinon-ie-1.5.2.js&quot; target=&quot;_blank&quot;&gt;Sinon-IE.js&lt;/a&gt;. It is for compatibility for IE when Timers &amp;amp;&amp;nbsp;fake&amp;nbsp;XHR is used.&amp;nbsp;While on Sinon.JS site, navigate to the &lt;a href=&quot;http://sinonjs.org/docs/#server&quot; target=&quot;_blank&quot;&gt;Fake XMLHttpRequest&lt;/a&gt; section under the documentation and look for sinon-ie.js.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;JSTD&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li style=&quot;list-style: square; margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;http://code.google.com/p/js-test-driver/&quot; style=&quot;color: #888888; text-decoration: initial;&quot; target=&quot;_blank&quot;&gt;JSTD (JS Test Driver)&lt;/a&gt;&amp;nbsp;- Navigate to the downloads &lt;a href=&quot;http://code.google.com/p/js-test-driver/downloads/list&quot; target=&quot;_blank&quot;&gt;page &lt;/a&gt;and look for&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;JsTestDriver-1.3.5.jar. Download and add it to the project root folder.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;list-style: square; margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;https://github.com/exnor/QUnit-to-JsTestDriver-adapter&quot; style=&quot;color: #888888; text-decoration: initial;&quot; target=&quot;_blank&quot;&gt;QUnit to JsTestDriver Adapter&lt;/a&gt;&amp;nbsp;- Download both QUnitAdapter.js and equiv.js, and place them under&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Scripts/libs/&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;js-test-driver.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;jQuery&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Get a fresh copy of &lt;a href=&quot;http://jquery.com/download/&quot; target=&quot;_blank&quot;&gt;jQuery &lt;/a&gt;and also place it under a new folder -&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;Scripts/libs/jquery.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;At the moment your solution tree should look similar to the one in the screenshot below, and your solution folder should contain the project folder and the JSTD jar file.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTwKg5YgJx-qEqfq3YNtpel5TLWD2Qud1jVHbv4e3WffLuLLwEgdKQmX7-6qoFfjSs5DjaWaw_yYC66MePlfCbi4CIP_qOfD-xqK8zvGmvGRfgJqcXrreJXbnKcIkr4VjK1P9RoAyqEPY/s1600/solution_explorer.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;visual studio solution explorer&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTwKg5YgJx-qEqfq3YNtpel5TLWD2Qud1jVHbv4e3WffLuLLwEgdKQmX7-6qoFfjSs5DjaWaw_yYC66MePlfCbi4CIP_qOfD-xqK8zvGmvGRfgJqcXrreJXbnKcIkr4VjK1P9RoAyqEPY/s1600/solution_explorer.png&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;We will leave Require.js aside for now, to be discussed in a later post in this series.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;So, for now, we&#39;ve got all the libraries we need to start with.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;The Unit Under Test&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In order to run unit tests, we first need some kind of unit. So let&#39;s create a very simple component to play around with.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Create a new calculator.js file, under Scripts/modules, with the code snippet below:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: javascript&quot;&gt;var Calculator = function () {
    this.sum = function (num1, num2) {
        if (num1 == undefined || num2 == undefined) {
            throw &quot;Invalid argument&quot;;
        }
        return num1 + num2;
    }
};
&lt;/pre&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This should be enough, as now we can go on and test the sum method.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Unit Test&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Next, create a new js file under Scripts/tests and name it&amp;nbsp;calculator-tests.js, with the code snippet below:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: javascript&quot;&gt;module(&quot;Calculator Tests&quot;, {
    setup: function () {    
    },    
    teardown: function () {    
    }
});

test(&quot;Sum&quot;, function () {
    // Arrange
    var calculator = new Calculator();
    // Act
    var sum = calculator.sum(2, 3);
    // Assert
    equal(5, sum);
});
&lt;/pre&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;We&#39;ve created a Module named &lt;i&gt;Calculator Tests, &lt;/i&gt;with a single test named &lt;i&gt;Sum&lt;/i&gt;, which in we instantiate the &lt;i&gt;Calculator&lt;/i&gt;, call the &lt;i&gt;Sum &lt;/i&gt;method, and simply Asserts for the&amp;nbsp;expected&amp;nbsp;result.&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Configuring JS-Test-Driver&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Js-Test-Driver, expects a configuration file in a&amp;nbsp;&lt;a href=&quot;http://www.yaml.org/&quot; target=&quot;_blank&quot;&gt;YAML &lt;/a&gt;format. For more about the Configuration File settings see &lt;a href=&quot;http://code.google.com/p/js-test-driver/wiki/ConfigurationFile&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Create a text file in Visual Studio, name it&amp;nbsp;jsTestDriver.conf, and place it in the project root, just next to the Js-Test-Driver jar file.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Copy the snippet below to the file:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml=&quot;&gt;server: http://localhost:9876

basepath: &quot;&quot;

load:      
  - Scripts/libs/jquery/jquery-1.8.3.min.js    
  - Scripts/libs/qunit/qunit-1.10.0.js      
  - Scripts/libs/sinon/sinon-1.5.0.js
  - Scripts/libs/sinon/sinon-qunit-1.0.0.js
  - Scripts/libs/sinon/sinon-ie-1.5.0.js      
  - Scripts/libs/js-test-driver/equiv.js
  - Scripts/libs/js-test-driver/QUnitAdapter.js      
    
  - Scripts/modules/calculator.js

test:    
  - Scripts/tests/calculator-tests.js  
&lt;/pre&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you&#39;ve placed JsTestDriver outside the project, replace the basepath to reflect the path to the folder containing JsTestDriver-1.3.5.jar.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If using other versions of the libraries under the load section, then rename accordingly.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Customize the Tools Menu&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;We&#39;re almost there...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;JS-Test-Driver can be executed from the command line, but we wanted seamless integration with Visual Studio, so let&#39;s create custom menu entries so we can run those tests with no more than a few keystrokes.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Menu Item for launching the Server&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Open the &lt;i&gt;External Tools&lt;/i&gt; under the &lt;i&gt;Tools&lt;/i&gt; menu.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Click Add, to add a new entry in the menu.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Set &quot;JSTD Server&quot; for the &lt;i&gt;Title.&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Set the full path to jave.exe.&lt;br /&gt;In my case it is &quot;C:\Program Files (x86)\Java\jre7\bin\java.exe&quot;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Set the &lt;i&gt;Arguments&lt;/i&gt; to:&lt;br /&gt;-jar JsTestDriver-1.3.5.jar --port 9876 --browser &quot;C:\Program Files (x86)\Internet Explorer\iexplore.exe&quot;,&quot;C:\Program Files (x86)\Google\Chrome\Application\chrome.exe&quot;&lt;br /&gt;&lt;br /&gt;I&#39;ve set it to run both IE and Chrome.&lt;br /&gt;Make sure to point to the correct path on your system.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Set &lt;i&gt;Initial Directory&lt;/i&gt;to&amp;nbsp;$(ProjectDir)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Check &lt;i&gt;Close on exit&lt;/i&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Click OK to Save.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;It should look similar to the screenshot below:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB-g3wNwktW6cYH9mfnl282zKKJjq4hLqEpnTQb8UQ0B_Z2Lg3EVb0Al6umpI2l3-VKRun7mg7BpmiFNFRHf8ovJXVgeGWvFeX1jrlcNaXIkNzUL-X790BwvQeojR-NLax9eFlN-22lFo/s1600/external_tools.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;visual studio external tools&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB-g3wNwktW6cYH9mfnl282zKKJjq4hLqEpnTQb8UQ0B_Z2Lg3EVb0Al6umpI2l3-VKRun7mg7BpmiFNFRHf8ovJXVgeGWvFeX1jrlcNaXIkNzUL-X790BwvQeojR-NLax9eFlN-22lFo/s1600/external_tools.png&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Menu Item for running Tests&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Open the&amp;nbsp;&lt;i&gt;External Tools&lt;/i&gt;&amp;nbsp;under the&amp;nbsp;&lt;i&gt;Tools&lt;/i&gt;&amp;nbsp;menu.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Click Add, to add a new entry in the menu.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Set &quot;JSTD &amp;amp;Run&quot; for the&amp;nbsp;&lt;i&gt;Title.&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Set the full path to jave.exe.&lt;br /&gt;In my case it is &quot;C:\Program Files (x86)\Java\jre7\bin\java.exe&quot;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Set the&amp;nbsp;&lt;i&gt;Arguments&lt;/i&gt;&amp;nbsp;to:&lt;br /&gt;-jar JsTestDriver-1.3.5.jar --server http://localhost:9876 --tests all --testOutput &quot;jsTestDriver-TestResults&quot; --verbose&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Set&amp;nbsp;&lt;i&gt;Initial Directory&amp;nbsp;&lt;/i&gt;to&amp;nbsp;$(ProjectDir)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Check&amp;nbsp;&lt;i&gt;Use Output window&lt;/i&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Save settings.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;It should look similar to the screenshot below:&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTbTvopfExYWV5zBKR7bZhxR-1BFTiB3MQofHY8sXH_FPsDJLkfg3-Lnu6Da-HLK434kPo3uFs-zIFzAf__3Xh6M-zWUBQYUnVSdL5mBxRhb_JdXBu9hy6xFvkz2JcUZi8YpvRFXIkBD0/s1600/external_tools.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;visual studio external tools&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTbTvopfExYWV5zBKR7bZhxR-1BFTiB3MQofHY8sXH_FPsDJLkfg3-Lnu6Da-HLK434kPo3uFs-zIFzAf__3Xh6M-zWUBQYUnVSdL5mBxRhb_JdXBu9hy6xFvkz2JcUZi8YpvRFXIkBD0/s1600/external_tools.png&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;And that&#39;s it.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Running The Tests&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;From the Tools menu, click on &lt;i&gt;JSTD Server&lt;/i&gt;.&lt;br /&gt;It will launch a new command, and you&#39;ll see new windows/tabs added to both Chrome and IE.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Now go and hit Tools menu, and then JSTD Run, or &amp;nbsp;just Alt+T+R.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;NOTE: When the solution contains more than one project, make sure to select the project before running the JSTD Server or the tests. As the $(ProjectDir) will instruct Visual Studio to look for the the Jar file under the selected project.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Tests will get executed, and you&#39;ll be able to see the results in the Output Window:&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaJA4XmZGuLFy-CqKP5n3QfjXyJWQ9cQnC8tvr92slMp4aPa97WzXQH2p7CISrfeiciqoQ1OgSQpbNHcrkygLvr4sWwRz8O0MO6k2dhzrOc2dt0Lb8xfCArdPgecVKjiGx-N8VRAlwPcA/s1600/output.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: block; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;visual studio output window&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaJA4XmZGuLFy-CqKP5n3QfjXyJWQ9cQnC8tvr92slMp4aPa97WzXQH2p7CISrfeiciqoQ1OgSQpbNHcrkygLvr4sWwRz8O0MO6k2dhzrOc2dt0Lb8xfCArdPgecVKjiGx-N8VRAlwPcA/s1600/output.png&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;You&#39;ve made it. You have just executed your first JavaScript Unit Tests in Visual Studio.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;And you can see that both tests passed.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;You should leave the JSTD Server running, and the browsers waiting, and just hit Alt+T+R when changing the code...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;What We&#39;ve accomplished&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Seamless integration with Visual Studio.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Headless testing.&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Against multiple browsers at the same time.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Support for Async Tests.&lt;br /&gt;(More about it in future post).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Documented libraries &amp;amp; Tools.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Free Tools.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;What&#39;s Next?&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In the next posts we will talk about AMD and we will see how to combine JS-Test-Driver and Require.JS to play nicely together.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Have fun testing...&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/8159954844529305166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/02/javascript-unit-testing-in-visual.html#comment-form' title='54 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/8159954844529305166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/8159954844529305166'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/02/javascript-unit-testing-in-visual.html' title='JavaScript Unit Testing in Visual Studio Part II'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8QzOHDR1-BCkBxksxY_XenklV6wHGUwVqKAX1bS6nmzpWpkZVTpWFMN0E4IVSotRg2h0rQFXyajCPc_0jy2TV6gxdKi15ItGyxH7so9IQkat0yt2iq83jYKQtIwAypd__sOA9T-llCSg/s72-c/jstd.jpg" height="72" width="72"/><thr:total>54</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-4193938830034943896</id><published>2013-01-30T12:08:00.000+02:00</published><updated>2013-02-19T21:19:00.154+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NServiceBus"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>NServiceBus Configuration Schema</title><content type='html'>&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Who Likes Configuration Files?&lt;/span&gt;&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-JZ609BURz_5dOsnSMySnrQGe5Tup6kKWPLyhe4mNCadWeZVh2spNLswhPjreG-2OZ7jmCinVteDR1-7WL2vZDbGD3QYp9ISCrlsfgXvLzXHKfoAd9v5AxAeXH4HLgdkxKssYyGg_u04/s1600/config.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img alt=&quot;configuration&quot; border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-JZ609BURz_5dOsnSMySnrQGe5Tup6kKWPLyhe4mNCadWeZVh2spNLswhPjreG-2OZ7jmCinVteDR1-7WL2vZDbGD3QYp9ISCrlsfgXvLzXHKfoAd9v5AxAeXH4HLgdkxKssYyGg_u04/s200/config.jpg&quot; title=&quot;&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Configuration files got a bad reputation in .NET and most developers don&#39;t like messing around with configuration files. They&#39;ll prefer Fluent NHibernate when it comes to mapping files, and a lot have been said about WCF configurations complexity and the &quot;&lt;i&gt;pain that is gone&quot;&lt;/i&gt; with WCF 4.0.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Going against that stream, I felt an XSD for NServiceBus is missing...&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;NServiceBus Configurations&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;NServiceBus&amp;nbsp;promotes convention over configuration, and provides an elegant way with it&#39;s fluent configuration coding style to&amp;nbsp;achieve most of what you need without messing with those config sections.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;But nevertheless, there are things you might choose to define in configuration, especially those dynamic settings that&amp;nbsp;happened to get changed frequently.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Being it an open source it was&amp;nbsp;straight forward to get the code and go over all the custom config section classes in NServiceBus assemblies and come up with an XSD file that can be referenced from Visual Studio and provide tooltips and intellisense.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzrAgqYhiZTMWgUHFy7O1w0R6qFC8DTVTvLimJPrQ8zFGeqwUtldxvFrXUx8PJ8KEsEpOHmhpQpUWo44J-xZGw7onMV9zWgFKEzEeJkmG0UTDRNnMCiWI_UpcA1L0FprZ0DFH2F4qcQbg/s1600/nservicebus-xsd.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzrAgqYhiZTMWgUHFy7O1w0R6qFC8DTVTvLimJPrQ8zFGeqwUtldxvFrXUx8PJ8KEsEpOHmhpQpUWo44J-xZGw7onMV9zWgFKEzEeJkmG0UTDRNnMCiWI_UpcA1L0FprZ0DFH2F4qcQbg/s640/nservicebus-xsd.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;For now, you can download it from here &lt;a href=&quot;http://gdurl.com/J5gG/download&quot;&gt;nservicebus-configuration.xsd&lt;/a&gt;.&lt;br /&gt;In the future I hope it will find its way to the NServiceBus project.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;It has already&amp;nbsp;saved me a lot of time in my current project, and I hope you&#39;ll find it useful as well.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/4193938830034943896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/01/nservicebus-configuration-schema.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/4193938830034943896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/4193938830034943896'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/01/nservicebus-configuration-schema.html' title='NServiceBus Configuration Schema'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-JZ609BURz_5dOsnSMySnrQGe5Tup6kKWPLyhe4mNCadWeZVh2spNLswhPjreG-2OZ7jmCinVteDR1-7WL2vZDbGD3QYp9ISCrlsfgXvLzXHKfoAd9v5AxAeXH4HLgdkxKssYyGg_u04/s72-c/config.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1765823288645515689.post-2523969663459534638</id><published>2013-01-28T21:36:00.000+02:00</published><updated>2013-05-29T11:19:52.159+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Js Test Driver"/><category scheme="http://www.blogger.com/atom/ns#" term="QUnit"/><category scheme="http://www.blogger.com/atom/ns#" term="Sinon.JS"/><category scheme="http://www.blogger.com/atom/ns#" term="Unit Testing"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>JavaScript Unit Testing in Visual Studio Part I</title><content type='html'>&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;JavaScript is all around&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWXvQz264ebt_EG_EgEWHtu3yxTVcdZj5PQEBTUlYVbMW49qgNOHtrYxk64dJgUr87uwh1hy4DV1XezgIajMqiP9pkDK4JmfGdqyG7bIBVnVjHTTmvOWooVESIYmQ0gD31yxoQwaUxT2w/s1600/failure-small.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img alt=&quot;caricature&quot; border=&quot;0&quot; height=&quot;169&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWXvQz264ebt_EG_EgEWHtu3yxTVcdZj5PQEBTUlYVbMW49qgNOHtrYxk64dJgUr87uwh1hy4DV1XezgIajMqiP9pkDK4JmfGdqyG7bIBVnVjHTTmvOWooVESIYmQ0gD31yxoQwaUxT2w/s200/failure-small.jpg&quot; title=&quot;&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you&#39;re building complex SPAs (&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;single page applications&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;) with ASP.NET MVC, or native-like Apps for smartphones using frameworks like&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://phonegap.com/&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot; target=&quot;_blank&quot;&gt;PhoneGap &lt;/a&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;(yeah, yeah it&#39;s Cordova now, just that PhoneGap sounded much better)&amp;nbsp;or alike, then JavaScript plays a big role in your day to day work. Not to mention &lt;a href=&quot;http://nodejs.org/&quot; target=&quot;_blank&quot;&gt;Node.JS&lt;/a&gt; and Windows 8 Metro Style Applications...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The days where JavaScript has been used for small client-side manipulation, and jQuery alone was&amp;nbsp;enough to overcome browser compatibility issues is long gone.&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;And with the boost of HTML5, and tremendous&amp;nbsp;improvements&amp;nbsp;in performance in modern web browsers, you can say what you want, but C# is not enough anymore.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;That being said, how should we tackle complex projects where JavaScript lines of code are running high?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;U&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;nit Testing, in that sense, can help by keeping complex things more simple.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you are an architect in a project, and you aim for quality, then you got to give your teams the right tools to come up with maintainable&amp;nbsp;projects.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Picking The Tools&lt;/span&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;When you go out there and pick your JavaScript libraries for your next project, and I must admit it becomes a very&amp;nbsp;nontrivial task those days with libraries like &lt;a href=&quot;http://jquerymobile.com/&quot; target=&quot;_blank&quot;&gt;jQueryMobile&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://backbonejs.org/&quot; target=&quot;_blank&quot;&gt;Backbone.JS&lt;/a&gt;, &lt;a href=&quot;http://knockoutjs.com/&quot; target=&quot;_blank&quot;&gt;KnockOut&lt;/a&gt;, &lt;a href=&quot;http://angularjs.org/&quot; target=&quot;_blank&quot;&gt;AngularJS&lt;/a&gt; and many more..., then you should also take into account those libraries that will assist you and your team to write and run your unit tests in your development environment.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;As a .Net architect, my main development environment is Visual Studio, so my goal was to come up with a set of libraries that will allow me and teams I work with to do unit testing in Visual Studio,&amp;nbsp;pretty much in same way we&#39;ve been doing it with other .Net Unit Testing libraries.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;!---more---&gt;

&lt;br /&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Let&#39;s set the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;expectations&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;What do we want to accomplish?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Seamless integration with Visual Studio.&lt;br /&gt;So we can run tests without leaving the IDE.&lt;br /&gt;(In any case, this is the Post&#39;s title right?)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Headless testing.&lt;br /&gt;Against multiple browsers at the same time if possible.&lt;br /&gt;Later we will want to take it a step forward and automate it as part of CI (Continuous&amp;nbsp;Integration), right?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Support for AMD (Asynchronous Module Definition) /&amp;nbsp;&lt;a href=&quot;http://requirejs.org/&quot; target=&quot;_blank&quot;&gt;Require.JS&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Support for Async Tests.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Documented libraries &amp;amp; Tools.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Free Tools are&amp;nbsp;preferred.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Libraries &amp;amp; Tools&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Eventually I came up with the combination of the tools listed below:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;http://qunitjs.com/&quot; target=&quot;_blank&quot;&gt;QUnit&lt;/a&gt;&amp;nbsp;-&amp;nbsp;Unit Testing Library.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;http://sinonjs.org/&quot; target=&quot;_blank&quot;&gt;Sinon.JS&lt;/a&gt;&amp;nbsp;-&amp;nbsp;Mock Library.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;http://sinonjs.org/qunit/&quot; target=&quot;_blank&quot;&gt;Sinon Adapter for QUnit&lt;/a&gt; -&amp;nbsp;Seamless Sinon.JS integration for QUnit.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;http://code.google.com/p/js-test-driver/&quot; target=&quot;_blank&quot;&gt;JSTD (JS Test Driver)&lt;/a&gt;&amp;nbsp;- Console Runner (Java).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;https://github.com/exnor/QUnit-to-JsTestDriver-adapter&quot; target=&quot;_blank&quot;&gt;QUnit to JsTestDriver Adapter&lt;/a&gt; -&amp;nbsp;Translates QUnit API to JS Test Driver.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I can&amp;nbsp;definitely&amp;nbsp;say I&#39;m quite happy with this combination.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In following posts of this series I&#39;m going to describe in details how to combine those tools to play&amp;nbsp;together.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;What tools/libraries do you use for Unit Testing Java Script in a Visual Studio/TFS development environment?&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.upstruct.net/feeds/2523969663459534638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.upstruct.net/2013/01/javascript-unit-testing-in-visual.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/2523969663459534638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1765823288645515689/posts/default/2523969663459534638'/><link rel='alternate' type='text/html' href='http://www.upstruct.net/2013/01/javascript-unit-testing-in-visual.html' title='JavaScript Unit Testing in Visual Studio Part I'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/15028783087060551239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWXvQz264ebt_EG_EgEWHtu3yxTVcdZj5PQEBTUlYVbMW49qgNOHtrYxk64dJgUr87uwh1hy4DV1XezgIajMqiP9pkDK4JmfGdqyG7bIBVnVjHTTmvOWooVESIYmQ0gD31yxoQwaUxT2w/s72-c/failure-small.jpg" height="72" width="72"/><thr:total>12</thr:total></entry></feed>