4

I have an application which is built in ASP.Net WebForms and Silverlight. There is another WCF services application which is accessed by silverlight part of my application.

Now I have to Re create the whole application in an MVC Single Page Application(SPA) and of course the WCF one because now I would need Web API for that.

An initial solution comes into mind is to add a web api project into wcf services application and start creating web methods there and call wcf methods from there if that functionality was already there.

And for webform start a new spa with mvc project from scratch and use durandal or any other spa client framework(hell of coding).

Any useful solution/advise? as I am looking for simplicity.

I searched around and found some questions but really did not helped as they are about merging with existing apps.

Note: application is a large application with a lot of functionalities

4

1 回答 1

3

您必须确定您的团队对客户端框架的信心。单页应用程序的开发一开始可能并不容易,但您很快就会习惯。为您的团队提供正确的培训非常重要。

在我看来,Durandal 是构建企业级 SPA 的最简单、最优雅和最完整的框架。了解淘汰赛、requre 和 durandal 的路由器和组合如何工作非常重要。对于以数据为中心的应用程序,我会使用微风在客户端操作和缓存数据,并从服务器端请求它。Breeze 在服务器端与 Entity Framework 配合使用效果最好,但这不是必需的。如果您可以使用 Entity Framework,它将简化您的开发,因为它可以轻松地生成数据库结构的元数据。如果实体框架不是一个选项,则可以手动编写元数据。

我会让服务器端尽可能薄。使用带有您选择的 ORM 和一些 cshtml 页面的 web api 从您的数据库中提供数据。

Durandal Get Started是一个很好的起点。

Durandal Auth是一个非常好的企业级 SPA 模板。它可能并不完全适合您,但您可以将其用作构建应用程序不同模块的指导。

Breeze 示例我建议您考虑使用微风。有很多关于复数视力的好课程。

Knockoutjs在数据绑定方面有很好的培训。

于 2014-01-02T23:13:12.423 回答