Skip to content

Instantly share code, notes, and snippets.

@tylerlong
Created October 26, 2016 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylerlong/976da6a3ccbf7928cd3dbfe7ce5a2cbb to your computer and use it in GitHub Desktop.
Save tylerlong/976da6a3ccbf7928cd3dbfe7ce5a2cbb to your computer and use it in GitHub Desktop.

I am thinking maybe it's better to create our own bot platform to replace hubot. I have several reasons to say so:

  1. Hubot is simple, It's easy to replace it. Basically what hubot does is: receive and send messages (via adapters), match with regex and invoke scripts.
  2. It's not hard to reuse existing hubot scrits for other bot platforms. Most hubot scrits are quite regular, thanks to the simplicity of Hubot. We could even write a tool to migrate exiting hubot scripts automatically.
  3. Hubot has long history but it has never been truely popular. Which implies that there are essential architectural defeats.
    1. It doesn't provide enough levels of abstraction from OOA's perspective. It only provides end programmers with the concept of "scripts".
    2. A "script" file (js or coffee) could have several "scripts", and the help information of those scripts are read from the comments of the source code.
    3. The concept is confusing and the design is not very elegant.
  4. Hubot doesn't support complex operations out of the box, for example: upload file, post images, start a new conversation with some one, @ some one ..etc. We need to hack it.
  5. It could be better: a script folder is an app which could contain mutiple js files if the app is complicated. Each app could have icon, logo, description, help information... specified. Each app could have several abilities/skills, each skill should have regex, description, help information ... etc.

Overall I feel very restricted building things upon Hubot and I don't think it's a beautiful piece of software. It's too simple and half-baked. And I always think I could create something much better in a short time.

People are already building new platforms to replace hubot. Such as https://dev.kik.com/#/docs/getting-started, https://playground.pandorabots.com/en/quickstart/ and http://www.techworld.com/picture-gallery/apps/seven-platforms-for-developers-build-chatbots-3639106/.

I am not suprised that people are building their own instead of reuse Hubot (although it's designed as as generic soltuion by means of adapters). Because they want their bot platform to be flexible and scalable, which could meet long-term requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment