Last post Nov 16, 2011 01:41 PM by atconway
Jun 13, 2011 04:04 PM|VBJunkie|LINK
I haven't developed in VS 2010 yet and I have to re-write an existing VS 2003 app. The existing application contains many sections
that are enabled/disabled by user security role. The sections are arranged in numeric order and present a development nightmare any time a new section is added between existing sections. Can any explain a good approach to handle this type of scenario in
There are around 45-50 sections in the current application. I thought about using web parts but I'm not sure that is a good approach.
Each web part could be added dynamically depending on security role. This would require much code and I'm not sure if it’s a good idea. There are also custom security roles that allow certain users to see all or select sections outside of their normally
Also, I have no experience with MVC and not sure if this would be a good approach due to all of the other functionality the current
app is currently providing.
Jun 15, 2011 01:39 PM|atconway|LINK
Can any explain a good approach to handle this type of scenario in VS 2010?
I don't believe VS.NET 2010 inherently is the answer for an improved application Architecture, but the additional technologies available from the .NET Framework 4.0 will help make the solution easier.
What I think you are really asking is "How do I re-architect this numeric mess of authorization to my web sections using the latest technologies and architectures?" It is hard to say exactly (sure I can spat out some new technologies and frameworks like
'EF' or 'ASP.NET MVC') but really I think one has to know that technology on to itself does not solve problems on its own. You can still architect and create a poorly written ASP.NET MVC application. I think what you have to do is start from the ground up
by re-defining and understanding the business problem or need from the point of authorization (since that is what is in question) and begin at looking at technologies and probably more along the lines of design patterns and architectures that suit your specific
I know the response is a bit vague, but it is hard how to dictate re-architecting an app based on just little pieces of information. First and foremost since the app is so old, is it even using OOD and principals in code? If not I would absolutely begin
there. If there is no layering, separation of concerns, class structure, etc. and everything is smattered all behind a bunch of pages you will want to being by instituting a good Object Oriented Design. It is difficult to work well and solve problems like
the one you presented when not working with Objects and just using spaghetti code.
Well I hope this helps get you thinking in the proper direction, and if you have some more specifics, spawn new thread in the appropriate forum to get more help. Good Luck!
Jun 15, 2011 06:11 PM|ajitsunny|LINK
You requires to change user authentication & authorization process in your application
Follow these links, see if this can help:
Using of ASP.NET Membership feature is best suitable for your problem, it will solve your problem for forever. ASP.NET Membership feature is available in VS 2005 i.e.
.NET 2.0 and above.
Membership, Roles, and the User Profile is answer to your problem.
Nov 16, 2011 01:09 PM|VBJunkie|LINK
Can someone explain the best approach for storing the section information in SQL tables. I'm trying to make it easy to be able to add and remove sections without having to re-write a bunch code. I'm thinking about adding name, id, and order columns to
a SQL table but I'm not sure if that is the best approach.
For example, If web page one contains sections 1,2, and 3. I would like to be able to add a new section in between sections 2 and 3 without having to write much code. Is there a way to store the sections by name or ID in a table and have the section order
update on the database side?
Nov 16, 2011 01:41 PM|atconway|LINK
I'm trying to make it easy to be able to add and remove sections without having to re-write a bunch code
Best solution for this = The Entity Framework. If you change fields in the database, you can refresh your data model and your auto-generated entities will reflect the newly created code mapping to the new fields. If you need this kind of flexibility then
ADO.NET Entity Framework Videos:
Entity Framework Overview: