Agreed. Generally I would argue against combining data and behaviour, for the very same reasons that the author wrote these abstractions.
However, I think there are better methods available. For example I would much prefer to organise related behaviour using Node modules (using Browserify if it’s a client app), which give you an extremely understandable way to group related behaviour AND hide private state.
However, I think there are better methods available. For example I would much prefer to organise related behaviour using Node modules (using Browserify if it’s a client app), which give you an extremely understandable way to group related behaviour AND hide private state.