I have always found that defining URLs for other "pages" in a web application seems either awkward, but fragile or bloated.
eg. you have an application that manages customers, sales, prospects, and therefore has the following "pages".
- Customerlist
- viewcustomer
- editcustomer
- addcustomer
- viewcontact
- editcontact
- addcontact
- perspective (x3? x4?)
- sales (x?)
- product (x?)
- request (x?)
- forecast (x?)
- etc.....
As the application grows, the number of pages increases to 100+ URLs in no time.
, / URL- , 100 / , 2 3 "this".
- (ASP, JSP, PHP, RoR, Python ..), PHP ( MVC). , ASP.Net Rails " " , .
Update:
MVC- PHP-, MVC. , URL , :
$URLs['CUSTOMER_ORDER_CONTACTS'] = '/customerordercontacts.php';
$URLs['CUSTOMER_PRODUCTS_EDIT'] = '/editcustomerproducts.php';
" " , , / URL- ... .
, , , , , . @Blixt - , / ... URL , :
: ...
$contacts = $customer.getContacts();
foreach($contacts as $key => $value){
echo('<a href="'.$URLs['CUSTOMER_CONTACT_VIEW'].'?customer='.$custID.'&contact='.$key.'">'.$value.'</a>');
}
foreach($contacts as $key => $value){
echo('<a href="/customer/'.$custID.'/contact/'.$key.'">'.$value.'</a>');
}