I was reviewing the topic and I learned that to create an application that shortens URLs, we will need some form of storage to keep track of the mappings between the short codes and the original long URLs.
Possible Approaches:
In-Memory Storage:
Use a dictionary (map) to store URL mappings.
Only suitable for small-scale applications or prototypes.
Note: Data will be lost when the application stops running.
Database Storage:
Use a database like SQLite, MySQL, PostgreSQL, or MongoDB to store URL mappings.
This would ensure data persistence and scalability.
External API
Use an external URL shortening service API (e.g., Bitly, TinyURL, Rebrandly).
This abstracts away the storage and management of URLs.
Issue
I was reviewing the topic and I learned that to create an application that shortens URLs, we will need some form of storage to keep track of the mappings between the short codes and the original long URLs.
Possible Approaches:
In-Memory Storage: Use a dictionary (map) to store URL mappings. Only suitable for small-scale applications or prototypes. Note: Data will be lost when the application stops running.
Database Storage: Use a database like SQLite, MySQL, PostgreSQL, or MongoDB to store URL mappings. This would ensure data persistence and scalability.
External API Use an external URL shortening service API (e.g., Bitly, TinyURL, Rebrandly). This abstracts away the storage and management of URLs.
I think we should go with 3. @Tav0nes. Thoughts?