Interfaces in TypeScript

In TypeScript interfaces are used to descript a type. Classes and functions are used to implement behaviour while interfaces are providing information's about shape of the data. All of the type information’s are removed from TypeScript program during compilation there is no runtime overhead and we can freely add type data. To be honest with you interfaces are like Swiss army kn…

By Dawid on (tags: interface, TypeScript, categories: code)

TFS 2015 clone/import/export build definition between team projects

While exploring features of the new Visual Studio Team Foundation Server 2015 I found that it is not possible to reuse a build definition created in one team project into another team project. Since this is a feature that I am going to use frequently, well, every time I start a new project, this is a must have functionality. In this post I will give you a complete solution I’ve…

By Mirek on (tags: build definition, clone, tfs, VSO, categories: tools, infrastructure, code)

Automated UI testing in ASP.NET MVC5 using Selenium WebDriver

I would like to show you how easy it is to use unit test in Visual Studio and Selenium Web Driver to make automated UI test. The Plan The plan is simple: host your app, investigate given page, make assertions. The first problem is how to host our application from inside a unit test? I want to host app using current code not from external source which is already delopyed – post …

By Piotr on (tags: asp.net 4, mvc 5, Unit test, categories: code)

Pivot grid in WPF

Today I am going to show you how easy to achieve a pivot scrolling in wpf using scroll viewers and scroll bars. What we are going to achieve is presented on following picture The center and top part can be scrolled horizontally using bottom scroll bar (red rectangle). From the other side the vertical scroll bar affects center and left side part (orange rectangle). So when we sc…

By Mirek on (tags: pivot grid, WPF, categories: code)

Localization in ASP.NET Core 1.0 and MVC 6

Previous ASP.NET localization approach was quite old. It was just based on resources and there was nothing wrong with this but lot of projects uses other sources of localized texts (for example database). In ASP.NET Core 1.0 it’s completely rewritten! Configuring Localization middleware The localization is configured in Startup class, where we need to enable Localization middle…

By Dawid on (tags: asp.net core 1.0, localization, mvc6, categories: code)

Azure Active Directory B2B: How it works

B2B is based on invitation model which lets you enable access to your corporate applications from partner-managed identities. You can provide email along with the applications you want to share and send invitation to your partners, customers or anyone else who have account in Azure Active Directory. Azure AD sends them an email invite with a link. The partner user follows the l…

By Dawid on (tags: active directory, azure, b2b, categories: azure, infrastructure, code)

Using Azure Active Directory application roles

In this post I’ll try to explain how we can build an MVC application that uses Azure Active Directory Application Roles for authorization. This kind of authorization is implemented using role based access control – RBAC. When using this kind of authorization we can grant permissions to roles, not to individual users or groups. The administrator can then assign roles to differen…

By Dawid on (tags: active directory, asp.net 5, azure, role, categories: azure, code, security)

Integration testing in ASP.NET MVC 6

In ASP.NET 5, Microsoft has produced a Nuget package called Microsoft.AspNet.TestHost which you can easily use to run your ASP.NET 5 in memory. We can use that feature of self hosted application to create integration tests. Creating integration test project After creating a new ASP.NET 5 solution open file and dependency for XUnit.DNX integration packages and the Microsoft.AspN…

By Dawid on (tags: asp.net 5, mvc 6, testing, categories: code)

Full responsive vs m-site approach

Nowadays there are more mobile devices than desktops and every mobile device can have different resolution and aspect ratio. That means that we need to come up with optimal solution to that situation. There are basically two main approaches: a website that can dynamically adapted to every screen size - full responsive or additional dedicated mobile version of every page – mobil…

By Piotr on (tags: ASP.NET, responsive design, categories: code, web)

Visual Studio Online and Team Foundation Server 2015 REST APIs

If you’ve been following Microsoft announcements about Visual Studio Online over the last 12 months, you already know that you can easili integrate with VSO from any platform, technology, or device. Everything thanks to a new set of of JSON-based REST APIs. Those APIs enable a lightweight way to work with Team Foundation Server from virtually any device, platform, or technology…

By Dawid on (tags: api, hooks, online, REST, service, studio, tfs, visual, categories: tools, infrastructure, code)