母版页 - 设计问题

发布于 2024-07-09 06:36:46 字数 243 浏览 6 评论 0原文

你们认为母版页应该是公司框架的一部分还是应该是每个应用程序的一部分? 或者也许公司的框架应该只具有一个接口来为所有母版页提供最少的功能?

当前我们面临两个问题:首先,最初的想法是为每个业务应用程序提供一个通用的布局。 这就是母版页位于公司框架中的原因。 其次,一些应用程序需要有不同的布局,这导致了一些痛苦,因为菜单、CSS 类等的整个逻辑都在框架中......

你们能告诉我你们的想法是什么吗?

谢谢,

Would you guys think that a master page should be part of the company's framework or it should be part of each application? Or perhaps the company's framework should only have a interface to provide the least functionality to all master pages ?

Currenlty we face two problems: Firstly, the original idea was to have a common layout for every and each business application. That's why the master page seats at the company's framework. Secondly, some applications needed to have a different layout, what has caused some pain as the whole logic for menus, CSS classes and etc were at the framework ...

Can you guys tell me what your thoughts are?

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

≈。彩虹 2024-07-16 06:36:46

我会尝试将常用控件等 UI 元素移至框架库中,并为应用程序中的每个应用程序创建一个母版页。 这将使您能够通过使用通用控件来维护应用程序中的通用 UI 元素,并提供为每个应用程序创建不同布局的灵活性。

其他需要考虑的事情是在同一应用程序中出于不同目的使用不同的母版页。 例如,您可以为内部员工使用一个母版页,为客户使用一个母版页等。或者您可以为普通浏览器使用一个母版页,而为黑莓等设备使用另一个母版页。

I would try to move UI elements like common controls into your framework libraries, and create a master page for each application in the application. This will give you the ability to maintain common UI elements across your applications through the use of common controls, and will provide the flexibility to create different layouts for each application.

Something else to consider is the use of different master pages in the same app for different purposes. For example, you might use one master page for internal staff, one for customers, etc. Or you might use one master page for normal browsers, and another for devices like blackberry.

温柔戏命师 2024-07-16 06:36:46

共享一些 CSS 和设计库(模板、图像、调色板),但单个共享母版页不太可能足够灵活。

Share some CSS and design library (templates, images, palette,) but a single shared master page is unlikely to be flexible enough.

初熏 2024-07-16 06:36:46

我认为这取决于你们公司的要求。 我曾经在一个组织工作,它是我们核心框架的一部分。 然而,这只是因为我们所有的 Web 应用程序都是内部的,并且需要具有相同的外观和感觉。

I think it depends on your company's requirements. I used to work for an organisation where it was part of our core framework. This however was only because all of our Web applications were internal and were required to have the same look and feel.

风苍溪 2024-07-16 06:36:46

如果您正在考虑拥有一个共享母版页,则可能意味着其中有太多逻辑。 在我的公司,他们过去创建了具有许多通用功能的基本母版页和基本页。 问题是这非常不灵活。 我已经开始使用 MVP 框架,并从页面中取出逻辑,不再真正需要通用母版页,它只具有布局逻辑。

If you are thinking of having a shared master page it probably means you have too much logic in it. At my company they historically created base master pages and base pages that had a lot of common functionality. The problem is that this is very inflexible. I have started using a MVP framework and taken logic out of the pages and having a common master page is no longer really needed, it just has layout logic.

半葬歌 2024-07-16 06:36:46

母版页旨在在整个网站的多个页面上保存静态元素。 您可以使用它来保存页脚、页眉等。

我认为您甚至不应该考虑为多个应用程序使用相同的母版页,这会严重限制您可以使用母版页执行的操作。 事实上,如果需要,我鼓励您在一个应用程序中拥有多个母版页。 这没有什么问题。

如果您尝试在多个应用程序中使用相同的母版页,则必须进行一些非常有创意的编程来保持它们的灵活性,并且您知道什么......在一个应用程序中引入的错误将渗透到所有应用程序中。 所以这绝对是一个不可以的想法。

希望有帮助。

Master Pages are designed to hold elements that are going to be static throughout your website, on multiple pages. You could use it to hold footers, headers, and so on.

I don't think you should even consider having the same master page for multiple applications, that would limit what you can do with your master pages severely. In fact I encourage you to have multiple Master pages inside one application if you need it. There's nothing wrong with that.

If you try to use the same Master Page across multiple applications, you'll have to do some very creative programming to maintain their flexibility, and you know what... Error that would be introduced in one application would percolate to all. So that's definitely a no-no idea.

Hope that helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文