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

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

am 17.01.2008 21:12:29 von Radu

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.

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

am 17.01.2008 21:32:21 von Scott Roberts

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



"Radu" wrote in message
news:5ca6a31d-8a0b-410c-94b3-ac5ac1457b5f@e25g2000prg.google groups.com...
> 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.

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

am 17.01.2008 21:48:02 von brucebarker

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.
>

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

am 17.01.2008 22:40:44 von younlaot

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!

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

am 18.01.2008 08:38:46 von Ian Semmel

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:5ca6a31d-8a0b-410c-94b3-ac5ac1457b5f@e25g2000prg.google groups.com:

> 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.

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

am 18.01.2008 17:19:58 von Radu

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=A0am, "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:5ca6a31d-8a0b-410c-94b3-ac5ac1457b5f@e25g2000prg.google groups.com:
>
>
>
> > 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 -