Hi,
I am good php programmer and want to learn asp.net.
Can someone tell me what are the best and the worst features of ASP.NET?
I'm moving from PHP to ASP.NET. I don't ever want to see PHP code again.
ASP.NET advantage:
1. Compiled code, with compile-time type-checking. PHP 5 still hasn't
fixed this open hole in their object model.
2. Exception handling. You can trap problems, record the issues, maybe fix,
and present a reasonable error notification to the user, instead of
just having the page blow up and stop, as PHP does.
3. Code-behind model means that all your executable code is in a separate
file from your page "markup" (although most ASP.NET markup is <asp: ...>
tags rather than straight HTML).
4. Field validation. ASP.NET has almost everything you'd ever want for
validating user input, without requiring you to code anything. All
you need is a one-line check to see if everything on the page passed
validation, or not.
5. Better database integration. You can load a table and bind it to
things like displayable table format, or listbox/drop-down lists,
with only a few lines of code.
6. HUGE framework, with lots of available function. It takes only a
few minutes to connect a web service, for instance. Or to write one.
Collections in the framework (including data tables, list controls,
and more) are designed hand-in-hand with iterators in C# and VB.NET,
so it's very easy to work with lists and collections. (I've never
been impressed by PEAR: not enough there, back-level, poor documentation.
..NET is the framework you've wished you had.)
7. Outstanding debugging, including breakpoints, local variable
watch, single-stepping through code, break-on-exception, remote
debugging, trace controls that can be switched on and off without
recompiling, performance counters, and much more.
8. Visual Studio is a highly productive IDE, more than just drag-and-drop
for laying out controls, but also drag-and-drop database access,
context-sensitive help, fully integrated documentation of the entire
framework, code generation, and more. It's also your debugging
environment.
9. Much more: XML support, scalability, integrated session state
management, lots of stuff I'm not remembering off-hand.
10. And I can't emphasize this enough: integration. Everything is
very carefully thought out and planned so that it all works
together smoothly.
The only downsides are initial cost for tools, and the learning curve.
There is a fair amount to learn: ASP.NET is just the framework, and
page markup language. You write executable code in either C# or
Visual Basic (the languages are fully equivalent in all capabilities;
it's just a matter of preference for coding style). ADO.NET is
another part of the .NET framework that provides standardized access
to all databases. .NET is closely tied to the IIS web server. (You
can also install PHP and Perl under IIS, and use it for all your
local web development.) IIS and Apache don't co-exist well on one
machine, because they both need port 80.
I've found the Que certification books to be excellent training.
Get either the 70-305 exam book (ASP.NET and visual basic) or the
70-315 book (ASP.NET and C#). Either book will get you up and
running, including ADO.NET and SQL Server.
Contrary to what someone else said, cheap commercial hosting is
available. Look at myhosting.com as an example; $10 a month gets you
both .NET hosting and a linux/Apache host. Database hosting costs
extra, but it's not out of line.
Diane