Using MemBus for messaging between application components
Sometimes we need publisher/subscriber messaging in our applications to broadcast messages to different parts of system in real time. We
Read moreSometimes we need publisher/subscriber messaging in our applications to broadcast messages to different parts of system in real time. We
Read moreI made quick comparison of performance of four DI/IoC containers. I measured Unity,Castle Windsor, StructureMap and Ninject in two scenarios – resolving objects with empty constructor and resolving object with injected parameters in its constructor. Results are here.
Read moreI am using Visual Studio database project and data generation plan to populate my database with random data. In my
Read moreIn my last post Find out how long your method runs I introduced how to measure the speed of code using actions. In this posting I will make a step further and give you some ideas about how to create easily measurable code units and how to build measurable scenarios of them. As a foundation I use simplified versions of patterns like Command and Unit of Work.
Read moreDuring my large database experiment I wrote simple solution for paged queries that I can use in my repositories. This far my experiments have shown pretty good results and I think it is time to share some of my code with you. In this posting I will show you how to create paged results using NHibernate and Entity Framework based repositories.
Read moreI am making some experiments with large database and different O/R-mappers. To make it easier for me to measure the time that code takes to run I wrote simple command class that uses Stopwatch class and measures how long it takes for action to run. I this posting I will show you my class and explain how to use it.
Read moreLists and their performance has been hot discussion topic for years. I have seen many examples and read a lot of stories about List class and I made conclusion that there is too much pointless opinions about it. In this posting I will show you how List performs when adding elements to it and how it works internally. Be prepared for interesting discussion!
Read moreDuring times I have seen problematic ways how developers measure the speed and performance of their code. There are some easy tricks that help you make your measurements way better and accurate comparing to measurements made not so well. In this posting I will give you some hints how to get more accurate results when measuring the speed of your code.
Read moreSome ASP.NET web applications use web services to get some data that they display to users. Some pages may lay hardly on web services and these pages need some optimization to work better. In this posting I will show you how to use web services behind your ASP.NET page asynchronously and perform a lot of queries to web services. Sample code included!
Read moreI am auditing one big legacy application. I use Visual Studio 2010 modeling projects to visualize the design of this legacy application. When I wanted to get my UML diagrams to image files so I can insert them to documents I found no option for it. As it turned out we have to write extension for modeling projects and deploy it as Visual Studio 2010 extension. Here is the installer and source package of my UML.SaveAsImage extension.
Read moreIn my last posting I introduced my idea about common membership provider for ASP.NET that is able to support multiple
Read moreI am trying to implement form based authentication (FBA) membership provider that is able to support multiple authentication mechanisms. Take it as an self-training experiment. In this posting I will introduce bases of my experiment and introduce my current plans and ideas.
Read moreLately I finished reading the famous patterns book by Martin Fowler – Patterns of Enterprise Application Architecture. This book introduces and describes design patterns you will usually see when building enterprise applications. There are also examples for patterns and although they are simple and primitive they give you the idea how to implement or use specific patterns. If you are working on enterprise applications every day you will find this book very useful and I’m sure you will use it as manual.
Read moreToday I worked out simple application side object locking solution for one server scenario. My motivation came from ASP.NET architecture forum thread How to solve concurrent site issue where one user asks for locking solution that works without changing database. Here is my simple and primitive solution that should help this guy out. I added also sample solution to this posting.
Read moreToday I tried out ASP.NET MVC HTML5 Helpers Toolkit by Dean Hume. Although browsers today support HTML5 partially it is time to start playing with it. As soon as HTML5 gets common standard in web you should be able to react fast. In this posting I will introduce you HTML5 Helpers Toolkit and some HTML5 field types.
Read moreLately I blogged about HttpNotFoundResult and HttpStatusCodeResult action results that come with ASP.NET MVC 3. These results are ideal for controller tests as we don’t have to mess with HttpContext and Response objects anymore. In this posting I will show you how to use HttpNotFoundResult in controller tests to check if errors are given correctly to user.
Read moreASP.NET MVC 3 brings us new view engine called Razor. Razor view engine was made available with WebMatrix first beta.
Read moreASP.NET MVC 3 supports global action filters. Global action filters are applied to all actions in web application. By example, you can use global action filters for common security checks. In this posting I will show you how to write dummy action filter, register it as global and test it.
Read moreOne of nice features of ASP.NET MVC 3 is support for multiple view engines. There will be two out-of-box view engines: one for classic ASPX-based views and one for Razor-based views. In this posting I will show you this new feature and demonstrate how to use different view engine in same project.
Read moreMy last posts described new action results in ASP.NET MVC 3 – HttpNotFoundResult and HttpStatusCodeResult. Unfortunately these result have no body to send to client but there are times we need it to inform our visitor about problems the way that we don’t go out of information context where visitor is. In this example I will show you how to write your own HttpStatusCodeResult that has also body.
Read moreASP.NET MVC 3 also introduces new action result HttpStatusCodeResult. This action result provides you way how to specify HTTP status code and status description in your controllers. In this posting I will show you how to use HttpStatusCodeResult in your real-world applications providing meaningful status code for products that were online once but are now gone and we don’t expect them to be back in future.
Read more