Results 1 to 4 of 4

Thread: C# AMI mapping question/suggestion

  1. #1
    adv12 is offline Registered User
    Name: Andrew Vardeman
    Organization: Iowa State University
    Project: USDA agricultural survey
    Join Date
    Oct 2008
    Posts
    9

    C# AMI mapping question/suggestion

    Hi Zeroc people.

    I'm curious about the mapping chosen for AMI methods in C# and have a probably-naive suggestion that would make my life easier in one limited scenario.

    It seems slightly cumbersome to have to extend a different abstract class for every unique AMI method you call. I understand that this class does two things: it provides callback methods and allows the caller to provide context for handling the response. In C#, I expected a solution that involved delegates and a separate context object passed to the call and passed back to the callback methods.

    It could be argued that the effect is the same and the only difference is syntax: after all, the developer still has to provide custom code to process the result of each method. This is true unless the processing that needs to happen is generic. I have a GUI app where I'm filling up a grid with values from a server. The calling code needs to know what server method to call, but all the callback needs to do is plop the return value in the right table cell. It doesn't care what method was called. So if Ice used delegates and a context object for callbacks, I could write a single method to handle responses from the server (at least for all server methods with the same signature). Under the current mapping, I just shrugged and said, "oh well, I don't need async *that* much."

    Has such a mapping been considered? Are there implementation problems I'm missing?

    Thanks,

    Andrew

  2. #2
    michi's Avatar
    michi is offline Registered User
    Name: Michi Henning
    Organization: Triodia Technologies
    Project: I have a passing interest in Ice :-)
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    1,055
    Doing such a mapping is on our "to do" list.

    Cheers,

    Michi.

  3. #3
    adv12 is offline Registered User
    Name: Andrew Vardeman
    Organization: Iowa State University
    Project: USDA agricultural survey
    Join Date
    Oct 2008
    Posts
    9
    Cool, thanks! And thanks for the response!

  4. #4
    michi's Avatar
    michi is offline Registered User
    Name: Michi Henning
    Organization: Triodia Technologies
    Project: I have a passing interest in Ice :-)
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    1,055
    BTW, Ice for Silverlight already does this.

    Cheers,

    Michi.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. array mapping question
    By hariss in forum Help Center
    Replies: 2
    Last Post: 11-17-2009, 04:45 PM
  2. One question about cpp mapping
    By peter in forum Help Center
    Replies: 1
    Last Post: 11-12-2009, 07:21 AM
  3. Question about AMI
    By OrNot in forum Help Center
    Replies: 3
    Last Post: 12-24-2005, 03:12 AM
  4. AMI question
    By stephan in forum Help Center
    Replies: 7
    Last Post: 03-02-2005, 04:59 AM
  5. Dummy c# mapping question
    By stephan in forum Help Center
    Replies: 5
    Last Post: 02-27-2005, 10:49 PM

Posting Permissions

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