-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Readability Suggestions #91
Comments
Also see here: https://stackoverflow.com/questions/12826977/multiple-arguments-vs-options-object#answer-12827204 Also no more than 3 arguments is possible consideration when deciding to switch to options object arg. https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming) |
I absolutely agree with this! In the meantime, if you feel like you can give it a shot please go ahead! |
Ok, I have a PR coming soon with an additional way to deal with middlewares where most my issues stem from loading a middle ware that support dynamic swagger. Should make more sense in the PR. But I have a basic express example without zero which I would like to work with zero. https://github.com/nmccready/swagger-express-ts-example See how to use swagger-express-ts here . Bottom line is the middleware needs to be loaded prior without a file based route. So I am trying to make this work dynamically by adding a middlewareHandler. |
Another thing you might want to consider is adding lazy logging to your debug usage which would improve performance. See:
Notice the Disabled levels. Thats with that log level off. |
Previously, there was a callback hell between file watcher, manifest module and the router. Because on each file change we needed to generate a new manifest and then on a new manifest, we needed to tell the router to update itself (if any pages were added or removed etc). With emitter model, we just pass these emitters and the module listens for events internally. Would love you feedback on the updated structure here. |
First off this project is really cool and I am trying to understand it and contribute to it.
However, I am finding the codebase significantly difficult to read.
This difficulty to me seems to extend from the heavy usage of arrays to be utilized later as function arguments.
Many of the array usage stems from
entryPoint
andproxyLambdaRequest
which in turn get pumped into azero-process
. This process boils down to 8 function arguments. This would be a ton more readable if structuring and destructuring were used instead.Areas where the code is very difficult to read for me begin in buildManifest.js.
Which has led to comments such as:
Anyway, I don't mean to be critical I just want this to be easy to help out.
The text was updated successfully, but these errors were encountered: