Forums BaseTen

Tell us about your project!

Subscribe to Tell us about your project! 7 post(s), 4 voice(s)

 
Avatar Tuukka Norri Administrator 11 post(s)

Hi everyone,

I’d like to hear more about you and the projects you use BaseTen for. Please reply to this post and write a short description and whatnot. This way we can add functionality that might be needed in application development.

 
Avatar Gero 3 post(s)

Hi Tuukka,

as you’ve probably seen from the tickets I am one of the BT users.
I am a computer science student at the RWTH Aachen in Germany and currently I write an item storage application for a chair I work at. It incporporates your framework and a bluetooth barcode scanner (and in the future will use a barcode printer as well _).
The database deals with rooms, people, item types and of course items. The application then allows creating new representations of these. You can then drag&drop items onto people and/or locations so that each item has a room and owner associated. That way (hopefully) all items can be tracked down easily and found if needed.

So far it’s almost finished (using the RC1 of BaseTen) and apart from the tickets I wrote I don’t see any functionality in BT I”d be in desperate need for.
One thing I’ve wondered about though is whether it is intentional that object (i.e. row) creation and, more important, deletion is not undoable in BaseTen. I haven’t posted a ticket about this or tried to handle this in my own code yet because I thought there might be a reasonable rationale behind this.

 
Avatar Tuukka Norri Administrator 11 post(s)

Creating and deleting rows should be undoable in manual commit mode. I don’t remember right now, if we have a test written for that, but it’s supposed to work. We’ll consider making at least creation undoable in the future. For deletion, it would probably be harder, if there are foreign keys or other things that have been created with ON DELETE CASCADE.

 
Avatar Gero 3 post(s)

Ah, I see, I forgot to mention that I am required to use autocommit mode (usability issue) so far.
Maybe I can change that, but especially a delete-undo would be really convenient. We (btw: the Media Computing Group) just thought undo of delete is more important than undo of creation, since deletion is a potentially fatal operation, creation not (one can manually kind of undo creation by deleting the new object). It’s not a feature we’re need quickly. Do you think it would work if I just use manual commit mode of the dbcontext and send a save message every time changes are made (i.e. make my own kind of autocommit) or does that make problems with the current undo-structure? Maybe I just test that on my own, asap. _

 
Avatar Marko Karppinen Administrator 67 post(s)

Like Tuukka mentioned, the reason DELETE operations cannot be undoed by BaseTen in autocommit mode is the fact that BaseTen has no information about what was deleted by ON DELETE CASCADE rules. I think it’s better to leave that stuff out than to claim that we do support undoing DELETE operations.

In manual commit mode (before the commit, ie. before the “save” message), the undo state is maintained by the database itself with CHECKPOINTs. Because of this, we can undo, or ROLLBACK to the previous savepoint, with the knowledge that everything about the database returns to the previous state. There is no way to implement this in the autocommit mode. (And, because of this, just sending save messages all the time is not a solution either.)

What I suggest you do is that on the delete operations in your application, you work directly with the NSUndoManager to record the events needed to reconstruct the deleted objects. This should be simple enough on a per-application basis, but much more difficult for us to solve generically.

 
Avatar Gero 3 post(s)

Sorry for the delay, I wasn’t able to get back to the project sooner.
Thanks for the explanation and tip. I already thought about putting it into the undoManager on my own, but thought that if you added the functionality in a future version (i.e. the 1.0) that would lead to my app not working anymore. Now I know that won’t be the case I just go ahead and do what you suggested. Thanks again!

 
Avatar xanatos 1 post

Hi Tuukka,

I started working on a project for a POS system based on BaseTen. To time the work is done by an Access Program which is really ugly. And since a started using Mac I wanted to change it, so I started to play around with Cocoa (but I’m still a new-be).
When a found your framework I know I was the only choice, because what could better fit in a POS System for a Sauna (PeltoBad) as a framework made in Suomi. :-)
But it’s still a lot of work to do, at the moment I’m learning the basics of PostgreSQL.
The plan is to be ready in at least 3 years. (I’m studing physiks besides) I hope I can persuade my father to let me buy your framework earlier. I think it’s really a pleasure to use I already build my first app with it (well, just a table view to edit and view a table).

sry for my english i know it’s not the best…

Greetings from Germany

Forums BaseTen