Closed DEADSEC-SECURITY closed 1 year ago
@DEADSEC-SECURITY I am working upon a javascript version of a HA Alexa dialogue. It's very early, though. I am currently working upon the concept, how to split it into multiple files, too.
From the index.js
file I directly redirect into lib/app.js
as a first step. lib/app.js
is the place, where I wire all parts up.
The concept of wiring up is all about dependency injection. This allows me to easily test each component separately by injecting mock objects. Dependency injection is rather the style of Java than JavaScript, but I like to work this way.
It's still too early to show any dependency injection, though. After the WE there will be a little more.
Maybe the wording I work out can give inspirations for the naming of the python classes.
Stale issue message
@DEADSEC-SECURITY I am working upon a javascript version of a HA Alexa dialogue. It's very early, though. I am currently working upon the concept, how to split it into multiple files, too.
From the
index.js
file I directly redirect intolib/app.js
as a first step.lib/app.js
is the place, where I wire all parts up.
- https://github.com/elmar-hinz/alexa.there-and-back-again/blob/master/lambda/index.js
- https://github.com/elmar-hinz/alexa.there-and-back-again/blob/master/lambda/lib/app.js
The concept of wiring up is all about dependency injection. This allows me to easily test each component separately by injecting mock objects. Dependency injection is rather the style of Java than JavaScript, but I like to work this way.
It's still too early to show any dependency injection, though. After the WE there will be a little more.
Maybe the wording I work out can give inspirations for the naming of the python classes.
Sorry didn't see this in my notifications. Ill check out the project.
For readability purposes splitting the skills into multiple files would be interesting and now with import feature shouldn't cause skill installation problems.