

Ask HN: Getting Started on MSFT Web Stack vs Other Frameworks/Platforms - BrandonWatson

I have been in the LAMP stack for the last 9 years, and RoR and Django most recently.  I built my last company (which we sold - IMSafer) on RoR.  I am just now starting to wrap my brain around C#, ASP.NET and other parts of the MSFT stack.  What I am most interested in are people's actual experiences with trying to on-board with the MSFT stack.  Specifcally, the younger hackers, i.e. 25 and under.  Let's try to keep it factual, and leave invectives out.  You can see my personal thoughts about all this at www.n00bnotes.com.
======
walesmd
I come from a LAMP background (learning Ruby now). What I have seen - in my
experience (25 year old, military making the transition to a NSA contractor)
is:

LAMP and open-source is where it's at for the true innovators on the web. Your
startups and companies that go out and try new things, will use some form of
open source stack.

A Microsoft Stack is prevalent when working within "the establishment," for
the man, or in Enterprise level development. These are commonly workcenters in
which they rely on the support and testing made available by Microsoft - it is
a key factor in their decision to follow that stack.

It's not always set in stone that way - my new job is a complete Microsft
Stack (IIS, MS SQL) with the exception of the language (PHP). Every now and
then, even the man, gets a little spunky and tries something new.

------
arebop
The ASP.NET MVC framework is a pretty close imitation of RoR.

The traditional ASP.NET framework is an attempt to shoehorn the Web into the
Windows Forms conception of the world.

One thing that MS MVC doesn't do particularly nicely is to capture the
declarative character of ASP.NET 1.1; the default view templating machinery
leads to a comparatively ugly mix of literal markup and imperative inclusions
of C#. But, this may not be a severe problem for you in practice, and anyway
you can use other view template subsystems.

I think if you're starting out, you should stick with MVC. It harmonizes
better with the wider architecture of the Web
(<http://www.w3.org/TR/webarch/>), and it doesn't suffer from much accumulated
cruft.

~~~
ahpeeyem
I'd agree with this comment that MVC is a lot nicer without the overhead of
everything that comes with pretending you're building a Windows Forms app --
it's definitely in better harmony with the web's architecture and you get more
control over the HTML you're outputting.

As others have said the databinding and drag+drop features are often useless
and you spend a big chunk of your time working around the framework to get it
to do something that doesn't /quite/ fit the drag and drop model, or figuring
out exactly which event you need to handle to get things to happen in the
right order (Page_PreInit, Page_Init, Page_Load, or Page_PreRender?).

But also as others have said, the C# language and the Visual Studio IDE are
really nice, and while I haven't developed anything serious with the MVC
framework yet, it promises to remove the frustration of endlessly working
around the framework's artificially imposed complexity.

------
friism
I agree with spoiledtechie that C# is a nice programming language. Recent
versions enable very concise higher-order functional (=fun) code to be
written. The generics implementation has few warts and tooling is good.

Another gem is SQL Server, even the Express version is fast and has solid
backup-restore features.

Powershell provides a (still somewhat embryonic) scripting environment.

One nuisance is the relative dearth of free-free software. The thinking seems
to go, that because MS gets money, then so should developers of small utils
and such. It gives the entire ecosystem a slightly different feel, and you
often find yourself paying $10 or similar for small, almost-trivial add-ons,
that would have been free on other platforms where a tradition of sharing for
the good of all is the norm (codeplex -- I think -- have helped in this
regard).

~~~
BrandonWatson
This is a very interesting point...do you have any suggestion for the types of
tools that you would want to see be free which aren't? Would contests from
MSFT help in this regard? What kind of investment could they make on this
problem which would resonate with this audience?

~~~
arebop
Until Windows is a free platform, I think you'll always find that it's
relatively difficult to find, use, and develop free software there and that
the users of the platform will tend to be people who care less about free
software. Having said that, things would be better for free software
contributors and users if Microsoft were merely passively uninterested in
software freedom.

I think the first thing for them to do is to stop actively opposing the free
software community. Microsoft has repeatedly attacked free software projects
on the .NET platform, from NUnit to NAnt to NDoc, by launching alternatives
with few or no technical advantages. This not only destroys momentum, but it
strengthens the cultural tendency among Microsoft customers to distrust
anything that does not originate in Redmond.

Lately Microsoft has released some of their software under liberal licensing
terms. I think this won't help much, so long as they discourage and hamper
participation beyond consumption by members of the public.

------
abyssknight
I came from a PHP and Coldfusion background and jumped into VB.NET/ASP.NET
development after some brief self training through our company training
portal. Basically, they gave me a copy of VS2008 and said okay, "We have this
project that is behind and we need help, do you think you can handle it?"

I had a 2 day training on the internal corporate framework and then I was
unleashed on the codebase. I would say it took maybe a month for me to 'get
it' but after that it was just a matter of code reviews and common sense.

If you can write good code in one language, you should be able to translate it
over. That said, the event model is a bit different than the straight
scripting in PHP or legacy CF. Once you get used to it you're going to feel
spoiled. In the WebForms model, a lot is already done for you. Templates are
built in, grids are built in, paging is built in... It can almost be annoying
how much is built in, but then you realize how little time it takes to get
things done. You have more time to spend on real business logic, which is a
good thing.

I would recommend checking out ASP.NET MVC RC1 if you're coming from Rails and
Django. Less is built in, but it better suits the design patterns you've come
from. The languages are the same, so if you learn WebForms first it doesn't
matter: VB and C# are standalone. Once you learn them, you can use them
anywhere whether its the web, GUI apps, or console batch code.

~~~
BrandonWatson
I was lucky enough to discover ASP.NET MVC a couple of days ago, and it's
much, much better. I think ASP.NET is fine for internal development, but for
anyone looking to build consumer sites, is it a reasonable tool? Yes, I know
MySpace is on it, but when I look at PHP adoption, and use of Rails/Django, I
find people are willing to try that "new hotness" but just don't like MSFT.
Someone told me that they didn't learn ASP.NET because they didn't think it
would help their resume (for startup type jobs - for IT it's good). Is that a
generally held view/opinion?

~~~
abyssknight
Personally, I think that would be an immature opinion. The language you write
the application in has little to do with the outcome. I know of at least one
company in town who moved from Ruby on Rails to ASP.NET recently. They were
looking to hire new .NET developers to convert their code.

The issue is that the stack is expensive. Windows licenses, SQL Server
licenses, hosting... It all piles up, and a start up cannot afford that out of
the gate. MSFT has been making strides to inject into that market. Visual Web
Developer Express is a good example. They are giving the IDE away for free.

That said, for start ups, certainly a Linux based stack is far more practical.
I just think that discounting an entire language or stack because the company
behind it isn't 'liked' by a minority in the community is off base.

Heck, one of the lead developers of PHP quit randomly. It happens, and the
community plows ahead. If ASP.NET support just died, entire industries would
have to rewrite but what they had already written will still work as is.
Likewise when any new version of anything comes out there are rewrites. That
is just the way our industry works.

You are right though, .NET is generally considered an 'enterprisey' solution.
It does however help on a resume. Usually boosts your going salary by $10k or
more. ;)

------
spoiledtechie
I am a big supporter of MSFT stack. I am a first time programmer out of
college, being 24 now and 2 years on the job I would say it should be taught
in school. They did a extremely good job with C# and it is becoming more
dynamic with the "var" keyword. There IDE is out of this world which is just
an amazing tool. It allows for extensions just like firefox in which there are
tons out there. They allow you to talk to every type of server or data set
with the new LINQ technology which allows going through tables absolutely
quick.

It is highly functional beating most of the competitors on bench tests. Look
up myspace asp.net case study.

The framework is solid and over all my time working on it, I haven't found a
bug except one that existed in their ajax controls contributed by the
community.

Its a bit hard to pick up when you have had no programming experience, but it
can be compared to syntactical to C++ and Java.

Hope that helps.

~~~
inklesspen
"I would say it should be taught in school."

That depends on what you go to school for. If you're going for training in
Microsoft technologies -- to a technical college or the like, that's fine. If
you're going to what's supposed to be a computer science program, they should
teach general computing principles using, whenever possible, free software
that has been around for a while and will continue to be around for a while.
(Yes, that means they shouldn't teach Rails either.)

~~~
blasdel
Yes, Computer Science departments should not be running damn vocational
programs.

------
johns
I've been using .NET full-time for 3.5 years. There are two types of .NET
developers. The first group uses the * View controls, uses the designer, does
everything (or most things) declaratively and generally conforms to the
Microsoft way. Then there's another group of developers that care about design
patterns, maintainability, testability, and everything else that goes along
with being a good programmer, not just a good employee. I started out in the
first group and now I'm in the second. It's a totally different world.

Microsoft has made a lot of effort lately to improve their appeal to hackers.
They have free (Express) editions of their tools. IIS is still free. If you
want the full-blown tools, they're available for _very_ cheap (BizSpark) for
startups. They're releasing more and more source code everyday (you can step
through the .NET Framework core while debugging in VS2008) and CodePlex is
helping bulk up the available OSS libraries for .NET. It's very rare when I
need a library and there isn't an open source one or its included in the
framework.

ASP.NET MVC is an excellent framework and eliminates most of the problems
Webforms has. Webforms has its place in corps for the first type of developer
I listed above, but MVC is made for the second. I wouldn't spend anytime with
Webforms if I were just starting out. Save yourself the headaches.

I think the quality of C# 3.0 has been covered enough. If you like dynamic
languages, IronPython and IronRuby rely on the Dynamic Language Runtime which
will be included in .NET 4. C# is getting support for interopping with dynamic
languages. F# is purely functional and will be a first-class language with
tool support coming up in VS2010.

------
physcab
I am 24 and have also been in the LAMP stack for the past year until I began
programming as an unpaid intern for a local web development company. The web
company uses a MS stack and I have LOVED it. I have a physics background, so I
never really "learned" how to code, and picking up PHP felt disjointed. One
thing that I have appreciated about MS is the consistency. The IDE is
wonderful.

~~~
BrandonWatson
I really thought this topic was going to bring the haters...and yet the
majority of the commentary has been uniformly positive. What is MSFT doing
wrong, then, that more people aren't building web apps on their stack?

For the record, Visual Studio is amazing. My buddies use VI. Whatever works,
but I love VS.

~~~
krakensden
Deployment is less convenient (fewer Windows webhosts, especially on the low
end).

If you don't run Windows, Visual Studio becomes less attractive, cutting out
the free unix and Mac crowd.

Also, their marketing is just... not as nice. Compare rubyonrails.org to
asp.net. One says 'Web development that doesn't hurt', and has big clickable
pictures. The other is ugly and seems to be selling stuff.

When you're just starting out, the little things like that matter.

~~~
BrandonWatson
What an interesting point...yes, the sites have very different looks and
feels, for sure. I wonder how many newbies get scared off from ASP.net from
the ASP.net site.

------
johns
You should have probably disclosed up front that you work for Microsoft. As
much as I like .NET, I like full disclosure more.

~~~
blasdel
Wow, you're right:

 _Brandon Watson ... is a board member of the Family Online Safety Institute
and a former Microsoft manager._

 _I have been hacking away in Python for a couple years, but now that I am in
the Developer Platform Marketing division at Microsoft..._

    
    
      That's a banning!
    

_Brandon founded IMSafer in 2006 in response to the growing threat of online
predators and the lack of effective tools for parents._

    
    
      He's an opportunistic ass, evangelizing about the imminent paedogeddon...
    

_IMSafer uses an advance language analysis engine to decipher the cryptic
language used in IM conversations and on MySpace message boards, scanning for
language that is dangerous, threatening or sexual in nature. In addition,
IMSafer monitors MySpace accounts and reports changes made to any age, name or
location disclosed._

    
    
      ...and a snake oil salesman too!

~~~
drhowarddrfine
Only a Microsoft person would stoop so low. When your browser and stock price
is losing market share and value like crazy, you have to resort to dirty
tricks to save your job.

~~~
blasdel
It seems like it might be a hail mary for him, considering this quote from his
blog:

 _Now that I have been working in the Developer and Platform Tools marketing
group at Microsoft for close to a year, I have decided that it’s probably a
good idea for me to be technically proficient in our own technologies._

~~~
BrandonWatson
Again, apologies. The last thing I want is to upset this community. I am
Brandon Watson, and I work at Microsoft. I am not, nor would I, trying to hide
that. I asked the original question with genuine interest in the opinions of
this community about the MSFT stack. I'm an HN addict, and consider it a
valuable knowledge discovery (links, blogs, products, answers, philosphical
questions) resouce.

~~~
blasdel
Except that it is your job to evangelize Microsoft products to us, and it's
pretty clear that this thread is part of that. If you really are "new to the
MSFT stack", what the fuck have you done at your job for the last year?

I've dealt with a Microsoft "evangelist" guy before in academia, promoting
their "Shared Source" initiatives trying to convince professors to teach NT
internals in OS courses. At least he was straightforward with his trolling,
and entertainingly churlish.

Your whole deal just seems sort of pathetic. You don't have a clue about JS,
CSS, or SQL? You've been paid to promote a "stack" for a year and you just
tried it out for the first time a week ago and are posting about it in
multiple places on the web?

You're ("pulling some marketing bullshit" ∪ "an idiot").

~~~
BrandonWatson
I don't work in DPE (Developer & Platform Evangelism). I work in product
management (marketing). I have decent tech skills, but over the last year, my
group was focused on launching our Azure Services Platform. The bulk of that
work was about positioning, partners, brand, pricing, features, etc. Not a ton
of time for actually using the platform. A new year resolution was that I
wanted to spend my free hcaking time in ASP.NET. It's all up on my blog, out
in the open. I'm not trying to hide anything from anyone, and I apologize
againg to the community if it came across that way.

~~~
blasdel
The marketing for Azure makes more sense in light of you not having used any
of the stuff you were promoting.

Nowhere do you mention any of your competitors, much less compare yourself to
them. None of the "tracks" [Web Developers, Corporate Developers, ISVs,
Systems Integrators, Business] had anything pertinent, and none of it was
remotely useful to anyone to whom _cloud computing_ was more than the cover
story of the latest _IT Drone Monthly_. The copy is littered with grating faux
pas, like: "multiple internet protocols, including HTTP, REST, SOAP, and XML".

The only useful information I could find about the offering was from your
competitors! -- <http://snarfed.org/space/windows+azure+details>

_PS: use your hour-long edit window to correct your spelling and grammar
mistakes_

~~~
adog
Wow. People can be really mean. After almost three hundred skydives, I posted
to an online community that I had been a part of for several years that I was
quitting for various reasons (the least of which was that I wasn't even close
to being coordinated enough to continue to pull it off). I was attacked almost
instantaneously by various members of the site. Some saw it as me vying for
attention. Others insisted I'd be back. Others still simply called me names.
That was four year ago. I haven't jumped again since. I haven't posted again
since. It is incredible in a society that has such a high tolerance for social
malfeasance, one has such a conniption simply because of a small omittance.
Seriously, have a drink. There are two pointless wars going on, there are
starving people and people with no place to live... and pandemics like AIDS
infiltrating the globe. If Brandon was willing to concede he didn't know PHP,
SQL or JavaScript, perhaps he was actually being honest about everything else,
too. He could have lied. He didn't. Chill out. Jesus.

-A

------
mattchew
My ASP.NET is a little rusty, but I did a fair bit upon a time. Bottom line,
if you drink the Kool-Aid and do it their way, it's not so bad. If you try to
translate some other web stack concepts into ASP.NET, you're going to be very
frustrated.

Specific things to understand:

Page cycle. Critical. ASP.NET events. Viewstate (nice if you don't lean too
hard on it) App_Code/App_Data directories. Master pages (heh)

Also MS has some funky way of handling javascript that is non-standard. You
add a javascript handler in Page_Load or something like that. I wasn't doing
JS back then so can't tell you more. If use a lot of JS you'll want to
understand how the IDs for ASP.NET controls are generated.

I tried to use a UserControl in a project and wasn't satisfied, couldn't get
the different pieces to see each other and talk to each other correctly. Try
before you fly.

I'd recommend finding a source of examples and starting there.

(P.S. If anyone else is curious like me about why someone would want to move
from RoR & Django to ASP.NET, read the first post on n00bnotes, it's explained
there.)

~~~
johns
This is mostly outdated information and these issues can be avoided by using
ASP.NET MVC instead of Webforms.

------
tomh-
I think if you are going to develop web applications you are better off with a
dynamic language, recompiling large projects is a time killer and can get
anoying. Another thing that is you might not like is that in general the
opensource community for c# is not as big as other platforms have.

On the other hand the technologies are nice and fast, but for .NET it is all
about tooling which can make you lazy and it can get in the way if you do not
understand whats going on under the engine. You can pretty much forget about
being productive without Visual Studio.

If you wanna geek around in a command-line interface, then .NET is not for
you. If you want to do one part of your project the non-MS way, then .NET is
probably not for you. I'm Microsoft partner and get all the software for a
good price, but I'm not convinced that I would be more productive than with
python and django.

~~~
johns
_If you want to do one part of your project the non-MS way, then .NET is
probably not for you._

This is completely false. There's a whole movement (<http://altdotnet.org/>)
of developers not doing it Microsoft's way and getting along just fine.

~~~
tomh-
You are right, but it doesn't feel the same as for example using freemarker
instead of JSF or whatever. My point was more, if you start using some non-MS
projects and you want to look up more information about how other people use
it, that information might not be there or you will have a hard time finding
it. If you are new to .net this can be a quite anoying. There are always
exceptions for everything, but I wouldn't recommend someone new to .net diving
straight into these alternative things.

------
mark_ellul
After 4yrs developing on the MSFT stack, I can say that it provides a nice end
2 end experience, especially using VS IDE. Now with Mono your deployment
options are more open as well, which I find useful.

My only gripe is the cost of the stack, if you are hosting your own servers. I
also found it hard to debug live environments, as it was hard to do
introspection without bring the whole system to a halt.

