Query parameters: http://example.com/apples?order=random&color=blue
Matrix parameters: http://example.com/apples;order=random;color=blue
http://example.com/apples;order=random;color=blue/2006/archive
You can read more about matrix parameters here: http://www.w3.org/DesignIssues/MatrixURIs.html
URI parameter (Path Param) is basically used to identify a specific resource or resources whereas Query Parameter is used to sort/filter those resources. Let's consider an example where you want identify the employee on the basis of employeeID, and in that case, you will be using the URI param.
The key difference between query parameters and route parameters is that route parameters are essential to determining route, whereas query parameters are optional.
Query parameters are a defined set of parameters attached to the end of a url. They are extensions of the URL that are used to help define specific content or actions based on the data being passed.
The Parameter Matrices, or Parameter Index Matrices (PIM), define the set of real parameters, and allow constraints to be placed on the real parameter estimates. There is a parameter matrix for each parameter in each group, with each parameter matrix shown in its own window.
The differences between Matrix parameters and Query Parameters are much more than just convention.
The main differences are:
I've written it up in more detail and with more references in Query vs. Matrix Parameters
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With