Relatively recently I am writing notation in OOP, studying Laravel, trying to deal with DI. There is also a need to write a bot who can answer questions and perform certain actions within the entire application. I can do this, but I would like to do it correctly, and it would be ideal to issue it as a separate package.
But when I look at the task, I see that the implementation requires both data storage and working with the models that are in the application. Is it possible at all to issue a separate package .. or is it necessarily to be part of my application?
update: what is it for
The task is simply to replace the DH manager with a bot). And here it’s not just the answer to the FAQ, but also requests like: “How are my devices?” Or in the case of a finished repair, this is already setting a reference for payment, with the calculation of the cost of the parcel. Here it turns out that at some stage of communication the bot needs to pull the class method from the main application. And it would be cool to reuse it, setting up the stages of the conversation and the methods that the bot would pull. Because the main algorithm of conducting conversations, obviously should not change, only the rules and the scheme.
While the setup of the bot is not very intuitive ... and while it can be called a sketch on the knees. Well, it is tied to the application, because the constructor serves all those objects that it pulls and even the sender, who sends the user something, if the bot knows what to send, or if you do not quite understand, specify the subject of the request and ask to rephrase if He does not know that he will not send anything, and the message will not be answered ... and the person will already be engaged in it.
PS>
I have nothing against service center managers, but they often answer the same questions and do the same operations. I think it is extremely correct to leave them only "interesting" questions.