Fog Creek Software
Discussion Board

Is this easier in ASP.Net?

Here is my usage pattern of ASP 3.0 for most (IE only) tasks:

Get data from the DB per request.

Give data to browser as XML data island or ADTG (for RDS).

Bind to data in the browser, edit/validate data, send back to ASP.

Validate data, save data back to DB.

Reason I'm asking is because I'm having trouble coming up with reasons why I should use .Net right now and I'm feeling *slightly* pressured to use it.  All of our ASP apps tend to be add-ons or custom screens for our main application (a call-center platform which consists mainly of big fat desktop applications for the client side).

I would like to use .Net eventually after Microsoft works out some of the kinks and  I usually don't jump on the 1.0 bandwagon of anything that comes out.  Furthermore, we are a small shop and barely have time to keep up with feature requests, etc. and I don't see the investment as worth it right now.  It just doesn't appeal to me.

Soon, we are going to make a light web client that mirrors some of the capabilities that exist in our desktop applications soon, and my boss asked me about .Net. I said "not yet", and he respects that, since we haven't really done anything serious with it yet (however, there's got to be a first time and I've got enough knowledge to be dangerous :). It didn't help that he had just talked to the lead developer of some company who's only product is a .Net component for mapping, who told him ".Net's made everything easier for me!".

In an effort to remain objective I'd like to hear from you guys.  Thanks.

Monday, April 19, 2004

Soon, we are going to make a light web client that mirrors some of the capabilities that exist in our desktop applications soon...

How am I supposed to make big decisions like this when I can't even write English??

Oy Vey!

Monday, April 19, 2004

For your own sake, I would jump into .NET asap... I realize ASP3.0 is probably good enough for you purposes, but don't get left behind technology-wise for the sake of using the best tool for the job at hand.

At some point, a pointy haired boss will send down a directive to make the switch to .NET, and they will hire someone from the exterior to do the job, and fire you a few weeks later. They'll say it's because the other guy has 10 years experience in .NET (even though it's been out for less than 5...)

Learning something on the job is the only credible way to do so, and it'll serve you well.

Monday, April 19, 2004

Personally, yes, I do think it is easier in ASP.NET. Now let me qualify that.

There is defiantly a learning curve, and I wouldn't jump right into using it on something new unless you have some extra time in your schedule. When we first started using ASP.NET, we had the benefit of a lax schedule which allowed us some time to make some mistakes and work out some things more than once. Now that we have used it on several applications, we are developing cleaner apps in less time than we did in ASP 3.0.

As far as working with data, we work with DataGrids and DataLists an awful lot. These are nice because they can be set up to fire events when you want to edit, update, delete, etc...  Then the event grabs the changed info and sends that to a stored proc to actually handle the update or what have you.

Validation is handled almost automatically with RequiredFieldValidators, RegularExpressionValidators, RangeValidators, and when necessary, CustomValidators.

So I guess what I'm saying with this big blob of opinion is that I really like programming. I was almost turned off of web programming until I was swayed into trying it out. With the .Net framework in general it seems like whenever I'm looking to do something, if I take a quick look around I'll find something that will do the job for me in the framework. Ok, not all the time, but you get the idea: There are a lot of tools that come with ASP.NET that are a little harder to do in ASP 3.0.

Sorry, didn't mean to be so long winded without really saying much of anything!

No, I am not an employee of Microsoft. In fact, I tried to be (went through the whole interview process and all), but apparently, I "need more experience". ;) ]

Tuesday, April 20, 2004

OK - here's the scoop.

After 5 years of progressively complex CRUD webapps in PHP & ASP/VB COM, I moved to VB / ASP.NET.  Here's my findings:

* separate code + logic for free
* Validation: Very slick, and very easy
* it's OOP - a lot more pleasant to live with
* User / Server controls : also very slick, possibly the best feature.  Encapsulate their own HTTP request/response cycle!
* Framework has lotsa classes
* IDE is good / sometimes great
* Parameterized queries

* Webform designer doesn't really make the grade
* state persistance mechanisms (viewstate) suck
* Weird client side hooks and browser sniffing = mysteries
* ADO.NET: The Latest Absurd Approach To Data Access - specifically the datadapter paradigm

* provided controls (datagrid,datalist) are cool, but I had built most of this already in ASP / PHP / whatever
* Big productivity gains seem tied to VS.NET

In conclusion: if you have been doing your web apps with a decent OO-esque design, and are comfortable with things like templating and web controls / widgets, then you will like ASP.NET, and should pick it up rather quickly.

Tuesday, April 20, 2004

I'm in the middle of that learning curve right now.  Compared to ASP 3.0, ASP.NET is worlds better.  Compared to C/C++ or PHP?  I'm not so sure.  The components are pretty nice.  I still loath Visual Basic, and the ASP.NET components suffer from some of the same problems that plague Visual Basic components.  Principally, it's a real pain in the tucus when you want to do things that are a little beyond what the control designers had in mind.

The interface event model is pretty nifty, although it's nothing that I haven't implemented in other languages already.  It's nice to have it available already, but if you needed it you already had it in other languages.

I'd make the leap from ASP 3.0 because you almost certainly will see benefits.  If you were developing in any other language though, I'd say wait for the fad to pass.

Clay Dowling
Tuesday, April 20, 2004

"The interface event model is pretty nifty..."

Could someone comment more on this? Does this mean that it's now easier to handle any event from a control/component on the server?

I saw an example where a textbox's Change event was handled on the server, but I don't see any need for this.

In my opinion, you only go back to the server when you have to (to send or receive data).

Tuesday, April 20, 2004

Interface events are neat in that you can define an event for a particular button, rather than having to pass tokens through the request to decide which event to fire.  It's not a really big deal IMHO.  ASP.NET just uses a 'lifecycle' model where a request starts with 'page_load' and the user-definable events basically just allow you to trigger an HTTP request in a programmable way.

Where it does shine is when using server controls.  Each control gets it's own events and lifecycle.  When you nest the controls in a page (or other control), you can actually fire the logic for all the controls for free.

An example is a form that contains a few oft-used items, in effect, several sub-forms.

Each of these 'sub-forms' needs to be bound to some data at load time.  With server controls,  you can specify the data bind in an event ( like page_load ) on each control.  You can add validators or transform data or whatever.  When you drop them all in a page, each control's respective page_load gets fired when the container's does.

This means you can mix and match widgets and the validation and complex behaviors come with - a nice feature.

The only broblems is that doing this effectively negates the great productivity aids in VS.NET - aside from simple drag-n-drop forms, VS.NET's designer is pretty useless for handling the less trivial stuff.

Tuesday, April 20, 2004

I just read "Control Execution Lifecycle" for Server Controls on MSDN and now I see what you're talking about.

OK, I guess I'm going to code some in-house things with ASP.Net now.  Can I still use frames at least or is that something that is frowned upon?

Tuesday, April 20, 2004

*  Recent Topics

*  Fog Creek Home