You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@tkavukat@sandeepkesarkar While building encounter-mongo-services I made some substantial changes to the structure of the project. I issued a pull request to this project with an updated seed project a while back, but since then I've deviated even further.
I think it might make sense if I take 1 week in December to migrate all of these changes into the seed project. I think this would give you a sufficient seed project for all node-based API-type services for the next 2+ years, and would give your team a way to hit the ground running with unit testing.
More specifically, these are some areas where I deviated:
The seed project wasn't using Promises, and it was also combining try/catch and callback error handling (which is considered a no-no). The combination of these items means you're necessarily going to have lots of nested callbacks and improperly handled errors... Instead, I've migrated to using Promises and their built-in .catch error handling, alongside a library that the creators of Node.js recommend using for error handling. I think we should update the seed to fully use this approach. If I move these items to the seed, it will be easy for you to hit the ground running with Promises and have better error handling / reporting on new projects.
Originally there wasn't a unit testing system in place. After I added the system, I then needed to change a good amount of your code using dependency injection so that it is test-able. I haven't moved those adaptations to your seed project yet... If you want to use unit testing in future projects, these changes should be moved over.
The default error reporting provided was incomplete. There is a more robust framework being used in part of the encounter-mongo-services project which it may make sense to migrate to the seed... While using other RxNT APIs, I noticed a common trend of only 500 errors being reported, and services timing out when things went wrong. I think this would resolve those types of errors.
Lastly, I have not linked errors to any kind of logging system. I think this should be implemented in the seed. I can then move this over to encounter-mongo-services.
The text was updated successfully, but these errors were encountered:
@tkavukat @sandeepkesarkar While building encounter-mongo-services I made some substantial changes to the structure of the project. I issued a pull request to this project with an updated seed project a while back, but since then I've deviated even further.
I think it might make sense if I take 1 week in December to migrate all of these changes into the seed project. I think this would give you a sufficient seed project for all node-based API-type services for the next 2+ years, and would give your team a way to hit the ground running with unit testing.
More specifically, these are some areas where I deviated:
The seed project wasn't using Promises, and it was also combining try/catch and callback error handling (which is considered a no-no). The combination of these items means you're necessarily going to have lots of nested callbacks and improperly handled errors... Instead, I've migrated to using Promises and their built-in .catch error handling, alongside a library that the creators of Node.js recommend using for error handling. I think we should update the seed to fully use this approach. If I move these items to the seed, it will be easy for you to hit the ground running with Promises and have better error handling / reporting on new projects.
Originally there wasn't a unit testing system in place. After I added the system, I then needed to change a good amount of your code using dependency injection so that it is test-able. I haven't moved those adaptations to your seed project yet... If you want to use unit testing in future projects, these changes should be moved over.
The default error reporting provided was incomplete. There is a more robust framework being used in part of the encounter-mongo-services project which it may make sense to migrate to the seed... While using other RxNT APIs, I noticed a common trend of only 500 errors being reported, and services timing out when things went wrong. I think this would resolve those types of errors.
Lastly, I have not linked errors to any kind of logging system. I think this should be implemented in the seed. I can then move this over to encounter-mongo-services.
The text was updated successfully, but these errors were encountered: