From: Stig T. <st...@st...> - 2003-09-13 10:50:02
|
Hey So one define one column in a table as being a foreign key? What is the purpose exactly? Does it allow for smarter queries? Ur welcome to adjust the create statements in the dbtasklist. I think we can just use the RessourceManager interface for files. It is placed in the core package. It allows for several implementations, which means one could also make a db implementation if necessary. The fileressoucemanger implementation uses the filenames/paths as keys, and serves up a file as object if a such exists. Ie, it has a base folder, and if u call getInputStream("filepath"), u will get an inputstream for that file. It doesnt return a file, since that would be implementation specific, but an inputstream for the object related to the key. If the object is a file, like a pdf file or similar, we would get an inputstream which we can read from and send over network or similar. We dont need an actual filereference tohandle files, though, when creating a gui where one can add attachments (as files) u will ofcourse get a file. To add this file to the ressourcemanager u then add it like ressourcemanager.add(file.getpath(), file.getInputStream()); Untill now most of the saving of more 'advanced' objects happens through serializing in the app. I can easely serialize the taskmodel like I do with the mailmodel. There is several reason that I wanted to test and have a db implementation of the taskmodel - 1. To have quik access to some testdate while building the model (changing a class tends to break serializing and u loose all data if ur not carefulll. 2. Loading a lot of data through serializing is slow. I like to create a db implementation of the mailmodel too, since I try to create all those models as independent of rest of the app. Which means that someone will be able to use them in a webapp or similar, and then use a database for saving. 3. In general I just want some more experience with databases. So if a standard user downloads and uses the program, we can use either serializing, or some xml scheme to save objects to disk. And otherwise a database. I think its save to assume, that if the program is used by someone seriously for a project (when we reach that point) they wont mind installing a database seperately to get a better backup of the data. There are some schemes for saving data to xml based on some definition files... (castor etc). But currently I think its too much trouble to start use those. Preferable I would like a small java db integreated in the app, but I havent yet found a good (opensource) java db. Theres on on sf, but it only supports a subset of sql. And I had trouble making it work. But if we find one it will be very easy to integreate that. Another issue about db and saving objects is when I try to implement some p2p structure. Then we need to send objects between peers, when synchronizing. This probably can be done through serializing. But I think I prefer doing it through some xml-scheme. The goals should not, as I see it, be displayed in the TaskView. The entranceview should display a list of modules/projects/clients or whatever to call it, and when u choose one of theese u should be able to see a list of goals, and also a list of tasks. But u can define a dependency between a goal and a task, and in that case... I guess it will be shown in the dependency list of the task (not as a prerequiesite, but the reverse thing). In general though, if a task is part of a module it (ofcourse) also has some dependency relationship with the goals of that module. But the model arent finished. Maybe the goal thing is not a good idea. I think we need to test it first and see how it works. I mean one can have some nice model, but if the user doesnt find it intuitive and uses it the way its expected, then it is wrong designed. But if I imagine the mailsomething project, I could have a mailapi module with goals like - implement pop3 - implement smtp - implement smtp authentification - do a mailbox/mailaccount structure - define interfaces for model There dont necessarely needs to be many goals. My point with this is basicly, that a task in one module should NOT be able to be directly dependent on a task in another module. If thats the case, the goals are not probably created. One thing to remember when creating a gui for this is, that goals is not something which changes a lot, like tasks. Primarely the user will work with tasks, while goals has a more static nature. The above example of some goals could have been the same goals for the mailsomething mailapi for the last 2 years, while the tasks have changed a lot. Maybe I just want to force the user to consider what is goals and what is tasks. In current implementations there seem to be some mixing up between those. Actually, if u see the testdata (I know have posted to cvs) several of those tasks can be considered as goals, since they are a definition of where to go, but not how to get there. I have uploaded the data from my tables. I think we should create some methods for loading and dumbing data, and while testing we can place some buttons for that in the entrance view, so one can export the data easily and then synchronize with cvs. Actually, when the p2p get running the entrancepoint should have some other actions for synchronizing between peers. Maybe u will create those load and export actions? We could also place them in a db-settings view. That would seem natural. Stig >----- Original Message ----- >From: "Darren Woollatt" <dwo...@ho...> >To: mai...@li... >Sent: Sat, 13 Sep 2003 10:50:18 +0930 >Subject: Re: Re: Re: [Mailsomething-devl] Compilation Problems >Hello again, > >I now see what you mean goals and that sort of thing. How will this need to> >be shown on the UI. For example would there jyst be a list of goals that ar>e >displayed under this task. > >To your questions about the database. I think it is possible to store files> >in a db, but I'm not sure what support MySQL has. I know PostgreSQL has som>e >support for this, but getting Postgres to work in Windows is an extreme >hassle. What I meant by foriegn key relationship was that a field in a >certain table would rterference a field in another table. For example, in a> >goal table (or something like that) you may have an id to the task which it> >belongs, this means that this table would reference the Task table with a > >foriegn key. This reduces redundancy as you can only enter a task in the >goal table that exists in the Task table. > >I will do some thinking and looking around for ideas for the entrance point>. >I think that the configuring of the database would be a good idea. > >I see your point of not wanting to include a database with the project, and> >this should be an option for the user. If there is no db how do you see thi>s >task module working?? Would it also have some sort of XML implementation >sitting on some sort of server. I was at a seminar the other day (at uni) > >conducted by the W3C (WWW consortium) and they were talking bout this stuff> >about the power of XML for this sort of thing. A db is probably better >though. > >Could you post that test-data to the cvs as a txt file?? > >Thanks > >Darren Woollatt > > >_________________________ >Mailsomething-devl mailing list >Mai...@li... >https://lists.sourceforge.net/lists/listinfo/mailsomething-devl |