wizardamigos / RepPointsServer

@deprecated - inspiration for organization internal "admin app"
1 stars 4 forks source link

Creating and Updating the RepPointsServer #5

Closed serapath closed 8 years ago

serapath commented 8 years ago

Proposal

Nasdneb commented 8 years ago

I agree

ninabreznik commented 8 years ago

Hm, saw this to late this time, but will do it next time.

serapath commented 8 years ago

@Nasdneb I checked the code, it's quite some lines of code already and at least the engine start to become hard to read. I don't know how to keep it simple, but maybe a specification driven approach would be nicer.

So in this or another issue - probably in a seperate issue, each source file of the Server could be described and maybe it's possible to split the code into many files, so that no file gets longer then maybe 10-30 lines of code... I don't know what would be a good number, but require('./filename.js') might be our friend here :-)

Usually I create the file structure like:

var repository = { }
repositor['source/'] = {
  'node_modules/' : {
    'api.js': '...file content...',
    'engine.js': '...file content...',
    'rest_api.js': '...file content...',
    'data/' : {
      'journal.js': '...file content...', // js files allow comments like this one
      'rules.js': '...file content...'
    }
  }
}

UPDATE: The latest updates are to be found here: https://github.com/wizardamigosinstitute/RepPointsServer/pull/9