Closed mraaroncruz closed 7 years ago
OK. So after actually looking through the codebase ;), I see that this is a wrapper around a couple other gems (messenger-ruby and facebook-messenger).
For these suggestions to make any sense, you'd need to start by making this a gem, so more like a messenger-ruby/facebook-messenger plugin, then move all of the rails stuff into an examples directory.
But for that to happen, a lot of architectural decisions would need to be made.
I see that this would be much harder to deal with because of the user model, for example. Worth discussing though. Pluggable persistence models would be one solution, like botkit does. It defaults to memory and has a built in JSON file store if you want to use it. We could add ActiveRecord or Redis backend adapters.
are you on the chatbotconf tomorrow?
Nope, waited too long to get tickets and it was sold out 😞
I'd like to use Sinatra or just plain Rack to build a bot with the framework since the routing layer is the least interesting and complicated part of building a chatbot. Relying on Rails, its memory footprint and bundled goodies that botstack would never use seems like overkill.
We just need two routes:
GET
POST
You would still get the benefits of being able to choose the endpoint (even in a Rack app) using Rack's
map
method.Also necessary would be an integration guide for Rails, Sinatra and Rack in the docs.
What do you think?