Ok i have a question.
I want to write a simple application.
The job of this application will be to create a document tracking of a list of items.
But I'm wondering what language i should write the application in.
The software should be able to talk to an mssql or equivalent database.
The application should handle multiple concurrent users and should be able to handle an item database of 100,000 unique entries.
And the mostt important thing. I want to build in a dynamic lookup system.
Where you can have a list of database items and as you type into a text box immediately the list of entries gets filtered to match the string.
So in a list containing
wood
jacket
tire
golf
game
if I typed "re"
it should automatically filter the list instantly to just
tire
Any advice on a language that could do this?
Usually, deciding which language should be used needs more details to be absolutely sure the choice can be made properly.
But from what you're saying, my hunch is that the application should be webbased, and it should be programmed in Ruby on Rails.
The search feature you're describing is a bit uncomfortable. In pseudocode, it's basically this (provided you have the list of all items ready):
Code:
List search(String query){
matches = new List
foreach item in item_list {
if item.name.substring(query) {
matches.append(item)
}
return matches
}
So you can immediately see the problem. Since the algorithm has to go through all items linearly, you cannot take any smart shortcuts, like hash-based lookups and the like. That may or may not be an issue down the line, both in terms of processing time required for this, and in terms of RAM used.
You could cut down on the demands by only starting to search if there are more than 3 characters, and using other tricks. Whatever reduces lookup time.
One thing you could do is carrying a table (or view, for that matter) in which it is denoted which names do NOT have which letter. So you have a column for not_A, and not_A holds wood, tire and golf in your example.
Maybe there's a module out there that does tricks like that well; you might want to try and find one instead of cooking that mess up on your own.