Skip to main content
54 votes

Why is XSLT so rarely used on the web?

XSLT does not really have a useful role in the modern interactive web. The purpose of XSLT is to transform from one XML language into another - but you actually never need to do that in the first ...
JacquesB's user avatar
  • 59.9k
45 votes
Accepted

Should HTTP status codes be used to represent business logic errors on a server?

Kasey covers the main point. The key idea in any web api: you are adapting your domain to look like a document store. GET/PUT/POST/DELETE and so on are all ways of interacting with the document store....
VoiceOfUnreason's user avatar
25 votes

Should HTTP status codes be used to represent business logic errors on a server?

In my experience, HTTP error codes are insufficient to represent business errors. However, they are useful to represent classes of errors. So, my recommendation would be to use HTTP error codes for ...
Kasey Speakman's user avatar
20 votes

Why is XSLT so rarely used on the web?

Depends what you mean by "in Web". XSLT is very widely used. As far as we can judge from metrics like the number of StackOverflow questions, it is in the top 30 programming languages, which probably ...
Michael Kay's user avatar
  • 3,529
16 votes
Accepted

Group set of commands as atomic transactions (C++)

In practice, such atomic transactions do not exist. Instead, you can try to make all operations idempotent so that they can be safely retried. Idempotence is particularly important for network ...
amon's user avatar
  • 135k
13 votes
Accepted

Do I need to know about the history of the web and .NET?

This is not absolutely necessary in order to be a skillful developer. You don't need to understand how a thing evolved over time in order to know how to use it now, in its current state. Similarly, ...
Arseni Mourzenko's user avatar
11 votes

How to solve form submission consistency in a web application?

This is a pretty common problem, and one of the reasons that web applications tend to commit right away after any change. Sometimes the right answer is do nothing. You have to decide up front how ...
Berin Loritsch's user avatar
10 votes

Should HTTP status codes be used to represent business logic errors on a server?

You can use "Bad Request" and include the id of the violated business rule plus some more details on the body of the response.
noneconnex's user avatar
10 votes

Which way of web navigation is more maintainable? (index with $_GET parameters vs physical file for every page)

Neither really. You should have a framework for routing. That way user have URLs like example.com/home and you can use home as a variable to load different controllers. This is better than example.com/...
Goose's user avatar
  • 1,898
10 votes
Accepted

How to balance 'efficient' vs 'clean' code?

First I code something that seems like it works correctly to me. Next I code something that seems like it works correctly to others. I never think about performance until I’m on the second step ...
candied_orange's user avatar
9 votes

Why shouldn't you create a custom uri scheme?

Custom URI schemes require your app to be already installed. There are other methods available that do not, such as Universal Links or App Links. You can't prevent another app from stomping on your ...
John Wu's user avatar
  • 26.6k
9 votes

A web browser written using OpenGL, is it practical?

Web browsers have to solve a very similar problem. No, they do not. When you put a game on a different platform, you rely almost entirely on your game's data to make that game work. Those fonts you ...
Nicol Bolas's user avatar
9 votes

Why don't servers deliver JS and CSS at the same time as HTML?

Your question seems to assume that all of these resources are coming from the same source. But that's not how the World Wide Web works. The browser's prevailing (and correct) assumption is that ...
Robert Harvey's user avatar
9 votes
Accepted

Calling service and repository layer from controller

If your repository layer is properly abstracted (eg, the service layer and controller can only access the repository via interfaces), then: Having the controller access the repository directly ...
David Arno's user avatar
  • 39.4k
8 votes

Should HTTP status codes be used to represent business logic errors on a server?

Generally, I would avoid using HTTP status codes to represent specific business logic errors. This is because they already have a semantic meaning that is defined by the world-wide standard. Other ...
Ivo Coumans's user avatar
8 votes
Accepted

Why use Java as a server-side language over an interpreted language?

There's the title of your question which is a valid one and then there is the content of the question which contains some poor assumptions and/or incorrect statements. I'll address the body first: ...
JimmyJames's user avatar
  • 27.8k
8 votes

Why is XSLT so rarely used on the web?

I am flip-flopping back and forth between answering this question and closing it as primarily-opinion-based. So, here's my flip: In short, because XML makes a crappy programming language. Something ...
Jörg W Mittag's user avatar
8 votes
Accepted

Is 10 KB a large amount of data to pass around each time a user makes an API call?

You are likely not even measuring the thing you really want to measure. When looking at the "Is this scalable" question, you need to look at cost per user or cost per request. For example, ...
coteyr's user avatar
  • 2,533
7 votes

Running expensive computation on single server

This is a very high-level question, and it might get closed as "too broad". But in short: What you need is an asynchronous solution: a request doesn't start the expensive job, but simply plans to do ...
Kilian Foth's user avatar
6 votes

Why don't servers deliver JS and CSS at the same time as HTML?

Caching By sending them separately, a web browser can just cache the CSS and Javascript files, and reuse them when another page calls for the same file, skipping additional requests. If they're merged ...
8bittree's user avatar
  • 5,656
6 votes

Why use Java as a server-side language over an interpreted language?

First, your hyperbole is a little off: You have to recompile every time you modify any line of code and pass the built EAR or WAR to the application server... That depends entirely if you are using ...
Berin Loritsch's user avatar
5 votes
Accepted

Choosing between Web API and DLL reference

There are a few considerations to make: Updates: changes to the BL will always be reflected in the API but you would need to install a new version of the DLL - Point for API Connection: A DLL will ...
Steve Barnes's user avatar
  • 5,320
5 votes

Stored procedures or ORM in web?

The problem with Stored Procedures in your case are the multiple databases. As you point out. if you have to change a sproc you will then have to deploy that change to every database. Where as if ...
Ewan's user avatar
  • 77.5k
5 votes

Is there any situation where there is a good reason to use an anchor <a> element without a href attribute?

In the old days, you used <a name="whatever"> if you wanted another link to jump to a particular point on the screen. Nowadays (for a long time actually) we use the "id" attribute.
Rory Hunter's user avatar
  • 1,737
5 votes
Accepted

Is .NET ASP MVC core suitable for rapid web development?

Yes .Net Core although still very new, is suitable for rapid web development. Caveat #1 : Asp.Net MVC/WebApi is the more mature technology. You may find it more compatible if you are doing lower ...
Ewan's user avatar
  • 77.5k
5 votes

Rest API POST with illegal data in parameters: Bad Request or 404?

You could use 404 in both cases but semantically speaking it would be a little bit misleading because www.cameracompany.com/camera does exist. Usually, 404 means "resource not found, don't try again", ...
Laiv's user avatar
  • 14.7k
5 votes
Accepted

REST API: what should PUT do with complex objects?

I would separate the warehouse from the items: GET api/warehouse Gets a list of warehouses PUT api/warehouse/{warehouseid} Updates some meta information on that warehouse (address etc) GET api/...
Jon Raynor's user avatar
  • 11.6k
5 votes

Data from one microservice to another

Service dependencies (and losing track thereof) are not uncommon with a microservice architecture. It's also expected that services have local data and this data can be keyed with a primary ID from ...
Martin K's user avatar
  • 2,917
5 votes

How does resuming downloads work?

For tracking the progress: the response to the first download request will have a Content-Length header telling the download manager how big the entire file is. That info will be persisted (and ...
marstato's user avatar
  • 4,628
4 votes

Is there any situation where there is a good reason to use an anchor <a> element without a href attribute?

You could imagine that some Javascript code is dynamically changing the DOM to add that missing href= attribute dynamically at runtime.
Basile Starynkevitch's user avatar

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