Diving Into .NET Web Development

Advertisement

Many people think of PHP, Ruby on Rails or Python and Django when choosing a language to create a new website or when choosing a language to learn to get that exciting new job. .NET, however, seems to occupy a space somewhat apart from this playground of cool kids. It’s always the last to be picked for team sports; it was shouting “Wassup!” at parties well after 2000; and it has been just plain left out in the cold.

I’m not one of these people. In fact, I’m quite a fan of .NET and have found it great to develop with since moving away from PHP in the early days of my career. With its great tools, large community and broad applicability (mobile, Xbox, desktop and Web) it’s both powerful and fun.

Let’s be honest, though. I’m probably already playing devil’s advocate. So, let’s see if I can convince you, a seasoned non-.NET developer, to try it out.

If you’re already a .NET developer, you might still find something new in the code sample, so I urge you to take a look.

.NET?

Let’s be clear on what we mean by .NET, as opposed to IIS (which is a Windows Web server), C# (one of the .NET languages) and ASP Classic (the previous interpreted ASP from back in the day). First, the decision to become a .NET developer is not necessarily a choice of language. Although the majority of developers out there work with C# and most jobs are for C#, you can also code using the .NET framework in Visual Basic (VB), F#, IronRuby, IronPython and others, taking advantage of the same base libraries. Admittedly, paid work for ASP.NET is mainly done with C# and VB. For fun, though, and to show how many options you have when developing on the .NET platform, the code sample below will include some of the more obscure methods of rendering a Web page using .NET.

So by “.NET,” we really mean the Common Language Runtime (CLR) (and/or the Dynamic Language Runtime for Iron* languages), which is essentially the virtual machine that the various languages accompanied by the base class libraries can run on. Frameworks are then built on top of that for Windows, Xbox, mobile and Web.

What Does This Mean?

Knowing that .NET is a runtime, we can infer that it is not inherently tied to a particular platform. Of course, the Microsoft CLR is the most common, but Mono is an open-source implementation that runs on Mac and Linux. The mono project also provides us with mod_mono (Apache), monotouch (iPhone) and monodroid (Android) as alternate platforms on which to run our C# code.

To differentiate it further, unlike scripting, interpreted per request languages such as classic ASP and PHP, C# is compiled. This means you don’t have to worry about including files or following naming conventions and folder structures to ensure auto class loading, nor do you have to rely on modules or add-ons to provide such things as RAM-based caching. In fact, the integration goes deeper, allowing you to write modules for IIS (which is the Web server itself) in C#.

So, if you take the time to get to grips with .NET, you can take advantage of these ancillary benefits. Maybe make a game for Windows or Xbox using XNA, or make a app for Windows Phone 7 or Surface. Not to say that every .NET developer is doing these things, but by knowing C# and the wider .NET world, you can very easily jump around the ecosystem trying them out, all using the same tools and core languages and all rounding you out well as a developer.

To see examples of .NET in the wild, take a look at Stack Overflow, Wired.co.uk, GoDaddy, aspects of the Sims and Unity 3. It’s not just for big enterprise B2Bs or people who are still running IE 6. And you can work with commercial products beyond just EPiServer and Kentico. The mono projects mentioned above are open source; and so, too, are a plethora of apps (e.g. Umbraco) and libraries (often found via the NuGet package manager).

Before we get too much into advertising territory, let’s be realistic. Plenty of negative opinions about .NET are out there. Some of these are myths, some are problems that have been addressed, and some are genuine problems that you’ll have to balance against the pros.

Tools

Most people have heard of Visual Studio. It’s pretty awesome. Yes, you do have to pay for it, but you can also get a free version. In fact, you can get it pretty easily using the Web Platform Installer, which will also install the IIS Express Web server and a SQL Server Express database if needed. (“Express” means “small-scale” and “free” in the world of Microsoft.)

If you want the full versions but don’t want to pay, then consider applying to Microsoft BizSpark (or, if you’re a student, DreamSpark). You’ll get access to the Microsoft stack for free for three years (after which, your business will be thriving and you can pay for it, or else it’s not and you’ll pay a $100 exit fee graduate). But to be honest, you probably won’t need it, particularly in the early days or if you’re a hobbyist.

Of course, these are all Windows tools. If you’re not on Windows, then you might opt for Mono Develop.

You could even go half and half: running VS as your IDE, coding in C#, but connecting to a MySQL or Postgres database. Nothing stops you, and support is available. This will even save you from having to consider the cost of production SQL server licenses.

Servers And Hosting

The Microsoft tax comes back to bite us here. But it doesn’t amount to a huge difference in cost. For example, for a VPS with the UK hosting provider Memset, a Windows box is £4 per month more than a Linux one. And the Microsoft website lists other hosts. Of course, you could go with Linux hosting, get yourself a VPS and configure mod_mono for your website.

What will hurt your wallet is licensing standard editions of SQL server. With this, you’ll have to balance the pros and cons of tight integration with the rest of the Microsoft ecosystem. You may, for example, go with the half-and-half approach to save on costs if you aren’t eligible for licensing discounts or if you are not happy with the restrictions put on SQL Express (such as the number of processors, RAM, etc).

A Brief Interlude

Is Mono Really an Option?

Mono has been around for a long time, but Microsoft doesn’t support it in the same way that it supports its own platform. Additionally it is usually slightly behind the C# developments coming out of Microsoft because the team has to catch up. The Mono website lists the areas of compatibility between the two. As you can see, the amount of coverage is large.

Finding shared hosts that provide for Mono might be hard, so you could find yourself configuring it on a VPS manually.

Actual Coding?

This is where we really get into some of the myths surrounding .NET. In my experience, many Web developers have a very negative perception it:

  • Bloated markup,
  • Lack of control over element IDs,
  • Large base 64-encoded form elements,
  • One form to rule them all,
  • An odd paradigm that mirrors Windows development.

However, many of these issues actually apply to ASP.NET Web forms, which, although joined only recently by ASP.NET MVC (and even more recently by the Web API in MVC4), was never the only platform for serving Web pages using the ASP.NET base libraries. Not only are there mini frameworks out there, but you could use “Web forms” and just implement some of your HTML output and templates in another way; for example, with XSLT. Or you could even stick with Web forms but use libraries, such as the CSS control adapters, or restrict yourself to repeaters as opposed to grid views, etc. In fact, with the relatively recent additions to WebForms, we are seeing efforts to address these markup concerns.

This may not mean a lot to you if you haven’t used those systems, and I don’t want to get into it too much. The bloated markup was a sign of over-reliance on “controls”, where the final HTML was effectively hidden from the developer, and extras such as viewstate were added to mask the stateless nature of the Web. The paradigm itself was quite different from “normal Web development,” with a very desktop-style event-based approach: server-side button_click events, etc. This was useful for Windows developers who were migrating, but it often made Web developers, including me, balk.

The demo below uses an ASP.NET MVC project, but be aware that some of those old prejudices against using the Microsoft stack could be a more narrow dislike of old Web forms, rather than of C# or .NET generally.

Finally, The Example

Rather than patronize you with a step-by-step guide to installing tools using a GUI (the Web platform installer), I’ve created a sample project that you can access via GitHub. There is no data access (that topic could cover a whole series of articles). The aim is to give you a taste of ASP.NET pages, to show your range of options, and to provide a look at the code layout and tools so that you can try things out for yourself.

Tooling Up Your Development Machine

The easiest way is to get your hands on the following:

  • Windows
  • The Web platform installer
    • Install “Visual Web Developer 2010 Express” or a Visual Studio 2010 trial (note that there are different Expresses, such as an Express for Phone).
    • Install “ASP.NET MVC 3 (Visual Studio 2010).”
  • If you want to run the IronPython demo, then you will also need to install IronPython
  • If you want to play with the F# examples (and you are using Express, rather than a trial or standard edition Visual Studio), then you will need these:

Pull the project from the demo page and open it in your newly installed Visual Studio IDE. You should see something like this:

Screenshot of the demo project open in Visual Studio Web Developer Express
The DotNetDev project in Visual Web Developer Express

Screenshot of the demo project open in Visual Studio Standard
The DotNetDev project open in Visual Studio Standard

The only difference between the two is that I’ve used a feature of the paid for Visual Studio to add “Solution” folders for readability.

If you want to see the demo code running, I’ve put a copy of it on my server. As you’ll see, the demo pages include additional notes and highlighted code sections to explain the inner workings.


DotNetDev C# MVC example running in Chrome

Although the code looks like a lot here, the examples are extremely simple. In fact, each Web project simply outputs a classic “Hello world” phrase. However, each project uses either a different language or framework for the task. Hopefully, this should give you some insight into the options available to you.

If you want to immediately run any of the examples, simply right-click on the project that you want to run and choose Debug → Start new instance. Visual Studio will launch the website in your default browser, powering the code with the built-in Web server that comes bundled with Visual Studio (you will also see this little server running in your system tray).

Notes On The Examples

ASP.NET MVC C# and VB (Two Separate Projects)

These two projects show the most well-known and most used methods of website creation in the .NET framework.

The following are the two key areas in the non-database-driven ASP.NET MVC (C# code shown):

1. Routes (Global.asax)

routes.MapRoute(
		"Default", // Route name
		"{controller}/{action}/{id}", // URL with parameters
		new { controller = "Message", action = "Index", id = UrlParameter.Optional } // Parameter defaults
	);

This is the initial entry point of the website. With some simple pattern matching of URL strings, we can transpose a request to an instance of a controller and an action method upon that controller. Additional parameters relate directly to those required by the method. For example, {controller}/{action}/{id} will work for /messages/edit/1 (i.e. message controller → edit action → sending 1 as the ID parameter to the method) or products/index (i.e. products controller → index action).

2. Controllers (MessageController.cs)

public class MessageController : Controller
    {
        public ActionResult Index()
        {
            return View(new Message { Text = "Hello C# ASP.NET MVC World!" });
        }
    }

The MessageController is an IController class instantiated by the ASP.NET engine per request when the above route is matched. A method matching the action name will be called.

3. View Models (Message.cs)

public class Message
    {
        public string Text { get; set; }
    }

Although passing data to a view via a dictionary (the ViewBag) is possible, it is generally considered a better practice to package up the data that is required by a particular view into a “View Model,” used as a transfer object between the model and template.

4. Views (index.cshtml)

@model Message

<h2>Dot Net Dev</h2>

@Model.Text

The templating engine used in these examples is known as Razor. The approach of Razor is to have minimal impact on the code. The @ symbol is used to denote the beginning of code. If followed by a view model variable, it will be outputted to the HTML.

F#

open System
open System.Web.Mvc

open DotNetDev.Mvc.FSharp.ViewModels

[<HandleError>]
type MessageController() =
  inherit Controller()

  member x.Index() =
    x.ViewData.Model <- new Message "Hello F# ASP.NET MVC World!"
    x.View()

The F# example shows a slightly different take on the .NET framework. In this case, the functional F# language (often used in the financial sector) is used to define the routes, controllers and models in a class library project. To be fair, the example used here is simple enough (as is my knowledge of F#) that the code is still reasonably imperative.

Also, note that the F# example shows how F# and C# can be used together, allowing you to, if appropriate and useful, use libraries of each in the other.

One point to note if you are trying to run this example via Web Developer Express is that F# library projects are not supported. However, you can use the also free VS2010 Shell and F# CTP to view the source, compile it and then run the Web project (DotNetDev.Mvc.FSharp.Web) from Express itself using that compiled library.

IronPython

class MessageController(Controller) :
    def __init__(self):
        self.ActionInvoker = DynamicActionInvoker(self)
    def Index(self):
        return self.View("index", Message("Hello IronPython ASP.NET MVC World!"))

The IronPython example shows how the DLR can be used to execute Python code from within a .NET application. The PythonControllers.py file contains all of the Python code needed to do this. Again, as with F#, multiple languages can work together in a .NET project.

Experienced .NET developers might be interested to look at the implementation of the DynamicActionInvoker that I’m using, which allows the use of dynamic controllers to serve the request (where traditional reflection to find the controller method would fail).

C# Using the Nancy Framework

The final example shows that we don’t need to use Microsoft’s framework(s) to render a website using C#. Here, I’m using the minimalist Nancy framework (inspired by Ruby’s Sinatra), one of a number of open-source .NET Web frameworks.

Almost all of the Nancy example is contained within the following code snippet:

public MessageModule()
	: base("/")
{
	Get["/"] = x =>
	{
		dynamic model = new Message { Text = "Hello Nancy World!" };
		return View["message_index.cshtml", model];
	};
}

Here, we can see the route pattern being defined and matched to a method in the same line, using a C# lambda (or inline anonymous function) assigned to a dictionary in the message module. This means that when a GET request comes in for /, the function body gets executed, and all it does is create a Message model, assign it to a dynamic variable and return it with the view’s name.

An Aside

The Nancy example also shows another useful feature of .NET. If you are used to tools such as PEAR, then you will be aware of the concept of package management. Essentially, using [project] right click → Manage NuGet Packages from Visual Studio, you will be able to search online through a myriad of open-source and free libraries to use in your projects. In this case, I’ve used Andreas Hakansson et al’s Nancy Web framework.

Some Context (Headscape)

This article has been a bit of a whistle stop tour through the .NET ecosystem. The intention was to ground experienced developers in what .NET is about, at least from my perspective, enticing you to make small changes to the sample code to see how you fare. Although I’m not suggesting that you make your controllers in IronPython or F#, hopefully I’ve shown how easily these languages can be used in a .NET project, whether it be to reuse some existing logic or to take a more dynamic or functional approach to an aspect of your work. It should also now be clear that .NET is embracing open source. Not only do some of its own offerings carry open-source licenses, but the default MVC project includes jQuery and Modernizr, and people are contributing frameworks and applications.

To give some context to all of this, I work as the lead back-end developer at Headscape, a design and development agency in the south of England. Although I wouldn’t identify ourselves as a “.NET house,” we do use it extensively, having grown from using ASP Classic to using the technologies that Microsoft grew it into. We even started out using the free Express editions of the tools. Our projects over time have been created in Web forms, VB and C#, but we do not shy away from using other technologies. We also use WordPress, Magento and other non-.NET projects. Playing around in the .NET ecosystem, however, has enabled me to have a go at XNA game development, to play with Python in a framework that I already know, and to look into mobile development in my downtime.

Please do run the code, play with it, check out the full demo (with additional notes on how this stuff all works), and let me know what you think.

Resources

(al) (km) (jc)

↑ Back to top

Craig Rowe is a front / back-end web developer and Tech Lead for headscape.co.uk, a UK based web design and development agency. By night he also writes on his blog at cargowire.net as well as being a mobile and game dev hobbyist.

  1. 1

    Really useful article. Nice intro into .NET web dev.

    0
    • 2

      Stephan Coertzen

      July 5, 2012 1:39 am

      You don’t need SQL Server necessarily if you want to host your site in mod_mono. I’ve got a working ASP.Net web site running on mono using mysql as database backend with my own custom ORM.

      0
  2. 3

    Fabricio Martínez Tamayo

    July 4, 2012 1:55 am

    I have a sample project for people who need a strong architecture for complex/big projects. Its open source and can be downloaded from https://github.com/fabriciomrtnz/FNHMVC

    It includes the following techs:
    Windows Azure SDK 1.6, ASP.NET MVC 4, ASP.NET Web API, NHibernate 3.2, Fluent NHibernate 2.1, Autofac 2.6.1

    I use the following design patterns:
    Model-View-Controller with ASP.NET MVC, Object-relational mapping with NHibernate, Dependency Injection with Autofac, Domain Driven Design,
    Command Query Responsibility Separation with Commands, Command Handlers & Command Dispatcher, Repository pattern Unit of work pattern,

    I will be updating the project soon to include Selenium Webdrive Unit Test.

    -Cheers,
    Fabricio

    0
  3. 4

    As a .net dev, I can honestly say I didn’t know about a good chunk of all of this. .Net’s come a long way, and I’ve not even noticed! Really informative, thank you.

    0
    • 5

      I run into that same issue, particularly now that I manage more than I code. The short summaries/intros are a good refresher to point out what I’ve been missing in the gaps.

      0
  4. 6

    This artical is both confusing and vague. You use way too many jargon words and never actually get to why anyone would forgo the ease and cheapness of php for .net; other than creating for windows phone and Xbox.

    The example… Um wth, could it be anymore complicated?

    0
    • 7

      “The example… Um wth, could it be anymore complicated?”

      What did you expect? It’s build with MS-Technology :>

      Nah, for being serious, i think this is an interesting article but i’m a bit curious why the author moved away from php to a proprietary system.

      0
    • 8

      Hi Cam,

      Sorry about that. While writing it I was trying to balance the audience so that there was something for say an experienced PHP or Ruby developer (who’s not used .NET) as well as something for .NET dev’s who maybe haven’t explored the ecosystem to it’s full.

      Have you checked out the running code sample up at http://stuff.cargowire.net/dotnetdev/DotNetDev.Mvc.CSharp.Web/ These felt like a better way of explaining how the code worked rather than too much long form text about them.

      In terms of foregoing the ease and cheapness of PHP I’m not saying you should suddenly drop all PHP and rush to the saviour of .NET but was more trying to indicate that .NET is also moving to a more open approach and the skills you learn within it are applicable to more than just an old Enterprise .NET WebForms application.

      0
    • 9

      I have to agree with Cam.

      I worked with ASP daily for the last 13-14 years and always hear about .NET but it’s just to complicated and I can’t see any benefits with it. Your article didn’t help :-/

      0
      • 10

        I think if you are working with a large existing Classic ASP site it may be hard for business reasons to go for a rewrite. However I think the lack of ongoing development of Classic ASP from Microsoft and others would be off putting. Both in terms of the tools and frameworks available – setting aside the potential benefits of being able to use the same dev environment for windows, console apps/services, mobiles and websites.

        0
      • 11

        .Net requires a certain shift in thinking when developing, compared to classic ASP. ASP mixes alot of the code and markup, kindof like in PHP. Not that you can’t get a well structured site but it is more dificult, especially for large apps or sites.

        .NET brings a strong, object-oriented programming framework that crosses diferent platforms, allowing better reuse of components. You can create alot of diferent “projects” (compontents, libraries, apps, sites..) and reuse your code. So for instance, you can create a simple project (library) that has a bunch of classes that describe whatever domain your working on (let’s say, a shop, for instance). the project with classes get compiled into a dll file, that you can use in other projects.

        You then might want to create another project (library) with a set of classes that manage access to the database and do your CRUD, using the classes in the first library for support. Those will get you a second dll. Next you might want to use those libraries in your project’s website, and reuse them in some console apps that run on the server to handle some tasks, or even create a desktop-like app or Xbox app to do something else.

        For the web, you also get options on to what you wan’t to build with its own conventions. WebForms are great, especially if you’re coming from windowed app programing since it has a similar event model; Asp.Net MVC get’s you a modern web programming framework, that’s great for sites. And Web API, WCF and WebServices allow for service oriented apps.

        Also, let’s say you choose one language (C#), you can program all these types of projects using that same language.

        It does require a shift in approach, but in the end, it works really well.

        0
      • 12

        The biggest source of confusion it seems, even for people who use the technology, is the distinction between “.NET”, a framework that is agnostic of the platform (web, windows, mobile) on which it runs, and “ASP.NET WebForms”, which is just one of many ways to use the .NET framework as the back end of a web site.

        .NET gets a bad rap as a web platform because of WebForms. WebForms deserves a bad rap: it’s awful. Don’t let that bad decision by microsoft turn you off from .NET, though. C# is a brilliant language, and the .NET framework is a joy to use. Just try to separate that notion- programming in a language against a framework – from the actual web platform. Because they are totally different things. The only thing that was bad about developing web sites with MS was the WebForms architecture.

        There is no longer any reason to use that. There hasn’t been for years. MVC is entering its 5th year, I believe. NancyFX is an increasingly popular community-supported framework that works on Mono too. Beyond that, it’s easier than ever to “roll your own” by picking and choosing your favorite parts. The components that make up a web framework – API management, markup processing, ORMs, and so on, are modular. MVC is open source. You can quite easily use your favorite parts of Microsoft’s offerings in conjunction with any other tools you want. Heck, MS has even actively embraced open-source tools as the defaults in MVC: jQuery, Knockout, Ninject all come preloaded with a new MVC4 project. But you can just switch them for anything else you want.

        .NET is a framework. It’s a bunch of components. There used to not be many alternatives for running a web site on top of .NET other than webforms. That is now ancient history.

        0
    • 13

      Fabricio Martínez Tamayo

      July 4, 2012 3:34 am

      Answer is simple. First .NET MVC is really quick (its compiled) and second Visual Studio. Since everything needs to compiled, programming and debugging is quite simple not the pain in the ass it is with PHP. Also, cloud support is also relatively simple.

      0
    • 14

      One big difference between .NET and PHP is that .NET offers several different ways to build web applications, all using the same framework. For example you can build web applications in WebForms, MVC or WebPages. WebPages is by far the easiest to grasp and has a flow and structure that resembles quite well to PHP.

      The good thing is all techniques share the same underlying Framework (which is REALLY complete and well documented) so it’s easy to move between these patterns after you’ve learned it.

      Discussing weather or not one prefer a compiled or an interpreted language is useless as it is a matter of taste, however as Fabricio stated, compiled languages have their benefits in terms of syntactic and semantic validation as well as built in debuggers for following your code’s execution.

      Microsoft has also come a long way in terms of being open, for example they open-sourced the entire code for the .NET MVC platform which is now availble at CodePlex for community members to participate in.

      0
      • 15

        While it’s true that there are many different ways to build web applications in .NET (as hopefully I’ve also shown in my article and code samples). It’s hard to say that also isn’t an attribute of PHP (Zend, Cake, CodeIgniter etc – if you consider PHP as the underlying framework).

        One of the big things I was trying to get across in this article was the breadth of options and the recent open source changes (as well as the ongoing open source community making things like Nancy) so thanks for also mentionning it!

        0
        • 16

          I partially agree with you. There are a lot of third-party frameworks available for PHP like you mention but a big difference is that since they are not actually a part of the PHP platform they don’t neccessarily follow updates in the underlying core. CodeIgniter for example, which I really like, was running on PHP4 far longer than their competitors and when they upgraded to PHP5 a lot of syntatic things were changed as they rewrote quite much to utilize the features of PHP5.

          Of course, a benefit from using a more “commercial” platform is often that backwards-compability is regarded a bit higher since otherwise you end up with a huge amount of support on your hands :)

          Anyways, there are quite a lot of options for both PHP and .NET nowadays and both platforms are really mature, so I’m not at all trying to talk down on PHP.

          And I’d really like some more interesting articles on .NET, so keep up the good work!

          0
    • 17

      Chris Demetriad

      July 4, 2012 2:28 pm

      Extremely confusing for me too, being just an average web developer. Might be the fact my skills and knowledge are limited, and the article seems to be very well written and documented and I am pretty sure the author went the extra mile to provide a quality piece.

      Clicked nervously on the title while on the tube and got disappointing after 5 minutes realising I don’t really understand much of it, actually got lost where “runtime” was mentioned for quite a few times and honestly, I am now “scared” of .NET and will probably avoid it in the future.

      I hope you will use the constructive critique and don’t take it too personally. You seem to be a good professional that knows his stuff.

      0
      • 18

        Mikhail Tsennykh

        July 16, 2012 1:20 pm

        The best way to check out .NET world, is to check out latest MVC framework (it’s done by Microsoft, but is fully open source now), by watching simple intro videos and tutorials here:
        http://www.asp.net/mvc/overview

        I promise it’s not that confusing at all. In fact core concepts behind MVC are so simple, that if you already know html, css, javascript/jquery, it shouldn’t be hard at all.

        Unlike moraly extinct classic ASP, and bulky (also somewhat extinct) WebForms for .NET (most people will complain about those anyway), MVC reqires much less code to accomplish simple tasks, works much faster and outputs clean lean HTML (unlike WebForms). MVC is like a God’s blessning for those of us, who ever used previous frameworks.

        Btw, it was a pleasant surprise to meet someone interested in .NET on Smashing Magazine. Didn’t expect that. :)

        0
  5. 19

    is this is a multipart series?

    It’s a bit confusing ;)

    0
    • 20

      Would you like it to be or are you saying ‘please no.. no more of this’.. ;)

      0
      • 21

        Not like that craig, its a great read but it’s a bit tough to understand about .NET for the beginners if they read these, reading these broad things they will be afraid to dive because they think they will drown ;)

        I ask multi-part because, like these some novice to ninja series in .NET is in the Queue or not. :)

        0
  6. 22

    Excellent article, reflects my sentiments entirely.

    Worth noting that you’re not bound to SQL Server by any means, we’ve done recent projects using SQL Server, MySQL, MongoDB and others. Each have well supported and maintained drivers which fit seamlessly into the .net stack.

    The latest Azure stuff is also seemingly worth a look for anyone opening their minds to the .net world :)

    0
  7. 23

    Having worked with .NET for the past ten years I found the article maybe a bit too broad to appeal to people who don’t actually know .NET already. An article focusing on just .NET MVC or even ASP.NET WebPages which resembles PHP more might be a good idea. Anyways I’m delighted to actually find anything about .NET here on Smashing Magazine :)

    I’m also working on an open-source cms-framework for .NET MVC / ASP.NET WebPages called Piranha (piranhacms.org) which will have it’s first official release by the end of this week. Be sure to check that out as well if you’re interested in .NET web development.

    Thanks!

    0
    • 24

      Fabricio Martínez Tamayo

      July 4, 2012 4:27 am

      Looks good. Great job!

      0
    • 26

      Having recently switched jobs from a PHP shop to a .NET shop, I’m also really happy to see a .NET article on Smashing! As a front-end developer, I’m not trying to master C#, but I felt the article was a solid intro. I still have a hard time understanding the differences between WebForms, MVC, etc, so an article breaking those down would be great.

      0
  8. 27

    Yeah, still using PHP.

    0
  9. 28

    How does this actually compare to something like Python using Django?

    0
  10. 29

    Daniel Sevitti

    July 4, 2012 6:02 am

    I think a mention of the entity framework and linq to sql is warranted here as well.. They are awesome features of the .Net framework and one of the major reasons I still develop using .Net.

    0
    • 30

      Fabricio Martínez Tamayo

      July 4, 2012 9:17 am

      I dont recommend EF at all unless you need something really basic and quick. I do recommend NHibernate with Fluent NHibernate.

      0
      • 31

        Have you looked at EF4 Code First and it’s fluent mapping API? From a syntax point-of-view it’s almost identical to Fluent NHibernate.

        0
        • 32

          The migrations stuff alongside EF is also pretty sweet

          0
        • 33

          Fabricio Martínez Tamayo

          July 4, 2012 1:44 pm

          Problem about EF is you don’t hate it until you start using it and see its problems and limitations.

          0
          • 34

            I’m going to have to agree with Hakan. EF got a lot of flak in it’s early days (I know I was one of the ones bashing it) but I’m loving it using the Fluent API and code first techniques.

            0
  11. 35

    This is a good article, full of useful detail.

    I’ve been working on ASP.NET web controls recently, because that’s the platform I had to use to extend a third party web application. It took me back to the days when I programmed with a 4GL on a 80 by 25 green screen. The built in stuff would almost do what you want, but you had to tweak it by writing your own code in event handlers, and they didn’t always fire when you wanted them to, or you had to work around the order they fired in.

    It’s been quite frustrating, because things don’t Just Work, you have to write a whole lot of extra code to, say, put a dropdown in a grid, or even to edit and save a row. It’s good to know other ways of using ASP.NET, I just learnt what I had to to get the job done. MVC looks nice, but unfortunately I don’t have that platform choice…

    0
  12. 36

    Nice article!
    I would say though that you certainly don’t need a VPS to host .net applications. My web host supports asp.net 4.0 and as long as I don’t want to buy a MSSQL database (I can use mySQL) it doesn’t cost any more than “standard” hosting. (£2.49p/m – hosutu.com)

    (I am not affiliated with them but just thought I should bring this up, as cost is often a factor when not choosing asp.net – I know it was for me!)

    Personally I like the feeling of working with asp.net (C# in particular) and although I am learning every day the help found on the net is pretty damn good!

    0
  13. 37

    As with any language worth its weight, it really comes down to the developer’s preference. I use ColdFusion, and it’s tag-based syntax hides its very powerful capabilities.

    .NET is more of an intimidating language to pickup since its syntax isn’t like PHP, which shares a similar format to Javascript (as does ColdFusion’s CFScript), but for many it’s exactly the server side language they’re looking for.

    I have a chip on my shoulder with .NET applications simply because I’m a bit of an organization nazi, and each and everytime we install a .NET application onto the server, it propagates this aspnet_client folder into each and every folder throughout the entire webserver, across different site directories; as long as IIS sees those folders, it puts that damned ‘aspnet_client’ folder in it. And at each directory level! If I have /presentation/images/gui, there are 4 different aspnet_client folders at EACH directory.

    It’s been frustrating and has soured me to .NET, but I’m nearing the point where I’m just going to drop $260, call Microsoft and see if they can’t do something to stop this needless disorganization.

    0
    • 38

      “.NET is more of an intimidating language to pickup since its syntax isn’t like PHP, which shares a similar format to Javascript”

      I have to disagree on this one. If you want similarity with the Javascript syntax, then go and try C#. For example:

      private int Foo()
      {
      var a = 10;
      var b = 20;
      return (a+b);
      }

      I’m not saying that all the syntax it’s exactly the same… but you can’t say its not similar.
      I don’t think I can explain it better :)

      0
  14. 39

    Let’s face it. Most of the negative response is from MS haters. That simple. Most developers fall in love with a certain language and tend to “marry” it. The responses on this article seem to prove that true. People seem to have a really hard time letting go of classis ASP or WebForms (which both really sucked), but like life; things change and ASP.NET MVC is here and pretty strong. I’m pretty sure this article was constructed to inform, and maybe convince you to give it a spin (meaning play with it a bit/give it a try). Not list all the reasons why your lang of choice is better in your “opinion” (which seems to be based on reasons from 5 or 10+ years ago).

    For those of you stuck working with classic ASP or WebForms (which again SUCK) then i’m sorry and maybe i’ll say and short prayer for you. Either way it seems to be your job (or a gig you picked up), so deal. If you don’t like that option then go find a new job or gig that isn’t stuck in the early 2000′s, and allows you to move into the current age. If you spend to much time with jobs like those you might become as obsolete as the technologies you are forced to use.

    This is coming from someone that uses both PHP, and .NET. Rid yourself of the ego, and stay open minded. You never know where the winds of change might push you.

    theusg.me/

    0
  15. 40

    The negative points you went over don’t apply for all of .NET web development. They really only apply to ASP.NET WebForms development. Which, most people aren’t really using now-a-days. Most are using the more modern, favored, ASP.NET MVC framework. This gives you full control of your markup and has no large 64-bit encoded viewstate. It tightly models to other MVC web frameworks like Rails and Django.

    0
    • 41

      I think if you’d find that most ASP.NET development is done in WebForms. Yes, MVC is here and it’s great but you can’t throw out all of the currently running applications that businesses won’t spend the money to upgrade.

      0
  16. 42

    Yeah, I love .NET! I’m still a drupal developer and I wrote a couple sites in CodeIgniter, and I enjoy it, but given the chance for any large custom project I’d rather use .NET MVC a zillion times over than even glance at writing something in PHP again. #1 reason? Visual studio. It blows away any other development environment I’ve ever tried. The integration is soo nice and saves me so much time.

    Did I mention how much I love c#? Lambdas, linq, interfaces, generics, extension methods…the only thing I’m really jealous of is mixins, darn ruby folks. Plus the new async model with .NET 4.5/win8 is super neat, to say the least.

    WCF is an amazing technology that could use more press here, as well as asp.net webmethods. Both allow for super fast development of service oriented architectures, although webmethods is focused on…web development.

    I sound like a super fanboy right now but that’s okay. With MVC, Razor, ko.js and Entity Framework I can have a data-driven custom site up and running with functionality and unit tests in a half hour.

    @Paul Morriss I’ve never liked user controls and web forms either. Protip: If you have a lot of legacy code, but would like to move to mvc, you can mix/match! Both run on asp.net, both will co-exist peacefully with a bit of routing. http://www.hanselman.com/blog/IntegratingASPNETMVC3IntoExistingUpgradedASPNET4WebFormsApplications.aspx

    0
  17. 43

    While making the transition from ASP Classic to PHP some years ago, I dabbled in .NET but found the lack of control of the actual HTML output frustrating. I had a discussion on that very topic last week. This article discussed a few alternatives which I’ll pass along to others, so at least I learned something.

    While making the jump to the LAMP world, I was amazed at all of the open source tools and flexibility of PHP compared to the aging ASP Classic, and the ability to work with Linux command-line tools added even more power. Much of this is possible in the IIS/.NET world as well but it’s a lot harder to do, especially in a shared hosting environment. I dabbled in .NET for a couple projects but had a hard time integrating the IDE and automatic code generation into my coding practices.

    As a web developer, it came down to numbers and capabilities: I can do more with PHP and the results can be used by more people, including IIS-based web hosts that include PHP. If I need a scalable compiled language, I’ll use Java for the same reasons.

    If I were in a corporate environment in a Microsoft shop, or if I were making Windows-only desktop apps then .NET would be the obvious choice.

    I think that the author did a good job presenting the topic. He knows he’s got an uphill battle even mentioning .NET to this audience, so kudos for even bringing it up. I’d read more articles on the topic but really only to refer colleagues who are firmly in the Microsoft camp to Smashing Magazine as a educational resource.

    0
    • 44

      I use PHP at home and ASP Classic at work. I’m no hardcore software programmer – I just do what it takes to make something work robustly. I don’t understand why you just can’t throw some HTML and code in a file, save it on the server and the view it in the browser. As i’m primarily front end developer, I too hate not being able to edit the HTML. HTML is more important to me, and having a language that can support logic in addition to this is why I like the interpreted languages.

      I have the belief that .NET is used by hardcore programmers that have a degree in software development and zero creativity that build incredibly complex websites that look rubbish and you need a degree in software development to understand and use!

      Can someone complete this sentence: Dog is to Cat, as PHP is to… .NET? MVC? Webforms? C#?

      0
      • 45

        graphicDesigner

        July 16, 2012 12:05 am

        I too agree with this, as a graphic designer and programmer, lack of control on the output code is frustrating. I find myself using ‘!important’ on a lot of css just to bypass MVC generated css that only appears during runtime. I would use PHP or Java based GWT for web applications. MVC just makes everything hard and time consuming in my opinion.

        “hardcore programmers that have a degree in software development and zero creativity”
        +1

        0
      • 46

        Yes, the programming aspect of .NET framework can be daunting to some web developers, but there is a time and a place. If you still believe that all .NET developers are just CS degree holders without creativity, you can check out http://www.visitidaho.org/ and http://www.visitvisalia.org/. Our firm primarily uses C#, and we also are able to put a bit of creativity in our projects.

        While I did study computer science for a couple of years in college, I ended up getting a degree in Graphic design. I made a move to the .NET framework (using C#) because I loved how easily I was able to separate my business logic from my presentation markup, and that was with Web Forms. Today, I start out all of my projects using MVC, without the default CSS that you have the option to exclude. This gives our team the same control you would have in PHP or any of the other traditional web development langages.

        0
  18. 47

    I’ve been a .NET developer for many years and, like anything Microsoft, you have to pick out and work with the good stuff and ignore the bad. The actual .NET framework is an extremely strong and useful API and is very powerful once you get to know and use it. Similarly the C# language is a great one to work with and has evolved over the years to add more and more language features that are useful in everyday programming. On the flip side, as mentioned most of ASP.NET’s front end stuff is bloated garbage and not really useful for anything other than extremely small, low traffic data based websites. That being said if you adopt a pattern of HTML / CSS / jQuery on the front end and tie that to a nice RESTful service on the back built with WCF / C# / SQL Server you can get a really nice product that has an extremely light and performant front end with a solid, easy to maintain backend. I will echo though that the price of SQL Server does suck. :-) It is nice to fire up a simple LAMP stack and have your host provide a few databases for free.

    0
    • 48

      “ASP.NET’s front end stuff is bloated garbage and not really useful for anything other than extremely small, low traffic data based websites” – and you say you have been a .net developer for many years?? Maybe you need to touch up your skills. If you are working circa 2004 when running web forms then this statement would hold some valid truth. MVC is definitely not as you describe and if you are working with web forms you either need to get a new job that doesn’t require you to or upgrade your skills to MVC. You realise stackoverflow and all of it’s stack… partner sites run on .net! You surely can’t be saying these are small low traffic web sites.

      I’m not having a go but making outdated sweeping statements like this puts off new developers from trying out what you correctly pointed out is a brilliant framework, language(c#) and very powerful development eco system. Stackoverflow (I use these as examples as they are very open about their systems) as of march 2011 hit 95 million page views a month on THREE, yes only three, web servers! Don’t believe me: http://highscalability.com/blog/2011/3/3/stack-overflow-architecture-update-now-at-95-million-page-vi.html. They only use ten for their whole group – 43 sites.

      0
  19. 49

    Patrick Harrington

    July 4, 2012 12:13 pm

    My issue with .NET is that the CMSes that are out there are so complicated, and difficult for content authors. Pair that with the fact that many of them require web forms (read: tens of kilobytes of base-64 form data coming down the pipe and massive IDs on all your tags), and you have a bad backend user experience, and bloated frontend code.

    My preference is ExpressionEngine when it comes to developing for pre-built CMSes. It costs pennies on the dollar compared to the big .NET CMSes, and is far faster, and more usable.

    0
    • 50

      Well if you want something that’s simple, extensible, well-presented and open-source. Take a look at the cms-framework I’m involed in. It’s nothing like the big commercial .NET CMSes out there :) http://piranhacms.org

      0
  20. 51

    There are piles of very good *open source* development frameworks out there. I don’t know why anyone would switch to a crappy microsoft one that you have to pay for and gives you less control over your product…

    0
  21. 52

    Gordon McLachlan

    July 4, 2012 12:45 pm

    Very interesting post and nice to get some info on a coding area that’s not often focussed on these days. I was hoping for a bit more meat about the pros and cons compared to other languages and frameworks though – maybe an idea for a follow up article? Would love to hear some more thoughts on how .NET is a competitive option.

    0
  22. 53

    Thomas Jaworski

    July 4, 2012 12:55 pm

    Nice summary of many related topics. I’m .NET developer also doing ASP.NET MVC and it’s nice to hear that I’m not alone out there! I’m not sure if this is something you forgot to mention, but I think that WebMatrix (http://www.microsoft.com/web/webmatrix) is a great small web editor and environment to get smaller Web projects running in no time, Check it out and thanks for your article *thumbs up*

    0
  23. 54

    If you want a really gentle on-ramp to using ASP.NET take a look at WebMatrix. Not only is it a free IDE for use with PHP and Node.js, but also lets you get into ASP.NET.

    0
  24. 55

    MVC isn’t new… It has been around more than three years. No serious new work starts with Webforms, it’s all MVC.

    This piece tries to be too many things to too many people. .Net as a runtime has more in common with Java than anything else, and if you’re new to object-oriented programming, this will seem daunting. The fact is, you should understand OOP first. Second, you should get to know basic software design patterns. ASP.NET Webforms is a heavy abstraction over the Web. MVC is much, much lighter, offering the separation of concerns that makes it testable and more maintainable.

    Again, you need to get OOP first. Jumping into ASP.NET directly will be futile. I wrote a book about going from script to this in 2005, and in retrospect, I should have emphasized the OOP more.

    0
  25. 56

    Great article. Great shout out to Nancy :) (and Sinatra)

    I started my dev career on ASP Classic, moved over to .Net, then have hopped around on a bit of Java and Rails but have always preferred the .Net, the tools are first class, even as mentioned earlier, WebMatrix.

    IMO, provided we ‘re talking modern .Net the only downside was cost of deployment, but ow with cloud based services even that is really a non issue. AppHarbour has a free tier, Azure Websites have free levels, you can even deploy to an Amazon free tier micro class instance. As for SQL server, who uses SQL these days? (Just kidding) MySQL & SQLite drivers are pretty stable but more importantly there is great first class support for NoSQL databases like MongoDB.

    A topic for another day is the fact that no-one, in this day and age should be hosting any of this stuff themselves, using cloud service providers, I think, is ultimately the future especially for small teams a and companies. It negates the license acquisition cost and really levels the playing field.

    0
  26. 57

    Jeremy Madison

    July 4, 2012 8:45 pm

    I have been developing in .Net for over 10 years and also maintain some classic ASP apps. Even though MVC is a huge leap forward and eliminates most of the annoyances of Web Forms, I am still beginning to move away from Microsoft for new projects. I guess it’s difficult to articulate exactly what I dislike about .Net development, boredom and a desire to expand my skill set are part of it, but an overall bad taste after working with it for so long seems to be the main thing pushing me away.

    I have gone through some sample projects in Rails, Django, and a few PHP frameworks. For my current pet project, it is the PHP framework Yii that has really captured my attention. Syntactically, it is wasn’t a big leap from C# to PHP, and the Yii framework is very complete. The transition has been much easier than I actually anticipated. The other big factor that pushed me towards PHP is the sheer volume and relatively low cost of hosting options (not to mention job prospects). My development environment is a combination of NetBeans, XAMPP and MySql. I don’t feel like I have really lost much compared to Visual Studio, even debugging was easy enough to get up and running.

    I will probably continue to use .Net where it makes sense, projects where there is already a heavy investment in Microsoft for example. The classic ASP projects aren’t going away any time soon either, but those are mostly just maintenance at this point. For most other projects however, I would have a hard time not choosing the open source route.

    0
  27. 58

    I work on both .net and PHP, and i like developing .net applications for desktop (WinForm and WPF), Its very powerful, easy and have a lot of controls.
    But when coming to web platform i really hate asp.net and i prefer PHP. i found it hard to develop, maintain and i feel asp.net create heavy pages that makes slow page load compared to PHP.

    0
  28. 59

    As a PHP developer I’ve tried many variety of frameworks including Zend Framework, Symfony1+2, CodeIgnitor, Yii, Cake, Prado, Joomla etc and have even built my own mini MVC framework. But what this article fails to tell me is what .NET is so good at, and why I should consider using it over other solutions.

    You mention a couple of benefits, such as the fact it has good tools, and you can easily switch between Microsoft based platforms, but fail to give examples of why the tools are so good, what are the main benefits they have over open source counterparts like Eclipse, are there any code generation tools? etc.

    What I’d also really like to see is real world examples of code! “Hello world” examples are nice to introduce you to the basics but don’t show in anyway why .NET is so powerful. As a developer I want to use something that enables me to spend less time coding and more time creating, and I want to create the best possible code with the least possible effort. I guess to cover all of that you could end up with a really massive article, but even to cherry pick some examples of the things that you personally find really great would be nice rather than a general overview article like this which has just left me feeling cold.

    As I think another commenter suggested, a part 2 would be good.

    0
  29. 60

    A very nice open source IDE for .Net is #Develop (SharpDevelop), available at http://www.icsharpcode.net/OpenSource/SD/ . Check it out.

    0
  30. 61

    As a suggestion, articles on more complex topics such as .NET or even PHP should have a mini-glossary at the end. It would help people hugely.

    I wouldn’t bother doing this for HTML or CSS, but for the more gritty, harder subjects, it would be worthwhile.

    0
  31. 62

    It would be interesting to hear the pros and cons of using C# or VB.

    0
    • 63

      Fabricio Martínez Tamayo

      July 5, 2012 12:13 am

      VB will stop being developed in 2012. C# Its more like C++ & Java, and will be continued to be developed in the future.

      0
    • 65

      VB.NET is case insensitive. C# is not. VB.NET looks similar to VB 6/Classic ASP (using VBScript). C# looks like Java/C/C++. VB.NET can do late binding–easier code. C# doesn’t. All that included, it’s all preference.

      0
  32. 66

    Having used C# .NET ASP.NET MVC for a couple of sites (and liked it greatly), when considering future projects, the elephant in the room is Windows.

    Whilst I have no particular gripe against it, going the .NET route ties my projects onto Windows platforms and using Windows tools. If I ran Microsoft, I’m sure that this would be near the top of my priority list.

    Other languages (none of which are perfect) allow for cross platform development and deployment. And Mono? Well, it’s just not quite there – we could never get the open source LINQ copies to function nicely. A useful project to point at when the monopoly regulators knock on the door!

    0
  33. 67

    I’ve always thought of .net as quite a ‘heavy’ solution.

    I feel that with any framework, you need to buy in to the core components of the vision of the framework or you’re going to find yourself working against the framework more often than you’d like.

    With .net, those core components are one from the list of MS supported languages, Visual Studio, MSQL, Windows Server, IIS, etc.

    In comparison to web frameworks like Ruby on Rails, the ‘.net package’ feels a little monstrous.

    Of course, some people feel comforted by the notion of such a large framework package and are happy to buy in.

    0
  34. 68

    I agree that .NET is extremely useful for building out sophisticated websites very rapidly and, using third party controls like Telerik, you can achieve highend results quicker in .NET than anywhere else. That stated, and I have been building MS solutions since the Windows 1.0 days, .NET fails on numerous fronts. The largest failure to date has actually been SQL Server which simply does not keep up under load no matter what I have tried. I have more stats, indexes and partitions than I ever thought I would need and it still balks under load. I ended up shipping much of my heavy querying load to MongoDB and I use SQL Server purely for user validation.

    Further, while .NET is great for advanced website creation, its controls are inherently flawed. From a distinct query for each sort to, as you stated, bloated viewstate transmissions, these controls came out the gates poorly constructed and have never been fixed. Now, in this case, it takes a little more effort but these controls (or their Telerik. etc… equivalents) can easily be tied into a custom business middle layer that manages access and those problems dissipate. To be honest the viewstate data is the hardest to understand how to eliminate and even that takes little time to remedy.

    I have learned over time to limit .NET to frontend development of websites only and to use custom backends for true functionality. I have further determined that .NET just cannot handle any high volume processing and that, despite all of the cool new Parallel Tasks, that .NET is just not a framework to use for deep programming needs.

    0
    • 69

      Fabricio Martínez Tamayo

      July 5, 2012 6:02 am

      What does .NET have to do with MS SQL performance? As a user stated before, .NET does not force anyone to use MSSQL.
      Does windows force you to use IE?

      0
    • 70

      As just mentioned SQL has nothing to do with .Net so why even mention it. You are not forced to use SQL server. Use another DB if it works better for you. You other criticism is purely focused on .net webforms which went out of use for anyone who is not forced to support them years ago. Viewstate does not exist in MVC and as mentioned by others this design pattern is well known and similar to Ruby etc.

      As for “I have further determined that .NET just cannot handle any high volume processing and that, despite all of the cool new Parallel Tasks, that .NET is just not a framework to use for deep programming needs.” Stack overflow (as I mentioned to another poster) has 95 MILLION hits a month and uses only 3 web servers!!! Can’t handle high load… lol that is a laughable statement… http://highscalability.com/blog/2011/3/3/stack-overflow-architecture-update-now-at-95-million-page-vi.html. What about netflix and people like that who are running .net to stream their video across all their services, web, xbox etx, via silverlight (not that i’m a massive fan of silverlight but it’s sitting on top of the framework which is the point).

      0
    • 71

      If SQL Server isn’t keeping up, you’re doing it wrong. I worked on the MSDN/Technet forums at Microsoft, and we ran that app on one SQL instance serving 50+ million page views a month.

      And yeah, SQL Server != .Net.

      0
    • 72

      The largest fail would be having to purchase licensed third party controls like telerik and devexpress, which in other languages you can pretty much get for free from tutorials or open source projects.

      I have no choice but to continue working on a project with ASP.NET MVC because my client decided to. Can someone please tell me how to create a collapsible vertical sitemap menu? The only solution I came across were to purchase some shoddy third party control and the worst part is I can’t even preview the thing since there’s no demo page on their website.

      0
      • 73

        No demo page? I’m not as familiar with Telerik (though I have used some of their products and worked with people who do), but DevExpress, for years not only does have demo pages for most (if not all) of its controls, various tutorial videos, and even a free fully-functional trial. It’s right there on the menu too.

        0
  35. 74

    While this is a good overview of some of the new technologies, I think one should stick to ASP.NET MVC and C# when learning the Microsoft Web Stack. Mainly due to the amount of information on it available.

    Phil Haack, Scott Hanselman and Scott Gu have some interesting articles on the MVC and ASP.NET and there are plenty of video tutorials on Microsoft’s ASP.NET MVC website.

    While projects like Nancy, F#, IronPython are nice projects, when learnings something one must first walk before one can run.

    0
    • 75

      I agree. And the resources you mention are great places to start. There were two drivers in including the other examples. One, that this article had some relevance to existing .NET developers who may not have looked into those things and Two, that experienced developers of other languages (PHP or Ruby for example) understand the range of available options in .NET rather than the narrow idea of WebForms on purely Microsoft server stack.

      0
  36. 76

    There are really many different opinions about the .Net Framework but in the end I have to agree that most of them are not good and I really don’t understand why.

    MS has been doing a great progress with the .Net technologies. For example, the Visual Studio 2010 and the framework 4.0 are so different of their ancestors VS 2003 with 1.1 framework. One of the reasons that many criticize MS was because they were not into open source. That has also changed. But for some reason it seems that many of you like to criticize without knowing the facts.

    The truth is really simple. Every technology has it’s advantages and disadvantages. But you have to be neutral when criticizing any of them. Many of you seem that are talking about your favorite football team. It doesn’t matter if they played well or if they were a better team or even if the referee was bought and your team won because of it. It only matters that they have won!

    I work with .Net (VB and C#), PHP, Java, Javascript and Classic ASP. Every single one of them have their strong and their weak points. Please get to know them and then you can say whatever you want about any of them.

    Most important… I have to congratulate Craig for a great introduction to .Net development. I think you’ve given your best to explain what the technology is and to demystify some myths that have no reason to be. Well done!

    0
  37. 77

    I may be over generalizing, but I think many in the web community, including a large portion of the SM audience, come to programming platforms from a web design perspective. They may master basic, entry-level skills in simple programming languages, but only because it is related to their core skill: web design. Example: learning PHP to master WordPress better.

    The opposite is true for most developers in .NET and Java: they are hard-core programmers/developers that are learning web front-end development as a secondary skill.

    The big pitfall in learning .NET is taking it too lightly. Sure, it’s easy creating that hello world app, and you’ll find plenty of 5-minute tutorials and “learn .NET in 24 hours” books, but for real-deal .NET development you need to learn a lot. You need to be able to master a very powerful programming language, you need solid OO skills, architectural skills. I think that is quite a big gap particularly for the homegrown web designer, which often is not a programmer.

    0
    • 78

      Completely agree with this. I’m a Web designer first and .NET gets in the way. The people I know who use .NET are engineers. Their web designs tend to be…… stale.

      0
    • 79

      wrong. there are those rare people with hardcore programming skills (java etc) AND have great artistic skills (drawing, digital painting, 3d modelling). I know because I am one of those rare breed. (and also game developers)

      In creating applications for end user, programming without design sense is useless. You need great programming skill and a great eye for design. Either that, or work with someone with skills that you don’t have.

      0
  38. 80

    Antonin Januska

    July 9, 2012 11:39 am

    What’s your opinion on ASP.NET WebPages? I’m using it very extensively right now due to the decision to use it where I work and it’s quite simple and beautiful (especially when using Razor). I wonder what your personal opinion was on how it stacks up against ASP.NET MVC, PHP, and other architectures

    0
  39. 81

    I’m also a great fan of .NET.Previously i developed a website using Asp.net with C# and Visual Studio 2008.The Project was a great Success and i could design with such ease:)

    0
  40. 82

    Cloud based app hosting like appharbor.com make it so easy to get a site up, deployed and publish updates. Love there integration with all the different types of database addons and other services that make it easy to plug into your site (appharbor.com/addons). Also like the ability to scale up for demand ($$pay more) as needed.

    It is definitely worth a look especially with a free account if your trying to pick up .net web dev.

    0
  41. 83

    Steve Sebastian

    July 17, 2012 5:13 am

    I am comfortable with CMS for developing website. Though .NET is considered bit higher than other languages, demand for CMS and PHP are still rising.
    http://www.usjoomlaforce.com

    0
  42. 84

    So, what is the business case for ASP.NET? I’m reading a lot about the technology but not a single word of why it is good for business?

    Is ASP.NET something clients want? Can it be good for differentiation?
    Is it something that clients will say “no, we want WordPress”? Is it something that will be more expensive to host?

    Technical talk is great, but the to commit to a technology we need a business case.

    0
  43. 85

    I’ve spent the better part of 10 years writing high-capacity software (eg: LIMS) in PHP. I am currently in an F500 where Microsoft products are used as well as some custom proprietary tag-based solutions. For desktop applications, I don’t think it gets any better than C# and WPF. They’re some of my favorite apps.

    For web-based solutions, even after dabbling with C# and ASP.NET and trying to get on board, I still prefer the simplicity of Yii to futzing about in Visual Studio.

    0
  44. 86

    Patrick Herrington

    October 15, 2012 7:45 am

    This is a pretty good thread; the article is a bit weak, but good thread none the less.

    It surprises me, a seasoned .Net dev (I started with .NET 1.0 which was only around for about 3 months) that people have these weird misconceptions about the ECMA’s preferred language C#. To start with, if you want to be a script kid keep using PHP and Ruby, or you can get those pants extra tight and go with NodeJS. If you want to be a dev move to Java, C++, or C#. What’s the difference? Compilation! I’m not going to go into the benefits, but they are drastic. With that said, you can still be a script kid in .Net land ().

    I think most of the bad name that this thread is mentioning comes from markup itself. Visual Studio has always come with Microsoft controls to use in your ASP apps. These controls are bloated and awful. The simple solutions is, and always has been, don’t be lazy and write your own markup! You can use ANY templating engine you like; RAZR comes with VS, but you can always implement XSL, Mustache, Jade, or whatever you like. I personally prefer a MongoDB / Mustache / LESS /Jquery stack, but that is all really up to you.

    Even with ASP.Net Forms you can surpass all but two of the complaints. Those being control over an element’s ID and multiple forms. IMO you shouldn’t use IDs to grab elements in your css or js, that is what class names are for. As far as multiple forms, there are workarounds, but I don’t really think you should have multiple forms on a page, it is hard enough to get a user to use 1 form.

    As far as price goes, you can dev completely free with MonoDevelop, or even better TextWrangler and a little bash file to compile. As for hosting, a Windows server is no more expensive than a Redhat server. But, if you want to stay cheap you can always use Mono and run on a Ubuntu (mint, whatever) server through either apache or nginx. It isn’t the easiest thing to get .Net running with Mono, but Nathan Bridgewater has made a handy script that does it all for you. (http://www.integratedwebsystems.com/). I personally find it easier to get Mono working than Ruby anyway. Why are there fifteen Mustache Gems, which one am I supposed to use, isn’t there a standard, ahh I just lost more hair thinking about it…

    Oh yeah, and .Net has been open source since it first came out. You have to ask MS for the code, but they will give it to you — that’s what the guys at MONO do when they migrate .Net upgrades to the MONO project. I’m sure you can figure out why MS doesn’t want you forking their code on Github.

    0
  45. 87

    What Ruby on Rails? It is better than ASP.NET MVC?

    0
  46. 88

    What skills do I need to learn to become a ASP.Net MVC 4 developer?

    0
  47. 89

    Great article. If anyone wants to learn Visual Basic (its a bit easier for the novice than c#) then take a look at http://www.visualbasictutorial.net

    0

Leave a Comment

Yay! You've decided to leave a comment. That's fantastic! Please keep in mind that comments are moderated and rel="nofollow" is in use. So, please do not use a spammy keyword or a domain as your name, or else it will be deleted. Let's have a personal and meaningful conversation instead. Thanks for dropping by!

↑ Back to top