<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><description>Konstantin Tarkus (aka @koistya) - software engineer since 2001, residing in St. Petersburg, Russia. This is my tech blog with thoughts and musings on web and cloud application design and architecture.</description><title>Konstantin Tarkus's Tech Blog</title><generator>Tumblr (3.0; @koistya)</generator><link>https://tarkus.me/</link><xhtml:meta content="noindex" name="robots" xmlns:xhtml="http://www.w3.org/1999/xhtml"/><item><title>AngularJS, Backbone, Durandal, CanJS: The Recent Activity on...</title><description>&lt;img src="https://64.media.tumblr.com/d517f41e71a8e611dff5cde36ff68033/tumblr_myw65qlN8C1rh9ij0o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;AngularJS, Backbone, Durandal, CanJS: The Recent Activity on GitHub&lt;/p&gt;</description><link>https://tarkus.me/post/72228920036</link><guid>https://tarkus.me/post/72228920036</guid><pubDate>Sat, 04 Jan 2014 23:29:50 +0400</pubDate><category>JavaScript</category><category>MVC</category></item><item><title>How to Customize Twitter Bootstrap with Git and NuGet in Visual Studio</title><description>&lt;p&gt;The following workflow can be used for advanced customization of any 3rd party library containing source code and is available on &lt;a href="http://www.nuget.org"&gt;NuGet&lt;/a&gt; package gallery. Like, for example, &lt;a href="https://www.nuget.org/packages/Twitter.Bootstrap.Less"&gt;Twiter.Bootstrap.Less&lt;/a&gt; NuGet package.&lt;/p&gt;

&lt;p&gt;Assuming you have a &lt;strong&gt;Visual Studio&lt;/strong&gt; solution with a web application project in it. This solution is already under &lt;strong&gt;Git&lt;/strong&gt; source control.&lt;/p&gt;

&lt;p&gt;Before installing a new NuGet package, you create a special branch for it.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/ST5tcNX.gif" width="500" height="300" alt="Create a new Git branch in Visual Studio"/&gt;&lt;/p&gt;

&lt;p&gt;Install &lt;a href="https://www.nuget.org/packages/Twitter.Bootstrap.Less"&gt;Twiter.Bootstrap.Less&lt;/a&gt; NuGet package, commit these changes to the &amp;lsquo;bootstrap&amp;rsquo; branch, and merge it with the 'master&amp;rsquo; branch.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/PMrnBdf.gif" width="500" height="300" alt="Merge Bootstrap branch into Master in Visual Studio"/&gt;&lt;/p&gt;

&lt;p&gt;From there on you can make any customization you want to Bootstrap files (*.less) in your 'master&amp;rsquo; branch  - move them around to suite your preferred project structure, change file contents, add or remove files etc. And whenever a new version of Bootstrap library released, you update it in your project via NuGet on a separate 'bootstrap&amp;rsquo; branch, then merge it with the 'master&amp;rsquo;.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/zch7ZsR.png" width="500" height="400" alt="Customized Bootstrap project structure"/&gt;&lt;/p&gt;

&lt;p&gt;Finally, for automatic compilation of .less files in your project you may want to use &lt;strong&gt;Node.js&lt;/strong&gt; and &lt;a href="http://twitter.github.io/recess/"&gt;RECESS&lt;/a&gt; (recommended by Bootstrap team).&lt;/p&gt;</description><link>https://tarkus.me/post/70489442659</link><guid>https://tarkus.me/post/70489442659</guid><pubDate>Thu, 19 Dec 2013 18:43:00 +0400</pubDate><category>CSS</category><category>Bootstrap</category><category>Git</category><category>VisualStudio</category><category>NuGet</category><category>LESS</category></item><item><title>Windows Azure VMs Remote Management</title><description>&lt;p&gt;The regular way to manage Windows Server machines is to setup and use Remote Desktop. However, sometimes that&amp;rsquo;s not the most convenient way of managing your servers. Let me show you how to manage Windows Azure VMs from a local machine using Server Manager and PowerShell Remoting.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Step 1&lt;/b&gt;. Download and install &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=39296"&gt;Remote Server Administration Tools for Windows 8.1&lt;/a&gt; aka Server Manager (assuming your local machine is Windows 8.1; or choose an appropriate version of this tool)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Step 2&lt;/b&gt;. On each VM go to Server Manager &amp;gt; Local Server &amp;gt; Properties and enable Remote management (assuming you have Windows Server 2012 R2 installed on your Windows Azure VM roles):&lt;/p&gt;&lt;p&gt;&lt;img src="http://i.imgur.com/fOxH9I6.png" alt="Enable remote management" width="500" height="260"/&gt;

&lt;/p&gt;&lt;p&gt;Then open Windows Firewall with Advanced Security &amp;gt; Inbound Rules &amp;gt; Windows Remote Management (HTTP-In) (Public Profile) &amp;gt; Properties:&lt;/p&gt;&lt;p&gt;&lt;img src="http://i.imgur.com/HJMRvt4.png" alt="Windows Remote Management (HTTP-In)" width="500" height="205"/&gt;&lt;/p&gt;

&lt;p&gt;Add your public IP (from which you&amp;rsquo;ll be connecting to your Azure VMs) to the scope:&lt;/p&gt;&lt;p&gt;&lt;img src="http://i.imgur.com/f6SMGev.png" alt="Remote IP address" width="447" height="414"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Step 3&lt;/b&gt;. For each Azure VM add WinRM (TCP 5985) endpoint via &lt;a href="https://manage.windowsazure.com/#Workspaces/VirtualMachineExtension/vms"&gt;Windows Azure Management Portal&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/iHGEDBd.png" alt="WinRM Endpoint" width="500" height="294"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Step 4&lt;/b&gt;. Add your Azure VMs to the trusted hosts list by running the following PowerShell script:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Set-Item WSMan:\localhost\Client\TrustedHosts SERVERNAME.cloudapp.net -Concatenate -Force&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Step 5&lt;/b&gt;. Open Server Manager on your local workstation and add remote VM servers to the list (by DNS name):&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/GHkVE53.png" alt="Add Remote Server" width="500" height="201"/&gt;&lt;/p&gt;

&lt;p&gt;Right-click on a newly added server in the list &amp;gt; Manage as&amp;hellip; and enter your VMs administrator credentials:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/YfA7jYq.png" alt="Manage as..." width="500" height="417"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;That&amp;rsquo;s it!&lt;/b&gt; Now you can manage your Azure VMs from a single place.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/ryMNpKA.png" alt="Remote Servers" width="500" height="258"/&gt;&lt;/p&gt;

&lt;p&gt;If you need a command line access just right-click on a server &amp;gt; Windows PowerShell, which will start up a PowerShell Remoting session:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/jKEii98.png" alt="PowerShell Remoting" width="500" height="145"/&gt;&lt;/p&gt;</description><link>https://tarkus.me/post/64761019099</link><guid>https://tarkus.me/post/64761019099</guid><pubDate>Tue, 22 Oct 2013 12:45:00 +0400</pubDate><category>Windows Azure</category><category>Windows Server</category><category>Remote Administration</category></item><item><title>Lean Startup / Business Model Canvas</title><description>&lt;p&gt;For those of you exploring the nice world of entrepreneurship and startups I want to share a Word document template of a business model canvas optimized for &lt;a href="https://en.wikipedia.org/wiki/Lean_Startup"&gt;Lean Startups&lt;/a&gt;. For more info read the «&lt;a href="http://www.amazon.com/gp/product/1449305172/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1449305172&amp;amp;linkCode=as2&amp;amp;tag=rigukona-20"&gt;Running Lean&lt;/a&gt;» book by &lt;a href="https://twitter.com/ashmaurya"&gt;Ash Maurya&lt;/a&gt; and «&lt;a href="http://www.amazon.com/gp/product/0307887898/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0307887898&amp;amp;linkCode=as2&amp;amp;tag=rigukona-20"&gt;The Lean Startup&lt;/a&gt;» by &lt;a href="https://twitter.com/ericries"&gt;Eric Ries&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src="https://64.media.tumblr.com/24911ce1433eb145fb5f7fb0fa0e20e6/tumblr_inline_mt24pj5PWX1qz4rgp.png" alt="Lean Startup, Business Model Canvas, Lean Canvas, Template" width="500" height="386"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Download&lt;/b&gt;: &lt;a href="https://dl.dropboxusercontent.com/u/16006521/Business%20Model%20Canvas.dotx"&gt;Business Model Canvas.dotx&lt;/a&gt; (Microsoft Word template)&lt;/p&gt;</description><link>https://tarkus.me/post/61028067489</link><guid>https://tarkus.me/post/61028067489</guid><pubDate>Thu, 12 Sep 2013 19:47:00 +0400</pubDate><category>Startup</category><category>Startups</category><category>Business Model</category><category>Entrepreneurship</category></item><item><title>Visual Studio 2013 Preview with AngularJS Support</title><description>&lt;p&gt;Good news, guys! &lt;a href="http://www.microsoft.com/visualstudio/eng"&gt;Visual Studio 2013 Preview&lt;/a&gt; has now IntelliSense for AngularJS in its brand new HTML editor.&lt;/p&gt;

&lt;p&gt;&lt;img width="500" src="https://64.media.tumblr.com/4988e61b93171ad92ea236a677674367/tumblr_inline_mp60ryT2sN1qz4rgp.png" alt="AngularJS IntelliSense in Visual Studio 2013" height="220"/&gt;&lt;/p&gt;

&lt;p&gt;Also a more friendly HTML validation, automatic brace completion and type-through, IntelliSense item grouping, smart ident and formatting, better Razor experience&amp;hellip;&lt;/p&gt;</description><link>https://tarkus.me/post/54176205305</link><guid>https://tarkus.me/post/54176205305</guid><pubDate>Sat, 29 Jun 2013 16:33:00 +0400</pubDate><category>VisualStudio</category><category>VS2013</category><category>AngularJS</category><category>HTML</category></item><item><title>AngularJS, ASP.NET MVC and SEO</title><description>&lt;p&gt;What if you want your single-page app to behave like a regular multi-page website when the client&amp;rsquo;s browser doesn&amp;rsquo;t support JavaScript? Here is an example of how to implement it with &lt;a href="http://angularjs.org"&gt;AngularJS&lt;/a&gt; and &lt;a href="http://asp.net/mvc"&gt;ASP.NET MVC&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;Demo: &lt;a href="http://angularjs-seo.kriasoft.com/"&gt;http://angularjs-seo.tarkus.me/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create a new ASP.NET MVC 4 project. Extract HTML from within the &amp;lt;body&amp;gt; tag of the /Views/_Layout.cshtml file into a separate layout (_BodyLayout.cshtml).&lt;/p&gt;

&lt;p&gt;At the top of _BodyLayout.cshtml, specify the parent layout and make sure it will be set to null if the request is made with the &amp;ldquo;X-Requested-With: XMLHttpRequest&amp;rdquo; header by using &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.ajaxrequestextensions.isajaxrequest.aspx"&gt;Request.IsAjaxRequest()&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;figure class="tmblr-full" data-orig-height="49" data-orig-width="500"&gt;&lt;img src="https://64.media.tumblr.com/bac5ba02f7cb0114981d30d6c327c13d/2f79b0a3066c8f7c-34/s540x810/09061855f8df681edaad48ed35e69080dee6c2aa.png" data-orig-height="49" data-orig-width="500"/&gt;&lt;/figure&gt;&lt;/p&gt;

&lt;p&gt;Update the default layout name in /Views/_ViewStart.cshtml.&lt;/p&gt;

&lt;p&gt;&lt;figure class="tmblr-full" data-orig-height="50" data-orig-width="500"&gt;&lt;img src="https://64.media.tumblr.com/b0c89185493d10bef893ee7b8a0da6c2/2f79b0a3066c8f7c-63/s540x810/ea84100d260c04a34b39dc50f8db517edaf493f3.png" data-orig-height="50" data-orig-width="500"/&gt;&lt;/figure&gt;&lt;/p&gt;

&lt;p&gt;Add a reference to angular.js and your custom app.js files in the parent layout (_Layout.cshtml). Add &amp;lt;ng-view&amp;gt;@RenderBody()&amp;lt;ng-view&amp;gt; into _Layout.cshtml.&lt;/p&gt;

&lt;p&gt;&lt;figure class="tmblr-full" data-orig-height="80" data-orig-width="500"&gt;&lt;img src="https://64.media.tumblr.com/919abd4e527ce386df73752e7543a5ef/2f79b0a3066c8f7c-58/s540x810/f2d4e6a7d1a22e48202650d03457a180b7e0e641.png" data-orig-height="80" data-orig-width="500"/&gt;&lt;/figure&gt;&lt;/p&gt;

&lt;p&gt;Add the ng-app=&amp;ldquo;App&amp;rdquo; attribute to the &amp;lt;html&amp;gt; tag and insert the following code into your app.js file with routing information:&lt;/p&gt;

&lt;pre&gt;
var app = angular.module('App', []);

app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
    $routeProvider
        .when('/', { templateUrl: '/home/index' })
        .when('/home/about', { templateUrl: '/home/about' })
        .when('/home/contact', { templateUrl: '/home/contact' });
    $locationProvider.html5Mode(true);
}]);
&lt;/pre&gt;

&lt;p&gt;That&amp;rsquo;s it!&lt;/p&gt;

&lt;p&gt;Sample project - &lt;a href="https://github.com/kriasoft/AngularJS-SPA-Template"&gt;AngularJS SPA Template for Visual Studio&lt;/a&gt;&lt;/p&gt;</description><link>https://tarkus.me/post/32207185180</link><guid>https://tarkus.me/post/32207185180</guid><pubDate>Mon, 24 Sep 2012 22:31:00 +0400</pubDate><category>AngularJS</category><category>ASP.NET MVC</category><category>Web</category><category>Programming</category></item><item><title>"Controlling complexity is the essence of computer programming."</title><description>“Controlling complexity is the essence of computer programming.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Brian Kernighan&lt;/em&gt;</description><link>https://tarkus.me/post/32153031668</link><guid>https://tarkus.me/post/32153031668</guid><pubDate>Mon, 24 Sep 2012 01:42:10 +0400</pubDate><category>Programming</category></item><item><title>AngularJS + ASP.NET MVC: Q and A</title><description>&lt;p&gt;In this blog will I try to answer a few questions you may have if you&amp;rsquo;re starting &lt;a href="http://en.wikipedia.org/wiki/Single-page_application"&gt;single-page web application&lt;/a&gt; (SPA) development with &lt;a href="http://angularjs.org/"&gt;AngularJS&lt;/a&gt; and &lt;a href="http://www.asp.net"&gt;ASP.NET&lt;/a&gt; stack of technologies (ASP.NET MVC, ASP.NET Web Pages, ASP.NET Web Api, SignalR, Entity Framework, TypeScript&amp;hellip;)&lt;/p&gt;

&lt;h3&gt;Q: Will I have any issues if I choose ASP.NET on a back-end for my single-page app? What are the alternatives?&lt;/h3&gt;

&lt;p&gt;Many folks are happy using Node.js + Express on a back-end. But if you&amp;rsquo;re already familiar with .NET you may take an advantage of using &lt;a href="http://www.visualstudio.com/"&gt;Visual Studio&lt;/a&gt; IDE + &lt;a href="http://www.visualstudio.com/products/visual-studio-online-overview-vs"&gt;Visual Studio Online&lt;/a&gt; (formerly TFS), which gives you almost all the required tools out of the box like - great code editor and debugger, Git source control, agile/scrum planning, unit / load / UI testing, continuous integration, automated deployment, Windows Azure dev tools (see &lt;a href="http://www.asp.net/visual-studio/overview/2013/release-notes"&gt;what&amp;rsquo;s new in Visual Studio 2013&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Also with ASP.NET you have a choice of using most of the required libraries and components required for building single-page apps from a single vendor, built on a common architectural ground (see &lt;a href="http://www.asp.net/aspnet/overview/owin-and-katana/an-overview-of-project-katana"&gt;OWIN&lt;/a&gt;). In overall I don&amp;rsquo;t think you&amp;rsquo;ll have any issues if you go ASP.NET route.&lt;/p&gt;

&lt;h3&gt;Q: Which project template to choose for an AngularJS web app?&lt;/h3&gt;

&lt;p&gt;Starting with an &amp;ldquo;Empty&amp;rdquo; project template is good I think, it will keep your project clean and free of some artifacts you may never use (for example, are you sure you need ASP.NET MVC-based help pages for your RESTful service if you choose &amp;ldquo;Web Api&amp;rdquo; template?)&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/2N9hG1Q.png" width="500" height="463" alt="AngularJS SPA Template for Visual Studio"/&gt;&lt;/p&gt;

&lt;h3&gt;Q: Should I use ASP.NET MVC, ASP.NET Web Pages or just plain HTML pages for my AngularJS views (templates)?&lt;/h3&gt;

&lt;p&gt;If you choose ASP.NET MVC, you may end up implementing two MVC code bases - one for server-side and another for client-side. I lean towards keeping things simple and avoid using ASP.NET MVC on the server side unless you&amp;rsquo;re really need one; use &lt;a href="http://www.asp.net/web-pages"&gt;ASP.NET Web Pages&lt;/a&gt; intstead. ASP.NET Web Pages (.cshtml) also give you more flexibility in comparison to plain HTML-based templates (.html) - Razor HTML helpers, an ability to have nested templates, layouts, easier to optimize website for search engines (SEO).&lt;/p&gt;

&lt;h3&gt;Q: OK. How do I add ASP.NET Web Pages support to my project?&lt;/h3&gt;

&lt;p&gt;Right-click on the project in Solution Explorer &amp;gt; Manage NuGet Packages:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/3FIgx2u.png" width="500" height="180" alt="Microsoft ASP.NET Web Pages NuGet Package"/&gt;&lt;/p&gt;

&lt;p&gt;Other than installing &amp;ldquo;Microsoft ASP.NET Web Pages&amp;rdquo;, you need to include an appropriate sections to your Web.config file:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/koistya/7673177"&gt;&lt;img src="http://i.imgur.com/ACocb75.png" width="500" height="433" alt="ASP.NET Web Pages Web.config"/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here you may want to add some other namespaces you want to make available by default inside Razor pages.&lt;/p&gt;

&lt;h3&gt;Q: OK. I&amp;rsquo;m using ASP.NET Web Pages instead of MVC. Where are the @Model and other HTML helpers?&lt;/h3&gt;

&lt;p&gt;ASP.NET Web Pages has a different set of HTML helpers, for example, instead of @Model you can use @PageData etc.&lt;/p&gt;

&lt;p&gt;For more info, visit this: &lt;a href="http://www.asp.net/web-pages"&gt;http://www.asp.net/web-pages&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Q: How to set page titles with AngularJS?&lt;/h3&gt;

&lt;p&gt;The easiest way is to store page titles alone with your route information (in case you&amp;rsquo;re using ngRoute ur UI Router). Then you can attach a handler on &amp;rsquo;$routeChangeSuccess&amp;rsquo; event and update the title of a page whenever URL path is set or updated.&lt;/p&gt;

&lt;p&gt;If your page titles are not static (you don&amp;rsquo;t know them upfront, but generate based on a response from a server) then a good place to set them would be - inside controllers. For example:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/lMBpV2j.png" alt="AngularJS Page Title" width="500" height="51"/&gt;&lt;/p&gt;

&lt;p&gt;And you would need to add ng-bind attribute to the &amp;lt;title&amp;gt; element in a layout template:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/kaPzQxZ.png" alt="ASP.NET Web Pages Title" width="500" height="50"/&gt;&lt;/p&gt;

&lt;p&gt;Finally, for SEO reasons, you may also want to set page titles in partial views as well:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/XhVYuUU.png" alt="AngularJS Page Title" width="500" height="100"/&gt;&lt;/p&gt;

&lt;p&gt;&amp;hellip;&lt;/p&gt;

&lt;p&gt;I&amp;rsquo;m currently updating this post. Please, come back later.&lt;/p&gt;

&lt;p&gt;For code samples visit: &lt;a href="https://github.com/kriasoft/AngularJS-SPA-Template"&gt;AngularJS SPA Template for Visual Studio&lt;/a&gt;&lt;/p&gt;</description><link>https://tarkus.me/post/32121691785</link><guid>https://tarkus.me/post/32121691785</guid><pubDate>Sun, 23 Sep 2012 18:07:00 +0400</pubDate><category>AngularJS</category><category>ASP.NET MVC</category><category>Web API</category><category>Web</category><category>Programming</category></item><item><title>As you probably know, there is currently no way to add...</title><description>&lt;img src="https://64.media.tumblr.com/tumblr_malfqprhmt1rh9ij0o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;As you probably know, there is currently no way to add descriptions to SQL Azure db objects. So, how do you comment db schema assets in your database projects?&lt;/p&gt;</description><link>https://tarkus.me/post/31854775234</link><guid>https://tarkus.me/post/31854775234</guid><pubDate>Wed, 19 Sep 2012 14:56:00 +0400</pubDate><category>Azure</category><category>Code Style</category><category>Programming</category><category>SQL</category><category>SSDT</category></item></channel></rss>