These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:08 pm Advanced search

Search-field with suggestions without scripting

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

Re: Search-field with suggestions without scripting

Postby macrojd » Wed Mar 16, 2011 12:41 am

Hi PhilG. So what you are proposing is to have an attribute in the HTML tag to access your server but then implement your own database and scripts in the server. Then it must be possible, but without a standard information most developers won't use it. For example, Geolocation is good, but because I don't have to update the list of IPs necessary to detect users' location myself. Without that standard information available Geolocation probably won't be used by anyone. I think the same happens in this case. The most important thing and the most difficult to create is the database and the algorithms, the rest is simple and probably will be implemented by user-friendly API constructed over the WebSocket API and other like this, but then you will have to do all the hard work (and without any reference). Just look at the dictionary, how do you set the relevance for millions of possible queries if you don't have previous feedback. You simply can't do that, and that's the most important part of this feature, the rest is simple to do.

I don't think the rest of the developers were happy because of the idea to implement a feature like you are asking, I think they were exited with the idea to have the feature and the standard information available, without having to do the hard work by themselves (exactly like the Geolocation API).

And I don't think we should worry anymore about Javascript. This is the language of the future, in just a few years those that don't have Javascript activated won't be able to access any good application. At this moment the number of users with Javascript deactivated is less than 5% and continues going down.

JD
macrojd
<h5>
 
Posts: 16
Joined: Thu Mar 03, 2011 1:20 am
Location: Canada

Re: Search-field with suggestions without scripting

Postby macrojd » Wed Mar 16, 2011 3:44 am

after thinking for a while I realized that there are non general websites that could find this useful. Website focused on specific information don't need huge databases to supply data to their users. But I still don't see it implemented without Javascript. No because is not possible, but because there are too many things to configure and HTML5 is tending to provide complete solutions and low-level APIs to create easy to use libraries over them. It's like going in the opposite direction.

I was looking for an implementation of the <datalist> element on this matter and I found this:
http://dev.opera.com/articles/view/an-h ... e-suggest/

There I can see what were you talking about, but I insist, it has no sense to avoid Javascript when everything is going that way. Even to play videos you need Javascript in HTML5. And with all the amazing APIs already available not use Javascript is just crazy.

JD
macrojd
<h5>
 
Posts: 16
Joined: Thu Mar 03, 2011 1:20 am
Location: Canada

Re: Search-field with suggestions without scripting

Postby CasparLamy » Wed Mar 16, 2011 8:49 am

I agree with Phil:
you need the same database, the same search-algorithms, the same relevance-sorting. No matter if you use "classic search queries", "incremental suggestion-search" with JavaScript or "incremental suggestion-search" without JavaScript. On the server there is no difference. This suggested feature is about to use this server-feature (that you can see as blackbox and is in use on much sites today) in the client without JavaScript.

And I don't see, why this only should be able to handle by big players like Google... PHP, Content Management Systems, etc. provide search-functions today. If there would be such a feature they would support that too, so that everybody who wants to use this, can use it.

I really don't see any problems.

@macrojd:
Of course there is a general discussion which things should be done with JavaScript and which things should be done declarative with HTML/CSS. Like Phil said: there are things that only could be done with programming (games,...). But why use Scripting for things, that also can be done declarative? This declaravtive way was the success of the WWW. You can use the web without gaming, but you can't use the web without the information done declarative.

You say, less than 5% surf without JavaScript. I don't know, if this is true, but I know tht NoScript is one of the most used add-ins for Firefox. But even if it would be only 1% in the future: why reach 99%, if you can reach 100% ? If you print posters for your business, would you destroy 1% after printing?

Features like the new possibilities for forms in HTML5 were also ipossible with scripting, but there were much reasons, to also implement that declarative.

And if there comes a serious attack on Scripting, the number of usage can decrease again. I personally think, that there will never come a day, where 100% of users use JavaScript. Sometimes more will use it, sometines less. (I personally use NoScript and activate Scripting only on trusted sites like online-Banking, Mail, the pages of my university,...)

And the declarative way would have more benefits than only make it usable for people with scripting deactivated. Even if every browser would have Scripting without the possibility to deactivate that, this declarative way would have benefits for accessibility (screen-readers,...), usability and maybe even speed.

If this feature would be done declarative in HTML there is no duty to use it. But the webdesigners who want to have it that way, should be able to use that.
CasparLamy
<h6>
 
Posts: 4
Joined: Thu Nov 25, 2010 2:19 pm

Re: Search-field with suggestions without scripting

Postby macrojd » Wed Mar 16, 2011 4:18 pm

Hi CasparLammy. Yeah, I was confused at first for two reasons, first I read a comment about this feature and the guy mentioned only Google and Wikipedia, and I immediately thought about general queries that are impossible to answer without an enormous database and previous search history. And second, I'm dedicated to work with the APIs provided by HTML5 and I'm so involved in that that I can't see a world without Javascript. When you start working with HTML5 (the entire specification not only HTML and CSS) you can see where the web is going and thinking not to use Javascript in that world is like thinking about creating desktop application without a programming language. Even today, the standard for the web is progressively including libraries like jQuery. Everything is going there, so since I'm posting messages in this forum I collide with a world of people that still don't have Javascript in their minds.

I think that there are several tendencies in HTML5 that don't allow this. HTML is going to be just a markup language, almost exclusively for structuring (almost), the solutions are full solutions, not partial, and Javascript is one of the main actors. The feature you proposed is kind of violating this premises, adding complexity to HTML, avoiding the use of one of the main actors, and providing an incomplete solution (only solving the coding in client side). That's why I think is not possible to implement what you are asking in the way you are asking. It could be easily implemented with an API in Javascript, probably included in the Form API (yes, we already have an entire Javascript API to work with forms) but it could be considered incomplete without a source of data (like Geolocation would be nice but almost useless without the data that helps find people).

JD
macrojd
<h5>
 
Posts: 16
Joined: Thu Mar 03, 2011 1:20 am
Location: Canada

Re: Search-field with suggestions without scripting

Postby PhilG » Wed Mar 16, 2011 10:24 pm

Hi JD,

"HTML is going to be just a markup language, almost exclusively for structuring"

On of the new things in HTML5 is, that forms can prove if an input has the right format. E.g. I can say this form-field should have strings, this one should have a number between 3 and 5, etc. etc. That's not only structure, but something, that is also possible with scripting.

So, why not also make such a suggestion-searchfield with HTML, without scripting?

It would very good, to have this.
PhilG
<h6>
 
Posts: 7
Joined: Thu Dec 02, 2010 2:37 pm

Re: Search-field with suggestions without scripting

Postby Gabor » Thu Mar 17, 2011 7:24 am

macrojd wrote:You not only need billions and billions of possible strings stored in a database, you also need to categorize those strings to show them sorted by relevance.


No! You don't need that or any other additional structure! You only need your data, that's already there and the same search-functions, that you use today for this feature and that are supported by many frameworks, CMS, etc. You only need a suitable HTML-tag to access that function instead of Scripting.

That feature can be done with standard-HTTP (like described above: every character typed or deleted by the user makes a new HTTP-request) and/or with WebSockets.

This feature wouldn't cause any problems. And it would be a big advantage for HTML and the web.
Gabor
<h6>
 
Posts: 9
Joined: Thu Aug 05, 2010 10:24 am

Re: Search-field with suggestions without scripting

Postby macrojd » Mon Apr 04, 2011 1:16 am

Gabor wrote:No! You don't need that or any other additional structure! You only need your data, that's already there and the same search-functions, that you use today for this feature and that are supported by many frameworks, CMS, etc. You only need a suitable HTML-tag to access that function instead of Scripting.


You don't need additional structure but you need a very fast typer:
http://www.youtube.com/watch?v=oK9-ci7Y ... dded#at=50
:D
macrojd
<h5>
 
Posts: 16
Joined: Thu Mar 03, 2011 1:20 am
Location: Canada

Re: Search-field with suggestions without scripting

Postby PascalS » Fri May 27, 2011 7:13 am

macrojd wrote:
Gabor wrote:No! You don't need that or any other additional structure! You only need your data, that's already there and the same search-functions, that you use today for this feature and that are supported by many frameworks, CMS, etc. You only need a suitable HTML-tag to access that function instead of Scripting.


You don't need additional structure but you need a very fast typer:
http://www.youtube.com/watch?v=oK9-ci7Y ... dded#at=50
:D


That video don't work...
PascalS
<h6>
 
Posts: 2
Joined: Fri May 27, 2011 7:11 am

Re: Search-field with suggestions without scripting

Postby PascalS » Fri May 27, 2011 7:17 am

This is a very useful feature used by search-engines, Wikipedia and many other sites that offer search-fields. But till now it needs Scripting. It would be really fantastic to have this great feature without scripting, so that it works for everybody, even if Scripting isn't activated. (And the accessibility would be much better too.)
PascalS
<h6>
 
Posts: 2
Joined: Fri May 27, 2011 7:11 am

Previous

Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 0 guests