keatontaylor / alexa-actions

A README and associated code to get actionable notifications setup for Alexa devices.
GNU General Public License v3.0
399 stars 187 forks source link

Refactor skill into different files #150

Closed DEADSEC-SECURITY closed 1 year ago

DEADSEC-SECURITY commented 1 year ago

For readability purposes splitting the skills into multiple files would be interesting and now with import feature shouldn't cause skill installation problems.

elmar-hinz commented 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.

github-actions[bot] commented 1 year ago

Stale issue message

DEADSEC-SECURITY commented 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.

Sorry didn't see this in my notifications. Ill check out the project.