Fredrik Normén
ASP.NET, AJAX, Silverlight, RIA, Architecture, Clean Code
-
What to do if computers didn't exists?
If there wasn't any computers in the world, what should I do right now? It's not an easy question to answer. When I was about 6 years old, I was dreaming about being a farmer, have three kids at the age of 20. At the age of 20, I was working with a Business 2 Business solution, no kids and almost single. I don't think I would like to be a farmer now, maybe some kind of a designer.
-
Why doesn't some of you write unit test?
I have educated over 1000 developers the last 1 1/2 year and about 5% of them raise their hands when I ask them if they writes test, like unit test or if they use Test Driven Development (TDD). 5%! That is not much. When I asked them why they didn't write any tests, the answer is often, we should but don't have time to do it, some answer "we have test but no one maintain the test and update them".
-
Using Web Services in a 3-tier architecture
During the age of the Windows DNA, most of us developers used COM/COM+ and a 3-tier architecture. Where we separate concerns by placing the views to present data into a layer called PL (Presentation Layer), we add all business logic into one single layer called BLL (Business Logic Layer), all code that handle data access was also placed into its own layer called DAL (Data Access Layer). During this time when Windows DNA was a hot topic, most application used this architecture.
By using DCOM it was easy to distribute the different components in the layers into distinct tiers. DCOM had its advantage and also disadvantage (DCOM hides the "distribution" and distribution could be done after application was written without the developers awareness, most applications wasn't designed for distribution purpose.). There was few application I was involved with that used DCOM, and I will in this article focus on the application that didn't use DCOM. The 3-tier architecture was well defined and common used. Several applications today used this architecture. When .Net arrived several developers was scratching their heads, it was a whole new platform for most of them and a difficult and confused time began, "how should this 3-tier architecture be applied on the .Net platform?". Web Services was introduced somewhere around this time and that was a bright light for some solution architects and developers, now they understand how to apply the 3-tier architecture on the .Net platform, the answer was to replace COM/COM+ components with Web Services. So instead of using a binary standard for the communication, XML and HTTP was used. -
Don't return List<T> from a public member!
A friend of mine had a question about IList<T> and List<T>. He had noticed that some developers are returning IList<T> from methods, for example:
-
Bring LINQ to SQL down
There is a discussion on the net about LINQ to SQL and if it should be removed in the future. My collogue and friend Patrik Löwendahl wrote a post about what he think, you can read about it here. I don't care if LINQ to SQL will be removed, honestly I want it to be removed. As Patrik wrote in his blog post, it's not the ADO.Net Team that created the LINQ to SQL. I think the team that focus on data access etc should be the team that build data access framework and the ADO.Net Team are doing a great job. After watching a session in the PDC about EF in the future, I must say that I will not use nHibernate or other OR-mapper as I have mention before in some old posts, I will now use EF. If we compare LINQ to SQL today with the current version of EF, LINQ to SQL is best suited for RAD, but in the future even EF will be suited for RAD. What I don't like with LINQ to SQL, is that developers are using the database first approached, they generate a model out from a database schema. A database is not object oriented.
-
Blog from PDC 2008
We are some Swedish developer blogging live from PDC 2008 in Los Angeles on http://blog.pellesoft.se (All posts are written in Swedish).
-
Sessions are the Achilles heel of a Web application
Michel T. Nygard wrote the following in his book Release It!: "Sessions are the Achilles heel of a Web application."
-
Is it important to write good code?
The last three weeks I have visit several companies and talked about writing good code. It's amazing to see how different developer thinks about writing good code. Here are some comments when I asked if it's important to write good code:
-
PDC 2008 here I come and btw, can we teach old developers to sit?
I will attend the PDC 2008 this year, only two weeks left.. I hope see as many of you as possible at the conference.
-
Region is an excuse for hiding large files
Often when I take a look at sample code there are a lot of regions. I need to open them all the time, it really start to make me crazy. Why does people even use Region in their code, what's the point of hiding code? I think it's only an excuse to hide code because of a too large file. What do you think?