MyPasswordSafe

XML Is a Godsend

|

I was working on my drag and drop prototype for MyPasswordSafe a couple of nights ago. I had it so items could be dragged and dropped, but still needed to do the same thing with groups. Drag and drop works by storing the data in a byte array, and for awhile I thought I would need to create my own binary format to hold a tree structure. Right before I started to take a crack at groups, the idea to use XML popped in my head. XML to the rescue! By nature it's hierarchical and fit the problem extremely well. XML is a tree. I'm trying to drag and drop a tree. Perfect!

I have the prototype done now, and everything works. I now need to come up with an abstract MVC. That and a undo/redo system, which may go hand in hand a bit. After drag and drop, undo/redo is the biggest new feature I have scheduled for MyPasswordSafe.

Trip To Borders

| | |

Last Saturday I went to Borders to look at a pattern book to see how badly I munged the model-view-controller pattern. I did a pretty good job at getting it wrong. The book I looked at was Patterns of Enterprise Application Architecture. The proper way to setup MVC is to have the view and controller communicate with the model, and have the view and controller communicate with each other. Compare that to how I currently have it setup, the controller communicating to the view which communicates to the model. I don't have much communication between the controller and the model. The bulk of the communication is done through the view, which should only be fetching data from the model. I'll have to straighten that out here pretty soon.

Qt 4 and MyPasswordSafe

|

I just got done looking at the information on Trolltech's Qt 4 Technical Preview, and it looks pretty good. One thing that did provoke some thought is Interview, because it got me thinking about better ways to implement the "MVC" in MyPasswordSafe. I think I got it completely wrong since the model is coupled to the view and the view is coupled to the controller. Not exactly the way it should be, so I might figure out the right way to do it. I think the right way may be to couple the view to an abstract model, the controller to the real model, and the the model built of the abstract model.

Syndicate content

Ad's by Google