Who's to blame, Microsoft and/or the .Net Community

I’m interested in why most of Microsoft and some other developer’s demons about writing apps mostly begin with the creation of a database? The design of the app will more or less in that case be driven by the database schema, after the database in place the Data Access Layer will be built and the entities will mostly reflecting the database schema. A data base like Microsoft SQL Server is a relation database, so our model will more or less be a relational model instead of a more object oriented model. That can make it harder to use good design patterns and principles to solve some Implementation problems. OO has a rich toolset for modeling the domain than the relation model.


If we start to focus on the domain model first and implement it, our entities will be created out of our domain model instead. We create our entities, our Repositories. We don’t need to focus on what the data source looks like or how the data should be stored. When the domain model is implemented and tested we start focus on the data source and select the right data source based on how our domain model should be persisted, mostly it ends with a database of any kind.

Microsoft and other developers (including me) articles are mostly technical focused rather than helping people build apps with their tools in the best way. I also think that is one reason so many .Net developers build horrible apps with bad quality and are hard to maintain etc.

On a forum I notice a question like this “My boss told me that I could build ASP.Net application without using a single line of code, because it’s what Microsoft told him, so I wonder how should I start building a web shop, please help me I’m not a developer”.

I think we all need to be better on writing "How", “When” and "Why" (More best practice).

Whose fault is it that so many .Net Developers uses the SQL Data Source when building “enterprise” apps and use drag and drop from a database?

Published Saturday, August 16, 2008 10:02 AM by Fredrik N

Comments

# re: Who's to blame, Microsoft and/or the .Net Community

Saturday, August 16, 2008 6:34 AM by Jonas Follesø

Hi Fredrik,

Interesting post! Totally share your concerns. I think it's a combination. Microsoft tend to focus on database driven design and application. Fact is more often than not you don't get to start with a fresh database. You have some database schema you have to build your application on top of, and Microsoft does not do allot to help out...

I also agree that blogs and conference sessions tends to be focusing on technical details rather than providing guidance and how to build "real apps" and not just drag-and-drop demos.

I'm speaking about "Silverlight 2 for developers" at TechEd New Zealand and Sydney in September, and is trying not to fall into this trap. My talk will be about development practices, writing flexible, testable and designable (as in UI designer) code. Will cover things such as Model-View-ViewModel, Dependency Injection in Silverlight and automatic testing...

I do feel that there is a change going on (the ALT.NET movement is one example) of .NET developers starting to "care" more about their applications. I guess it's a sign of the community getting more mature (after all we are still some years behind Java). Efforts from ASP.NET MVC are good examples of Microsoft products trying a new approach to building software, not measuring success by the number of drag-drop-and-clicks in Visual Studio to do something, but rather about how testable, flexible and maintainable your code is...

Cheers,

Jonas Follesø

# re: Who's to blame, Microsoft and/or the .Net Community

Saturday, August 16, 2008 8:45 AM by Keyvan Nayyeri

I don't know if this is a common approach among .NET developers but I personally build my applications in the reverese order. There are many classic features provided by .NET and VS that I don't use at all and try to write something that I'm aware of.

Btw, we would blame Microsoft for this. I always have had some complains about some features that have made many developers lazy!

# re: Who's to blame, Microsoft and/or the .Net Community

Saturday, August 16, 2008 11:06 AM by dinoboy

I think that this tendency is because of most of the presentations, tutorials and examples focus on drag and drop functionality and how to build application fast. I sort of blame Microsoft for this. There are not so many resources which explains how to write application differently and so new developers think that this IS the right way of building applications. But lately this is becoming better. With ASP.NET MVC there are more focus of the general architecture and I have noticed more resources which explain kind of different approach than drag and drop programming.

# re: Who's to blame, Microsoft and/or the .Net Community

Saturday, August 16, 2008 4:49 PM by Luis Abreu

Fredrik, if you're working on a team where you don't have time to learn (during all the year) then you should just do the obvious: get out.

Regarding guidance, yes, it's good if we have it. But what will you do when you face new chalenges? Did you had guidance from others in all the challenges you've faced in life? what i'm trying to say is that most of the fault is with the person which doesn't take the time to study new stuff (as I said, probably because they don't like what they do enough to sacrifice some of their free time improving their skills)...

# re: Who's to blame, Microsoft and/or the .Net Community

Saturday, August 16, 2008 6:00 PM by Fredrik N

Luis Abreu:

I know several of companies that do not send their developers on courses, not even to free events. It’s because they will not get any income when they aren’t doing any work for a customer. Some of those people barely have the time to learn new stuff on their freedom, because they have a family to take care of, they need to make dinner, get the children into bed, help them with homework, drive them to football training etc. When they are done and the kids are in bed, they are mostly tired and don’t have the strength to learn new stuff. Some of them may have a busy and stressed day, so they are tired of switching on the computer, because they have work the whole day with computers and need something else to clear their mind with.

How do you learn new stuff, you probably read about it. So if you mostly find articles where people build simple 2-tier apps, don’t you think several of developers will do that, how should they know that there are other ways to do it? If they found 80% articles about using Sql Data Source, and 20% where they don’t use it, and no one tells when to use what, what do you think they will use, if they have never displayed data in a Grid before. Probably do what they found most information about.

When I got a dog for some months ago I read several books about how to teach a dog good behavior. I had to trust what they say, because I have nothing else to compare with.

So I can’t only blame the developers, I also had to blame the people that teach them, the people that write articles, books, guide lines etc and also the people that don’t let the developer learn new stuff.

# re: Who's to blame, Microsoft and/or the .Net Community

Sunday, August 17, 2008 1:30 PM by Anders

I agree with Fredrik N.

I've been on several of those companies that thinks letting me off to a free Microsoft event is costing them money.

And if I do get to go to a free event then the speaker usually tells me something like: "I'm only doing like this because its fast and for this demo, normally I'd do it some other way, but look how fast and easy it is, and it's working perfectly!"

Well, when I go back to office my boss wants things to happen fast. And I'm happy if I can do it easy and it's working perfectly...

And, yes - I do try to educate myself on my spare time, including reading blogs like this. But I also have a life including two kids and not to mention - a wife...

I think those quick solution demos are coming back to bite Microsofts ass in the end.

Show demos that are architectually correct instead. Even if it takes a little longer to prepare the demo i believe it will pay off in the long run for Microsoft!

# re: Who's to blame, Microsoft and/or the .Net Community

Sunday, August 17, 2008 6:59 PM by Luis Abreu

Fredrik, what you've described sums up what happens with me at my current work. It also happens with my co-workers. In the place I work, there isn't any money for training nor books (and guess what? you'd laugh if I told you how much I make per month:) ). In fact, I'm still using a 6 year old pc for working, so you can see that I don't really have the best conditions in the world (and I'm not gonna talk about office space!). Oh, and I live in an island, so there aren't really that many events here nor is there much interest in anything realted with development.

You don't need to switch on the computer to improve your developer skills...For instance, and if i'm not mistaken, Joel Spolsky used to go to the library for reading at night when he worked at ms instead of watching tv at night...

And aren't we all tired by the end of the day? I am...I can tell you that for sure! And I can garantee that in my current work I don't have the luxury of just doing app A or just building component X. When there's a problem, there's 95% chance that people will come to me for help (and there's also a great probability of me not being able to help them :) ). My point is that by the end of the day I'm also tired, stressed (did you notice the 6 year old pc that I must use on my day to day work?) and I also need to do all the stuff you describe on your post...

But there's a difference between me and most of the other guys that work with me (and no, I'm not smarter than the other guys). what is it then? Well, I buy books, get into discussion lists, talk with people that might help me improve. In other words, I *enjoy* what I do and I really try to improve my skills everyday! I don't see that happening with others...most of the time, they give me the same excuses you've presented on your comment: kids, no training, etc...But the truth is that in 99% of the cases, people just say they want to improve but aren't ready for making any efforts to achieve those goals.

regarding the argument of MS giving lots of bad advice, well, guess what: I've written code that follows that advice. and i saw that it didn't work! seeing that it's wrong should be easy when you deploy a solution and see that it doesn't scale or that your datasets aren't really going to be a good option for returning data from your web service...so, if it doesn't work, that means that it's my responsibility to search for better options that solve my problems. And man, let me tell you something: If I had internet 15 years ago, I'd really know lots of stuff (ok, I had some friends with internet access through modem, but my family didn't had the financial resources for me getting access to the internet. shame, but it's life!). For instance, just look at Martin Fowler's site, there really are lots of great architecture advice there....and it's free too! Does it really cost that mcuch to do that at work and print some pages to read while going home?

I'm not trying to defend MS. No! Should they build better demos. Yes (they probably have good ones too, bad they probably don't show them on events...). What I'm saying is that at the end of the day, we (developers) should take the responsibility of educating ourselves and not finding any excuses for justifying our laziness.

Just my 2 cents.

# re: Who's to blame, Microsoft and/or the .Net Community

Monday, August 18, 2008 1:17 AM by herry

I would blame Microsoft on this.

They build a tool and show developers ways to encourage laziness, and we as human are inherently lazy.

In the open source world, they have no concept of drag and drop so they have to know what they are doing which would lead to better code.

Which is why if you pick an open source and a .net developer on the street, chances are the open source is a better developer.

I love .NET but I see so many horrible .NET code because of this drag and drop approach.

I hope ASP.NET MVC will take over webforms in the future.

# re: Who's to blame, Microsoft and/or the .Net Community

Tuesday, August 19, 2008 12:16 PM by Torkel

@Michael,

Data don't drive applications (at least they shouldn't).

Solutions to problems drive applications, and how to solve those problems drives developers, the specifics of how data is stored/fetched is in most cases not important and can be abstracted.

Saying that developers are object driven, is of course correct as applications developers works in a object oriented language where objects are used to abstract and model the problem domain.

I am not saying that data is not important (it is very important!) but how data is stored and fetched is a separate concern to how an application models and works with that data.

# re: Who's to blame, Microsoft and/or the .Net Community

Monday, August 25, 2008 6:42 PM by jdanforth

Fredrik, that's an interesting topic with many answers to I would say. I agree that many of the demos we see at Microsoft events are a little too draggy/droppy, and I especially remember one of the first demos Scott Guthrie did on (I think it was a beta) of ASP.NET version 2. It was almost 100% dragdrop on the aspx designer surface all the way through with cheers from the audience. Maybe it was just Scott's presentation skills they applauded :)

But, there are times when such an application is perfectly valid - not for enterprise apps, but perhaps for that one or two user kind of small database apps? And there are other companies that do exactly the same thing as Microsoft does on their events - just because they have some tools or APIs the need to show off in 45 minutes and they just don't have the time to dig into proper architecture. Sometimes you hear them say "this is not how you should do this for larger apps...." etc, and at least they admit that. If it’s a large event they usually have an architect track as well – and smart (IMHO) developers attend at least a few of those sessions to perhaps learn when and how to use the particular technique they’ve just seen demoed.

But then there are all kinds of developers out there - some people started out programming really young and now work with the hobby they love and therefore like to spend time to learn more about how to make their apps better, faster, more stable and easier to maintain. Then there's the other kind of developers, who perhaps made a decision to study computer science, not because they love it, but because it sounded like a good job. We've (who read this blog comment) all met both kinds of people, and at least I know which kind I prefer to have on my team ;)

I used to work for a quite large consultancy firm, and they used to encourage people and send their "resources" to courses and education often. But that sort of stopped at the end of the Internet-boom because it was too expensive. Yes, in the short run it was... because loads of the employees didn't bother to keep themselves up to date

and it didn't take more than 3-4 years before most of the skilled people left for other companies, a bunch of the others where sacked and the company was chopped up and sold.

Ops, too much rambling going on here... anyway, the answer is not that easy I would say. Microsoft, the community, the developers themselves and their managers – perhaps we are all to blame a little?

Regarding Microsoft I must say that things are looking better now. It's quite interesting to see Scott Guthrie and the people behind ASP.NET MVC, IronRuby and ADO.NET Data Services showing off their stuff. I know that the evangelism teams on Microsoft is listening to the criticism regarding the sometimes flashy demos of their tools and I’m sure we will hear more about this.

My 10 cents ;)

Johan Danforth

# re: Who's to blame, Microsoft and/or the .Net Community

Tuesday, September 2, 2008 10:08 AM by Paul Horan

Fredrik,

So your contention is that

"drag-n-drop programming" = spaghetti, and

"line-by-line coding" = well structured code?

I can guarantee you that I've seen some pretty horrible spaghetti code written in Java - even with frameworks having been used.  And I've seen (and written) some fairly elegant PowerBuilder code (if I do say so myself).

The bottom line is always the talent and ability of the developer to understand and implement the desired pattern, regardless of the language or method of its implementation.

-Paul Horan-

# re: Who's to blame, Microsoft and/or the .Net Community

Friday, September 11, 2009 2:25 PM by reboltutorial

I don't understand some of you Guys: why don't you choose Java then if you think .net is so bad :) I prefer .Net because there hasn't silly stuffs like EJB. You can do things easily when you are in a hurry or you can do things the hard way when you have time. CHOICE. I prefer to have choice depending if I want to test something in 30 seconds or build my own framework or use an existing framework.

Leave a Comment

(required) 
(required) 
(optional)
(required)