Best way to get started with a web framework

If you’re looking for a program to code up to learn about a web framework, I strongly suggest you try writing a URL shortener.

You’ll understand the concepts of database, authentication (if you allow a user to log in), dynamic routing, permanent routing, creating views, form validation and of course, sending response other than 200 (redirect 😉).

So, let me write down a description for you to make things easier.

What you’ll build is a landing page where I have a text box shown. I can enter a link and be given a shortened link in return. The shortened link, when opened, should redirect me to the original link.

If it is an invalid link, the page should say so and not create a short url for it.

Bonus points for allowing me to login and see my previous shortened links. More points if you count the number of redirects for each link.

This is basically it. If you want to increase the complexity, add validations on the client side, create a responsive UI and expose a JSON API with token authentication for each app/client.

Need more complexity? Store the geolocation of each redirect, by inspecting their IP address. Create a graph to analyze when the most amount of traffic goes through each URL.

Working through this problem will provide you with a good deal of knowledge about the new framework you’re trying out.

3 thoughts on “Best way to get started with a web framework

Leave a Reply

Your email address will not be published. Required fields are marked *