简体   繁体   English

可测试iframe应用程序的体系结构 - 使用Facebook C#SDK的最佳实践

[英]Architecture for testable iframe application - Best practices with Facebook C# SDK

I am struggling in seting up a the basic architecture for my ASP.NET MVC Facebook iframe application which is running on Windows Azure . 我正在努力为我的ASP.NET MVC Facebook iframe应用程序建立一个基本架构,该应用程序在Windows Azure上运行。

I know that there are some basic samples, how to use the toolkit. 我知道有一些基本的样本,如何使用该工具包。 But it seems that for big application i need a really good architecture to begin developing with. 但似乎对于大型应用程序,我需要一个非常好的架构来开始开发。

Also a lot of other developers seem to struggle in setting up this kind of basic architecture for an iframe ASP.NET MVC application, too. 此外,许多其他开发人员似乎也在努力为iframe ASP.NET MVC应用程序设置这种基本架构。 So why not gather all available information here and set up something like a starter kit for building complex facebook iframe applications 那么为什么不在这里收集所有可用信息并设置类似于用于构建复杂的facebook iframe应用程序的入门工具包

Requirements: 要求:

  • Highly testable ( Unit Testing and Dependency Injection is a must). 高度可测试( 单元测试依赖注入是必须的)。
  • Runs in Cloud (But also testable locally) 在云中运行(但也可在本地测试)
  • Supports local debugging 支持本地调试

How would you set up an architecture for an complex facebook application which is testable ? 您如何为可测试复杂Facebook应用程序设置架构? Does somebody already have a basic architecture to start with? 有人已经有了一个基本的架构吗?

So acutally some of the upcoming questions during setting up such an architecture are: 因此,在建立这样的架构时,一些即将出现的问题是:

  • How to test and debug this applications locally (There seem to be problems with the Windows Azure part)? 如何在本地测试和调试此应用程序(Windows Azure部分似乎存在问题)?
  • How to develop using Unit Testing (Facebook and Windows Azure Parts needs to be replaced in some form)? 如何使用单元测试开发(Facebook和Windows Azure部件需要以某种形式替换)?
  • ... ...

Since there are so many developers searching for information like that let's set up a starter kit for complex facebook iframe applications which are scalable with cloud but still highly testable locally (I am thinking about the following frameworks: new Facebook C# SDK, AzureToolkit, NUnit and Ninject). 由于有这么多的开发人员在搜索这样的信息,让我们为复杂的facebook iframe应用程序设置一个入门套件,这些应用程序可以通过云进行扩展但在本地仍然可以高度测试(我正在考虑以下框架:新的Facebook C#SDK,AzureToolkit,NUnit和Ninject)。

I am the primary dev and architect of the Facebook C# SDK and the AzureToolkit. 我是Facebook C#SDK和AzureToolkit的主要开发人员和架构师。 We are definitely looking to improve in any way we can. 我们绝对希望以任何方式改进。 That being said, many of the things you are talking about such as unit testing, local debugging, and building in azure are already supported. 话虽这么说,你所谈论的许多事情,如单元测试,本地调试和在azure中构建,都已得到支持。 We have several apps running in very high load environments that use both the Facebook C# SDK and the AzureToolkit and run on Azure. 我们有几个应用程序在非常高的负载环境中运行,它们同时使用Facebook C#SDK和AzureToolkit并在Azure上运行。 The other stuff like mocking out Azure and the Facebook APIs are going to be really difficult. 嘲笑Azure和Facebook API等其他东西真的很难。 If you have some specific ideas on how we could do that, I would love to hear them. 如果你对我们如何做到这一点有一些具体的想法,我很乐意听到他们。 The best way to get started with this would be to create a fork of the Facebook C# SDK and start to mock up some of these things. 开始使用它的最好方法是创建一个Facebook C#SDK的分支,并开始模拟其中的一些东西。 If they work, we will definitely accept them back into the core frameworks. 如果他们工作,我们肯定会接受他们回到核心框架。

All the Facebook iframe does is provide you with some query parameters that can easily be faked or stubbed inside of your application. 所有Facebook iframe都会为您提供一些查询参数,这些参数可以很容易地在您的应用程序内伪造或存根。 After you remove that complexity you're just building a regular application. 删除该复杂性后,您只需构建一个常规应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM