4 ms·
Ask HN: Recommended web framework for Python/SQL back end in 2020
Hi,
I'm a self-learned programmer working in finance who primarily uses Python and SQL. I am a team of one which allows me freedom in choosing what I want to work with but unfortunately also comes with the downside of having no mentorship on the programming front. Right now, everything ends up in Excel and I want to start migrating things to a web app. I want to create some simple web apps for displaying (for now) minimally formatted tabular data and as a distant second some basic charts. I do not know any JavaScript but would be willing to learn if it would assist. I previously have tried out Flask and hated working with HTML/CSS each time. Is Flask still recommended for a minimal/easy to get started setup in 2020 or is there anything else out there? Any advice would be greatly appreciated.
- trboyden 6y agoHTML/CSS is the web, so if you want to develop web apps, you have to learn it/use it. To enable any meaningful front-end interactivity, JavaScript is required as well. But with Microsoft Blazor (https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor) there are starting to be alternative approaches via WebAssembly that allow you to use C# or other languages in lieu of JavaScript. If you don't like the flexibility of Flask, there is always Django (https://www.djangoproject.com https://www.djangoproject.com).
- pythonthrowaway 6y agoThanks for the response. HTML/CSS aversion was more from writing things from scratch. Agreed that I will have to learn some. Django always seemed like overkill for what I wanted but haven't look at it in years so will take a look at the new version. Anyone know if something like DataTables (https://datatables.net/ https://datatables.net/) is still widely used?
- trboyden 6y agoI use it for my data grids on https://pysyteline.boyden.us https://pysyteline.boyden.us (Flask is the framework I used for that site).
- gshdg 6y agoWhat things do you want your framework to do for you? Django has a steeper learning curve than Flask, but takes care of more of the tedious and repetitive stuff for you. With Flask you’ll have to build more from scratch or cobble together third party modules that were never really meant to work together. When did you last look at Django? Modern versions are far more flexible and powerful than those of 10 years ago, but that flexibility comes at the expense of a bit more boilerplate and a bit more to learn. It’s just about perfect for most CRUD apps; and if you want to use raw SQL for queries too complex for the ORM, it supports that too. For charts, there are some Python tools for server side rendering, but you may want to look into Javascript frameworks like D3 that support live-updating charts when users adjust parameters. That said, you can also start with server rendered for MVP and add Javascript as necessary. You’re probably going to have to write at least some of your HTML from scratch, but a modern layout library like Bootstrap can save you the heavy lifting for CSS and provide some HTML boilerplate.