Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
So I have what is probably a common question. I want to build a web front end for a CRUD REST API that I also built.

As some background, my background is in the operations side of IT, but I also have a CS degree and can pick up programming things easily, so I built a REST API using Python's FastAPI that we use in my org for managing our infrastructure. FastAPI was great because it let me focus purely on the logic of my app and FastAPI did a lot of the work for me. It's an API because we have automated systems that interact with it programmatically, but humans also need to view and update the data, hence the front end. A benefit of doing the work in FastAPI/Python is that this is built for and by operations people, and operations people are more likely to be comfortable with Python than other languages.

So, I'm really not sure where I should be looking as far as a tool to build this with. My instinct is to look at something like React, but that also seems like a very heavy solution, and something that would be hard for someone else to pick up and modify. Other than me, generally speaking, the maintainers of this would be people from an "operations" background rather than a "development" background, so javascript/react skills are not something that they would be regularly exercising. I have some experience with Python's flask, and I could write something where the flask app queries the API, renders a page, and sends it to the browser. But there's still going to be a lot of HTML and still some javascript involved there, so there's going to be a skills gap with "operations" people no matter what.

I'm happy to research and learn something new, I'm just having trouble even pinning down in what direction I should be looking, especially for something that feels like it should be a somewhat common use case?

Adbot
ADBOT LOVES YOU

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams

Calidus posted:

As someone who got paid to write terrible SPAs that run on internal enterprise networks, I would really take a look Retool. It fits your use case perfectly, but there per user pricing is a no go for some places.

Yeah, I've looked at Retool in the past for a similar case and scope, basically where we need to grant access to over 1000 people to the form or tool, but only a handful of them will actually use it in any given time period, and actual usage would be pretty low, so their pricing would pretty quickly destroy us. I'm also not sure I could even get leadership on board with even the potential of spending money to try and open a channel to sales to see if they can work out some pricing that works for us.

I spent some more time looking at React and the like and I'm pretty sure that's not the direction I want to go now, as I think the mental leap to building an SPA based on our existing skillsets is probably too high. I think in the end I'm probably looking for something much closer to static HTML with some javascript using the fetch() method to get the data. I'm once again leaning towards Flask or Starlette to build this out, mostly using that backend to handle some authentication and long term session storage, and then mostly just spitting out raw HTML that uses something like Bootstrap to render elements in a pretty way.

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
I think Bootstrap does that, there's probably others that do similar things.

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
The specific codes don't matter, but a good rule of thumb is "4xx is the user's fault, 5xx is the server's fault" lots of tooling will operate on those assumptions.

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
I'M A TEAPOT

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply