

Where Is .Net Headed? - wubbfindel
http://odetocode.com/blogs/scott/archive/2013/05/15/where-is-net-headed.aspx?utm_source=feedly

======
ComputerGuru
Regardless of where .NET is headed, C# the language (which is an entirely
separate beast) has, in my humble opinion, become the most damn awesome all-
around language.

It's got all the awesome features _most_ of which are very elegantly
implemented and accessible in a very streamlined fashion. Obviously if you
hate C-syntax, C# isn't going to win any brownie points, but in terms of sheer
power and flexibility, C# 5.0 steals the cake by a huge margin. Lambdas,
parallelization, anonymous functions, interop with C functions, fast
compilation, "fast" execution, awesome bytecode, and more. Constantly
iterating, but not breaking with the original design goals.

It's borrowed the right features from the right languages, the right syntax
from the right languages, and the right design choices from the right
languages.

(Although I do dislike how the new _dynamic_ keyword is implemented. It throws
then catches too many exceptions under the hood and people really need to
understand it before they use it. It was primarily designed to convert
unknown/random JSON to a C# object on the fly and should not be abused. Many
people coming from dynamically-typed, loosely-defined languages might think
it's an easy way of adapting to the traditionally statically-typed and
statically-defined C#... not so.)

(And, like it or not, it really is a cross-platform language. Mono _does_
count and _is_ pretty awesome. Esp. if you think about the compatibility of
the _language_ and not the framework.)

I'm still a die-hard C/C++ coder, but C# won my heart a long time ago.

~~~
ilaksh
Start with the name, ".NET". What were they referring to when they chose that
name very carefully? They were referring to the web.

C# 5.0? Take a look at this example code from the MSDN blog which is "showing
off" the new features of C# 5.0. (It was formatted this way with no
indentation on the blog). This example, not by coincidence, demonstrates how
.NET interfaces with the web.

    
    
        private async void
        btnTest_Click(object sender, EventArgs e) 
    
        { 
    
        var request = WebRequest.Create(txtUrl.Text.Trim()); 
    
        var content = new MemoryStream(); 
    
        Task<WebResponse> responseTask = request.GetResponseAsync(); 
    
        using (var response = await responseTask) 
    
        {
    
        using (var
        responseStream = response.GetResponseStream()) 
    
        { 
    
        Task copyTask = responseStream.CopyToAsync(content); 
    
        //await operator to supends the excution of the method until the task is completed. In the meantime, 
        the control is returned the UI thread. 
    
        await copyTask; 
    
        } 
    
        } 
    
        txtResult.Text = content.Length.ToString(); 
    
        }
    

What does that code do? It works behind a form running on the desktop, where
you press a button to do an async HTTP request and display the content length
of the response.

First of all, why would I want to create an application that runs on the
desktop, rather than build a web application that I can show to people with a
link? Especially

If I were going to do the same thing with a web application then I would
probably do something like this in CoffeeScript:

    
    
        $.get $('#url').val(), (res) -> $('#res').val res.length
    

I'm sorry, but I don't see C# as being the most damn awesome all-around
language. I like CoffeeScript, or maybe even better, LiveScript
(<http://livescript.net>). Or failing that, plain-old JavaScript.

~~~
pantaloons
For one, you're criticizing a web API here and not the C# language-- and
you've failed to even do that convincingly since it's an intentionally verbose
example using an outdated API.

res.Text = (await new
HtppClient().GetStringAsync(url.Text)).Length.ToString();

(Disclaimer: I work at MS.)

~~~
ilaksh
Well, that's not bad, but I think the CoffeeScript is better

    
    
        $.get $('#url').val(), (res) -> $('#res').val res.length
    

Or using LiveScript backcalls is even cooler:

    
    
        data <-! $.get '/x.html'
        $ \.res .val data
    

Or in IcedCoffeeScript if you like 'await'

    
    
        await $.get 'documentation/css/docs.css', defer res
        console.log res
    

Or check out the huge list of languages that compile to JavaScript at
<http://altjs.org/>

------
ghuntley
Erm. .NET is alive and well, especially on the game and mobile phone
development front

Xamarin (the monodevs) are doing some really interesting stuff:

<http://xamarin.com/evolve/2013>

Frameworks such as MvvmCross allow you to target iOS, Android, Windows 8
Mobile, Windows 8 Store, WinRT, WPF all using the same codebase using the MVVM
Pattern. Write your code business logic in a PCL and share it across all
platforms, i.e. 80% code re-use on mobile, write your UI for each platform and
link against your shared core business logic PCL.

<https://github.com/slodge/MvvmCross>

Oh, you can do all of the above, program for all those platforms (iOS
included) in Visual Studio with either C# or F# using async/await and linq.

Disclaimer: I went to #evolve, if you use .NET and didn't go then sorry to say
you missed out ;-)

Personal highlights from the conference include:

\- C# async/await on iOS, Android announced and available in the beta update
channel.

\- Xamarin acquires Calaba.sh (lesspainful), announces the future of automated
mobile phone testing: <http://xamarin.com/evolve/2013#session-xcjpj20d6s>

\- 80% code reuse case study: <http://xamarin.com/evolve/2013#session-
shy07zqsoz>

\- Behind the scenes with the award winning game Bastion (monogame):
<http://xamarin.com/evolve/2013#session-mazw2c15qr>

\- (Scott Hanselman) How C# Saved my Marriage, Enhanced my Career and Made Me
an Inch Taller: <http://xamarin.com/evolve/2013#session-umfpnw90c9>

\- (Josh Collins - @GlobalMoxie) Buttons are a hack: can't wait for vid to be
uploaded...

------
orangethirty
One point that is somehow missing in this thread, yet is implicitly made is:

 _Open source is not the solution to every problem_.

There are businesses that value the support, packaging, and overall
completeness of the .NET stack. Yes, they cost money to deploy, but so do open
source alternatives. People will argue that MS will _lock you down_. Yet, if
you start developing under Rails or Django, its pretty hard to move away when
things get going.

------
300bps
I have moved everything that I host for myself or my clients to Azure. Low
cost, rock solid reliability, incredible speed and easy to administer. CPU,
memory and disk really are a commodity at this point.

I loved Amazon EC2 too but Azure was far cheaper for high use Windows VMs.

~~~
Fizzer
EC2 is indeed very expensive for Windows hosting. A c1.medium instance on EC2
reserved for 3 years is $42/mo Linux and $116/mo Windows - that's nearly
triple the cost for the same hardware!

Another option is to switch to mono and run your .net apps with EC2's Linux
prices. Then it's even cheaper than Azure. This is what I did for my current
project.

~~~
ilaksh
Right so who makes Mono? Is it primarily Microsoft developers? No. Of course
not.

So where does that leave Windows for internet servers?

------
at-fates-hands
I currently work at a fairly large MS client. No way we're going to abandon
.Net right now or in the next few years.

We're currently in the process of getting ready for a migration to Sharepoint
Server 2013 which will cement the company with .Net for at least the next two
to three years. We still have several sites on the old 2007 platform with no
hint of moving those over any time soon.

I'm wondering what you see as viable open source alternatives to the .Net
platform.

Also, we have a handful of .Net developers and they've all said a majority of
the work they've had in the last year did not involve MVC3 or MVC4 so I'm also
wondering what the future of this platform will be.

~~~
untog
I think the future of the MVC framework is a better question. It's stuck in
the middle of two worlds- huge corporate projects don't use it, and anyone
that even thinks about MVC will be more likely to use something like Ruby.

~~~
terrble
> huge corporate projects don't use it

Incorrect assumption (source: developer at huge corporation on huge projects)

~~~
untog
OK, _most_ huge corporate projects don't use it.

Point is, there was no huge shift to MVC after it was released. A ton of web
projects are still made using WebForms and will continue to be. MVC will
continue to be a minority framework.

~~~
charlieflowers
I could be wrong, but I don't think that's true. I have come across a lot more
ASP.NET MVC + JavaScript jobs than I have WebForms the past couple of years.

I think the shift has quietly occurred because everyone wants at least a
little AJAX, and everyone wants jQuery, and once you've thrown those in the
mix, who wants to do that using WebForms?

------
rocky1138
They should add Java as a CLR-supported language :P

~~~
yareally
They did that once before <http://en.wikipedia.org/wiki/J_Sharp>

~~~
joseph_cooney
pretty sure he was being funny (hence the :P ... and the court cases).

------
taternuts
They need to open source the CLR and rule the world

~~~
kvb
Why? It's already an ISO/ECMA standard, and there's an existing high quality
open source implementation in Mono. Microsoft has open sourced several of
their more recent frameworks and languages, including ASP.NET MVC, F#, and
TypeScript, and released free-but-not-open-source tools like the express
editions of Visual Studio. How would open sourcing the CLR help?

~~~
orbitur
Exactly. Being closed isn't the problem, it's just effectively unsupported on
any platform that's not Windows. Mono's nice and all, but it's not complete,
and it never will be.

~~~
moron4hire
What is it missing that you are missing?

Mono is pretty damn complete. The stuff I've found it to be missing are very
Windows-centric stuff and wouldn't fit in a Unix environment anyway.

~~~
cookiecaper
WPF is the replacement of WinForms. Many desktop apps designed by conventional
.NET developers in the timeframe between the release of Vista, and probably
many now despite MS's deprecation, use WPF as a base library. It's not
something you can just easily replace, and Mono does not implement it.

Microsoft is using the same business tactics that they've employed since the
PC wars in the 90s, since they hit critical mass of market share, just with a
bit more finesse. Microsoft allows Mono's existence only because it feeds into
their power play, by creating more dependency and familiarity with .NET. They
make the basics open and provide some interoperability, but then lay on
proprietary extras that eventually become hard dependencies organically (like
WPF) as a function of Microsoft's monopolization of the market ("why wouldn't
I use this tool that makes things way easier? it will work great in our
environment"). It's all EEE. Microsoft's MO, then and now.

Then all of the sudden, iPads exist. Xamarin is in a killer market.

~~~
cmircea
It's not as if WPF was the only way to make UIs for apps.

~~~
cookiecaper
But it was the primary, endorsed way for several years. WinForms was
deprecated, and WPF was the new thing you were supposed to use.

~~~
moron4hire
Now you're putting words into Microsoft's mouth to make your point stick.
WinForms was never deprecated, WPF was never meant as a replacement for it.

~~~
cookiecaper
My mistake, I was under the impression that WinForms had been formally
deprecated in favor of WPF. It doesn't appear to be such a rare feeling; there
are 1.59 million results in Google for "WinForms deprecated".

Regardless of the formal action, the clear message from MS upon release of WPF
was: "This is the new official GUI builder, please use it, it should be
preferred". Indication of such preferences is relevant. Or do you suggest that
MS released WPF with the intention that no one would ever use it?

~~~
moron4hire
I think they released WPF with the understanding that WinForms has very
Windows-specific features that were preventing people from adopting .NET for
cross-platform development. WinForms is Java AWT, WPF is Java Swing. WinForms
is meant to be a basic wrapper around GDI, WPF is a completely different
rendering engine separate from Windows. I think they were hoping people would
choose appropriately based on their needs.

------
orangethirty
I've been away from .Net for a while. How has it improved? How is the market
for programmers in it? For freelancers?

~~~
bigdubs
ASP.net MVC is pretty awesome, there are some good open source projects like
Nancy for more lightweight stuff, Entity Framework isn't great but it's pretty
mature and fast for an ORM. Visual Studio continues to be the best IDE on the
market.

~~~
guiomie
"Entity Framework" ... why dont you use Linq instead?

~~~
qu4z-2
You mean Linq-to-Sql? Entity Framework lets you use Linq and manages your db
for you. As long as you use the Code-First approach it's... okay. But it does
at least support compiling Linq to Sql mostly alright. (I'm looking at you
NHibernate)

------
cooldeal
Great, another .NET is dying post voted up on HN. Didn't we have one of those
just this morning?

Meanwhile, in the real world, Microsoft posted these earnings:

"Server & Tools business reported $5.04 billion of revenue, up 11% from last
year"

Inspite of competing products like Linux, Apache, Eclipse, Ruby, Java being
given away for free, people are willing to pay for Windows Server, Visual
Studio and IIS.

Does anyone have real data related to ".NET is dying" other than idle
conjecture, short sighted "frog in the well" anectodes which sound like
they're written and voted up by people sipping on a latte on a Macbook in a
Starbucks in Silicon Valley?

Like the number of jobs posted? They seem to increasing every day.

Sigh, some people here just love these '.NET is dying' posts, perhaps some
with a vested interest to scare startups from using it.

Again, _any_ hard data will be appreciated that shows .NET is dying instead of
the same paragraph upon paragraph of opinion and no links, references or data,
we have enough HN comments of that already.

~~~
eduardordm
You couldn't buy the VS licenses + SQL Server + Windows Server with the money
YCombinator provides you.

So, yes, most microsoft products are incredibly damaging for a startup.

~~~
cooldeal
You don't need to buy them: <http://www.microsoft.com/bizspark/default.aspx>

Prime example: Stackoverflow/StackExchange is built on the Microsoft stack.

~~~
eduardordm
BizSpark has rules many startups cannot follow and is only valid for 3 years.
This is the same selling scheme used by drug dealers.

~~~
CloudNine
There's a LOT of startups here
<http://www.microsoft.com/bizspark/Partners/Startups.aspx>

>This is the same selling scheme used by drug dealers.

Would you hold Google to the same standard and say that's true of their free
Google Apps for education and how they use free email to sign you into
Google.com so they can track you across different PCs?

<http://www.google.com/enterprise/apps/education/>

~~~
randomfool
Do you happen to work for Microsoft?

If not, cool. But if so, would be good to be clear. You've suddenly become
very active with what I'd consider an overly Microsoft approach (looking at
your comments from the past few hours).

(ex 'softie here).

------
dschiptsov
into a dustbin, to meet Clipper, Delphi and Java?)

------
rbanffy
I had to stop at the "1. The success of Windows Azure" part. Will get back to
the article as soon as I stop laughing...

~~~
smacktoward
Laugh if you want to, but the point is pretty serious. Azure supposedly racked
up more than $1 billion in revenue in 2012 ([http://www.zdnet.com/windows-
azure-joins-microsofts-billion-...](http://www.zdnet.com/windows-azure-joins-
microsofts-billion-dollar-business-club-7000014669/)).

Amazon's AWS, on the other hand, is estimated to have brought in between $1.5
and $2 billion ([http://go.bloomberg.com/tech-deals/2013-03-07-what-if-
amazon...](http://go.bloomberg.com/tech-deals/2013-03-07-what-if-amazon-web-
services-were-a-standalone-business-itd-be-big/),
[http://www.informationweek.com/cloud-
computing/infrastructur...](http://www.informationweek.com/cloud-
computing/infrastructure/amazons-cloud-revenues-examined/240145741)) during
the same period.

So while Azure is still booking less business than AWS is, it's definitely a
major competitor. Maybe _the_ major competitor. And since the market for
virtualized platforms is still in early days, there's lots of room for that
revenue figure to grow substantially even if Azure ends up stuck at #2 behind
AWS forever.

~~~
charlieflowers
I heard this a couple of weeks ago (on Hacker News), and I was SHOCKED!

I have worked for years as a .Net consultant, and I had no idea Azure had
grown this quickly. A couple of years ago, I thought their entire set of
literature was counter-intuitive, and I quit paying attention to them.

How on Earth did they grow to be in AWS's league so quickly? Surely just
getting the "default Microsoft business" wasn't enough to put them at $1
billion ??

~~~
cmircea
Well they've kept constantly adding major missing parts, which likely added a
lot to their market.

One month, web sites, another virtual machines, then Hadoop. Oh, wait, and
mobile services. The list goes on; they've catched up with Amazon on offerings
more or less.

Oh and let's not forget that Azure support is fucking awesome.

