{"id":367003,"date":"2022-07-22T07:00:19","date_gmt":"2022-07-22T14:00:19","guid":{"rendered":"https:\/\/css-tricks.com\/?p=367003"},"modified":"2022-07-28T11:31:14","modified_gmt":"2022-07-28T18:31:14","slug":"why-i-chose-angular-to-build-a-url-shortener","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/why-i-chose-angular-to-build-a-url-shortener\/","title":{"rendered":"Why I Chose Angular to Build a URL Shortener"},"content":{"rendered":"\n

URL Shorteners are tools we use to make links shorter than they actually are. With a URL Shortener, you can transform a long link (maybe for a registration form or article) into a shorter version.<\/p>\n\n\n\n

Behind the scenes, the long and short versions of a given link have been stored in some database. Then when a user visits the short link in a browser, the URL Shortener will redirect the user to the long version of the link (where the actual content is found).<\/p>\n\n\n\n

Shortened links from URL shorteners are commonly used when the long version of those links would be too long to use. Sharing links on social media or when designing flyers and adverts is a popular use of URL shorteners.<\/p>\n\n\n\n

For one of my projects, I created a personal URL shortener. My intention was to use it for links to articles I write or videos I make. I used Firebase to build the backend of the URL shortener.<\/a> Specifically, I used the Firestore database to store short and long versions of any given link.<\/p>\n\n\n\n

To create links, I had to use the Firebase console. This wasn’t a problem but it was cumbersome for the high frequency of editing links. The user experience (UX) was not ideal. Now I was faced with a problem. How do I create, edit, and delete links? I needed to build a frontend for the URL shortener. I needed a website for this.<\/p>\n\n\n\n

In this article, we’ll review the available tools used for building this frontend, decision choices, and factors that influenced why they were made.<\/p>\n\n\n\n\n\n\n

Problem statement<\/h2>\n\n\n

The project requirements were:<\/p>\n\n\n\n