SQL Server Application Role

Sql Server Application Role is a way to control access to the database for specific applications. It simply grants a access to a program  that provides application role credentials, not for the user login that is used to connect to a database. Application Roles are useful when you want to restrict direct access to the database for a user or group of users, but you want the…

By Mirek on (tags: Application Role, Entity Framework, SQL Server, categories: architecture)

Where to learn CSS3

For those who start their adventure with web developing, especially with cascading style sheets, or those who want to catch up on what is new in CSS3, there are couple of resources you might find quite useful and reach. The first starting point, and for sure a every day work manual about CSS3, is w3Schools.com. A rich compendium containing hundreds of definitions together with …

By Mirek on (tags: css, categories: web)

Why designers should learn front-end development and front-end developers should learn design

Recent experiences have brought me to write this article, for the sake of improving developer <–> designer communication. TL;DR; If you’re a developer – read about basic design principles. Color schemes, golden ratio, typefaces and the likes. If you’re a designer – find a introductory tutorial on html and read it.   If you made it this far, means that you’re interest…

By on (tags: design, categories: web)

Mock your database with no effort

This is a tool I was looking for for a very long time. The Effort is a library that allows you to mock your database with basically no effort. This is simply a database provider for Entity Framework which uses an in memory database (NMemory). Although it is still in beta version it is fully functional for most cases. I found it very usefull in unit and functional testing. Ok so…

By Mirek on (tags: Effort, Entity Framework, testing, categories: tools)

Like that? really?

So I found this. Please don’t do that. Do something better, it’s easy and less complicated. I’ll show you how. I doubt that OWIN components have been designed to be used as a DI container and in this post – they certainly seem to be used that way, unless I’m not seeing something. The idea behind the article IS GOOD. One manager per request – good, one DbContext per request – al…

By on (tags: ASP.NET, dependency injection, categories: tools, web)

Testing the web - a new hope

There are plenty of ways to test web apps, but most of them require a cumbersome setup and a lot of tools installed and I’m just too lazy to do that. But I just found something that may work in my favour. The fact that I will need something more than unit tests for web apps is obvious – I just didn’t have the time/urge/heart to set up ‘the whole machine’. I’ve had some experien…

By on (tags: fluent, testing, categories: tools, web)

ASP.NET Identity – the new way of handling authentication and authorization in asp.net

First there was ASP.NET Membership (well, maybe not first, but it was released a long time ago), then there was the ASP.NET Simple Membership, then ASP.NET Universal Providers now there’s the “latest and greatest” ™ ASP.NET Identity. Let’s dig in. For a while now my project build reported that FormsAuthentication is deprecated so I knew I’ll need to look into the latest thing a…

By on (tags: autentication, identity, categories: web)

WPF CollectionView can leak memory

A time ago I wrote about using collection views in WPF to achieve different looks at the same source collection. By creating different instances of ListCollectionView we could have the collection displayed in different sorting, ordering and grouping shape. Unfortunately there is small trap when using collection views. CollectionView class instantiated with a source collection t…

By Mirek on (tags: CollectionView, memory leak, WPF, categories: code)

Memory leak by misusing Autofac

Recently I’ve found out that we can easily cause a memory leaks in our .net application by improper usage of the dependency injection container Autofac. The case of this problem concerns only components that implements IDisposable interface, so are meant to handle some unmanaged resources and need to be disposed when no longer needed. Let me show you how to reproduce this probl…

By Mirek on (tags: Autofac, IDisposable, memory leak, categories: code)

Memory leak using PropertyDescriptor AddValueChanged

Recently I found out that my attached property, which I am using to modify the dependency property of one of my controls, causes a memory leak. Finally it turned out that it is not the attached property, but the titled method of PropertyDescriptor I have used in my code. The AddValueChanged method allows to monitor changes on any dependency property of a component. In my case I…

By Mirek on (tags: memory leak, WPF, categories: code)