2
5 Comments

I've built a fully functioning Flask app deployed to Heroku. What to do for front-end?

Anyone have experience building front-ends for Flask? Do I need to start learning React or a similar framework? Is one better than the other for working with flask applications? Is bootstrap no longer acceptable? Thanks.

on April 5, 2020
  1. 2

    Flask does provide you with multiple endpoints, which you call via an HTTP request. This is basically your setup for a microservice architecture, as, depending on the granularity of your endpoint functions, you can call them from multiple places and re-use the backends capability.

    Getting to your question if any of the frameworks is better for working with Flask: Because pretty much every front-end language has the capability to run HTTP requests, you are not limited at all and I don't think there are better or worse.

    But as @horizontech said you're probably off to a good start with HTML, CSS, and JS. Then a framework such as React, Vue, Svelte. A framework for Python-based web applications is django, if you're more into that.

  2. 1

    Looks like HTML + CSS & Bootstrap + JS is all you need for your front end design if you are using Flask and Heroku. I'm happy with the workflow and I think the result works pretty well. This is my first personal project and I am using all of this features you are talking about in a really simple App for bulk image resize -> freeimageresizer.com

  3. 1

    Hey Samuel,

    I assume you are still working on the web app you referenced in your previous post. I don't see any reason you would have to dive into react to do this. Flask works pretty well with the Jinja templating engine. You could use this to render webpages(html/css). Bootstrap is definitely still a functional alternative. I wouldn't worry too much about what technology you are using as long as it works for you. Your users won't be bothered either.

  4. 1

    if bootstrap gets the job done for you then use it. I've used it across several projects :)
    for openstartuplist.com I use tailwind css

  5. 1

    start with simple HTML, CSS. Then JS.

    Won't suggest directly jumping into React.

  6. 1

    This comment was deleted 4 years ago