coolharsh55 / kwest

Automatically exported from code.google.com/p/kwest
0 stars 0 forks source link

Decoupling of modules in program code #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We have separated the code into 4 different responsibilities: 
1. FUSE
2. DB
3. EXTRACTION
4. IMPORT

When writing code for the module, we tend to put in comments or leave 
operations open in the code with the hope that in future, we will interface it 
with the others module. E.g.
in file import.c by @SG
//Hash Function : f=entry->d_name
         /*
            QUERY : 
                Check if f already exists in database [FILE]            
                IF not 
                        add f as File [path is in full_name]
                        Extract Metadata
                        [IF REQUIRED]Get inode information from fstat structure (fstat.st_ino)
         */

Here, instead of writing a query in your module itself, he can call the DB 
module function add_directory. Let @RC implement the query and its related 
operations. You are concerned only with whether the operation returns 
SUCCESS/FAIL...
Discuss this issue...

Original issue reported on code.google.com by coolharsh55 on 30 Nov 2012 at 9:52

GoogleCodeExporter commented 9 years ago
I'll handle this one.

Original comment by euphoric...@gmail.com on 2 Dec 2012 at 9:19