Responsive phone-book - howto - a design issue, not a coding one.

Discussion in 'ASP .Net' started by Radu, Jan 17, 2008.

  1. Radu

    Radu Guest

    Hi. I need to implement a "phone-book" kind of feature - I have a list
    of about 50.000 people, and the user should be able to find anyone by
    typing either the (beginning of the) last name, either the (beginning
    of the) first name.

    Assume that the list of names is:

    abc
    abcd
    abd
    ac
    adu
    adv
    aeg
    bai
    bah

    I need incremental search, so by typing "ad" i get to chose from "adu"
    and "adv", but if I type "adv" i see the details for Mr. ADV. Of
    course, if I backspace to just "a" I should have to select from all 7
    records which start with "a".

    The app needs to be responsive (i.e. if possible a minimum of server
    round-trips). How could I implement this ? OnTextChanged of a textbox
    involves a post. Is it possible to do without a post ? Anyway, I have
    no KeyDown/KeyPressed/KeyUp events here, as I would have in
    traditional programming, so each key press should then be followed by
    a post ? This would be at least very annoying ! Would JavaScript help
    me in this instance ?

    Also.... could loading the 50K records in a collection/list on
    page_load help with the response time ? Is this not to expensive/slow
    on load ?

    Please advise on how to attack this problem !

    Thank you very much
    Alex.
     
    Radu, Jan 17, 2008
    #1
    1. Advertising

  2. http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx



    "Radu" <> wrote in message
    news:...
    > Hi. I need to implement a "phone-book" kind of feature - I have a list
    > of about 50.000 people, and the user should be able to find anyone by
    > typing either the (beginning of the) last name, either the (beginning
    > of the) first name.
    >
    > Assume that the list of names is:
    >
    > abc
    > abcd
    > abd
    > ac
    > adu
    > adv
    > aeg
    > bai
    > bah
    >
    > I need incremental search, so by typing "ad" i get to chose from "adu"
    > and "adv", but if I type "adv" i see the details for Mr. ADV. Of
    > course, if I backspace to just "a" I should have to select from all 7
    > records which start with "a".
    >
    > The app needs to be responsive (i.e. if possible a minimum of server
    > round-trips). How could I implement this ? OnTextChanged of a textbox
    > involves a post. Is it possible to do without a post ? Anyway, I have
    > no KeyDown/KeyPressed/KeyUp events here, as I would have in
    > traditional programming, so each key press should then be followed by
    > a post ? This would be at least very annoying ! Would JavaScript help
    > me in this instance ?
    >
    > Also.... could loading the 50K records in a collection/list on
    > page_load help with the response time ? Is this not to expensive/slow
    > on load ?
    >
    > Please advise on how to attack this problem !
    >
    > Thank you very much
    > Alex.
     
    Scott Roberts, Jan 17, 2008
    #2
    1. Advertising

  3. Radu

    bruce barker Guest

    the normal solution is an ajax (javascript) based. in javascript you can
    catch the keydown/keyup. then on each keypress you call back to the server to
    get the list.

    for this to work the server paging code needs to be real fast (100ms or
    less). the page response should be small (<10k).

    this is often called autocomplete. the ajax toolkit has one, but you still
    need to make the server code fast.

    -- bruce (sqlwork.com)


    "Radu" wrote:

    > Hi. I need to implement a "phone-book" kind of feature - I have a list
    > of about 50.000 people, and the user should be able to find anyone by
    > typing either the (beginning of the) last name, either the (beginning
    > of the) first name.
    >
    > Assume that the list of names is:
    >
    > abc
    > abcd
    > abd
    > ac
    > adu
    > adv
    > aeg
    > bai
    > bah
    >
    > I need incremental search, so by typing "ad" i get to chose from "adu"
    > and "adv", but if I type "adv" i see the details for Mr. ADV. Of
    > course, if I backspace to just "a" I should have to select from all 7
    > records which start with "a".
    >
    > The app needs to be responsive (i.e. if possible a minimum of server
    > round-trips). How could I implement this ? OnTextChanged of a textbox
    > involves a post. Is it possible to do without a post ? Anyway, I have
    > no KeyDown/KeyPressed/KeyUp events here, as I would have in
    > traditional programming, so each key press should then be followed by
    > a post ? This would be at least very annoying ! Would JavaScript help
    > me in this instance ?
    >
    > Also.... could loading the 50K records in a collection/list on
    > page_load help with the response time ? Is this not to expensive/slow
    > on load ?
    >
    > Please advise on how to attack this problem !
    >
    > Thank you very much
    > Alex.
    >
     
    bruce barker, Jan 17, 2008
    #3
  4. Radu

    younlaot Guest

    Yup! For a super quick was to implement this (if you don't want to
    code alot of new technology you might not know too much about) go to
    google and search for ASP.NET AJAX. You will find a control toolkit
    that comes with an autocomplete control you can slap down and it has a
    tutorial on connecting to the DB to get the results after each
    keystroke. Great way to do exactly what you want, you will love it!
     
    younlaot, Jan 17, 2008
    #4
  5. Radu

    Ian Semmel Guest

    You should investigate using a soundex field as an index which allows
    the user to type in what he/she thinks the way the name is spelt eg
    Smith Smyth etc will both match

    "Radu" <> wrote in message
    news::

    > Hi. I need to implement a "phone-book" kind of feature - I have a list
    > of about 50.000 people, and the user should be able to find anyone by
    > typing either the (beginning of the) last name, either the (beginning
    > of the) first name.
    >
    > Assume that the list of names is:
    >
    > abc
    > abcd
    > abd
    > ac
    > adu
    > adv
    > aeg
    > bai
    > bah
    >
    > I need incremental search, so by typing "ad" i get to chose from "adu"
    > and "adv", but if I type "adv" i see the details for Mr. ADV. Of
    > course, if I backspace to just "a" I should have to select from all 7
    > records which start with "a".
    >
    > The app needs to be responsive (i.e. if possible a minimum of server
    > round-trips). How could I implement this ? OnTextChanged of a textbox
    > involves a post. Is it possible to do without a post ? Anyway, I have
    > no KeyDown/KeyPressed/KeyUp events here, as I would have in
    > traditional programming, so each key press should then be followed by
    > a post ? This would be at least very annoying ! Would JavaScript help
    > me in this instance ?
    >
    > Also.... could loading the 50K records in a collection/list on
    > page_load help with the response time ? Is this not to expensive/slow
    > on load ?
    >
    > Please advise on how to attack this problem !
    >
    > Thank you very much
    > Alex.
     
    Ian Semmel, Jan 18, 2008
    #5
  6. Radu

    Radu Guest

    Thank you all for your suggestions. I am currently looking at AJAX's
    AutoCompleteExtender.

    Again, thanks a lot for your spending time answering me.

    Alex.



    On Jan 18, 2:38 am, "Ian Semmel" <> wrote:
    > You should investigate using a soundex field as an index which allows
    > the user to type in what he/she thinks the way the name is spelt eg
    > Smith Smyth etc will both match
    >
    > "Radu" <> wrote in message
    >
    > news::
    >
    >
    >
    > > Hi. I need to implement a "phone-book" kind of feature - I have a list
    > > of about 50.000 people, and the user should be able to find anyone by
    > > typing either the (beginning of the) last name, either the (beginning
    > > of the) first name.

    >
    > > Assume that the list of names is:

    >
    > > abc
    > > abcd
    > > abd
    > > ac
    > > adu
    > > adv
    > > aeg
    > > bai
    > > bah

    >
    > > I need incremental search, so by typing "ad" i get to chose from "adu"
    > > and "adv", but if I type "adv" i see the details for Mr. ADV. Of
    > > course, if I backspace to just "a" I should have to select from all 7
    > > records which start with "a".

    >
    > > The app needs to be responsive (i.e. if possible a minimum of server
    > > round-trips). How could I implement this ? OnTextChanged of a textbox
    > > involves a post. Is it possible to do without a post ? Anyway, I have
    > > no KeyDown/KeyPressed/KeyUp events here, as I would have in
    > > traditional programming, so each key press should then be followed by
    > > a post ? This would be at least very annoying ! Would JavaScript help
    > > me in this instance ?

    >
    > > Also.... could loading the 50K records in a collection/list on
    > > page_load help with the response time ? Is this not to expensive/slow
    > > on load ?

    >
    > > Please advise on how to attack this problem !

    >
    > > Thank you very much
    > > Alex.- Hide quoted text -

    >
    > - Show quoted text -
     
    Radu, Jan 18, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Frank
    Replies:
    0
    Views:
    343
    Frank
    Nov 21, 2003
  2. =?Utf-8?B?SmF3YWhhcg==?=

    ASPX page un responsive. after opening Modal Dialog

    =?Utf-8?B?SmF3YWhhcg==?=, Sep 29, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    507
    Lau Lei Cheong
    Sep 30, 2004
  3. James Nugent
    Replies:
    4
    Views:
    844
  4. Timasmith
    Replies:
    12
    Views:
    612
    Julian Treadwell
    Dec 8, 2006
  5. deadpickle

    Gtk2 IRC Client Sluggish and not Responsive

    deadpickle, Mar 5, 2008, in forum: Perl Misc
    Replies:
    0
    Views:
    190
    deadpickle
    Mar 5, 2008
Loading...

Share This Page