First of all, adding just a little AJAX can significantly improve the user's experience with as little as 10 lines (on the html source) for the first update panel, 8 thereafter. I believe it is a great improvement for any site that posts back for minor things, such as on-the-fly server-side validation. Also, instead of using self-created javascript to validate on the client side AND validate server-side on a full post back, I can just run the server-side validation directly in the background.
One problem I ran into was creating controls dynamically. Even if all the controls were created on the first page load, there were some issues with posting back where the controls didn't retain their values. This was just a problem with when the controls were created.
For example, I'm used to doing most things in Page_Load. I gathered custom dataobjects as a datasource and bound them to a datalist every time the page loaded. The problem I had was that the controls needed to exist in order for the ViewState to be loaded correctly for them. Thus, I put the data gathering and DataBind() method in my Page_PreInit, and the ViewState loaded correctly, retaining all values. My solution may be a workaround to the correct way, but this was simple and it works.
The biggest issue, I find, is that AJAX will weed out the people who know .NET and programming concepts from those who don't. A co-worker of mine couldn't, and didn't, want to know WHY the AJAX wasn't working or how to fix it. (I was discussing the different stages in the Page life cycle, i.e. preinit, init, load, prerender, etc., and why the Page wouldn't remember a dynamic control's value). I told him my solution to the problem, and he said it wouldn't work for what he already had done, and instead put a lot of static invisible labels in his page to save the information. And we're supposed to be in the "refinement" and refactor stages of website version 2.0, upgrading from 2003 to 2005.
Hi,
Thanks for the insights and opinions. Another thing I hope to get is on the impact AJAX use has on bandwidth issues for high volume sites. My guess is that a good AJAX implementation would save a lot, but that's not the kind of data I'd have to look at - and it might be a bit early for that. I wonder if bandwidth savings will be a bigger driving force for AJAX implementation than user experince?
Your point about differenciating between ASP.Net developers, is likely true (but maybe a bit harsh if applied generally). I take your comment as meaning it helps in an evironment like yours, where a certain level of understanding of the underlying concepts is critical, but not all situations require the same skill set. I also wonder if that requirement and effect will last, as AJAX becomes better supported and - like ASP.Net development in gerneral - requires less understanding of how it works to get it to work. Probably, there will be plenty of both highly skilled developers that know the frameworks inside and out, and those that know enough to get a lot (or enough), accomplished.
My perspective is not as a developer, though I have to know and appreciate the concepts developers work with. Thanks again for your input. BRN..
I guess I've never had to think about bandwidth issues before as I've never dealt with high-volume sites. Mine have all been personal sites for local businesses or internal/restricted sites where there are limited authorized users, and/or a highly configurable network setup for internal apps.
You're probably right about my criticism. Most people don't need to know things, but they do need to know how to investigate a problem and/or listen when someone tries to tell them how something needs to be fixed. It was most likely an indirect way of venting, as I only have one coworker. : /
But anyway, 10 minutes updating an existing page isn't bad for the results.
No comments:
Post a Comment