Fredrik Normén
ASP.NET, AJAX, Silverlight, RIA, Architecture, Clean Code
-
Fluent-API to add ActionFilters to Controller in ASP.NET MVC
Note: The name of the classes and the methods are just temporary and may change, I’m so bad when it comes to naming classes and methods. The source code is simple and haven’t done so much refactoring etc. Just wanted to see if I could get it to work, so please have that in mind.
-
Visual Studio 2010 Launch Countdown Sidebar Widget
<style type="text/css">
-
Introduction to Templates in ASP.NET MVC 2 Screen cast
I have recorded some screen casts during the last week for Microsoft, one is was published today on Channel 9 (The Screen cast is in Swedish, I will eventually try to record screen casts also in English, but when that happens, I don’t now). You can found the screen cast here:
http://channel9.msdn.com/posts/MSDNSweden/Introduktion-till-Template-i-ASPNET-MVC-2/ -
Distributing domain entities over the wire
When we design our domain entities we don’t have a presentation layer or database in mind. The domain entities are core business objects located on the server or client side based of what kind of application we are building. Domain entities aren’t designed for distribution. When we realize that we need a distribution, we shouldn’t distribute the entities, instead collect the data we need to distribute and create a data transfer object (DTO) instead. Have the network in mind, a domain entity aren’t designed with a network in mind and of that reason not suitable for distribution. When we create our domain entities, they aren’t designed for presentation purpose, they are designed to fulfill business needs. You should be careful when you start thinking about returning a domain entity to the View when using a patterns like MVC, instead use DTO or a ViewModel, because once again the domain entities aren’t designed with presentation in mind, and aren’t often suitable for presentation purpose. It’s often better to map them to a DTO or ViewModel, objects that are suitable for presentation purpose or passed over the wire.
-
VS 2010 Beta 2 and .Net 4.0 is now available for downloading from MSDN Sub.
Oh, I'm late.. but better late then never.. you can now download VS 2010 nad .Net 4.0 Beta 2, if you are a MSDN Subscriber.. You can read more about VS 2010 Beta 2 on Scott Guthrie's blog.
-
ASP.NET 4.0 Web Form routing
One of hundreds things I like about ASP.NET MVC, is the routing, a way to use clear and friendly URLs like: www.server.com/Customer/List, instead of something like www.server.com/Customers.aspx.
-
Some features I love in VS 2010
This post will not be so long, I want to write a little about some Visual Studio 2010 features I love. First of all the changes made to C# is great, the default value on parameters rocks! When I implement Frameworks, I often ended up with something like this:
-
Create an automatic scrollable image slider in Silverlight
I guess someone will send me an comment and say something like: “Why not simply use XXXX, why write your own control” ;) I know there are a lot of controls out there that will do stuff for me, but I want to know how they are created, and try to create my own solution to learn more etc.
-
ASP.NET AJAX 4.0 Preview 5 – Working with Converters and the new CDN
In this blog post I’m going to show you how you can use the new Converter feature during data binding, to make this post more special I have used the new Microsoft AJAX CDN (Content Delivery Network), so I don’t need to have the AJAX 4.0 script on my server. The example code I use in this post, will use the ASP.NET AJAX DataView and also Microsoft ADO.NET Data Services to retrieve data from the server. My fantasy isn’t so special good, but I decided to make a little “rental” application, where I will use ASP.NET AJAX to simply show a list of cars and the current rental status. The status of a rental car will be sent to the client as a string and can be of the following values, Approved, Not Approved and Pending. The little app I’m building for this post, will show the rental status as different colors for the user.
-
Use a ResourceDictionay and an external resources located in an assembly
I have notice that some developers are asking questions about how to use a ResourceDictionary and reference it to a resource located in a separate assembly. Here is a simple step by step guide to make it possible, I assume you already have a Silverlight project created: