dcmjs icon indicating copy to clipboard operation
dcmjs copied to clipboard

code needs to be refactored

Open pieper opened this issue 7 years ago • 6 comments
trafficstars

Add comments here with things that need to be changed in the code base:

  • consistent capitalization Dicom -> DICOM
  • remove abbreviations unless they are standard
  • dynamically load the data dictionary rather than hard-coding it in the class

please add more below...

pieper avatar Nov 01 '18 17:11 pieper

Also we should clean up any lingering dead code. Also any commented out (or not) console.log debug statements. Instead we should have a proper logging mechanism.

pieper avatar Nov 02 '18 11:11 pieper

The framecount-method should be moved into the DICOMZero class. This would pack code together which belongs together and avoid code duplication in nearly every example.

tostein avatar Jan 04 '19 12:01 tostein

Also we should clean up any lingering dead code. Also any commented out (or not) console.log debug statements. Instead we should have a proper logging mechanism.

What about using loglevel?

tostein avatar Jan 04 '19 13:01 tostein

loglevel looks fine to me.

Also regarding DICOMZero, I'm thinking it should be made into a dcmjs.utils or similar.

pieper avatar Jan 04 '19 15:01 pieper

As the examples are just working with the files in the helpers folder, i think we should move the dicomweb.js and DICOMZero.js to the main library as application enabling files?

Then i could start with documenting the helper files code and how the examples are using them.

tostein avatar Jan 29 '19 14:01 tostein

Hi Tobias -

The helpers are not meant to be part of the main library, but if we find that there are specific methods in DICOMZero we could move them to utils. For dicomweb.js, they should be merged with dicomweb-client. Ideally the examples should be as small as possible. Thanks!

-Steve

On Tue, Jan 29, 2019 at 2:43 PM Tobias [email protected] wrote:

As the examples are just working with the files in the helpers folder, i think we should move the dicomweb.js and DICOMZero.js to the main library as application enabling files?

Then i could start with documenting the helper files code and how the examples are using them.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dcmjs-org/dcmjs/issues/19#issuecomment-458564953, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHsfZryXrhFItENoDp_gUPB7AFIxU-zks5vIF34gaJpZM4YHkmY .

pieper avatar Feb 01 '19 07:02 pieper