Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a reason I should not start with C#

Tags:

c#

.net

php

ruby

I think I'm leaning toward C# and .net as a concentration language for learning web development. I would like to learn good programming fundamentals and I've looked at pretty much everything else. The four I've narrowed it down to have been C#, Python, Ruby and PHP. Is there a reason to stay away from C# (and I don't think the cost issue would really apply to my solo-developer situation but I could be totally wrong). Any thoughts?

I realize that these are all great languages so I'm not trying to ask which is the best overall. However, would Ruby be a viable alternative for a first language or does it have too much "magic under the hood" coupled with Rails, and unorthodox methodologies? I do like what I've seen with the language.

like image 505
Mackristo Avatar asked Mar 23 '09 01:03

Mackristo


3 Answers

This is likely to result in a flamewar but I think C# is a pretty good language to start with for Web Development.

It is a full featured object oriented language and is statically typed and compiled. It's very well documented and has a huge developer community.

If you absolutely have to run on Linux/Apache and do not want to use Mono, that would be a reason not to use C#. Other than that, I don't think there is a compelling reason not to, particularly with ASP.NET MVC, which lets you move away from the WebForms model.

This is not to say that WebForms is necessarily bad but some might object to WebForms as it introduces abstractions that are not inherent in other web development platforms.

like image 168
BobbyShaftoe Avatar answered Nov 20 '22 21:11

BobbyShaftoe


If you go with C# for web development, depending on your experience with web technology, I'd heartily recommend starting with ASP.NET MVC before ASP.NET Web Forms.

ASP.NET Web Forms is the original style of building ASP.NET applications, and tries to abstract a lot of the details. It allows you to build applications without realising what's happening under the hood (post data, state management). In my opinion, these abstractions although making things easy at first begin to "leak" when you get into more complicated scenarios (as this tutorial proves).

ASP.NET MVC on the other hand makes it easier to build web sites that are a lot "closer to the metal" while still keeping you productive. If you want absolute control over the resulting HTML and aren't afraid of things like cookies, form tags, post and query string data, then you might enjoy ASP.NET MVC a lot more.

Of course it would be beneficial to know both. But if I was starting now, I'd probably start with MVC and move to Forms (then realise how bad it is and move back :)).

like image 21
Paul Stovell Avatar answered Nov 20 '22 22:11

Paul Stovell


There are no "best language over all". You use one tool for the purpose it has been made, that's why there are several tools.

Since your question is "why not learn C#", I'd say :

  • If you plan to work with other OS then Windows (Mono cannot compare).
  • If work in an env or with people not .net friendly (e.g : bank, scientists)
  • If you work in an env or with people that are expert in another good tech (never underestimate the use of a good master).
  • If you think Free Software matters so much that using a MS product is not worth it.
  • If you don't like MS Visual Studio (working in c# without a good IDE is a pain).
  • If You plan to program something that .net is not suited for (e.g embedded devices, scripting, real-time, fault tolerant system, AI, etc).
  • If you are a web dev and can't afford a Windows Server Licence.
  • If you want to learn programming with the very basics, including simple functions and quick and dirty scripts.

Now, I program in Php, Python, Java and C#. Python is my language of choice, but c# is really the first MS programming tool that seduced me : it's clean and efficient. Really, it's about what you want to do, not a question of religion.

Make YOUR choice.

That's said, C# sucks and Python rocks.

like image 20
e-satis Avatar answered Nov 20 '22 22:11

e-satis