Thread: [Waba-spec] The registry, etc.
Status: Abandoned
Brought to you by:
bornet
From: Sean L. <se...@cs...> - 2001-10-17 20:00:02
|
Here are my initial thoughts on the final Registry description. 1. There is no reason why you shouldn't be able to skip negative bytes. If you back up to position X, and then start writing, the Registry should assume that everything after X is automatically deleted. 2. What happens if you delete the registry while it's open? Can you continue to write? Would that recreate the registry (I assume not)? Or do you have to call getRegistry() again? 3. There should be a function indicating the maximum feasible number of bytes that the registry can hold. 4. I presume that the registry does not take locking into consideration: if you have multiple instances of your application open, I presume the result is undefined? Which is fine, just as long as we state this. Now as to some other stuff. Olivier had written: > - take the Ewe's Datastore package and insert it in the extension API. By my read, Datastore requires a *lot* of underlying modification; further I think it is inappropriate for environments which do not file storage. Am I misreading the description? If Datastore can sit on top of existing stream protocols with little or no underlying VM changes, then I think we might consider it. But if it requires VM modification, we should talk about it some more: I don't like the idea of changing the VM semantics to support a nonstandard package. That's a recipe for spaghetti code. So I want to discuss this further first. > - postpone the java.util.Map (and the associated class) to the next > release of the specifications. In truth, I don't think we should implement Map at all. The CLDC doesn't. It's too heavyweight for our purposes. > - postpone the serialization also to a future release of the API. Serialization is a LARGE addition to the VM, both in terms of VM support underneath, and in terms of supporting Java classes. That's why, for example, that the CLDC doesn't support it. I think we should think very hard whether or not the advantages of the feature (which I use heavily in "real" Java programs) outweigh its significant disadvantages in terms of majorly bloating the system. > - move the Catalog class to the Palm platform specific branch. This mean > it's available for the Palm implementation, but not necessary for > others. > << > > Disagree. Catalog must be implemented in all platforms. Otherwise, no > Palm programs will able to run other platforms without being modified. But that's why they're *Palm* programs! If you want to run on other platforms without being modified, use the Registry class and/or a Database class replacement of some sort. > - take http://waba.sourceforge.net/javadoc/waba/io/CatalogSeanLuke.html > for the base of the discussion when the topic "Catalog class" will > come. > << > > Does this make sense in other platforms too? > > /** Retrieves the attributes of the current record. Use the > REC_ATTR_xxx > masks to set/retrieve its states. @returns 0 if db dont exists @since > 2.0 */ > public byte getRecordAttributes() > { > return NativeMethods.nm.catalogGetRecordAttributes(this); > } Record attributes are a Palm thing, ar they not? What kind of general-purpose "attributes" are you thinking of? I can still be convinced. > To limit the discussions, I suggest to agree with complete package, and > not to split them. I suggest to take all but the Throwable. This mean, > WRAPPER, UTILITY, SYSTEM and MODIFIED. I know Sean say the last one to > take is SYSTEM, but I think if we take them later, the classes allready > in Waba continue to diverge, and it will be more difficult in the future > to change them. Yeah, that's doable, though I might need some help on implementing the Class class. The throwable classes may be easily removed, but only by commenting out all the "throw" statements in the other classes; otherwise they will get compiled in with the other class files when you make your app. That's fine to do this, though we should keep "thrown" versions of the classes around that are compatible for the future situations when we do (?) get exception handling. BTW, I don't recall if the Vector class has backward-compatible functions for the old waba.util.Vector class or not, it's easily enough added in. Sean |
From: Guilherme C. H. <gu...@us...> - 2001-10-17 21:31:28
|
> Serialization is a LARGE addition to the VM, both in terms of VM support > underneath, and in terms of supporting Java classes. That's why, for > example, that the CLDC doesn't support it. I think we should think very > hard whether or not the advantages of the feature (which I use heavily > in "real" Java programs) outweigh its significant disadvantages in terms > of majorly bloating the system. I already did a function that does serialization in SW (but it didnt worked :-) ). It receives an object and stores all primitive/String types. We could use something like that. > But that's why they're *Palm* programs! If you want to run on other > platforms without being modified, use the Registry class and/or a > Database class replacement of some sort. Sean (and all), this is really out of discussion. There is *no* other options for storage in PalmOS. If the spec decides that it should be moved, SW will not implement that decision. > Record attributes are a Palm thing, ar they not? What kind of > general-purpose "attributes" are you thinking of? I can still be > convinced. /** Read Only database */ public static final int DB_ATTR_READ_ONLY = 0x0002; /** Set if Application Info block is dirty. Optionally supported by an App's conduit */ public static final int DB_ATTR_APPINFODIRTY = 0x0004; /** Set if database should be backed up to PC if no app-specific synchronization conduit has been supplied. */ public static final int DB_ATTR_BACKUP = 0x0008; /** This tells the backup conduit that it's OK for it to install a newer version of this database with a different name if the current database is open. This mechanism is used to update the Graffiti Shortcuts database, for example. */ public static final int DB_ATTR_OK_TO_INSTALL_NEWER = 0x0010; /** Device requires a reset after this database is installed. */ public static final int DB_ATTR_RESET_AFTER_INSTALL = 0x0020; /** This database should not be copied to */ public static final int DB_ATTR_COPY_PREVENTION = 0x0040; /** This database is used for file stream implementation. This attribute may not be used. */ public static final int DB_ATTR_STREAM = 0x0080; /** Record atribute: Deleted */ public static final byte REC_ATTR_DELETE = (byte)0x80; /** Record atribute: Dirty (has been modified since last sync) */ public static final byte REC_ATTR_DIRTY = (byte)0x40; /** Record atribute: Private */ public static final byte REC_ATTR_SECRET = (byte)0x10; regards guich |
From: Scott C. <sc...@co...> - 2001-10-19 04:39:33
|
>>- move the Catalog class to the Palm platform specific branch. This mean >> it's available for the Palm implementation, but not necessary for >> others. >><< >> >> Disagree. Catalog must be implemented in all platforms. >> Otherwise, Palm programs will able to run other platforms >> without being modified. > > But that's why they're *Palm* programs! If you want to run on other > > platforms without being modified, use the Registry class and/or a > > Database class replacement of some sort. > > Sean (and all), this is really out of discussion. There is *no* other > options for storage in PalmOS. If the spec decides that it should be moved, > SW will not implement that decision. Guich, I think you are misunderstanding the concept here. Currently platforms other than PalmOS don't have catalogs, but they emulate them. Why can't SW emulate the Registry or Database class using underlying Catalogs? (just like SW emulates catalogs on WinCE and Java) Why does a SW program need access to real Palm Catalogs? If a SW program needs to access real PalmOS catalogs (like the MemoDB or AdressDB) then the program will only work on the Palm. Shouldn't the SW(waba) api reflect this platform dependancy? Is your concern backwards compatiblity? Sorry if I'm being too confronting, but I want to try to understand why you disagree. scott |
From: Guilherme C. H. <gu...@us...> - 2001-10-19 10:12:49
|
Hi Scott, > I think you are misunderstanding the concept here. Currently platforms > other than PalmOS don't have catalogs, but they emulate them. Why can't > SW emulate the Registry or Database class using underlying Catalogs? > (just like SW emulates catalogs on WinCE and Java) But i did agree with the Registry class. You can see an e-mail i sent about the registry topic. It only have one work: agreed. About the Database class, i need more time to see if its feasible. I'll do that next week. > Why does a SW program need access to real Palm Catalogs? > If a SW program needs to access real PalmOS catalogs (like the MemoDB or > AdressDB) then the program will only work on the Palm. Shouldn't the > SW(waba) api reflect this platform dependancy? Don't windows have Notepad and address books? we could use a common denominator. > Is your concern backwards compatiblity? Sure. I'll not break backwards compatibility (even with PalmOS 2.0). > Sorry if I'm being too confronting, but I want to try to understand why > you disagree. You're more correct than me. bye guich |
From: Christian G. <chr...@sm...> - 2001-10-25 16:33:34
|
Hello, On Wed, Oct 17, 2001 at 03:59:58PM -0400, Sean Luke wrote: > Here are my initial thoughts on the final Registry description. Thank you for the feedback! > 1. There is no reason why you shouldn't be able to skip negative bytes. > If you back up to position X, and then start writing, the Registry > should assume that everything after X is automatically deleted. I modified 'skipBytes' accordingly. I am assuming that no platform will have a problem with this (reel tapes are not that common on PDA's :-) ). > 2. What happens if you delete the registry while it's open? Can you > continue to write? Would that recreate the registry (I assume not)? Or > do you have to call getRegistry() again? Reading/writing after having deleted the Registry is undefined; one should re-obtain it. I modified the documentation accordingly. > 3. There should be a function indicating the maximum feasible number of > bytes that the registry can hold. I added a 'spaceAvailable()' method, which would return the amount of registry space available at that moment. Is that what you had in mind? > 4. I presume that the registry does not take locking into consideration: > if you have multiple instances of your application open, I presume the > result is undefined? Which is fine, just as long as we state this. Another good point. The result would indeed be undefined, and I modified the documentation accordingly. Let me know what you think. Thanks, -Christian |