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

女生的网名这么多〃 提交于 2019-12-06 05:43:37

问题


I am struggling in seting up a the basic architecture for my ASP.NET MVC Facebook iframe application which is running on 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. So why not gather all available information here and set up something like a starter kit for building complex facebook iframe applications

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? 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)?
  • How to develop using Unit Testing (Facebook and Windows Azure Parts needs to be replaced in some form)?
  • ...

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).


回答1:


I am the primary dev and architect of the Facebook C# SDK and the 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. We have several apps running in very high load environments that use both the Facebook C# SDK and the AzureToolkit and run on Azure. The other stuff like mocking out Azure and the Facebook APIs are going to be really difficult. 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. If they work, we will definitely accept them back into the core frameworks.




回答2:


All the Facebook iframe does is provide you with some query parameters that can easily be faked or stubbed inside of your application. After you remove that complexity you're just building a regular application.



来源:https://stackoverflow.com/questions/4483811/architecture-for-testable-iframe-application-best-practices-with-facebook-c-sh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!