Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
638 views
in Technique[技术] by (71.8m points)

ruby on rails - What is Restful Routing?

I'm familiar with Ruby On Rails's routing system and well as how Code Igniter and PhpCake route things but is there more to it than having a centralized location where you give out routes based on a directory structure? Like this

controller/action/id/
Admin/editUser/22
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The basic premise is, instead of relying exclusively on the URL to indicate what webpage you want to go to (and just using the one method), it's a combination of VERB and URL.

This way, the same URL, when used with a different verb (such as GET, PUT, POST, DELETE), will get you to a different page. This makes for cleaner, shorter URLs, and is particularly adapted to CRUD applications, which most web apps are.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...