首页 \ 问答 \ 可以将相同的设计模式用于Web以及.net的桌面应用程序(Can same design patterns be used for web as well as desktop applications for .net)

可以将相同的设计模式用于Web以及.net的桌面应用程序(Can same design patterns be used for web as well as desktop applications for .net)

我已经在.net开发了多年的网络应用程序。 我需要为桌面应用程序构建一个解决方案。 是用于桌面的最常见架构? 有哪些因素需要考虑? 是否可以为Web和桌面应用相同的设计模式? 请不要将此问题标记为开放式并关闭它。 这将有助于具有Web体验的人们从使用桌面应用程序的人那里获得一些想法。 感谢专家对此的回答!

问候,


I have been developing web apps in .net for many years now. I have a need to architect a solution for desktop application. Whatare the most common architecture that is used for desktop? what are the factors to be considered? Can the same design patterns be applied for both web as well as desktop? Please don't mark this question as open ended and close it. This would help people with web experience to get some ideas from people who have worked on desktop apps. Appreciate expert answers on this!

Regards,


原文:https://stackoverflow.com/questions/29267110
更新时间:2022-01-13 16:01

最满意答案

2或更少意味着你需要做:

if(strlen($variable) <= 2)

你做的是小于2,不包括2(1或更少)


2 or less means you need to do:

if(strlen($variable) <= 2)

What you are doing is less than 2 which excludes 2 (1 or less)

相关问答

更多
  • 仔细检查你的文本是否真的是UTF-8。 这个“”字符让我看起来像一个经典的字符编码问题。 你应该检查从文本的原点到上面引用的代码中的点的整个路径,因为有很多地方编码可以被消除。 文本是否源自HTML表单? 确保您的
    元素包含accept-charset="UTF-8"属性。 文本是否一直存储在数据库中? 确保数据库以UTF-8存储并返回数据。 这意味着检查服务器的全局默认值,数据库或模式的缺省值以及表本身。 Double-check whether your text really is UTF ...
  • 2或更少意味着你需要做: if(strlen($variable) <= 2) 你做的是小于2,不包括2(1或更少) 2 or less means you need to do: if(strlen($variable) <= 2) What you are doing is less than 2 which excludes 2 (1 or less)
  • 他们在谈论C函数 ,而不是PHP函数。 C函数将在第一个\0之后停止计数,但PHP字符串可以在其他地方包含\0而不是结尾。 They're talking about the C function, not the PHP function. The C function will stop counting after the first \0, but PHP strings can contain \0 elsewhere other than the end.
  • 它本身没有漏洞,这是完全正确的代码。 当然,这是过早的悲观。 除了最短的字符串之外,它将用尽堆栈空间,并且由于递归调用它的性能会下降,但否则就没关系。 尾部呼叫优化很可能不会处理这样的代码。 如果您想要危险地生活,并依赖于尾部呼叫优化,则应该将其改为使用尾部呼叫: // note: size_t is an unsigned integertype int strlen_impl(const char *s, size_t len) { if (*s == 0) return len; i ...
  • PHP是一个字节处理器,它不是charset-aware。 这有很多棘手的后果。 Strlen()以字节为单位返回长度,而不是以字符为单位的长度。 这是因为php的“字符串”类型实际上是一个字节数组。 Utf8为每个字符使用多个字节作为“特殊字符”。 因此strlen()只会为一个狭窄的文本子集(=纯英文文本)提供正确的答案。 Mb_strlen()将字符串视为实际字符,但假设它在通过mbstring.internal_encoding指定的编码中,因为字符串本身只是一个字节数组,并且没有指定其字符集的元数 ...
  • 检查字符串长度的代码段是错误的: if(substr($name, 0, 8 ) == "product_"){ $length = strlen($name -8); $item_id = substr($name, 8 , $length); ... 你正在检查$name - 8 ,而$name - 8等于-8 ,它有2个字符,所以它总是得到2个字符。 -8应该不在strlen()函数中: if(substr($name, 0, 8 ) == "product_"){ ...
  • $用品 - > introtext 内容干净吗? 即如果它包含html特殊字符,标签或除varchar值以外的任何其他元素? 如果没有,则强烈建议在应用mb_substr()之前清除内容。 您可以将内容清理为:: mb_strimwidth(strip_tags($item->introtext), 0, 400); //returns varchar substring of length 400 from first character. 如果您愿意,可以进一步清理内容,例如删除htmlspecia ...
  • 你的逻辑错了: if(!strlen($_POST[username])>=6) 替换为:*还要注意变量中的'字符(!!negator被替换为小于,双重否定,如果你需要查看大量代码,这更容易理解,你可能会错过“!” if (strlen($_POST['username'])<6) 希望这可以帮助。 还有一些你可能想要考虑的事情:摆脱“insert.php”并把THAT的代码放到与表单相同的页面中。 你可以做这样的事情: 表格:
    正如在评论中通知的那样,问题是我使用了相对路径而不是绝对路径 As notified in a comment, problem was that I used relative path instead of an absolute path

相关文章

更多

最新问答

更多
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • 电脑高中毕业学习去哪里培训
  • 电脑系统专业就业状况如何啊?
  • IEnumerable linq表达式(IEnumerable linq expressions)
  • 如何在Spring测试中连接依赖关系(How to wire dependencies in Spring tests)
  • Solr可以在没有Lucene的情况下运行吗?(Can Solr run without Lucene?)
  • 如何保证Task在当前线程上同步运行?(How to guarantee that a Task runs synchronously on the current thread?)
  • 在保持每列的类的同时向数据框添加行(Adding row to data frame while maintaining the class of each column)
  • 的?(The ? marks in emacs/haskell and ghc mode)
  • 一个线程可以调用SuspendThread传递自己的线程ID吗?(Can a thread call SuspendThread passing its own thread ID?)
  • 延迟socket.io响应,并“警告 - websocket连接无效”(Delayed socket.io response, and “warn - websocket connection invalid”)
  • 悬停时的图像转换(Image transition on hover)
  • IIS 7.5仅显示homecontroller(IIS 7.5 only shows homecontroller)
  • 没有JavaScript的复选框“关闭”值(Checkbox 'off' value without JavaScript)
  • java分布式框架有哪些
  • Python:填写表单并点击按钮确认[关闭](Python: fill out a form and confirm with a button click [closed])
  • PHP将文件链接到根文件目录(PHP Linking Files to Root File Directory)
  • 我如何删除ListView中的项目?(How I can remove a item in my ListView?)
  • 您是否必须为TFS(云)中的每个BUG创建一个TASK以跟踪时间?(Do you have to create a TASK for every BUG in TFS (Cloud) to track time?)
  • typoscript TMENU ATagParams小写(typoscript TMENU ATagParams lowercase)
  • 武陟会计培训类的学校哪个好点?
  • 从链接中删除文本修饰(Remove text decoration from links)