Re: [whatwg] SQL API and database metadata at creation
On Nov 12, 2007, at 10:29 AM, Aaron Boodman wrote: On 10/31/07, Ian Hickson [EMAIL PROTECTED] wrote: I agree, but like you I don't know exactly what to say about this. This is an area where implementation experience will help. It may be, for instance, that nobody uses more than one database per app, and a prompt ends up being fine. I think one simple way to address this is to move the metadata into the application itself. For example: html applicationName=Google Reader You can imagine other things eventually going in to this application metadata, such as icons at various sizes. Good idea, but I don't think it solves the same problem. The Display Name user readable description is per database. Specific web page/ apps can have an arbitrary number of databases, in addition to the possible collisions introduced by databases being per origin. I also think the estimated bytes thing is not that useful. It's going to be hard for developers to estimate this and they're all just going to but 64k or something they copied from an example. I agree for many apps it will be hard to estimate this, but not all. Whereas some apps will store arbitrary amounts of user data, others will just want a small amount of persistent storage client side for prefs/settings. and others still will know they are going to store 50mb of app data client side. I think it should be up to the UA to make sure that the database does not grow too large and to prompt the user for access to more storage when necessary on behalf of the application. Obviously all UA's should do this. The expected size is more of a UI hint than a contract. UA's should still do what they need to do. The value of these arguments might end up being somewhat dubious, but I requested they be added based on implementation experience - noticing some holes left but the info available in the previous iterations of the spec. I would not be against making the expected size optional, but I am a firm believer in the display name. ~Brady
Re: [whatwg] SQL API and database metadata at creation
On Oct 24, 2007 10:38 AM, Brady Eidson [EMAIL PROTECTED] wrote: Armed with these two option arguments, a single UI prompt similar to: www.google.com wants to create a database on your hard drive. The purpose of the database is for DatabaseDescription and www.google.com thinks the database might use up to expected size bytes of drive space. Do you want to let it continue? One quibble I have with this revised aspect of the spec is that database use somewhat overlaps schema. A site can decide to have a single database with many tables, or they can decide to divide their tables across multiple databases, thus leading to three or four prompts. There might be byzantine reasons for this - maybe a product is composed of elements from three or four groups within a company, rather than being monolithic, and the databases are used for namespace control. Unfortunately, I can't think of a good action item WRT the spec. I suspect that the user-agent might end up going in the direction of maintaining an aggregate quota for an origin. -scott
Re: [whatwg] SQL API and database metadata at creation
On Wed, 31 Oct 2007, Scott Hess wrote: One quibble I have with this revised aspect of the spec is that database use somewhat overlaps schema. A site can decide to have a single database with many tables, or they can decide to divide their tables across multiple databases, thus leading to three or four prompts. There might be byzantine reasons for this - maybe a product is composed of elements from three or four groups within a company, rather than being monolithic, and the databases are used for namespace control. Unfortunately, I can't think of a good action item WRT the spec. I suspect that the user-agent might end up going in the direction of maintaining an aggregate quota for an origin. I agree, but like you I don't know exactly what to say about this. This is an area where implementation experience will help. It may be, for instance, that nobody uses more than one database per app, and a prompt ends up being fine. -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Re: [whatwg] SQL API and database metadata at creation
On Thu, 25 Oct 2007 06:58:40 +0200, Brady Eidson [EMAIL PROTECTED] wrote: LOL - are you SURE you didn't change that sometime between when I first read it and when I copied the passage into an email and obviously didn't re-read it? ;) http://html5.org/tools/web-apps-tracker?from=1093to=1094 -- Anne van Kesteren http://annevankesteren.nl/ http://www.opera.com/
[whatwg] SQL API and database metadata at creation
First off, my first impression of the new API is that I like it a lot and think it addresses most - if not all - of the outstanding issues. We'll see if that impression continues after I process it all! =D - On to my point... The API has various places where the User Agent should provide some form of UI for policy and management of databases. For example if an origin reaches its size limit, the User Agent should prompt for permission to exceed the limit. Additionally, the UA is required to provide a facility for the user to see the size of all current databases. Google Gears takes things further by prompting the user for permission to create a database in the first place. I think this is quite prudent and we're likely to provide facilities for the same prompt. The problem I have is that all of these UI elements - required or prudent - have little to work with for making the UI clear and useful. In the wild, database names will often not be too useful. We use WebKitStickyNotes for our example, but someone might use a generic Database or a cyrptic __rvWidgets as a database name. How is a user supposed to interpret that in the management UI? It is unlikely to be useful or meaningful. And if a UA prompts the user at creation like Gears, how is the user supposed to make a meaningful decision if they're told www.foobar.com wants to create a database named '__Xlak`? The database name is - and should remain - a technical detail that is internal to the implementation of a web application. I propose we provide an optional way for an openDatabase() call to include a DatabaseDescription, which is meant to be a human-readable name or description of the database. This would make policy prompts regarding the database (creation, increasing the size) as well as the management UI potentially more meaningful and clear to the user. A side proprosal that might help consolidate the should I allow this database to be created? and should this origin be allowed to go over its size limit? prompts would be to provide another optional argument to the openDatabase() call which is the expected size of the database which is something many application developers may be able to establish ahead of time. Armed with these two option arguments, a single UI prompt similar to: www.google.com wants to create a database on your hard drive. The purpose of the database is for DatabaseDescription and www.google.com thinks the database might use up to expected size bytes of drive space. Do you want to let it continue? The response to this prompt could remove the requirement to bump the allowed quota later as long as the database stays under its expected usage. The DatabaseDescription and allowed size could also be represented in the management UI. Armed with the current information, the prompt could only be: www.google.com wants to create a database named cryptic name on your hard drive. Do you want to let it continue? I don't think this is mission critical for the spec. But I do think that as long as there are required UI elements in the spec as well as implicit UI elements many User Agents will choose to implement, that the spec would be even more proficient to have a standard way to provide this information. ~Brady
Re: [whatwg] SQL API and database metadata at creation
On Wed, 24 Oct 2007, Brady Eidson wrote: Great! But, I think an editorial mistake in the updated spec page - The openDatabase() method returns a Database object. The method takes four arguments: a database name, a database version, a display name, and an estimated size, in bytes, of the data that will be stored in the database. Second database name should be database description, or even user friendly database description It doesn't say database name twice, it says database name and display name. :-) -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Re: [whatwg] SQL API and database metadata at creation
LOL - are you SURE you didn't change that sometime between when I first read it and when I copied the passage into an email and obviously didn't re-read it? ;) ~Brady On Oct 24, 2007, at 5:35 PM, Ian Hickson wrote: On Wed, 24 Oct 2007, Brady Eidson wrote: Great! But, I think an editorial mistake in the updated spec page - The openDatabase() method returns a Database object. The method takes four arguments: a database name, a database version, a display name, and an estimated size, in bytes, of the data that will be stored in the database. Second database name should be database description, or even user friendly database description It doesn't say database name twice, it says database name and display name. :-) -- Ian Hickson U+1047E) \._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _ \ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'-- (,_..'`-.;.'