摘要:
在任何系统中,权限设计是最基础的东西,本文给出一个基于角色的权限设计的循序渐进的设计方案。 在权限系统中,功能(权限)是最小的单位,比如起草新闻、编辑新闻、审核新闻、删除新闻等,而角色是一类功能的集合,比如新闻编辑这个角色,他可能有起草新闻、编辑新闻等功能集合,而责任编辑他可能就有更多的权限,比如除了新闻编辑的功能,还有审核新闻、删除新闻等功能,给张三赋予新闻编辑的角色(其实我更愿意说把张三... 阅读全文
摘要:
Polymorphism literally means many forms or many shapes. It is the concept thata method declared in a base class can be implemented in many different ways inthe different derived classes. 阅读全文
摘要:
There are five different kinds of types in C#:classstructinterfaceenumdelegate You can nest all five of these inside a class or a struct. Note You cannot nest a type inside an interface, an enum, ... 阅读全文