Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted
Comments
Sergey Alexandrovich Kryukov 25-Jun-12 21:25pm    
It depends on how you link the "centralized website" with others.
--SA
Mico Perez 25-Jun-12 21:50pm    
so what is the best way to link it? im just planning to have one page that will process all the request.
Sergey Alexandrovich Kryukov 29-Jun-12 19:57pm    
Hm... I though you already decided on that...
--SA

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
 
Share this answer
 
Comments
Mico Perez 25-Jun-12 22:29pm    
nice thought and suggestion but what design pattern is that?
jhathine 25-Jun-12 22:50pm    
design pattern sir? I don't know how to answer that.. Can I say:

1. Centralized website contains 3 website for you to log on.
2. Centralized website is the admin's access key to the 3 websites.
3. Once admin is logged on in the main website, one child website at a time only you can logged in. Admin can only access another website by logging out to the previous child website. (Multiple opened website may eat large amount of data, that will slow down your app. I think haha)
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[^]
 
Share this answer
 
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.
 
Share this answer
 
Comments
Mico Perez 3-Jun-13 20:38pm    
Hi Tadit

Thanks for the ingfo's. I'll check.
Hi Mico,

Most Welcome. My pleasure... :)

Please accept this answer, if it has helped you in anyway.
It will help others to find the answer with one go and you will also be awarded with some points.

Thanks,
Tadit
Mico Perez 24-Jun-13 23:31pm    
answer accepted. Regards again
Thanks a lot Mico... :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900