哪种设计模式最适合登录 [英] Which Design pattern is best for Login

查看:146
本文介绍了哪种设计模式最适合登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨大家好



想了解一些最佳的登录设计模式。



申请是这样的。



我有3个网站和1个集中网站。如果我登录集中式网站,我将拥有访问3个网站的角色和权限



是针对此模式或命令模式的策略模式吗?

Hi Guys

Just want to get some info what would be a best design pattern for login.

the application is like this.

I have 3 websites and 1 centralized website. If i login on the centralized website i will be having roles and permissions to access the 3 websites

is strategy pattern ok for this or command pattern?

推荐答案

也许你可以模仿你的其他自制页面链接所在的facebook部分。在Facebook中,页面右上角有一个齿轮图像,当您点击它时,您可以登录到不同的自制Facebook页面。它真可爱!对于您的情况,当您在您的集中式网站时,管理员可以通过他的3个其他网站登录,只需通过位于您的集中网站右上角的可爱齿轮图像选择页面链接..然后噗!您刚刚登录到其他网站。 :)但你仍然在你的集中网站上..哈哈。只是一个建议。认为这很可爱
Maybe you can mimic the part of the facebook where your other self made pages link locates. In facebook, there is a gear image from the upper right corner of the page where in when you click it, you can log in to your different self made facebook pages. It's cute! To your case, when you are in your centralized website, admin can log in through his 3 other websites by just selecting a page link through that cute gear image located in the upper right corner of your centralized website.. And then poof! You just logged in to your other website. :) But you are still ON to your centralized website.. haha. just a suggestion. Thought it was cute


对于不熟悉设计模式的人来说。这通常是人们在询问设计模式时所指的。



http://en.wikipedia.org/wiki/Design_Patterns [ ^ ]
FYI for anyone not familiar with Design Patterns. This is usually what people are referring to when they ask about design patterns.

http://en.wikipedia.org/wiki/Design_Patterns[^]


请关注。



1. 策略模式与命令模式 [ ^ ]。

2. 策略模式和命令模式之间的区别 [ ^ ]。

3. 设计模式:命令模式 [ ^ ]。



这些可以帮助您做出决定。

我对这些概念不熟悉,但我想这将是符合你要求的命令模式。
Please follow.

1. Strategy pattern vs. Command pattern[^].
2. Difference between Strategy pattern and Command pattern[^].
3. Design Patterns: Command Pattern[^].

These can help you decide.
I am new to these concepts, but I guess it will be Command pattern which will suite to your requirements.


这篇关于哪种设计模式最适合登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆