So, one step further, with the new Beta everything went fine. Started to build a new product. Outline: Want to build a Gallery, where owners can add postscript-pictures with some comment. A thumbnail is generated and a page with thumbnail and comment is displayed. The thumbnail is a link to the actual Postscript picture. A Gallery can include other Galleries to collect pictures for different topics. This will be a subclass of a Folder. As this product should be used by many different users, I don't want to fill up the database with all this pictures. So I want to make an object, which acts like a file, but stores only a link to an external file. Subclassing File and overwriting PData -> ready is the BLOB. Q1: Is there already something like this in Zopeland? This could also be used to make dataviewers for big (GB) datafiles. Q2: I can delete the object from the POS, but how do I delete also the external file? Is there some hook I can use? Q3: The development of a package is quite time consuming, because I need to delete the product, restart the server and add the object again. Can this be done faster? How are other people developing packages? Are all writing bug free code :-)? Q4: Would it be easier to build soemthing like this as external methods? I see now, that it is easier, but than I need to implement my own upload scheme and so on. (This are some of the benefits of a product, all the predefined protocolls, right?) Q5: If I want to extent the gallery with some functions, can these be coded as external methods and added to the Gallery object? I have tried it, but a BLOB object, which is only one class of the product does not get the method (defined by def method(self,...): ) Q6: If more and more packages are developed the security screen becomes rather big. How will this be handled in the future? Thanks for any help and insight you can provide __Janko Hauser
Hi Janko (Janko Hauser), in <m0zpbEx-000KmqC@lisboa.ifm.uni-kiel.de> on Dec 14 you wrote:
As this product should be used by many different users, I don't want to fill up the database with all this pictures. So I want to make an object, which acts like a file, but stores only a link to an external file. [...] Q2: I can delete the object from the POS, but how do I delete also the external file? Is there some hook I can use?
It is quite easy to do this. The PDMS (document mgmt) stores some info in the Object Database, some in an SQL, and the actual documents in the filesystem (usually). You simply need to identify a unique id and a mechanism to reference the file given the id. The PDMS used the folder ids to link a document to a folder and then queried the SQL for entries associated with a folder. The filesystem filename was associated with the SQL index for each document (as an example). Your object could do just as you say - store the filename. Associated methods could insert, update and retrieve it. Many ways to do this...
Q4: Would it be easier to build soemthing like this as external methods? I see now, that it is easier, but than I need to implement my
For simple things like this, external methods are probably just fine. Doesn't mean that people aren't working on more general solutions to your situation though. :^)
own upload scheme and so on. (This are some of the benefits of a product, all the predefined protocolls, right?)
You have the form variables including the file info, just save the uploaded file in the filesystem.
Q6: If more and more packages are developed the security screen becomes rather big. How will this be handled in the future?
Good question... Kent
participants (2)
-
Janko Hauser -
kent@eaenki.nde.swri.edu