-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Templates and getting started experience #2874
Comments
I like the idea of guiding new users through the process of running their app for the first time. Here are a couple of thoughts: No 1:
> Spin Apps are compiled down to WebAssembly... to do so, you can the `spin build` command.
> Press [ENTER] to run `spin build` for the first time
No 2:
Perhaps we could address code samples by adding a defined comment in the template source code and create a simple plugin for Spin which users could instruct splitting out sample code for a defined scenario (e.g. Using a kv store with Spin) |
(clarifying, not suggesting we execute any command automatically without user input, but ask, whether it's standard |
We have something a bit along these lines in spin/crates/doctor/src/rustlang/target.rs Lines 145 to 146 in 967fdf3
|
Tool setup is a long wished for improvement! Unfortunately, from the Also 100% agree with what Thorsten and Radu said about the trust implications of "running a template could execute arbitary programs on your machine." Anything we do in this area needs to be diligent about informing users and obtaining informed consent.
One thing to consider is "we will do this for you!" (press Enter to run spin build) vs "here is what to do" (now run spin up --build to build and run your application). The first is more helpful in the very short term, and of course shortens "time to success." The second gives the user experience of performing the task: for many people this helps learning more than being told what the computer is doing for them. I hope we can balance those factors (and either would be more than what we do now!).
The current templates were, admittedly, a bit of a reaction against "create new project" systems that gave you a whole application where experienced users had to delete it all or new users had to struggle to see what was important. We (I) might well have erred too far in the opposite direction! But I'd definitely want us to think about the cognitive overhead of "what are all these things, do I need to understand all these comments." But generally yes this is ripe for review, and we can always do more to help users get started! |
I've been thinking a lot lately about using our templates to guide the user a bit more through the experience of 1) bootstrapping their application and 2) using Spin features.
More specifically, for 1):
when I create an application based on a known, maintained template, I set the name, description, and path for my initial component, but then I have to look up what commands I need to build and run. We try to make that experience consistent across templates, so
spin build
andspin up
should be enough, but a) that assumes the user knows those commands, and b) there are templates that require a one-off command be executed before you can evenspin build
(looking at you,npm install
...).so to address this, I'm thinking we could extend the interactive
spin new
process with per-template prompts that could execute commands (if enabled) — like install dependencies, build, then immediately run the application for the first time.For 2):
spin.toml
or the actual source code that gets generated for me.The gist of this issue is: we have an idea what people tend to want to do once they generate an application -- first build and run it; then, they ask how to use certain features.
Can we streamline this experience more through our templates?
Happy to kickstart a SIP if this is a direction people would be interested in.
The text was updated successfully, but these errors were encountered: