CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

View Poll Results: Whick is a better option in your Opinion

Voters
10. You may not vote on this poll
  • .NET 2.0 ICallbackEventHandler

    4 40.00%
  • AJAX

    6 60.00%
Results 1 to 10 of 10
  1. #1
    Join Date
    May 2003
    Location
    upstate NY
    Posts
    168

    ICallbackEventHandler VS AJAX

    Ok,
    .NET 2.0 ICallbackEventHandler or AJAX?

    Which would you implement and why?


    Will
    --------------------------------------------
    Tell me and I will forget
    Show me and I will remember
    Teach me and I will learn

  2. #2
    Join Date
    May 2003
    Location
    upstate NY
    Posts
    168

    Re: ICallbackEventHandler VS AJAX

    anyone going to post any comments?


    Will
    --------------------------------------------
    Tell me and I will forget
    Show me and I will remember
    Teach me and I will learn

  3. #3
    Join Date
    May 2002
    Posts
    10,943

    Re: ICallbackEventHandler VS AJAX

    Between your posts there was a lapse of 3.5 hours. Give it time.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  4. #4

    Re: ICallbackEventHandler VS AJAX

    Hello. I would have voted if I were familiar with .NET 2.0 ICallbackEventHandler.

    Perhaps, it would be better to post an article (or two) about those two here so at least people have a quick link to check and read. Just my two cents.

    EDIT:
    Okay, I found a couple of links:
    AJAX - http://en.wikipedia.org/wiki/AJAX
    ICallbackEventHandler- http://www.dotnetjunkies.com/tutoria...0EECF13D7.dcik
    Last edited by cherish; February 13th, 2006 at 03:06 AM.
    A few friendly reminders:
    * Use Code Tags when posting code.
    * Rate good replies/post by clicking "Rate this Post" and leaving a positive feedback.
    * Things should be made as simple as possible, but not any simpler. -- Albert Einstein

  5. #5
    Join Date
    May 2003
    Location
    upstate NY
    Posts
    168

    Re: ICallbackEventHandler VS AJAX

    thanks for the links...

    So what would you choose?


    Will
    --------------------------------------------
    Tell me and I will forget
    Show me and I will remember
    Teach me and I will learn

  6. #6

    Re: ICallbackEventHandler VS AJAX

    They're basically the same thing... they both use the XMLHTTP object to make the request. The ICallbackEventHandler just makes things a little easier on you.

    I think from the article cherish posted use the CallbackEventHandler *if* you're developing a 2.0 website and you only plan to ever run it as ASP.NET /MS.

  7. #7

    Re: ICallbackEventHandler VS AJAX

    Quote Originally Posted by mmetzger
    They're basically the same thing... they both use the XMLHTTP object to make the request. The ICallbackEventHandler just makes things a little easier on you.

    I think from the article cherish posted use the CallbackEventHandler *if* you're developing a 2.0 website and you only plan to ever run it as ASP.NET /MS.
    Oh, I see. Thanks for the additional info, mmetzger.
    So I guess, it basically comes down to personal preference in choosing which one to use.

    EDIT:
    I found another article, let me quote here a portion I think is noteworthy:
    As I see it, AJAX provides two things over and beyond ICallbackEventHandler. The first feature is arbitrary parameters to the target method. The implementation uses reflection to map the incoming call onto an arbitrary method and its parameters. This is certainly convenient. The second feature going for it is generating JavaScript objects in the client script that correspond to server side types returned from the callback method. This is also very convenient.


    With those two slick features over ICallbackEventHandler, it’s easy to overlook what AJAX doesn’t do well. The primary thing that ICallbackEventHandler has over AJAX is that it integrates very well into the server page lifecycle. This might seem unnecessary and it is if all your callback method is executing code unrelated to the page object on the server (like accessing a database and returning some values, say). But, integrating into the page model is essential if you want to leverage all those server controls.
    Source: ICallbackEventHandler vs AJAX.NET
    Last edited by cherish; February 13th, 2006 at 08:48 PM.
    A few friendly reminders:
    * Use Code Tags when posting code.
    * Rate good replies/post by clicking "Rate this Post" and leaving a positive feedback.
    * Things should be made as simple as possible, but not any simpler. -- Albert Einstein

  8. #8
    Join Date
    Apr 2001
    Location
    South Africa, Jo'burg
    Posts
    680

    Re: ICallbackEventHandler VS AJAX

    Hi,

    I vote for AJAX, as they both achieve the same result. AJAX though prevents vendor lock in. If you want to change from a MS server to a *nix/other server you can do so with minimal effort, provided you didn't use AJAX from within ASP/.NET code.

    Byron

  9. #9
    Join Date
    May 2003
    Location
    upstate NY
    Posts
    168

    Re: ICallbackEventHandler VS AJAX

    Remember tho...

    With AJAX .. at least now you are required to download AJAX.net if you want to us it in a .NET application, if you are developing with 2.0 however there is no need to download anything as the ClientCallback is already part of the framework. Untill Microsoft releases their AJAX.net plug-in I will have to put my vote on ClientCallBack.

    AJAX Examples:
    ]http://www.backbase.com

    http://www.ajaxmatters.com

    XMLHttpRequest Examples:

    http://developer.apple.com/internet/...mlhttpreq.html


    http://www.fiftyfoureleven.com/search/?p=xmlhttprequest


    Thanks again for the reply's

    Will
    --------------------------------------------
    Tell me and I will forget
    Show me and I will remember
    Teach me and I will learn

  10. #10
    Join Date
    Apr 2001
    Location
    South Africa, Jo'burg
    Posts
    680

    Re: ICallbackEventHandler VS AJAX

    Quote Originally Posted by womalley
    Remember tho...

    With AJAX .. at least now you are required to download AJAX.net if you want to us it in a .NET application, if you are developing with 2.0 however there is no need to download anything as the ClientCallback is already part of the framework. Untill Microsoft releases their AJAX.net plug-in I will have to put my vote on ClientCallBack.
    That's only if you're unfortunate enough to have a .NET app. Seems there already is vendor lock in.

    Byron

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured