“单例无模式”是什么意思? 意思是?
我知道什么是单例,但是在浏览网络应用程序时,我的同事说“单例-无模式”。 他这话是什么意思?
I know what a singleton is, but while walking through a web-app, my co-worker said "singleton-modeless". What does he mean by this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
那么,无模式形式与模态形式相反。
无模式形式
情态形式
话虽这么说,单例无模式必须意味着无模式表单的单个实例。
Well a modeless form is the opposite of a modal form.
modeless form
modal form
That being said, singleton modeless must mean a single instance of a modeless form.
我在 MSDN 体系结构中心此处找到了对其的引用。 它们似乎意味着一个非模态窗口(换句话说,用户在与其父级交互之前不会被迫与其交互)并且仅存在一个窗口实例。
我不确定你同事的意思是不是这个意思,但我不会因为不知道他的意思而感到难过。 他可能并不真正了解自己。
I found a reference to it in the MSDN Architecture Center here. They appear to mean a window that is not modal (in other words, the user is not forced to interact with it before interacting with its parent) and where only one instance of it exists.
I'm not sure if that's what you're co-worker meant but I wouldn't feel bad about not knowing what he meant. He may not have actually known himself.
单例无模式或模式对话框很棒,因为您不必担心同时向用户显示 2 个实例。
Ext.MessageBox是这样的,通过方法调用,单例模式。 它也可以用作单例无模式的基础。
我同意,模态对话框通常很糟糕,除非经过深思熟虑。 大多数现代应用程序都采用无模式抽屉或功能区,用户在处理手头的任务时始终可以使用它们!
所以检查一下你的对话; 您现在的应用程序中可能不需要其中的一半......
Singleton modeless or modal dialog is great because you don't have to worry that 2 instances will be shown to the user at the same time.
Ext.MessageBox is like this, called by a method, singleton modal. It could be used as the basis for a singleton modeless as well.
I agree, modal dialogs usually suck, unless very well thought through. And most modern apps are going modeless drawers, or ribbons, that are always available to the user while in context of the task at hand!
So examine your dialogs; you probably don't need half of them in your app right now...