Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is just an educational query wherein I am trying to accomplish an application that loads a specific UI (after login screen) depending on a role assigned to a user.
I just need materials to study and read on, I have been searching google and I found this article so far

PluginManager - A C# utility to load plug-in based components[^]

Its almost close to what I am trying to study and accomplish, only that it does not full describe how the plugin is created and how to create the plugin manager.

As I said I am trying to accomplish an application that loads specific user interface depending on a role assigned to a user. The reason behind is that each user of the app has a totally different job than the other, its more like a permission based app not just for security but also for a good UI design specific to a role.

So I am only asking for references regarding such matter, any article or code samples will be very useful. I am still looking for sources and other samples, but I think getting a more personal suggestions would be best.

Thank you in advance
Posted
Updated 28-Jan-15 21:39pm
v2
Comments
CHill60 29-Jan-15 7:58am    
Just had a thought - because I have given a solution then your question has dropped out of the list of unanswered questions so others may not bother looking at it. It might be worth posting your question in one of the forums e.g. http://www.codeproject.com/Forums/369270/Design-and-Architecture.aspx[^]. Include a link back to this post so you don't get flamed for cross-posting and I get beaten up instead :-)
phyxian 29-Jan-15 8:14am    
I just posted as you suggested, thank you very much for the suggestion and the answer.
BillWoodruff 29-Jan-15 8:39am    
Are you using WinForms here, or WPF, or ASP.NET ... or ????
phyxian 29-Jan-15 20:23pm    
i would prefer using winforms, im not that accustomed yet to WPF, and im a total novice to asp.net :D

1 solution

Scott Mitchell has written a series of articles on creating dynamic, data-driven UI - see http://aspnet.4guysfromrolla.com/articles/082008-1.aspx[^]. It's for webforms but the principles can be applied to WinForms too.

There is also an MS Article[^] - again Web based but some useful stuff in there

I'm assuming that you are comfortable dynamically adding controls to a form via code but just in case (and for anyone else stumbling across this) there is a tutorial here[^]

Another technique I've seen used was to have pre-built forms but the data to determine the actual one that could be loaded was based on a role table. There was a sort of "controller" class that was called with form "alias" which would either show the form required or show a generic "You can't do this" form as required. Sorry the details are a bit vague but it was a long time ago and it was written in an old form of VB that shall remain nameless.

There is a commercial CRM product that stores ALL of it's UI definitions in a database - and I mean all! The "form" or parts of forms were generated at run-time from all that information. As you can imagine, sometimes it could be quite slow to navigate around. But that was mitigated by keeping the forms simple. If you have "fixed" areas then that would ease the load (excuse the pun).

Finally (from me) there is an Open University research program called Cedar[^] - might be worth having a look through their publications on the subject
 
Share this answer
 
Comments
BillWoodruff 31-Jan-15 2:42am    
+5 really comprehensive reply !
CHill60 31-Jan-15 4:56am    
Thank you! Far too much of my past came out in that solution ;-p
BillWoodruff 1-Feb-15 12:04pm    
You're welcome, I would be curious to see your reaction to some ideas I posted on the re-post of this question on the Design and Architecture forum:

http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=4992426&obtid=3&action=AddBookmark&bio=false&bis=small

Beyond prototyping the ideas mentioned in that comment and verifying they work, I have not had the experience of using these ideas in a "real-world" project.

thanks, Bill

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