📖 Scenario: You are a developer deciding which cloud backend service to use for your new mobile app. You want to compare Firebase, AWS, and Supabase to understand their features and differences.
🎯 Goal: Create a simple data structure that lists key features of Firebase, AWS, and Supabase. Then add a configuration variable to select a service. Next, write code to extract the features of the selected service. Finally, complete the setup by adding a summary of the chosen service.
📋 What You'll Learn
Create a dictionary named services with keys 'Firebase', 'AWS', and 'Supabase' and their feature lists as values
Add a variable named selected_service set to 'Firebase'
Write code to get the features of the selected_service from services into a variable named features
Add a variable named summary that describes the selected service using selected_service and features
💡 Why This Matters
🌍 Real World
Developers often compare cloud backend services to choose the best fit for their app's needs.
💼 Career
Understanding cloud service features and how to organize them in code is essential for cloud architects and developers.
Progress0 / 4 steps
1
Create the services dictionary
Create a dictionary called services with these exact keys and values: 'Firebase' with value ['Realtime Database', 'Authentication', 'Hosting'], 'AWS' with value ['EC2', 'S3', 'Lambda'], and 'Supabase' with value ['PostgreSQL', 'Realtime', 'Authentication'].
Firebase
Hint
Use a dictionary with keys as service names and values as lists of features.
2
Add selected service variable
Add a variable called selected_service and set it to the string 'Firebase'.
Firebase
Hint
Assign the string 'Firebase' to the variable selected_service.
3
Extract features of selected service
Write code to get the features list of the selected_service from the services dictionary and store it in a variable called features.
Firebase
Hint
Use the selected_service variable as a key to get the features from the services dictionary.
4
Add summary of the selected service
Add a variable called summary that is a string describing the selected service and its features. Use an f-string with selected_service and features to create the summary.
Firebase
Hint
Use an f-string to combine the selected_service and features into a descriptive summary.
Practice
(1/5)
1. Which platform is best suited for quickly building apps with realtime data updates and simple backend requirements?
easy
A. Firebase
B. AWS
C. Supabase
D. None of the above
Solution
Step 1: Understand Firebase's main strength
Firebase is designed for fast app development with realtime database and simple backend features.
Step 2: Compare with AWS and Supabase
AWS is more complex and flexible, Supabase is open-source with SQL focus, but Firebase excels in realtime simplicity.
Final Answer:
Firebase -> Option A
Quick Check:
Realtime + simple backend = Firebase [OK]
Hint: Realtime + simple backend = Firebase [OK]
Common Mistakes:
Confusing AWS as fastest for simple apps
Thinking Supabase is best for realtime simplicity
Assuming all platforms are equally simple
2. Which of the following is a correct statement about AWS compared to Firebase and Supabase?
easy
A. AWS is only for small projects with simple backend needs.
B. AWS offers powerful and flexible cloud services for complex projects.
C. AWS is an open-source SQL backend with realtime features.
D. AWS is mainly used for mobile app development with realtime database.
Solution
Step 1: Identify AWS's core purpose
AWS provides a wide range of cloud services designed for large and complex projects requiring flexibility.
Step 2: Eliminate incorrect options
"AWS is only for small projects with simple backend needs." is false because AWS handles complex projects; "AWS is mainly used for mobile app development with realtime database." describes Firebase; "AWS is an open-source SQL backend with realtime features." describes Supabase.
Final Answer:
AWS offers powerful and flexible cloud services for complex projects. -> Option B
Quick Check:
AWS = powerful + flexible for complex projects [OK]
Hint: AWS = powerful and flexible for complex projects [OK]
Common Mistakes:
Thinking AWS is only for simple apps
Mixing Supabase features with AWS
Assuming AWS is mainly for realtime mobile apps
3. Given this description: "An open-source backend with SQL database and realtime features," which platform fits best?
medium
A. Supabase
B. AWS
C. Firebase
D. Google Cloud Functions
Solution
Step 1: Analyze the description keywords
Open-source, SQL backend, and realtime features point to Supabase's main characteristics.
Step 2: Compare with other platforms
Firebase is not open-source and uses NoSQL; AWS is not open-source and offers many services; Google Cloud Functions is serverless compute, not a backend database.
Mixing serverless functions with backend databases
4. You want to build a complex app with many cloud services and custom infrastructure. Which mistake would cause problems if you choose Firebase instead of AWS?
medium
A. Firebase is too complex and hard to use for simple apps.
B. Firebase requires managing your own SQL database.
C. Firebase does not support realtime data updates.
D. Firebase lacks the flexibility and wide range of cloud services AWS offers.
Solution
Step 1: Understand Firebase's limitations
Firebase is great for simple apps but does not offer the extensive cloud services and flexibility AWS provides.
Step 2: Identify the mistake
Choosing Firebase for complex infrastructure needs leads to lack of flexibility and missing services, which AWS covers well.
Final Answer:
Firebase lacks the flexibility and wide range of cloud services AWS offers. -> Option D
Quick Check:
Complex app needs flexibility = AWS, not Firebase [OK]
Hint: Complex needs require AWS flexibility, not Firebase [OK]
Common Mistakes:
Thinking Firebase is complex and hard for simple apps
Believing Firebase lacks realtime support
Assuming Firebase requires manual SQL management
5. You want to build a realtime app with a SQL database and prefer open-source tools. Which platform should you choose and why?
hard
A. Firebase, because it offers the best SQL support and open-source backend.
B. AWS, because it has the simplest realtime database and open-source features.
C. Supabase, because it provides an open-source SQL backend with realtime capabilities.
D. None, because no platform supports realtime SQL with open-source backend.
Solution
Step 1: Identify the requirements
The app needs realtime updates, SQL database, and open-source tools.
Step 2: Match requirements to platforms
Firebase is not open-source and uses NoSQL; AWS is powerful but not open-source SQL backend; Supabase fits all requirements.
Step 3: Confirm Supabase features
Supabase offers open-source SQL backend with realtime features, ideal for this scenario.
Final Answer:
Supabase, because it provides an open-source SQL backend with realtime capabilities. -> Option C