473,783 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ajax or just javascript

ton
Hi,

I wander what to do. I'm developing a webapplication. One of the parts is to
show records from a database.
To modifiy a value, text of relational link or date I would like to use Ajax
where possible. I saw the posiibilty of the Ajax control toolkit with the
calendar extender.
How nice. But is it fast? Thats the question, because the roundtrip to the
server would build the full page in postback and only the changes will be
posted back to the client. But it still is a full "renew" of the entire
page.
So my question is:

What is the advantage of using these controls, is it really faster, or is
there another way (javascript) to get a small calendar when the date-field
got the focus.

Please comment of better help me if you can

Thanx in advance
Ton

Jun 27 '08 #1
4 1503
"ton" <to*@nospam.nlw rote in message
news:14******** *************** ***@cache3.tilb u1.nb.home.nl.. .
What is the advantage of using these controls, is it really faster, or is
there another way (javascript) to get a small calendar when the date-field
got the focus.
Ajax is superb technology. However, that does not mean that it must be used
for every eventuality...

The calendar example is a good one. I have a JavaScript calendar which I've
used for years. It does everything I require of it, namely to display a
month at a time and to respond to mouse clicks. While the user is scrolling
backwards and forwards through the months there is no roundtrip to the
server at all. When the user chooses a date, I can add the date to a DOM
control or cause a postback if I want to. I can even persuade it to call a
server-side C# function via Ajax. The only time I might want it to retrieve
data from the server is when the client requires more functionality that
this e.g. they might want to display public holidays in a different font or
colour or whatever. Then, the calendar control would need server-side
connectivity, almost certainly through Ajax.

You are correct that Ajax callbacks are not so "heavy" as full postbacks,
but they do still involve a roundtrip to the server.

It's always been my belief that one of the simplest ways to improve a web
application's performance is to minimise the roundtrips to the server.

So, I would say that if it can be done client-side with JavaScript, then do
it client-side with JavaScript. This applies especially to things like
validation - e.g. there is absolutely no requirement whatever to validate
the contents of a numeric-only TextBox server-side...

I'd also advise you to have a serious look at Silverlight - some of the
possibilities with that technology are bordering on the revolutionary.. .
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #2
ton
thank you. It is just what I had in mind. Ajax but not for everything

can you tell me what calendar control you use? And is it hard to implement
it on VB.NET websites?
Or better can it be used in a web server control, because I've allready
developed a webserver control which displays te record of a table in 2
columns. To modifiy a date field the user has to type the date and I want to
chenge this by using a ajax or javascript control.

thanx

Ton

"Mark Rae [MVP]" <ma**@markNOSPA Mrae.netschreef in bericht
news:%2******** **********@TK2M SFTNGP02.phx.gb l...
"ton" <to*@nospam.nlw rote in message
news:14******** *************** ***@cache3.tilb u1.nb.home.nl.. .
>What is the advantage of using these controls, is it really faster, or is
there another way (javascript) to get a small calendar when the
date-field got the focus.

Ajax is superb technology. However, that does not mean that it must be
used for every eventuality...

The calendar example is a good one. I have a JavaScript calendar which
I've used for years. It does everything I require of it, namely to display
a month at a time and to respond to mouse clicks. While the user is
scrolling backwards and forwards through the months there is no roundtrip
to the server at all. When the user chooses a date, I can add the date to
a DOM control or cause a postback if I want to. I can even persuade it to
call a server-side C# function via Ajax. The only time I might want it to
retrieve data from the server is when the client requires more
functionality that this e.g. they might want to display public holidays in
a different font or colour or whatever. Then, the calendar control would
need server-side connectivity, almost certainly through Ajax.

You are correct that Ajax callbacks are not so "heavy" as full postbacks,
but they do still involve a roundtrip to the server.

It's always been my belief that one of the simplest ways to improve a web
application's performance is to minimise the roundtrips to the server.

So, I would say that if it can be done client-side with JavaScript, then
do it client-side with JavaScript. This applies especially to things like
validation - e.g. there is absolutely no requirement whatever to validate
the contents of a numeric-only TextBox server-side...

I'd also advise you to have a serious look at Silverlight - some of the
possibilities with that technology are bordering on the revolutionary.. .
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Jun 27 '08 #3
"ton" <to*@nospam.nlw rote in message
news:24******** *************** ***@cache3.tilb u1.nb.home.nl.. .

[top-posting corrected]
>The calendar example is a good one. I have a JavaScript calendar which
I've used for years.
Can you tell me what calendar control you use?
It's one that I wrote myself based on several that I found on the Internet,
all of which did part of what I wanted...
And is it hard to implement it on VB.NET websites?
I've never tried it with VB.NET as I never use that but, as I said, it's
pure client-side JavaScript so the server-side language is irrelevant...
Or better can it be used in a web server control
As above...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #4
ton
thanx

ton

"Mark Rae [MVP]" <ma**@markNOSPA Mrae.netschreef in bericht
news:eR******** ******@TK2MSFTN GP03.phx.gbl...
"ton" <to*@nospam.nlw rote in message
news:24******** *************** ***@cache3.tilb u1.nb.home.nl.. .

[top-posting corrected]
>>The calendar example is a good one. I have a JavaScript calendar which
I've used for years.
>Can you tell me what calendar control you use?

It's one that I wrote myself based on several that I found on the
Internet, all of which did part of what I wanted...
>And is it hard to implement it on VB.NET websites?

I've never tried it with VB.NET as I never use that but, as I said, it's
pure client-side JavaScript so the server-side language is irrelevant...
>Or better can it be used in a web server control

As above...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4327
by: bobzimuta | last post by:
I'm creating a simple AJAX library. It's an object that will return an array containing the response text or xml. I'm trying to find a way to assign the response as a property of the object, but from within an inline function. Within the AJAX object: this.xmlhttp = new XMLHttpRequest(); this.response = ''; //to contain the response text OR xml var that = this; //since we cannot reference this within the
0
1845
by: melledge | last post by:
Ajax Developers' Day added to XTech 2006 agenda XTech 2006 - 17-19 May - Hotel Grand Krasnopolsky - Amsterdam, The Netherlands
5
1768
by: darrel | last post by:
I've been playing with prototype.js and scriptaculous to create some nice drag-and-drop interaction on my applications GUI. That's working well. Now I want to take the next step and start passing data back and forth between my page and the server via AJAX. In terms of .net, can someone give me the overall concept? Normally, I'd have a function in my codebehind that grabs a dataset and then binds that to a control on my aspx page.
5
20089
by: dougwig | last post by:
I'm trying to handle the scenario where a user's session times out and and their ajax request triggers a redirection by the webserver (302 error?). I'm using Prototype 1.4 and the my works great with Firefox,but with IE6 the onFailure never gets called and the request never completes. My code: var ajaxReq = new Ajax.Request( url, {method: 'post', parameters:
31
3166
by: Tony | last post by:
I just noticed that prototype.js is one of the files in the Ajax.NET distribution - I'm pretty concerned about this. Does anyone know if this is the same "prototype.js" that is not well-liked around here? If so, do you know if Ajax.NET can be used without prototype.js? -- "The most convoluted explanation that fits all of the made-up facts is the most likely to be believed by conspiracy theorists. Fitting the
1
4033
by: geevaa | last post by:
http://www.phpbuilder.com/columns/kassemi20050606.php3 XMLHttpRequest and AJAX for PHP programmers James Kassemi Introduction: Although the concept isn't entirely new, XMLHttpRequest technology is implemented on more sites now than ever. Compatibility is no longer an issue (IE, Mozilla and Opera all support it), and the benefits to using it are amazing. There are too many PHP programmers avoiding any
17
11883
by: Arjen | last post by:
Hi, I want to reload 2 divs at one click. Ive tried: <a href = "javascript:void(0);" onclick="show('ajaxrequest.php?action=removefield','div1');show('ajaxrequest.php?action=reloaddiv2','div2')">verwijderen</a> While both seperate actions work they dont when I put them together. Anyone know how to fix this ? My ajax.js with funcition show
0
7191
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along the way. First, deep linking is not something that a completely AJAX web site should be able to do by it's very nature of everything being on one page basically. So how can a person deep link to something that is on one page? This question...
8
4344
by: Bill Gower | last post by:
I have a webapp that uses the AjaxControlToolkit. The app and ajax works fine when run within my dev server in Visual Studio 2005 but does not work on IIS. Any Suggestions? Bill
6
5483
by: Bart Van der Donck | last post by:
Hello, I'm presenting my new library 'AJAX Cross Domain' - a javascript extension that allows to perform cross-domain AJAX requests. http://www.ajax-cross-domain.com/ Any comments or suggestions are welcome. --
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9946
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6735
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.