简体   繁体   English

webform或winform,如何选择?

[英]webform or winform, how to choose?

What would be the normal way to decide which way to go? 决定走哪条路的正常方法是什么?

In my case, what if 就我而言,如果

  • user-base was under 10 persons 用户群不到10人
  • you have no control over CAS but can install the framework 您无法控制CAS,但可以安装框架
  • needed to import/export let say excel file/pdf 需要导入/导出,让说Excel文件/ PDF
  • would be intranet 将是内部网
  • security is really important 安全真的很重要
  • business logic is somehow complex 业务逻辑有些复杂

This seems to be a bit of a blacksheep of a thread, but lets go for it anyways. 这似乎有点像是一个线程的黑羊,但是还是放手吧。

Pretty much in a small distribution, a thick client ( winForms ) is easier to develop for. 在较小的发行版中,胖客户端(winForms)易于开发。 One of the biggest flaws is the difficult in deployment. 最大的缺陷之一是部署困难。 CAS will be more of a factor with a thick client app ( as its basically a non-factor on a webform app ), but in the end, with the basics you have described, it shouldn't really become a factor. 对于胖客户端应用程序,CAS将更多地考虑因素(因为它基本上是Webform应用程序中的因素),但是最后,就您所描述的基本知识而言,它实际上并不是应该考虑的因素。 Then again, this may be a product of not having enough information. 再一次,这可能是没有足够信息的产物。

Where WebForms thrive is the ease of maintenance and the lack of deployment. WebForms蓬勃发展的地方在于易于维护和缺乏部署。 Additionally, it is much easier to deploy a WebForm app on the Internet should that ever become a priority. 此外,一旦成为优先事项,在Internet上部署WebForm应用程序就会容易得多。

Your actual task described, could easily be accomplished by either technology, it really all comes down to the specifics. 您描述的实际任务可以很容易地通过任何一种技术来完成,实际上,所有这些都取决于具体细节。 Need a highly or easily distributed app? 需要一个高度或易于分发的应用程序? Go with WebForms. 使用WebForms。 Need to provide easy upgrades? 是否需要提供简单的升级? Again, WebForms. 同样,WebForms。 Need to provide a rich client experience, then go with WinForms. 需要提供丰富的客户端体验,然后再使用WinForms。

It really all comes down to many specifics you have provided and your particular skillsets, which also arent mentioned. 实际上,这全都取决于您提供的许多细节和您的特定技能,也没有提到。 What you have requested ( as far as we know ), can be provided using either technology. 您所要求的(据我们所知)可以使用两种技术来提供。

Click Once deployments to a web site could handle the distribution problem. 单击“一次部署到网站可以解决分发问题”。 Also, if it is an MS environment only then the winForm using web services on the backend for database access works well. 另外,如果仅在MS环境中,则使用后端上的Web服务进行数据库访问的winForm效果很好。 Also web services can be used with webforms or asp too. Web服务也可以与Webform或ASP一起使用。 Joe Carron 乔·卡隆

Winforms is probably slightly "richer" in that you can do more on the client (since you're running a full fledged application vs. just a browser), eg it's a "Rich Client"; Winforms可能会稍微“丰富”一点,因为您可以在客户端上做更多的事情(因为您运行的是完整的应用程序,而不是浏览器),例如,它是“ Rich Client”。 on the other hand, the Webforms app doesn't need to be installed on each and every machine since it's a "Thin Client", so that's a bonus. 另一方面,由于Webforms应用程序是“瘦客户机”,因此无需在每台计算机上都安装Webforms应用程序,因此这是一个额外的好处。

As for the business logic, I would separate that out into its own layer/tier anyway, which could be used from either Winforms or Webforms - no deciding factor here, I think. 至于业务逻辑,无论如何我都会将其分成自己的层/层,可以从Winforms或Webforms中使用-我认为这里没有决定性的因素。

So really - which ever you feel more comfortable with is probably fine. 所以说真的-您可能更满意的选择。 You don't really give much really good reasons to choose one over the other.... 您并没有给出太多真正的好理由来选择一个。

Marc

Your "cases" either do not distinguish between Webforms and Winforms, or are too vague to be used to make a decision. 您的“案例”要么不能区分Webforms和Winforms,要么太模糊以至于无法做出决定。

A typical Webforms application connects to a server somewhere on the internet, all data and logic is stored remotely and sent to clients. 一个典型的Webforms应用程序连接到Internet上的服务器,所有数据和逻辑都存储在远程并发送给客户端。 A typical Winforms application has all data and logic performed on the user's machine. 典型的Winforms应用程序具有在用户计算机上执行的所有数据和逻辑。 This should be the basis for which you use. 这应该是您使用的基础。

Will a bunch of people be contributing to your data, with no one user owning it? 会有一群人为您的数据做出贡献,而没有一个用户拥有它吗? Is the data not useful unless all contributions are available? 除非所有捐款都可用,否则数据没有用吗? Are the contributions unreliable, or should individual users be protected from possibly dangerous contributions? 捐款是不可靠的,还是应该保护个人用户免受可能危险的捐款的侵害? Webforms are the way to go. Webforms是必经之路。

Or is the data the sole responsibility of one person? 还是数据仅由一个人负责? Does the data need to interoperate with other files, applications, or hardware used by that person? 数据是否需要与该人使用的其他文件,应用程序或硬件进行互操作? Will each user act separately from everyone else who uses the data, and do you want to isolate each user's data from others? 每个用户都将与使用数据的其他每个人分开行动,您是否想将每个用户的数据与其他人分开? You should use Winforms. 您应该使用Winforms。

Yes, you can run a Webforms app locally on one machine, and you can create collaborative internet Winforms apps, but the two technologies were created for different purposes and you will be better off using each for the purpose it was designed for. 是的,您可以在一台计算机上本地运行Webforms应用程序,也可以创建协作式Internet Winforms应用程序,但是这两种技术是为不同的目的而创建的,因此最好将每种技术用于其设计目的。

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

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