microsoft / botbuilder-dotnet

Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET.
https://github.com/Microsoft/botframework
MIT License
872 stars 480 forks source link

Documentation is too thin #182

Closed digitaldias closed 6 years ago

digitaldias commented 6 years ago

The documentation is lacking in it's ability to describe middleware in particular.

There is no explanation of what types of middleware you can/should pass to the bot, there is no documentation at all explaining IntentRecognitionMiddleware, or what other options there are, only a (far too slim) text that says the execution of Middleware is executed in the order that the middleware is added.

You need to detail in documentation how a user would go about setting up various ITopic classes, and how an IntentRecognitionMiddleware helps decide which topic is activated.

Consider that the developer would like to deliver the following dialog:

I know and understand that this is already done in part in the Alarms example, but that has so many bits and pieces to it that it is hard to understand the flow. The documentation should use some form of diagram that shows the objects involved in delivering this type of functionality, and how information flows between then - perhaps even the Alarm project would be good to use as a starting point.

Coming to V4 from V3, my questions after looking at the wiki are:

Having some background in V3, I can figure out some of the questions by reading code samples, but for someone starting out with v4, the complexity of writing Middleware without understanding middleware and how it is utilized by Bot is in my opinion a direct showstopper.

garypretty commented 6 years ago

@digitaldias I can't answer all of these questions, but I think I can help on a few :)

Ultimately I think over the comings weeks we will likely see the pieces falling into place and a little more stability in the core SDK which will then allow for more detailed documentation / wiki pages to be produced, once these are not likely to change (potentially daily at the moment!). My understanding is that the overall direction of travel for v4 is to provide a core set of capabilities for bot development, but to be less prescriptive around the patterns used to form the conversations itself (e.g. dialogs). Coming from v3 this can feel initially like a step backwards (at the moment), but in the end should allow greater flexibility and for better bot development patterns and practices to grow with the community.

Hope that helps. I am cc'ing @cleemullins in case he wants to correct me on or expand on any points. Hopefully I am not too far off though.

digitaldias commented 6 years ago

Thanks for an extensive answer, Gary. Yeah, you're right in that I was thinking about FormFlow in v3, where FormBuilder is one of the actors.

One knee-jerk reaction to naming: The term "Middleware" seems to cover a huge set of bot functionality; from topics of conversations to intent recognizers and prompts. The term itself says nothing about the responsabilities of the classes involved. Documenting what makes a piece of Middleware, and how the flow runs through it, would be essencial in having the developers understand and expand on that knowledge.

garypretty commented 6 years ago

@digitaldias I totally agree! I am sure @cleemullins and the team will appreciate the insight.

cleemullins commented 6 years ago

@digitalias, I agree on all fronts.

As @garypretty has pointed out, we've got a docs team churning full time. The issue is that things have not yet settled out, so they're chasing a moving target. To help with that, we added docs into the roadmap and just haven't gotten there yet.

Many of the issues you see being posted are actually from members of our docs team, as they try to figure things out, hit "weird" areas, and otherwise are trying to document this SDK.

(As for Middleware, I also agree. I know @johnataylor also strongly agrees. We're starting to put boundaries around it, define when/how it should be used, and generally providing meaningful guidance around the Middelware. I would NOT say we have achieved this yet.)

JonathanFingold commented 6 years ago

I added the following to the Overview topic on the wiki. Hopefully, this helps a little.

Under Middleware

The SDK is designed around middleware that represents application-independent components, such as:

JonathanFingold commented 6 years ago

Closing. @digitaldias , please reopen if this issue hasn't been addressed appropriately.