Questions tagged [backend]
128 questions
64
votes
10 answers
How do I mitigate a scenario where a user goes to pay, but the price is changed mid-request?
This is kind of similar to the Two Generals' Problem, but not quite. I think there is a name for it, but I just can't remember it right now.
I am working on my website's payment flow.
Scenario
Alice wants to pay Bob for a service. Bob has quoted…

turnip
- 1,657
- 2
- 15
- 21
45
votes
5 answers
SQL sanitizing in code with no user input
In my company's codebase, we hardcode sql queries without using an ORM.
Here's an example of a query we would run:
UPDATE client SET status="active" WHERE client_id=123
Since the query is hardcoded and the parameters are passed in, the code would…

half of a glazier
- 577
- 2
- 8
39
votes
6 answers
Is the frontend or backend (API) responsible for formatting data in a specific locale?
In our company we had a discussion whether formatting data in a certain locale is the responsibility of the frontend application or of the API that provides data to it.
Which of the following scenarios would be best practice?
Scenario 1
The API…

Dario
- 535
- 1
- 4
- 9
35
votes
10 answers
Am I right that switching programming languages will have little impact on the scalability of a CRUD API?
An external consultant to our team advised us to rewrite our SaaS offering (essentially a CRUD API) in .NET because this is more "scalable" than using Node.js (or Ruby on Rails, Flask, etc.). By that they seem to mean that a backend API written in…

Vincent
- 544
- 4
- 8
35
votes
2 answers
Methods of separating front and back-end with full stack javascript?
Suppose I have a front-end which is mostly a single-page application written using angular, grunt, and bower. And suppose I have a backend, which is mostly just a REST API sitting on top of an ORM, which stores/retrieves objects from a database,…

FrobberOfBits
- 759
- 1
- 6
- 9
27
votes
5 answers
Is the term 'Front-End' synonymous with 'Client-Side'? If so, is this always the case?
As a relatively new (self-taught) web developer, I've heard the terms front-end, client-side, back-end, and server-side quite often. To me, front-end and back-end were always synonymous with client-side and server-side, respectively.
However, as…

HellaMad
- 381
- 1
- 3
- 7
25
votes
6 answers
How can I access Excel from my backend?
We have a lot of business logic in Excel files and we would like them to integrate in a web application (a Node.js web application). We don't want to rebuild the logic in a programming language. Instead, we would like to insert data into the Excel…

Martin Böschen
- 380
- 3
- 8
25
votes
3 answers
Is it normal design to completely decouple backend and frontend web applications and allow them to communicate with (JSON) REST API?
I am creating new business web application and I want to achieve:
Use the best technologies from their respective realms. I want reliable backend framework with solid ORM. And I want the most advanced SPA (single page application) framework with…

TomR
- 1,003
- 1
- 9
- 17
12
votes
2 answers
As back-end developers, should we learn software testing?
As a junior developer, I'm working in a company that develops software for the airline industry. We have a test team, so I don't have any motivation to learn testing software. My friend is working for a small company as an back-end developer. Their…

Ali Arda Orhan
- 385
- 2
- 9
10
votes
2 answers
How do serverless architectures manage database connections?
The main advantage of serverless architecture is said to be that such programs do not need a dedicated server to run continuously. Then are invoked on a request and stop on exiting the function.
This means that a serverless program will have to be…

Registered User
- 263
- 1
- 6
10
votes
3 answers
REST API authorization strategies
There are a lot of questions on here that deal with the mechanics of authentication and authorization of RESTful APIs but none of them appear to go in to details of how to implement secure services at the application level.
For example let's say…

HJCee
- 165
- 1
- 9
8
votes
3 answers
code generation - would C be a good compiler backend?
In this and this stack overflow questions, the answers state that C as a compiler backend is a bad idea.
But why?
C has many compilers that can heavily optimize it. Every platform has a compiler that supports it, and it can be compiled to every…

Kied Llaentenn
- 91
- 5
8
votes
3 answers
Authentication and authorization - front-end vs back-end dilemma
I'm working on centralized authentication and authorization API system and got stuck in front-end vs back-end dilemma.
Front-end person is telling that should to have only one request to that API to have user authenticated and authorized at the same…

JackTheKnife
- 329
- 2
- 3
- 9
7
votes
5 answers
How to designing API JSON Response with nullable fields
We were discussing how to design a API response, for simplicity, think of having to give information of all the different types of facilities available in a city:
{
"city": {
"cityName": "Gotham",
"population": "8620000",
…

daltonfury42
- 179
- 5
7
votes
2 answers
How to define and share a JSON schema between the front-end and back-end of an application?
We have a mobile app that accepts input into some fields, formalises them as a JSON document and then sends it to the back-end for processing.
We want to agree on a schema for this document that can be validated and referenced indirectly in both the…

Nobilis
- 179
- 1
- 6