Skip to content
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

Why? What? Who? How? (Tutorial) - Please Answer The Key Questions #1

Closed
3 tasks
nelsonic opened this issue Jul 16, 2020 · 17 comments
Closed
3 tasks

Why? What? Who? How? (Tutorial) - Please Answer The Key Questions #1

nelsonic opened this issue Jul 16, 2020 · 17 comments

Comments

@nelsonic
Copy link
Member

Hi @th0mas, 👋
as noted in #7, #8 and #9, it would be really good to have a complete beginners guide to insomnia core in general
and then specifically how we are using it in our smart-home-security-system project 🏡

image

As with any new technology we adopt @dwyl, we need to have a beginner friendly intro explaining exactly what problem the tech/tool solves for us and why it's a total no-brainer to use it instead of anything else. We are very conscious/deliberate with our technology stack selection/adoption because we know each addition adds cognitive load, complexity and maintenance overhead. That being said we are stoked when people introduce us to new tools that can help make our lives easier. So ...

Please use this repository to write up everything you know about insomnia core so that someone who has never heard of it before can get started.
In the "How?" section, it's reasonably safe to assume they know what a REST API is (even if they have never built one themselves)
and that the have some familiarity with Elixir/Phoenix. But the tutorial is meant to show them everything they need to know from first principals so don't make any assumptions beyond "Todo List" level.

Why?

Describe why someone would want to use insomnia core for designing/documenting/managing a REST API.
Summarise the key benefits preferably in bullet points so people can quickly see that it's relevant to them.

We always start with why because it's the first question people ask themselves.
Within a handful of seconds of starting to read a page, people think: "What's in it for me?" (WIIFM)
Not because they are self-centred, just because they are busy and need to know fast if it's worth their time.
i.e. "Why should I bother with this when there are so many other things competing for my attention?"
So we need to answer that question ASAP in anything we write so people don't immediately bounce.

What?

In layperson's terms, what are the key features/benefits of insomnia over handrolling the API or using a different API creation/management tool? Again, use bullet points or a short paragraph.

Limitations?

At present insomnia does not support WebSockets Kong/insomnia#528 and there does not appear to be a timeline for it.
As noted in "Why Elixir" one of the biggest reasons we use Elixir/Phoenix is for Channels.
Can we still use insomnia for the REST API portion and then hand-craft the spec/docs for our Channels/RealTime API?

Who?

Answer the question: "Who is this tutorial for?"
(it's definitely not "everyone" ... but what subset of the dev community is it relevant to?)

How?

  • Show how to get started with insomina from scratch in a new project. (this repo)
  • Create a basic API step-by-step

If you're stuck for a basic example of a REST API to build with insomnia, just build out the endpoints of a Todo List which should already be familiar to the reader so it's less explaining.
Or, if you just want an ultra basic API with just an endpoint for GET and POST,
Consider the "Quotes" example we used in the https://github.com/dwyl/phoenix-content-negotiation-tutorial
Where the POST would be adding a new quote to the database.

  • Demonstrate the reader how insomnia makes creating/extending/maintaining the API easier.

tl;dr

Technical writing (written communication) is every bit as important as crafting code, read: nelsonic/nelsonic.github.io#797
So please take your time to write something that is a beginner-friendly as possible.
We have several examples you can follow e.g:

Once you're done, you could mirror the tutorial to your personal site as a "blog" post/tutorial.
When you applied to work with us this summer, we looked at your personal site as evidence of your proactiveness.
And specifically at your Fancy Lights "lockdown" project as a sign you could actually get work done. 🚀
The more content you can publish on your personal site the better for your long-term job/career goals.

@th0mas
Copy link
Collaborator

th0mas commented Jul 16, 2020

I'll get on this tomorrow (Friday)

@nelsonic
Copy link
Member Author

Thanks @th0mas you're a ⭐ !
(love what you've proactively done with learn-scenic so far; keep up the great work!) 🚀

@iteles
Copy link
Member

iteles commented Jul 16, 2020

@nelsonic On a slightly separate note, this description of the 'Why? What? Who? How?' format explanation would be really useful as a readme in our contributing repo! I can open an issue there.

@nelsonic
Copy link
Member Author

@iteles yeah, go for it. re-purpose however you see fit. 👍

@nelsonic
Copy link
Member Author

image

When you first open Insomnia core you will see an empty workspace:

image

Before:
Step 1

After:
step-1-insomnia-create-workspace

Reduce the size of the screenshot to the bare minimum and highlight the important part.

@nelsonic
Copy link
Member Author

insomnia-create-new-request

insomnia-new-request-name

insomnia-url-send

insomnia-response

@nelsonic
Copy link
Member Author

The old image had 8080 in it from the Go example, which was also updated to use TCP Port 4000:

step 2.1

@nelsonic
Copy link
Member Author

Text refers to left, middle and right columns, so rather than updating the text, just got a new 4000 screenshot:
insomnia-response-3-columns

@nelsonic
Copy link
Member Author

insomnia-create-todo

@nelsonic
Copy link
Member Author

insomnia-manage-environments

insomnia-create-environment

insomnia-double-click-to-edit-environment-name

insomnia-environment-developmet

Before:
Host Template

After:
insomnia-host-environment-variable

Use the development environment:
insomnia-use-development

@nelsonic
Copy link
Member Author

insomnia-localhost

insomnia-host

@nelsonic
Copy link
Member Author

insomnia-post-request-review-pr

@nelsonic
Copy link
Member Author

insomnia-new-request-view-item

insomnia-response-autocomplete

@nelsonic
Copy link
Member Author

insomnia-response-error

@nelsonic
Copy link
Member Author

insomnia-auth-request-authenticated

@nelsonic
Copy link
Member Author

insomnia-edit-tag

insomnia-send-view-item

insomnia-token-auth

insomnia-auth-request

@nelsonic
Copy link
Member Author

PR #3 merged. ✅
Thanks again @th0mas 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants