Resources for moving to C#?
June 27, 2005 11:24 AM   Subscribe

Can anyone recommend some resources from someone moving from CFMX/PHP to C#?

My background is in CFMX and Oracle, though I know some PHP and dabbled in ASP back in the day. I've dealt with MSSQL before. A new project I'm about to undertake will require migrating my work environment to C#/MSSQL. I've used Visual Studio for C++ back in the late 90's, so I don't think the new .Net Studio (or whatever they call it these days) will be completely foreign to me.

Can anyone recommend some sites/books/whatever to help with this transition?
posted by mkultra to Computers & Internet (3 answers total) 1 user marked this as a favorite
 
I use the usual O'Reilly suspects, although I moved from Java and JSP:

C# In A Nutshell

ASP.NET In A Nutshell

ASP.NET Cookbook
posted by veedubya at 2:57 PM on June 27, 2005


Learn ASP.NET from scratch. The 'transition' isn't really one at all - if you think of ASP.NET like PHP, you will get nowhere. You really have to throw yourself into ASP.NET as a completely different way of writing web applications, which you may or may not like. If you don't like it, go back to PHP, because making ASP.NET fit a PHP model is bad news.

I second the book suggestions, though. In addition, I use C# Core Language (dialup today, so no links, sorry) whenever I have a language issue. I came from C++, so the languages were similar enough to get me into trouble, but the book is good at clearing up features/etc. You need a decent knowledge of C# to use it though, so don't expect to learn from it.

Programming Microsoft .NET is useful for big-picture stuff.

Designing Microsoft ASP.NET Applications is another decent one for big-picture stuff, specific to ASP.NET.

Note that a few days mucking around in tricky web apps will teach you much more effectively than the books will.

Page Events: Order and Postback - This site/chart has helped me out of so many jams you wouldn't believe. Print it, put it by your computer, and every time something doesn't work right, look at it and make sure you're not doing something stupid.
posted by devilsbrigade at 4:01 PM on June 27, 2005


I feel for you, as I had to do exactly this transition myself. Sadly, I'm not sure there are any books that deal directly with the conceptual differences that devils refers to.
I think most Asp.Net books are written to be background-unspecific, and they only vaguely let you in on the secret that ASP.Net is structure completely differently.

This being the case, let me see if I can think of a few pointers:

- .Net is designed to do everything possible to resist the model of building one page with a form, and an action page to receive the post. Everything is typically on the same page, so probably one of the first things you're going to have to do is convert a bunch of paired form/action pages to single pages with button click event handlers.

- ASP.Net is based on Controls. Pretty much every kind of form element is neatly wrapped up in an ASP Control, so learning to use these things, which is quite easy, is among your early tasks.

- Coming from a CF/php background probably means you're pretty good with HTML. Do not use designer mode in Visual Studio .Net. It will rewrite all your code in ways that will make you want to kill yourself... but not before whoever at Microsoft is responsible.

- Many of the books will only show you C# code that is written in-line in a script block at the top of an aspx page. I think they do this to conserve space, as they don't need to display the visual overhead of the codebehind to get their point across. I'd avoid this in the long run, though. It's just not the right way to do it, so don't establish that habit now.

Good luck.
posted by frufry at 7:43 PM on June 27, 2005


« Older birdhouse   |   computer freezing Newer »
This thread is closed to new comments.