Skip to main content
10 votes
Accepted

Keeping a JSON copy of a database

Basic Drawbacks Excess complexity, redundancy. More potential for bugs (more paths through more code), more time to develop, test, and more cost to maintain, forever. Stale Data The moment the ...
joshp's user avatar
  • 3,511
10 votes
Accepted

Is there a canonical definition of SPA or is SPA a broadly agreed-on architecture with fuzzy edges?

There is no canonical definition of a single page application, since there is no governing body that defined it. Instead, it is a name that got applied to web applications that exhibit a number of ...
Greg Burghardt's user avatar
8 votes
Accepted

Is there any recognized pattern supporting or discouraging the access to the same database from multiple applications?

Connecting multiple applications to the same database is often a bad idea. It's an integration anti-pattern you might call The Shared Database and it's unfortunately a very easy anti-pattern to fall ...
Bogdan's user avatar
  • 3,660
8 votes
Accepted

Single-Page vs Multi-Page and Client-Side vs Server-Side

SPAs and MPAs The core difference between a SPA and a MPA is that with a single-page application, all the requests happen within the lifecycle of a single HTML page. You might be able to see ...
Zach Bloomquist's user avatar
5 votes

Benefits of using a JS Framework

As with any other question to adopt a technology - it depends on the technology. It depends on your requirements. It depends on any future requirements/the roadmap for the product. It somewhat depends ...
JᴀʏMᴇᴇ's user avatar
5 votes

Interoperability between client and server versions

Version your server API. The client doesn't need to know what the current version of the API is, the client needs to know what version of the API your instances support. There are two general options ...
Jeff Lambert's user avatar
5 votes
Accepted

Are Physical Firewalls mandatory

If by "physical firewall" you mean a separate appliance, then this might not be necessary. Configuring port forwarding in the router is already a kind of firewall. But let's take a step back ...
amon's user avatar
  • 136k
4 votes

How do I deal with file downloads?

Both approaches have advantages and disadvantages, you need to weigh them according to your requirements. Direct links can be faster or use less server resources, may even scale better if you use a ...
Hans-Martin Mosner's user avatar
4 votes
Accepted

Can I assume nobody deletes user generated content off my server's file system?

To give you a direct answer to Is it bad practice to assume that server side file will never be deleted by external forces It is not bad practice to assume it is unlikely a file will never be ...
Doc Brown's user avatar
  • 220k
4 votes

Interoperability between client and server versions

Focus on ensuring that the messages passed between different versions of the protocol can be understood. Broadly, this means You never add a new required field to a message Optional fields can be ...
VoiceOfUnreason's user avatar
4 votes

Can I assume nobody deletes user generated content off my server's file system?

This kind of depends on where and how you expect this application to be deployed. If you control the deployment or can make rules (such as in the form of a "maintenance guide") that those who operate ...
Michael Borgwardt's user avatar
4 votes
Accepted

One thread for all database operations or one thread for each db operations?

Is it a good solution ? or not ? and why ? Databases have been among us for a long time, and a lot of people already did the thinking for us ;) You have a problem of Transactional Serializability. ...
linuxunil's user avatar
  • 1,461
4 votes
Accepted

Interoperability between client and server versions

Custom proxies and stubs, which handle version adaptation So clearly to make this work well, you need to version your API. Each different version of the API which may see action in the field requires ...
Lewis Pringle's user avatar
3 votes

Achieving server-side rendering of data coming from a PHP API

AngularJS has support for server-side rendering by using a Node.js server, see their documentation on it: https://angular.io/guide/universal. This guide describes Angular Universal, a technology that ...
Jade Ellis's user avatar
3 votes

If we write validation in sever side, don't it become two times of writing same code? What is the standard software engineering solution for it?

Server-side validation is for security, so users can't bypass client-side validation and send potentially harmful requests. Client-side validation is for usability, so users can immediately see that ...
Kayaman's user avatar
  • 1,980
3 votes
Accepted

Rendering custom markdown format: client side or server side?

It all comes down to one thing: what are your main concerns with this system? Is it reducing the storage space required? The bandwidth use? The server CPU use? Is the custom markdown something your ...
TurtleKwitty's user avatar
3 votes

Do CPU Intensive/ Data Intensive Tasks belong on the Server

The normal rule for data intensive work is to place the processing so that the 'large' block of data doesn't move around much. This is because network delays are frequently much larger than any other ...
kas's user avatar
  • 61
3 votes
Accepted

What does a proper server response look like?

Having a basic JSON wrapper such as {"age":30} enables you to extend the response structure in the future without breaking the interface. You don't need to include the additional metadata if you don't ...
casablanca's user avatar
  • 5,004
3 votes

One thread for all database operations or one thread for each db operations?

Database operations typically consist of multiple stages and allow for quite some parallel execution. Your single thread will block that. You're right that creating a new Connection for every request ...
Ralf Kleberhoff's user avatar
2 votes

Benefits of using a JS Framework

There are several benefits to use client side JS over server side. One is it scales easier than server side, another is its ability to render faster since it doesn't have to send data between client ...
Karl Svensson's user avatar
2 votes

Do CPU Intensive/ Data Intensive Tasks belong on the Server

You always want to minimise the amount of data transmitted between server and client. If by doing some amount of extra work the server can significantly reduce the amount of data to be sent, then this ...
gnasher729's user avatar
  • 49.4k
2 votes

System design for multiple workers

How should the workers notify the processor about new data? Should I use a simple REST server (i.e. Apache Tomcat) or some Message Broker to deliver the data to some backend service? You can use HTTP (...
JimmyJames's user avatar
  • 30.9k
2 votes
Accepted

Why does YouTube save Restricted Content filter locally?

There are several use cases for youtube: User connects with an account (your case) User browses anonymously (my case) As a connected user, you'd think that it would be more practical to store ...
Christophe's user avatar
  • 82.1k
2 votes

Securely allow access to a secure area of a website with PHP

Actually, you do have an account system, only a very limited one that supports only a single authenticated account. To prevent non-authenticated access to the admin pages, you should use the same ...
Bart van Ingen Schenau's user avatar
2 votes

Is there any recognized pattern supporting or discouraging the access to the same database from multiple applications?

The other way around - having multiple applications (services) access the same database - would be an anti-pattern which implies lots of problems such as high coupling between those applications, ...
Andreas Hütter's user avatar
2 votes

Are Physical Firewalls mandatory

Every single day, new vulnerabilities are detected on lots of software components, be it on the server side or the router side. First of all, port forwarding is nothing like a firewall. Port ...
Christophe's user avatar
  • 82.1k
1 vote

Is there any recognized pattern supporting or discouraging the access to the same database from multiple applications?

One principle I absorbed from a huge company is that each server-side enterprise application should only have access to its own database, and if other applications need to read/write data on that ...
Robert Harvey's user avatar
1 vote
Accepted

Storing username and password for another site in Node and MongoDB

Given the constraints, you should encrypt the password in the database. If you are going to process every user/password every night, you might as well go ahead and encrypt the username too. There ...
JimmyJames's user avatar
  • 30.9k
1 vote

Server side rendering of third party updated html components

A component that's activated by a script tag will be written in javascript and designed to run in a browser. It will typically work by modifying the DOM, which is how the browser manages the content ...
Martin K's user avatar
  • 2,947

Only top scored, non community-wiki answers of a minimum length are eligible