Replies: 12 comments
-
What kind of advanced samples are you specifically looking into - and do you consider it an opt-in scenario? I've been trying to keep the code as "clean" as possible to allow for flexibility for the developers |
Beta Was this translation helpful? Give feedback.
-
IMHO, a new project scaffolding should be as bare bones as possible... just enough to scaffold the project and make it work on the first try. Anything more advanced should be handled as docs/tutorials. This favors the following approach without the last step (that would happen with more advanced stuff):
|
Beta Was this translation helpful? Give feedback.
-
How about adding a Code Tour that takes you through your setup and optionally links to more advanced scenarios? |
Beta Was this translation helpful? Give feedback.
-
Since we're talking in the context of an interactive generator, why not offer users a choice with regards to what they want to get scaffolded? That would let them go all the way from a barebones project @andrewconnell mentioned, to a more complete solution maybe even including scripts to easily deploy the generated package to Teams using CLI for Microsoft 365. Yes, it would add an extra prompt or two, but I'm sure there are developers who would appreciate these extra features. |
Beta Was this translation helpful? Give feedback.
-
I get both sides - bare bone scaffolding (which I would use) and more complete examples. This could as you say @waldekmastykarz be managed by more options. However, given the number of options already in the generator and the exponential increase of maintenance that would require, it's less than optimal. Personally I'd rather create richer examples in the PnP Teams sample gallery and refer to them and make it easy for folks to copy/paste. |
Beta Was this translation helpful? Give feedback.
-
If these samples are maintained separately from yo the generator, then it could become a challenge to keep them in sync with the version of the generator that someone is using. Another challenge is the discoverability of these samples: how someone using yo teams would know that there are relevant samples that can help them kickstart their dev process? |
Beta Was this translation helpful? Give feedback.
-
@waldekmastykarz - that's why I think code tour could be a perfect match... It would be easier to (optionally) scaffold code tour(s) and reference samples/documentation |
Beta Was this translation helpful? Give feedback.
-
While @waldekmastykarz brings up valid points, I strongly disagree with this approach. Let's approach this from a different angle... When you create a new project in Visual Studio, do you get the option of creating more complex examples? You don't see this done with any other generator in the M365 space... not for SPFx, not for Office Add-ins, etc. Samples != tools. Adding the burden of updating all that sample code every single time someone creates a new project with Yo Teams is unnecessary for Yo Teams. IMHO, samples, tutorials & docs do not belong in tools under any scenario. Tools should create bare-bones projects. Want more? Go look at docs. Also, consider the fact that if there's a tiny bug or security issue that's yet another burden on the generator maintainers. And what if the sample code has a vulnerability This is why you don't see any of Microsoft dev tooling create anything more than the bare-bones projects. How many Teams projects will be deployed with additional sample code that's not used in production apps? And if that sample code had a security issue or bug? |
Beta Was this translation helpful? Give feedback.
-
@waldekmastykarz - and I'd rather have the generator and referenced samples out of sync, rather than having generator internal files being out of sync... |
Beta Was this translation helpful? Give feedback.
-
Another option would be to have an additional (sub) generator, that adds more options to the default generator...but same thing, I will likely not have time to maintain that :-) |
Beta Was this translation helpful? Give feedback.
-
Suggestion: What if we added support for code tours, all based on what you scaffold. One with an intro/overview of the solution, and one per "feature". The first time you run the generator we'll have the code tour as by default true and the next time you scaffold it's default false? |
Beta Was this translation helpful? Give feedback.
-
Personally, I think it's bloating the generator. It's not just my opinion, but it's exactly how DivDev works. IMHO, they've been pretty successful so I wouldn't try to overthink this. There's PLENTY of contributions to do on Yo Teams that are more important than this. Tools != training/docs/samples ... the two should be kept separate. Code tours are used in SPFx samples as well, but only in the samples... NEVER in the code generated by the tools. |
Beta Was this translation helpful? Give feedback.
-
I'd like to see more "advanced" samples in the auto-generated code, especially now that Yo Teams supports React Hooks, because developer might not be up to date about how to use Hooks.
Beta Was this translation helpful? Give feedback.
All reactions