Compare REST, SOAP, and GraphQL APIs
📖 Scenario: You are working as a junior developer in a company that uses different types of APIs. Your manager wants you to create a simple comparison of three popular API styles: REST, SOAP, and GraphQL. This will help the team understand their differences clearly.
🎯 Goal: Create a small program that stores key features of REST, SOAP, and GraphQL in a dictionary, then filters and displays the features of the API style chosen by the user.
📋 What You'll Learn
Create a dictionary called
api_features with keys 'REST', 'SOAP', and 'GraphQL', each holding a list of 3 features as strings.Create a variable called
selected_api and set it to one of the keys: 'REST', 'SOAP', or 'GraphQL'.Use a for loop with variables
feature to iterate over the list of features for the selected_api key in api_features.Print each feature on a new line.
💡 Why This Matters
🌍 Real World
Understanding different API styles helps developers choose the right one for their projects and communicate clearly with teams.
💼 Career
Many software jobs require knowledge of REST, SOAP, and GraphQL to build or maintain web services and APIs.
Progress0 / 4 steps