Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

I want my, I want my... ASP

ASP.Net would be a great addition to TeamTreehouse. ASP.Net hold a pretty good share of the market with respect to Business applications. It's not all Ruby/Rails & PHP out there in the corporate world... As much as I Love Open Source, .Net has it's place too... and there is a free version of Visual Studio.... Visual Studio Express... For every Java, Ruby & PHP req out there, there are just as many .Net (mostly C#, but some VB.Net)... Speaking from experience, and letting the requirements dictate the platform, sometimes I'll choose PHP, Sometimes Ruby, sometimes .Net... each has it's pros and cons, but I'm a "Right tool for the job" kind of guy... and will choose the platform based on the requirements, time, and budget... Someimes it just makes sense to choose one over the other, or even create a blended SOA... that being said, I think TeamTreehouse should Start an ASP.Net section.

7 Answers

Matt Campbell
Matt Campbell
9,767 Points

I don't know much about .NET. Seems like pretty advanced stuff. Or is it as simple as PHP to pick up?

Can a job that .NET does be done with PHP, Ruby or something that TreeHouse already teaches?

@Gordon Jiroux Javascript is the future :D and single page app.

I wish if we see more JavaScript, BackboneJs, nodejs videos. I wana learn Single page app development :[

Though the syntax is different, the form and many of the keywords are the same... for example:

an example where they are the same in C# (ASP.Net) int i = 0; //declaring an integer named i, and setting it to 0.. in .Net, you declare your variable with a type, if(i == 0){ // Do someting }

Where they are different: Properties... ASP.Net (C# uses "dot" syntax)

(In PHP) Object->Property (in C#) Object.Property

Where it diverges more is that ASP.Net really doesn't have UI "includes" the same as PHP... they have masterpages.. "includes" are Server-side "using" and they are for namespaces. Namespaces are logical organization, sepataions, and collections of objects (classes). for instance the Object DataView belongs to the System.Data namespace. the full logical Path to the object is System.Data.DataView, but if you type using System.Data, you can reference the class directly like this... DataView dv = New DataView();...

All in all they as different in as many respects as they are similar... I find that if someone knows php, they can pickup ASP.Net rather easily, and vice-versa... There are a few things that through some people off a little (If they're not used to a template system like "Smarty")... and not used to "Object Oriented" php

  1. The server-side code for the most part is not mixed with the UI... you write server-side code in a "code-behind" file; It's the code that runs on the server . So if you have a Page.aspx, you'll have a Page.aspx.cs file where you write the majority of your server-side code (For straight ASP.Net.. not MVC etc.)

  2. The Page Lifecycle... whereas php pages are mostly linear in flow, .Net has methods that fire before, during and after a page is "loaded". an easy example is Page_Load() fires before "Button_OnClick()"

  3. Figuring out which classes belong to which namespace, and what properties etc an object has, but "intellisense" helps quite a bit with that... as soon as you start typing... the keyword and properties start showing up in a listbox below your cursor, so you can see all of the properties, methods and events... for instance

@Ajinkya Borade, I write plenty of .Net apps with Javascript (even with JS libraries like jQuery, etc) .

You can write a page completely in Javascript, but eventually that javascript is most likely going to have to talk to a server through AJAX... so there would need to be a Web Service, or some other Server-side endpoint out there written in one of the server-side languages

Additionally, you can contain a .Net Website to one page with a control that supports "paging" like <asp:Wizard> but on an externally facing website that may cause some serious SEO issues

Furthermore .Net pages by default postback to themselves be default, and the server-side code does it's job, but in .Net the objects natively have eventhandlers like a TextBox's .TextChanged(), or a Button's .Click() event

I have built dozens of HTML5/CSS3/JS websites with ASP.Net... the browser doesn't care; Server-side code is executed on the server, and only HTML, Styling and JS get pushed to the browser

@Matthew Campbell, .Net and (Ruby, PHP, etc) could do the same job, yes, but sometimes it's easier, faster, and more cost effective to go with one over the other. Additionally, you won't always have the luxury of picking your platform. Some would argue that while you can run php in a WAMP/XAMP environment, those tools were meant for a process based "POSIX" environment, not a thread-based OS... as a result, php isn't as efficient running on a Windows Server as it would be on say Ubuntu, or RHEL.

The other side of the coin is sad, but in my experience true... .Net developers with the same number of years experience in the same role as a php or ruby developer will make more money hourly or Salary than their counterparts... it may just be as simple as supply and demand, but it seems that php and ruby devs top out at 115 to 125k, and .Net devs top out at 150 to 175k. I was recently on a contract where a company (will remain nameless) needed the same exact "ToolSet"/API programed in both .Net and PHP. I saw the req for both... both sets of code needed to do exactly the same thing. I was given the choice of developing either the .Net or php version, but the company placed a value of $30/hr more on the .Net position, so naturally I took the .Net one... php/ruby seems to be more prolific in the Web Dev Shops & for Customer-facing sites, and .Net seems to be more widely used in the corporate world (internally as Line of Business Apps)... I'm not saying that's how it it, I'm saying through personal experience and observation, that's what I and many of my multi-platform developer friends have seen as well... In-fact about a year ago I finished an approx. 2 year contract refactoring a series of LAMP and Ruby Apps to .Net for a major financial institution. They had made a decision that .Net was they way they wanted to go. and instead of adding new functionality to the existing apps, they wanted them re-factored first. Geography seems to play a big part too... certain areas of the world (even down to a city level) are "pro" Win or *nix, and by extension .Net or php or Ruby... I still maintain, each has it's place and thugs it's better than the others for and things I wouldn't touch it with a stick for. If you want to be most attractive to companies and able to determine what you should use when, you should learn them all.

John Locke
John Locke
15,479 Points

.NET developers get paid more because they are getting harder to find, with the experience level that companies are looking for. Older enterprise systems were built on it, and changing everything over is more complicated than maintaining an existing code base. As time goes on, open source languages will continue to grow, and old proprietary systems will become less and less, but not for a while.

.NET is based on SPA.. knockout n all.

@teamtreehouse please add Knockout, nodeJS courses please