Web 应用程序的新表示层

发布于 2024-08-24 02:12:16 字数 200 浏览 1 评论 0原文

我们已经有一个用 magic 编写的现有 Web 应用程序。但现在我们最终希望将现有的 Web 表示层(也可能是富客户端)交换为服务器端表示层。你认为我应该首先看什么(ASP.Net MVC、Silverlight、PHP 中的东西)。

如果你只有一个模型,使用哪种技术来交换表示层的工作量相对较小。

是否可以使用通用表示层,以便我们可以轻松创建新页面。

we've got an existing webapplication written in magic. But now we eventually want to exchange the existing web-presentation layer (maybe also rich client) to a server side presentation layer. What do you think I should look first (ASP.Net MVC, Silverlight, something in PHP).

With which technology is the effort relativly small to exchange the presentation layer if you only have a model.

And is it maybe possible to use a generic presentation layer so that we could create the new pages with small effort.

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

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

发布评论

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

评论(1

相守太难 2024-08-31 02:12:16

PHP 与 ASP(或其他任何语言,如 Ruby on Rails 等)的比较完全取决于偏好以及您所知道或认为您想要加强的内容。让我从 Microsoft Web 开发人员的角度来谈谈这个问题,假设您选择走这条路。

如果您有一个非常简单的数据输入/数据输出应用程序,并且不需要大量的动态屏幕交互并希望快速开发功能,那么 ASP.Net 就是您的最佳选择。您可以使用 Javascript 和 Web 服务执行许多动态操作,但 ASP.Net 不如 ASP.Net MVC 那样灵活。然而,使用服务器端控件在 ASP.Net 中快速开发整个屏幕要容易得多。

如果您希望更好地控制 HTML 输出,希望使用 Javascript 实现更动态的显示,并且希望能够更轻松地利用单元测试,那么 ASP.Net MVC 就是您的最佳选择。开发简单的屏幕将比传统的 ASP.Net 应用程序花费更长的时间,但开发服务器生成的 DOM 需要与客户端操作良好配合的交互式内容,使用 MVC 会更快。使用 ASP.Net MVC 进行单元测试也是轻而易举的事情,并且有大量示例展示如何构建经过良好测试的 MVC 站点。我认为 ASP.Net MVC 也可能具有更好的扩展性,因为您可以更好地控制输出。

如果您需要一个具有丰富图形和动画的非常漂亮的 UI,并且希望能够对您的应用程序逻辑进行单元测试,那么使用 MVVM 模式的 Silverlight 就是您的最佳选择。我现在正在编写这样一个应用程序。它非常容易进行单元测试(与任何单元测试一样简单),可以轻松模拟数据以使用大型数据集测试 UI,并且 Silverlight 提供了 HTML 中无法获得的图形级别。话虽如此,您将使用 Silverlight 面对较小的受众,因为需要该插件才能像 Flash 一样查看 Silverlight。 Silverlight 也不适用于 iPhone。 Silverlight 还会带来下载时间的损失,因此您必须考虑一下您的应用程序有多大,而“纯”Web 应用程序的情况则不然。

ASP.Net 和 Silverlight 或 ASP.Net MVC 和 Silverlight 的混合是您的第四种选择。当您的应用程序中只有部分内容需要 Silverlight 提供的丰富 UI 时,您可以这样做。 Silverlight 和 ASP.Net 项目可以共享文件,因此您可以在这两个地方使用您为业务逻辑开发的类(有一些注意事项)。

我希望这对您有所帮助,祝您的项目顺利。

PHP vs ASP (or anything other such as Ruby on Rails, etc) is all about preference and what you know or think you want to ramp up on. Let me talk about this from a Microsoft web developer perspective, assuming you choose to go down that path.

If you have a pretty simple data in / data out app, and don't need a lot of dynamic screen interaction and want to develop features quickly, then ASP.Net is the way to go. You can do a lot of dynamic stuff with Javascript and web services, but ASP.Net is not as flexible as something like ASP.Net MVC. However, its much easier to develop an entire screen quickly in ASP.Net using server side controls.

If you want greater control over your HTML output, you want a more dynamic display with Javascript, and want to be able to more easily leverage unit testing, ASP.Net MVC is the way to go. Developing simple screens will take longer than a traditional ASP.Net app, but developing interactive content where server generated DOM needs to mesh well with client-side manipulation will go faster with MVC. Unit testing is also a snap with ASP.Net MVC, and there are plenty of example out there to show how to build a well-tested MVC site. I would argue that ASP.Net MVC might also scale better since you have more control over the output.

If you need a really pretty UI with rich graphics and animation, and want to be able to unit test your application logic, then Silverlight using the MVVM pattern is the way to go. I am writing just such an app right now. Its pretty easy to unit test (as easy as any unit testing ever is), easy to mock out data to test the UI with large datasets, and Silverlight provides a level of graphics you cannot get in HTML. Having said that, you will be dealing with a smaller audience using Silverlight as the plugin is required to view Silverlight just like Flash. Silverlight isn't available on the iPhone as well. Silverlight also incurs a downloading time penalty, so you have to do some thinking about how big your app is which isn't so much the case with a "pure" web app.

A mixture of ASP.Net and Silverlight or ASP.Net MVC and Silverlight is your fourth choice. You might do this where only parts of your application require the rich UI that Silverlight provides. Silverlight and ASP.Net projects can share files, so you can use classes you develop for business logic in both places (with a few caveats).

I hope this helps, and good luck with your project.

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