Image of sky

.NET Diaries  Part One

September 26, 2008

This is planned as a multi-post series of my experience with .NET, specifically ASP.NET. For those of you who do not know what .NET is, it is an elaborate framework created by Microsoft for use with Microsoft products and technologies. It has both advocates and critics, it has been said that many developers are either PHP or .NET Developers.

Why Bother

Why bother learning .NET? I’ve asked myself this very question several times, and the answer is simple… I love money! That’s the bottom line. If you take out all of your web savvy companies, almost all companies use it. Large corporations, as well as small businesses use .NET because they use Microsoft, so it makes sense to them to use .NET also. I see it as an opportunity.

Many network IT people thrive on certifications, and companies love those certifications. It’s a security blanket for them, and it makes sense. If I own a company, and I am not knowledgeable about technology, I would like the fact that the company that produces the products I use has certified my developer to work with those products. And I am willing to pay a lot for that expertise, which takes me back to why bother…money.

First Impressions

ASP.NET has a very robust suite of tools available for use. While using Visual Studio 2008, I found it very easy to add controls and edit the properties of those controls. I am usually strictly against drag and drop, but in this case it makes development extremely easy. I see the drag and drop functionality of VS a tool for building web sites, not a method for building them. What I mean by that is, I write almost all my code in code view by hand. When I need something such as a database connection, while still in code view, I drag a database connection control to the spot where I want the connection to appear, answer the questions, and viola, it’s all set. I see that as a tool to aid in the development phase.

ASP.NET pages can use any one of a series of server side programming languages. C# is hands down the most popular. Others include Visual Basic, C++, and Java. But the catch is that they are all strongly typed languages. In case you don’t know what that is. Wikipedia states strongly typed programming language as

the term strong typing is used to describe those situations where programming languages specify one or more restrictions on how operations involving values having different datatypes can be intermixed.

In a nutshell, strongly typed languages have to declare datatypes, and match those datatypes unless they are converted. For example, if you get a number from a form and try to perform a calculation, that will produce an error because all data in a web form is a string. You would have to convert that string to a number data type: integer, float, or decimal before performing the calculation. This can trip up novice PHP developers because PHP performs this type of conversion for you.

ASP.NET is not the monster I expected to be. It is possible to produce fully validated, semantic code with Visual Studio as long as you don’t rely on drag and drop for everything. Of course, just like any WYSIWYG editor, if you do not know the code and drag everything to the page, the code is not going to be pretty. It will be interesting to see how ASP.NET sites I create will turn out.

Next, I’ll explore database connections and dynamic content. Until Then…Happy Coding!

Recent WebSites

Of Interest...

Name:

Email:

Comments: