HMVC internal/external 请求和路由?

HMVC internal/external requests and routes?

看完这个问答我想我理解了HMVC的概念https://softwareengineering.stackexchange.com/questions/220480/hmvc-and-database-connections;答案摘录如下:

Let's assume you want to have a view that enables a user to make a comment to a blog post. You would have fields for name, e-mail, title and comment, but you also want to have a field country displayed as a dropdown. In the action that displays this view you would make a database query that loads the countries and then populate that dropdown. Which is ok, but it forces you to duplicate the query and the view required to display the countries if you need it in another part of your application. A better approach would be to create separate controller for countries with an action that returns a view with the dropdown and then render that action whenever you need to show a list of countries.

我无法理解的是,如果我可以在内部请求一个只显示一个小部件(例如国家 select 框)的 controller/model/view,这是否意味着通过访问来自浏览器的 url 也只会显示该视图吗?

这在 HMVC 中是如何管理的,路由是否仅定义为 internal/external,因此将内部路由与外部请求匹配会显示 404 页面?

这通常是如何完成的吗?上面的 HMVC description/definition 是否可以满足大多数 Web 应用程序的一般用例?

在浏览器中显示子请求的输出应该不是问题,所以我不会打扰,尤其是用户不知道这些 URL 并且单独输出小部件是安全的。

尽管如此,正如@deceze 提到的那样,您可以不将这些控制器附加到任何路由。如果你有一个 "default" 路由(匹配所有请求),那么你必须禁用它。