Skip to main content
22 votes
Accepted

How to design for API use cases that need different data from the same table?

In the end, there is no "right" or "wrong" in this situation, so my advice can only be on a very general level. You seem to be falling into the trap of leaking a certain design ...
mtj's user avatar
  • 2,340
17 votes

Is this approach to website design adequate or am I making a mistake?

It appears that this design is based on a CRUD model. This kind of model is good for designing database operations, and might actually work for small website UI, but when you are designing for a user ...
Robert Harvey's user avatar
14 votes

Why so many good open source programs have websites that are very poorly managed?

I was reading about gzip program and I found the official website of the gzip software. No, you didn't. You found the website that used to be the official website back when the original authors were ...
Jörg W Mittag's user avatar
7 votes

How to design for API use cases that need different data from the same table?

For this answer I assumed that the terms tournament_id and event_id are equivalent, although you didn't state that explicitly in your question. As mtj pointed out in their answer you shouldn't design ...
Tim's user avatar
  • 179
6 votes
Accepted

Does DNS reply with more information than just IP address?

DNS can respond with some additional data like mail exchange server, but that's not related. Usually we can't access websites by IP address using web browser, because there are more than one websites ...
Slawek's user avatar
  • 2,894
6 votes

How to adapt the architecture of a website and have suitable hosting along with it to meet increasing users?

Just a quick note on terminology: Scaling up refers to improving the hardware. Scaling out refers to adding more hardware in a load balanced environment. In the web world, we tend to scale out the ...
John Wu's user avatar
  • 26.9k
6 votes
Accepted

How to check a solution method submitted by a user?

Question: what is a test supposed to do? Answer: verify that the system under test (website in this case) has the desired functionality. Therefore the answer is relatively obvious: you run the test ...
Philip Kendall's user avatar
5 votes
Accepted

Secure Admin-pages-only login without HTTPS

You should probably go over to HTTPS for the whole website. If you really insist on having an insecure main site, the login form should at least be over HTTPS, otherwise an attacker can just read the ...
Jasmijn's user avatar
  • 1,869
5 votes

How to create a cache-preventing link? Using random number? Unix time? or other better options?

It's probably better to use cache-controlling HTTP headers rather than generating lots of unique URLs.
Michał Kosmulski's user avatar
5 votes
Accepted

Cookie consent and facebook cookies?

Going against the law is not an option: first it might make you loose more visitors (i.e. those who count on you to respect their privacy). Second, GDPR fines calculated as percentage of your global ...
Christophe's user avatar
  • 80.6k
5 votes
Accepted

Why so many good open source programs have websites that are very poorly managed?

Generally, an open source software project has a large(ish) number of contributors, so it can continue even if certain individuals stop contributing either temporarily or permanently. It is also ...
HorusKol's user avatar
  • 4,131
5 votes

Is this approach to website design adequate or am I making a mistake?

Making a total of 51 pages to cover all of ADD, DELETE and UPDATE in the design. In my opinion, this is a considerable amount of pages to design, even if most of them are sufficiently generic in their ...
Laiv's user avatar
  • 14.8k
5 votes

How to design for API use cases that need different data from the same table?

Essentially you need three endpoints. Not worrying about the paths for now we have.. GetPlayerById?id= Returns a single player by id for the player info page. GetPlayersInATournament?tournamentId= ...
Ewan's user avatar
  • 79.8k
4 votes

Creating a web portal to access multiple databases (security and best practice?)

We do this in a different way. We have a directory based (in our case MS Active Directory) authentication. Access to the databases is given to active directory groups within SQL server. Then the ...
Ben Whyall's user avatar
4 votes

How does having assets saved on a secondary domain(s) reduce the load time of the website?

Updated answer for 2024: the technique described (which is called Domain Sharding) is obsolete according to this MDN article because most servers (and basically all browsers) support HTTP2 now, which ...
Remy Oudemans's user avatar
4 votes

Is it hard to "add" semantic web to your website?

Short answer: Semantic HTML is one element of on-site SEO. It's about using HTML4/5 tags that communicate context and not just data to Google. Have a look at this article, it's the best beginner ...
Advait Junnarkar's user avatar
4 votes
Accepted

Prevent download of static files referenced only from pages a user is not authorized to access

You need authorization, of course. Now, you may simply run this through your web server, and check database. While not ideal from performance perspective, it is simple, and often will be good enough. ...
freakish's user avatar
  • 2,604
4 votes

Prevent download of static files referenced only from pages a user is not authorized to access

I handle all requests to static files using the same method and evaluating the same authorizations I use for pages: would that work? Would that make sense? I'm going to disagree with @freakish's ...
pjc50's user avatar
  • 14.8k
4 votes
Accepted

Is there a model or some implementation logic for web layouts?

Yes, I know of a way to make the layout better: I show my first scetch of the UI to one or two users and discuss it with them. That's an old, praxis-proven, standard software engineering technique. ...
Doc Brown's user avatar
  • 214k
3 votes
Accepted

Maintaining a static website using an HTML preprocessor

Your web-server itself can do this with Server Side Includes. Use the include directive in your page to insert a header and/or footer file. <!--#include virtual="/footer.html" --> Sadly, this ...
toastifer's user avatar
  • 147
3 votes
Accepted

How to implement a website with translatable articles?

The question is not so much how the world does it, but how you should do it. The world is full of websites that are designed with a main language in mind, and that later implemented some extensions to ...
Christophe's user avatar
  • 80.6k
3 votes

What happens when I update a page on a live website?

If I just go edit the file with a text editor, or update it with rsync or scp or something, is it possible for a request to get fouled up? For text editors (at least all the common ones), rsync, or ...
Jörg W Mittag's user avatar
3 votes

How would you optimize the rendering of 10,000 elements on a webpage?

I believe what you are looking for is Lazy Loading. It may or may not be what you meant by "virtual" list, but in my years of experience, this is the optimized way to render 10,000 elements into the ...
Kaneki's user avatar
  • 147
3 votes

How to manage a multilingual website/blog?

It depends on the readers. I faced a similar problem when I started my blog. I thought my readers would be mostly from France, but I knew I would also write some articles in English. I decided to ...
Arseni Mourzenko's user avatar
3 votes
Accepted

How exactly does someone make money from free software? And how do programs compete with websites?

Here are some common ways that organisations monetise their software: Advertising - users are shown sponsored content within the context of the software. Often seen on free mobile applications and ...
Samuel's user avatar
  • 9,217
3 votes
Accepted

Where to store unregistered user data?

If it's a small amount of information, you can store it in cookies on the client's device. If it's more data, you might try web storage or even a database on the client. There is also the option of ...
Bogdan's user avatar
  • 3,640
3 votes
Accepted

Make modifications to a database resource specific per company

One possible solution is to create N rows in the tasks table for each task - one row for each company. The tasks table would have the columns: id (the unique id of the row) company_id assignee_id ...
Andrey Bienkowski's user avatar
3 votes
Accepted

Preventing parent component re-rendering of a big React component when you "Lift State Up"

I don't think you can do better than path copying. If you ever written a immutable data structure you'll know that you will have to copy the nodes that you touch as you recursively traverse what in ...
John Leidegren's user avatar
3 votes

How to check a solution method submitted by a user?

The key question here is "do you have control of the website that's being tested?" If you don't I'm not sure it's realistically possible, You would have to analyse and virtually duplicate ...
Ewan's user avatar
  • 79.8k
3 votes

Why would I use Gatsby instead of Manual HTML / CSS when creating a static site?

I'm using Gatsby for my own blog. Here are some benefits I can share based on my experience. Usually, people use SSG writing their blogs. You have a template or skeleton as the layout for all of blogs,...
Richard H. Nguyen's user avatar

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