Questions tagged [routing]

51 questions
66
votes
10 answers

How and why did modern web application frameworks evolve to decouple URL routes from the file system?

Compared to about 10 years ago I have noted a shift towards frameworks using the style of routing that decouples the URL path from the filesystem. This is typically accomplished with the help of a front-controller pattern. Namely, when before, URL…
Dennis
  • 8,157
  • 5
  • 36
  • 68
32
votes
5 answers

Bad practice - switch case to set environment

In the last three years that I have worked as developer, I have seen a lot of examples where people use a switch statement to set the path (both in back-end and front-end) for a URL. Below is an example of this: Back-end example (C#): public static…
22
votes
6 answers

In MVC, what is the difference between controller and router?

Do they mean the same thing (attaching URLs to actions, or actions to URLs) or is there any difference I'm missing? Example: http://github.com/dannyvankooten/PHP-Router vs. http://konstrukt.dk
thelolcat
  • 221
  • 1
  • 2
  • 3
12
votes
2 answers

How to temporarily save the result of the query, to use in another?

I have this problem I think you may help me with. P.S. I'm not sure how to call this, so if anyone finds a more appropriate title, please do edit. Background I'm making this application for searching bus transit lines. Bus lines are a 3 digit…
Madara's Ghost
  • 8,787
  • 9
  • 25
  • 33
8
votes
4 answers

Advantages of HATEOAS based RESTful service

There is a scenario, where we have two commercial applications that are so called REST based(java) but not HATEOAS compliant. Development activity is out-sourced to vendor Development phase of project is done and planning for functional testing. We…
mohet
  • 89
  • 6
6
votes
2 answers

Multi Tenancy Aware Gateway routing

Hello Fellow Programmers, We are converting our monolithic application into microservice based. One challenge which we are facing is that one of our component is stateful. We cannot make this component stateless as of now (Due to high migration…
Tuhin Dey
  • 97
  • 5
6
votes
2 answers

What is the correct way to pass JSON objects in an http request when a GET request is most appropriate?

One scenario is when you're creating a search endpoint. In the example below, I want to search a database of companies and the queries can become complicated; enough where I want to have the parameters passed as JSON objects instead of a flat…
Cuthbert
  • 201
  • 1
  • 2
  • 9
6
votes
5 answers

When did the first "REST"-model and friendly URL web technology come to be?

Everyone knows that the "current" way to do things is to have user-readable URLs. Like: http://example.com/blog/edit/1234 Rather than: http://example.com/blog.php?action=edit&id=1234 When exactly did people start making web technologies handling…
Earlz
  • 22,658
  • 7
  • 46
  • 60
6
votes
1 answer

What does path finding in internet routing do and how is it different from A*?

Note: If you don't understand this question then feel free to ask clarification in the comments instead of voting down, it might be that this question needs some more work at the moment. I've been directed here from the Stack Excange chat room Root…
alan2here
  • 156
  • 1
  • 10
5
votes
2 answers

Comparison of route formats

I'm developing a new application and I'm trying to come up with a convention for defining routes. Ideally, I would like it to be simple, flexible, and reversible. Here are some from popular frameworks: Backbone route …
mpen
  • 1,889
  • 19
  • 29
4
votes
1 answer

How are application in separate data centers routed

A bit of down time at work let my mind wonder a bit. I was designing a single location application on Digital Ocean (load balancer to app servers to DB with DNS). All fine. Then I thought what if the application will have a lot of traffic in America…
nerdlyist
  • 945
  • 1
  • 7
  • 12
4
votes
4 answers

Pattern for endpoint that routes requests?

I am building a service that will push notifications to many other services. It has a couple of different notification types that each consumer may care about, but likely will not care about all of them. Instead of requiring many different…
4
votes
2 answers

HTTP Query String vs URL Parameter for referral codes

I'm working with a Laravel app and am development a "referral" feature. A user clicks "refer friend" and a URL pops up that can be shared on Facebook etc, when another user clicks on the link they are taken to the site, a session parameter is set,…
dangel
  • 167
  • 1
  • 7
4
votes
3 answers

Work out which parcel deliveries we ship ourselves and which we outsource

Firstly, I hope I'm asking this in the right place. I work for a large online retailer in UK. We ship approaching 2000 orders each day and are growing very quickly. We currently use multiple delivery firms to handle all our deliveries. We're…
Luke Cousins
  • 143
  • 4
4
votes
1 answer

How to go about designing an intermediate routing filter program to accept input and forward accordingly?

My predicament: I designed an app, written in Python, to read my mail and check for messages that contain a certain digital signature. It opens these and looks for keywords. If the message contains these keywords, certain related functions area…
eatonphil
  • 561
  • 4
  • 8
1
2 3 4