Try Tuts+ Premium, Get Cash Back!
ASP.NET from Scratch : Lesson 3
videos

ASP.NET from Scratch: Lesson 3

Tutorial Details
  • Length : 30 minutes
  • Difficulty: Intermediate
This entry is part 3 of 10 in the ASP.NET from Scratch Session
« PreviousNext »

Picking up where Lesson two left off, this new installment of ASP.NET From Scratch covers more C# programming fundamentals – namely class inheritance and interfaces. In this lesson, you’ll learn how to use inheritance to save time and code. You’ll also learn about the concept of interfaces, and how they can make your applications and components flexible and maintainable. You’ll also be introduced to the Object Browser, a feature of Visual Studio that organizes all classes within the Framework Class Library and your project in a browsable format.


Screencast


Other Viewing Options


Sell ASP.NET Scripts on CodeCanyon

Did you know that you can sell your ASP.NET scripts and components on CodeCanyon? Simply sign-up for a free author account, and start selling!

Jeremy McPeak is jwmcpeak on Codecanyon
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • Way

    Gonna watch this now. It’s a really good and interesting serie.

    • http://www.jeba.in Tojo

      Yup! I second that.. I like the way he explains to the depth..

  • http://laranzjoe.blogspot.com lawrence77

    Buffering ;)

  • http://twitter.com/KGTheNerd Karthik

    Awesome, Back in action, Definitely going to watch this.

  • http://www.avey.de Way

    Gonna watch this now. It’s a really good and interesting series.

    • http://www.avey.de Way

      Please don’t ask me for the reason of doubleposting. At my first try to add my comment the request failed and i’ve got an empty page. So sorry for that.

      It’s really worths watching all screencasts of this series because asp.net has a lot good arguments to use it ;)

  • http://www.portlandonrails.com Jason Schmidt

    .NET is a dying language. Why do you think so many .NET jobs are out there? Companies are having trouble finding people to work on their crap legacy systems. The smart developers have moved away from Microsoft.

    • http://www.jeffrey-way.com Jeffrey Way

      This statement is both ridiculous and hilarious at the same time.

      • http://www.freshclickmedia.com Shane

        I’ll go for just ridiculous. .NET isn’t a language, and it certainly isn’t legacy. Funny though that you should think that lots of jobs equates to an issue with employers finding people to do the work.

        You’re obviously a Rails fan, and that’s cool by me, but far from making an intelligent comment, you’ve just outed yourself as a technical bigot, and that says a lot more about you as a developer than one with just a preference for a particular development framework.

    • http://www.wdonline.com Jeremy McPeak
      Author

      .NET isn’t a language.

      Interesting take. Most people would see the amount of work and think there was growth in that area.

    • http://edgespan.de Alexander Trefz

      uhm, WRONG?

      .NET is going bigger and bigger with every day since 2001. And its not an language its a Framework. C# and VB.Net are the most common languages for Windows-Applications, and thx to Mono AND Microsoft its going to be standard on Mac/Linux too. Its not dying, its to be born.

      Ah, so Anders Hejlsberg(lead architect of C#) isn’t a smart developer?

      You write Bullshit.

    • Yojance

      ASP.NET is extremely powerful and programing Framework, I have used it only on small to close-to-mid-size-projects and it has saved me lots of time and efforts.

    • http://www.jeba.in tojo

      ASP.NET has grown beyond anyone’s imagination.. I work as a .NET developer. Trust me it is powerful and takes out a lot pain and makes life easier.

      .NET Framework just seem to be growing pretty fast and it won’t be wrong to call it as matured framework. C# is beautiful..

    • Ari

      Jason Schmidt :)
      Ruby, PHP, C#/ASP.NET are all platforms and tools to accomplish a task or in Business scenario it can be a Web/Desktop or even a Cloud application.
      A “smart developer” just needs a platform and tools to design the application. No matter if someone use Ruby on Rails or ASP.NET but the goal is to make i work. What’s the Joy if programmer uses advance Ruby or ASP.NET frameworks and output the bloated software?. I know some Banks have even still COBOL applications and some firms uses Pascal applications in their Business and yes as far as Legacy code is concerned, just search on amazon you will find latest books on maintaining legacy systems.
      Saying that .NET is dying or it’s a legacy system then I hope good luck for you in Software Business. No… I am not a fan of ASP.NET and at work I use Python/CGI for Web and Desktop apps.

      Neither .NET is dying nor PHP is reborn, all of these are just different cultures :)

      Ari

  • joe

    I don’t about y’all but we definitely could use some c# tutorials up in here. It being dead is funny cos as I recall the author of mono and his team are working really hard on this and there are apps for the IPHONE using mono!!! Very well Done Jeremy!

  • http://www.portlandonrails.com Jason Schmidt

    Isn’t that what comments are for? Speaking your mind. Whether someone agrees or not is what sparks the conversation? Or are comments just a tool for SEO, and spammers? (Thanks for the link juice by the way)

    I take pride in all of the work that I do, and it shows. I’ve worked with many languages, frameworks, whatever you want to call them in the 10 years that I have been in this biz. The last thing I need is Shane’s stamp of approval on my comments.

    Addressing the job postings, when you see the same companies re-posting the same ads over and over for .NET positions, that’s not a good sign.

    • http://www.freshclickmedia.com Shane

      We were both speaking our minds. Of course you’re welcome to your opinion. You don’t need my approval, but I’m welcome to my opinion too :)

    • sam

      Thats because more and more systems are being built using the .net framework dummy! And thats why .net programmer jobs are higher paid than php…lol!!!!!!

    • erik

      fat idiot

      • http://www.freshclickmedia.com Shane

        hey Erik – there’s no need for personal insults

    • Chris

      You’re entitled to speak your mind, but it won’t do for you to say something that is completely and demonstrably false. As much as I HATE .NET, ASP, C#, and almost anything that Microsoft produces (and that hatred was developed from personal experience), .NET is most certainly not going anywhere soon. There are tons of .NET jobs, which indicates that there is a need for .NET programmers. Hell, C# itself is what? 5 years old?

      There is a host of problems with everything .NET, but no.. it’s not dying.

    • No One

      Link juice? Next time, check the source… rel=”external nofollow” Ten years and you don’t know the difference between a language and a framework? You meant ten months right?

  • http://www.wdonline.com Jeremy McPeak
    Author

    I don’t understand how you think reposted jobs translates into a shrinking .NET community. Obviously they can’t find (competent) .NET programmers, but to me that shows a growing demand, thus an expanding of the platform… not a decrease.

    So with your logic, the inverse must be true: a lessening of demand means a growing community. That doesn’t make sense at all.

    • http://www.wdonline.com Jeremy McPeak
      Author

      And I need to learn to click the correct “reply” link.

  • http://rarepearldesign.com Wayne Helpard

    I am a .NET guy through and through, one who swore by everything Microsoft throughout my career. Although I am still a .NET Architect now full-time, I freelance in web design to keep my creative side flowing and since have exposed myself to lots of other languages and frameworks. Each has it’s place in a variety of projects and industries. I love CodeIgniter for example, so I am not completely biased.

    That being said, .NET is not going anywhere. I have hired .NET developers for various projects over the years and the reason they get reposted more often is because it’s hard to find really good .NET developers. PHP developers are literally a dime a dozen, no offense, it’s just the saturation out there. At least from what I’ve seen, but I am in Atlantic Canada, not the big tech markets in the states.

    • sam

      I agree, that is because lots of programmers coming from asp, vb6 and even php have jumped into .net and use the framework like it was a scripting language and as a result bring their bad programming habits..

      “Just because you can do something fast, it doesn’t make it right”

  • http://xandercs.com Alexander

    That was a great explanation of interfaces and WHY and HOW to use them. Great Tut!

    • http://www.wdonline.com Jeremy McPeak
      Author

      Thanks, Alexander!

  • kitty

    Sexy voice

    • http://www.wdonline.com Jeremy McPeak
      Author

      hahaha

      My wife tells me I have a nice voice, but I chalk that up to her being obligated to tell me that ;) Thanks =)

  • http://bloggerzbible.blogspot.com/ Bloggerzbible

    yes Alexander i agree its a great tut

  • Maddie

    Yes!! Good timing Jeremy!

    • http://www.wdonline.com Jeremy McPeak
      Author

      Hope it helps!

  • Kel

    Jeremy, that was really really well done, and if indeed of the cuff, you could have fooled me. For whatever reason, I never use the refactor tools — will start after seeing this.

    I would appreciate an in-depth exception handling tut, too. To show best practice for handling conditions exposed as stored procedure return codes all the way to the presentation tier. I like to imagine I know what I’m doing, but I haven’t watched a screencast yet that didn’t teach me something new. And this is an area I always find myself striving for perfection in.

  • http://sasa.po.gs sasa

    woohoo, nice thanks.

  • http://www.visual-blade.com Daquan Wright

    .NET has a higher barrier of entry and is more relevant for commercial use or enterprise class applications, of course there would be more PHP programmers.

    .NET requires an understanding of OOP and allows you to use multiple languages for different purposes. All of this equates into why .NET jobs pay more and why they can’t find as many developers, because it just is not easy to learn and takes longer to be good at it. I bet there is a big gap between people who just know procedural PHP and a framework for PHP, along with knowledge of functional/OOP as well. ;)

    With sites like myspace/amazon build in .NET from my understanding it would be weird for the framework to be in danger at all. The only way I would see .NET being in danger is if it wasn’t good at what it was designed to do and so far it seems to be doing it very well.

    *To the conversation above* ^_^

  • http://sonergonul.com Soner Gönül

    Wow !

    That’s great !

    Thanks !

  • http://www.erenyagdiran.com eren yagdiran

    btw it’s not asp.net :) it’s a console application written in c# but great i like it ;)

    • http://edgespan.de Alexander Trefz

      the interfaces and other things are the same in asp.net and the console/win App cause its both based on c#. u can use the code of the app and paste it in a asp.net app and it will work.(except the output)

    • http://www.wdonline.com Jeremy McPeak
      Author

      I use a console app when working solely with C# and .NET concepts that aren’t ASP.NET specific. Building and running the app to see the results is a bit faster with a console app than having to wait on VS to build the project, start up the built-in web server, and start up the browser so it can load the page.

      We’ll return to ASP.NET soon.

      • http://www.erenyagdiran.com eren yagdiran

        looking forward to watch it..you speak very clear.. so stay like this.

  • http://www.jordanwalker.net/index.php Jordan Walker

    Have to save this one for later.

  • Brian Reindel

    Jeffrey, would you be interested in a Java/JSP tutorial from scratch using Eclipse? I’ve noticed that .NET has received some interest here, and I wonder if an introduction to the Java world would do just as well. I sent an email a few weeks back, but heard no response.

  • http://www.51eo.com move

    Good….

  • http://edgespan.de Alexander Trefz

    The Automatic Properties are a Feature of C#3 but not of .NET 3.5, what means: u can use them with a targeting of .Net 2 but only in VS 2008 (because it has the C# 3 compiler) and higher. ;D

    Greets

    • http://www.wdonline.com Jeremy McPeak
      Author

      Thanks for clearing that up, Alexander.

  • pnr

    Wohoo! Thanks, I was waiting for this one!

  • eric

    All,

    I work for a fortune 50 company and I can tell you that 90% of the corporate intranet sites run on IIS or Java. Infact unless someone installs a wiki on a UNIX box I hardly see .php anywhere. I am doing my part to change this, but unless you all just want to spend your time creating Blog websites for a pittance you should not po-po .net. Somewhere there is a Sr. executive in a large company out there who is salivating to get their teams running on a share point server.

    • http://www.wdonline.com Jeremy McPeak
      Author

      In one of my responses to Jason Schmidt, I was going to mention that .NET isn’t anywhere near dying simply because companies choose .NET based on the fact it incorporates itself into their Microsoft-established network and apps.

      Your mention of SharePoint is a perfect example. If a company using Office as its productivity suite wants an Intranet based on sharing documents, schedules, etc, SharePoint is the logical choice since it integrates very nicely with Office and a Microsoft domain network. If a company wants to extend SharePoint and tailor it to their needs, it can easily be done with .NET. So here you have a variety of solutions all offered by one company that integrate near-seamlessly. If anyone wants to get into the real-world and start writing apps as their livelihood, .NET is the platform to start learning. It can be used in virtually any company running Microsoft products, and enable the employees to be more productive. There isn’t another programming platform, with the exception of Java to some extent, that can do that, and it won’t change until Microsoft does because there is absolutely no competition in the business segment.

  • http://spotdex.com/ David Moreen

    When I started to do a little bit of ASP, for my schools website. All of the things looked so complicated. PHP is just to straight forward and simple, it blows ASP out of the water.

    • http://spotdex.com/ David Moreen

      But being open minded, I’ll check this stuff out, cuz it’s good information to have in the back of my mind.

    • http://www.wdonline.com Jeremy McPeak
      Author

      There’s no doubt PHP’s simplicity and straight-forwardness is a huge factor in it’s popularity. There are many times I wish .NET was just as straight-forward, but all-in-all I’m glad I made the switch all those years ago. I wouldn’t be where I am today professionally if I hadn’t.

    • Jason Offutt

      Also, just to clarify…

      ASP != ASP.NET. They are two *completely* different animals. Just thought I’d throw that out there, since I see a lot of folks lump them together who aren’t very familiar with the Microsoft stack.

  • Jeff

    Fairly good tutorial in the subject. And I don’t want to nitpick but the capital “I” in the class name isn’t what defines the class as an interface it is the interface keyword. You can name your class anything, but if you want to maintain a common naming scheme with the framework the “I” is what they use.

    Also, a tutorial about interfaces would have been the perfect time to also discuss abstract classes. Since it also plays a big part in the inheritance chain and I think would be a natural next topic.

    Anyway I am glad to see these series here.

    • http://www.wdonline.com Jeremy McPeak
      Author

      I don’t think I implied the capital “I” in an interface’s name is what makes it an interface. I didn’t explicitly say “you have to use the interface keyword”, but we’re far enough along in the series that it can be inferred that the use of the interface keyword is required to define an interface. I should have explained that by convention, all interfaces start with a capital “I”. And not to nitpick, a class isn’t an interface =)

      I thought about going into abstract classes, but I decided it wasn’t that important of a topic considering of where I wanted to get to. Abstract classes are an easy concept to grasp when you understand class design and inheritance. Abstract classes are just like regular class, except you can’t directly create an instance of an abstract class. They can also contain just method and property declarations (like interfaces), but its not a requirement.

      • Jeff

        I thought I heard you say, “The capital “I” here is what tells us it’s an interface” or something like that. Anyhow it was just a nitpicking thing were I thought some beginners could get confused.

        I hadn’t watched the other series so I can’t attest to what you have covered or were you are wanting to go with it. I made the assumption from this screencast that you were trying to cover the language itself. So I mentioned the whole abstract class thing. But if doesn’t really play a part in were you are wanting to go, than no big deal.

        Also, I find that beginners have a harder time grasping abstract classes than they do interfaces. But that is just me.

        Again, I am just glad to see that the .net framework isn’t getting completely ignored.

  • http://mokshasolutions.com Moksha

    thanks tuts team and Jeremy McPeak for posting asp.net tutorial.

    they are very basic tutorial, but I will follow it, please also make some advance tutorials in between and keep this basic series going side by side

    thanks again

  • jeraldo

    im looking forward for more asp.net vids on this site. thanks.

  • Good01man

    The education ended only with explaining the codes. If it was a little more visual it would be more tutorial.”Jway” is good in this regard. Why am I saying these?Because my English is not enough to understand in this way. Excuse me for my reaction.

  • Miguel

    Thanks for lesson

  • Chris

    Good take on OOP.

    I especially liked section on Interfaces. Kinda pointing to polymorphism concept in OO.

    Great Work… Looking forward fro more juice.

  • Hobbyist

    I found this tutorial really dull. It reminds me of school. People want real world scenarios, hands on. Who care abouts cars? I know that you are trying to make a point but it just makes me want to sleep. I honestly can’t follow this monotone way of teaching a point. The stereotype about those who can’t do teach is fulfilled with this video. Judging by some of the video posts on here I would hesitate before commiting to a monthly subscription. Not trying to be malicious but this is how I felt when I watched the video.

    PS: I don’t plan on coming back to check any follow up comments so don’t bother, just typed this in hopes that the quality of the people posting videos improve.

  • T

    Great stuff and plan to keep checking these out as you put more up!

  • Nick

    Great tut man! And thanks for a perfect and easy to comprehend explanation of interfaces!
    Can’t wait for the ADO.net tut!

  • michael

    waiting for ASP.NET from Scratch: Lesson 4 on ADO.net tut!

  • Gil

    I’m really looking forward for the forth lesson. Any insight of when it will be available?

  • Giri

    Great Work man!!! Helps a lot in understanding ASP….Keep up the gud work!!!