Click here to Skip to main content
15,949,686 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
QuestionWhat pattern should I use? Pin
nickiii3-Feb-09 5:17
nickiii3-Feb-09 5:17 
AnswerRe: What pattern should I use? Pin
Jon Rista3-Feb-09 10:55
Jon Rista3-Feb-09 10:55 
GeneralRe: What pattern should I use? Pin
nickiii3-Feb-09 13:01
nickiii3-Feb-09 13:01 
Questionbus address converter Pin
aswd30-Jan-09 7:46
aswd30-Jan-09 7:46 
JokeRe: bus address converter Pin
Jon Rista3-Feb-09 10:56
Jon Rista3-Feb-09 10:56 
GeneralRe: bus address converter Pin
Luc Pattyn6-Feb-09 9:34
sitebuilderLuc Pattyn6-Feb-09 9:34 
GeneralRe: bus address converter Pin
aswd9-Feb-09 13:19
aswd9-Feb-09 13:19 
QuestionAdvices designing a document-centric application Pin
crs2129-Jan-09 9:18
crs2129-Jan-09 9:18 
Hi there,

I am seeking help for building a document-centric application. More specifically, handling extensions and icons for the different file types the application is going to manage. I know how to register extensions within windows, I'm just unsure how to do it inside my own application!

My current design is something like this:

Each document has it own class (the documents are actually just the objects serialized, gzipped and stored on the disk). Those can be extended through a plugin system (with external dlls being loaded during runtime), so the number of file types may be extended at will. Each file type should have its own extension and can have its own icon. I'm using multidotted extensions to keep the naming scheme sane.

To define a new document, thus a new file type, one has to implement a interface, lets say, IDocument, which has common properties like Name, Description and Remarks, and then define what his document will contain.

Now, the problem is: Where should I specify which will be the default extension and icon for a particular document class I'm writing? At first I thought about adding static properties to the interface in order to ensure its implementation, but I know interfaces cant have such things. I also need to be able to, given an extension, return the System.Type of the related document, or given a Type, return its extension. I could write a table of extensions and related types, but then how could I enforce every class that inherits from IDocument will register itself into this table?

It should be mandatory for a document to have a extension, but I can not think of a way to enforce this rule. Sorry for the long question, but I hope I could explain what I'm trying to achieve.

Thanks in advance,
C
AnswerRe: Advices designing a document-centric application Pin
Pete O'Hanlon30-Jan-09 1:05
mvePete O'Hanlon30-Jan-09 1:05 
GeneralRe: Advices designing a document-centric application Pin
crs2130-Jan-09 3:37
crs2130-Jan-09 3:37 
GeneralRe: Advices designing a document-centric application Pin
Pete O'Hanlon30-Jan-09 4:22
mvePete O'Hanlon30-Jan-09 4:22 
AnswerRe: Advices designing a document-centric application Pin
Jonathan Davies30-Jan-09 1:17
Jonathan Davies30-Jan-09 1:17 
QuestionHow to create DFD Pin
Member 467943628-Jan-09 23:18
Member 467943628-Jan-09 23:18 
AnswerRe: How to create DFD Pin
Pete O'Hanlon29-Jan-09 1:06
mvePete O'Hanlon29-Jan-09 1:06 
GeneralRe: How to create DFD Pin
led mike29-Jan-09 4:40
led mike29-Jan-09 4:40 
GeneralRe: How to create DFD Pin
Pete O'Hanlon29-Jan-09 8:29
mvePete O'Hanlon29-Jan-09 8:29 
GeneralRe: How to create DFD Pin
led mike29-Jan-09 9:20
led mike29-Jan-09 9:20 
QuestionAvoiding Circular References with Application Architecture Pin
Leftyfarrell20-Jan-09 11:46
Leftyfarrell20-Jan-09 11:46 
AnswerRe: Avoiding Circular References with Application Architecture Pin
led mike21-Jan-09 5:13
led mike21-Jan-09 5:13 
GeneralRe: Avoiding Circular References with Application Architecture Pin
Leftyfarrell21-Jan-09 13:34
Leftyfarrell21-Jan-09 13:34 
GeneralRe: Avoiding Circular References with Application Architecture Pin
Jon Rista21-Jan-09 18:34
Jon Rista21-Jan-09 18:34 
GeneralRe: Avoiding Circular References with Application Architecture Pin
Leftyfarrell22-Jan-09 1:27
Leftyfarrell22-Jan-09 1:27 
GeneralRe: Avoiding Circular References with Application Architecture Pin
led mike22-Jan-09 4:59
led mike22-Jan-09 4:59 
GeneralRe: Avoiding Circular References with Application Architecture Pin
Jon Rista22-Jan-09 5:35
Jon Rista22-Jan-09 5:35 
GeneralRe: Avoiding Circular References with Application Architecture Pin
led mike22-Jan-09 6:08
led mike22-Jan-09 6:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.