Hot answers tagged

51 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 ...
  • 55.2k
36 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....
30 votes

Why did Alan Kay say, "The Internet was so well done, but the web was by amateurs"?

It seems to be due to a fundamental disagreement between Alan Kay versus the people (primarily Tim Berners-Lee) who designed the web, about how such a system should work. The ideal browser, according ...
  • 55.2k
23 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 ...
19 votes

Explanation of how server-side programming languages are accessed

Yes, any general programming language can serve to write the server-side part of a web site. However, the qualities of a programming language, in this subject as in other things, are usually only one ...
  • 1,418
19 votes

Using GPL’d software in a proprietary web application

Your friend is wrong. First, the GPL only requires to disclose your source code to your customers when your software runs on their machines. Your load balancer runs on your own hardware, so you don't ...
  • 22.9k
16 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 ...
  • 3,290
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, ...
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 ...
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/...
  • 1,828
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 ...
9 votes
Accepted

Cross-language Test-Driven Development

Is there a technique for unit testing both components in one run? That would actually be the opposite of unit testing - unit testing, especially in TDD style, means to test your components in ...
  • 188k
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 ...
9 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.
8 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 ...
  • 11.6k
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: ...
  • 22.9k
8 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 ...
  • 38.4k
7 votes

Providing friendly URLs for a website vs. realities of database IDs

Keeping the ID in the URL is the most future proof method and as you demonstrated, the URLs can still look relatively good. Another option used by multiple projects is to keep an history of ...
  • 1,729
7 votes

Explanation of how server-side programming languages are accessed

Am I right in thinking that a server just needs some kind of interface such as CGI to make the server and the programming language work together? Almost. You need a web server that has some kind ...
  • 676
7 votes
Accepted

Would it be possible to transfer an HTML file using a protocol different from HTTP?

Yes. You can transmit HTML over any medium that can transmit text. Email, for example. I'm willing to bet that at least 90% of all emails you receive, and probably also most that you write, are HTML. ...
7 votes
Accepted

node.js C++ addons to do all major computations

For this answer, I'll assume that the C++ code is ONLY well-tested and perfect security wise. If if would be actually be perfect then you wouldn't have asked this question anyways... This is a ...
  • 186
7 votes
Accepted

Why is it non-trivial to write mathematics on the web?

Mathematical formulas (or formulae) can be viewed as some language (difficult to write or typeset or display in a pretty way). The original HTML was not designed (in the early 1990s) with that ...
7 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 ...
7 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 ...
  • 24.9k
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 ...
6 votes
Accepted

Pre-Processors vs Pure Web

I see plenty of reason why you should embrace pre-processed languages, and I'll try to demonstrate the benefits of those tools. 1. Paradigm shift In my opinion, the greatest feature of any pre-...
6 votes
Accepted

Web framework in pure SQL

No, because you need at least basic IO capabilities to be able to serve up web content. Assuming you finesse that by using something else to put in front of your database server then, yes, technically ...
  • 498
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 ...
  • 5,630
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 ...

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