XNA Game Studio Express 1.0 released
This is so cool ! In the past, I used PlayStation 2 Linux Development Kit to write applications / demo for my PS2. But this ps2 kit is very hard to learn, very small library was supplied, and I must use C++ to code, this is a nightmare. And now, Microsoft has released XDA Game Studio, I'm so excited. I can use C# to develop game now, not only for PC but also next-gen console XBox 360 . Oh, hoo hoo \^_^/ .
Some link:
Wednesday, December 20, 2006 | View Comments
C# 2.0 : Nullable Types
Problem
// User Classpublic class UserBecause C# 1.1 does not support null value for DateTime so the example above will throw exception if reader["RegisteredDate"] equals null.
{
private int userID;
private DateTime registeredDate;
public User() {}
public int UserID
{
get { return userID; }
set { userID = value; }
}
public DateTime RegisteredDate
{
get { return registeredDate; }
set { registeredDate = value; }
}
}
// Create User from a DataReader
public virtual User CreateUserFromReader(IDataReader reader)
{
User item = new User();
item.UserID = (int)reader["UserID"];
// throw exception if reader["RegisteredDate"] equals null
item.RegisteredDate = (DateTime)reader["RegisteredDate"];
return item;
}
Solution
Old schoold soltution :
// Create User from a DataReader
public virtual User CreateUserFromReader(IDataReader reader)Now in C#2.0 we can resolve null problem by declaration RegisteredDate as nullable DateTime with ? symbol :
{
User item = new User();
item.UserID = (int)reader["UserID"];
if (!reader.IsDBNull(reader.GetOrdinal("RegisteredDate")))
{
item.RegisteredDate = (DateTime)reader["RegisteredDate"];
}
else
{
item.RegisteredDate = new DateTime(1900,1,1,0,0,0,0);
}
return item;
}
// User ClassNullable type
public class User
{
private int userID;
private DateTime? registeredDate;
public User() {}
public int UserID
{
get { return userID; }
set { userID = value; }
}
public DateTime? RegisteredDate
{
get { return registeredDate; }
set { registeredDate = value; }
}
}
// Create User from a DataReader
public virtual User CreateUserFromReader(IDataReader reader)
{
User item = new User();
item.UserID = (int)reader["UserID"];
item.RegisteredDate =
(reader.IsDBNull(reader.GetOrdinal("RegisteredDate"))) ?
null : (DateTime)reader["RegisteredDate"];
return item;
}
Nullable types are constructed using ? type modifier.
Example :
int? age;
string? name;
DateTime? birthday;
A nullable type has two public read-only properties: HasValue and Value. When HasValue is true, the Value property returns the contained value. When HasValue is false, an attempt to access the Value property throws an exception.
DateTime? registeredDay;Null colalescence
// throw exception if RegisteredDate is null
registeredDay = user.RegisteredDate;
if (user.HasValue)
{
registeredDay = user.RegisteredDate
}
else
{
registeredDay = null;
}
C# 2.0 introduces a new operator called the null coalescing operator denoted by
double question marks ?? . If the instance is null, the value on the right is returned
otherwise the nullable instance value is returned.
int x = 10;
int? y = null;
int z = y ?? x;
response.write(z); // z = 10
y = 99;
int k = y ?? x;
response.write(k); // k = 99
Wednesday, August 30, 2006 | View Comments
C# 2.0 : Partial types
What is Partial types ?
Partial types is types that allow classes, structs, and interfaces to be broken into multiple pieces stored in different source files for easier development and maintenance. Additionally, partial types allow separation of machine-generated and user-written parts of types so that it is easier to augment code generated by a tool.
Problems
While it is good programming practice to maintain all source code for a type in a single file, sometimes a type becomes large enough that this is an impractical constraint. Furthermore, programmers often use source code generators (such as CodeSmith) to produce the initial structure of an application, and then modify the resulting code. Unfortunately, when source code is emitted again sometime in the future, existing modifications are overwritten.
Solution
A new type modifier, partial, is used when defining a type in multiple parts. The following is an example of a partial class that is implemented in two parts.
Part one :public partial class Customer
{
private int id;
private string name;
private string address;
private List<Order> orders;
public Customer()
{
}
}
Part two :
public partial class CustomerWhen the two parts above are compiled together, the resulting code is the same as if the class had been written as a single unit:
{
public void SubmitOrder(Order order)
{
orders.Add(order);
}
public bool HasOutstandingOrders()
{
return orders.Count > 0;
}
}
public class Customer
{
private int id;
private string name;
private string address;
private List<Order> orders;
public Customer()
{
}
public void SubmitOrder(Order order)
{
orders.Add(order);
}
public bool HasOutstandingOrders()
{
return orders.Count > 0;
}
}
Wednesday, August 30, 2006 | View Comments
C# 2.0 : Anonymous Methods
What is Anonymous Method ?
C# 2.0 introduce new method named Anonymous Methods. Anonymous Methods are Inline Delegate.
Old school Delegate :
this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
void btnLogin_Click(object sender, System.EventArgs e)
{
Response.Write("tui ne");
}
Anonymous Method :
this.btnLogin.Click += delegate { Response.Write("tui ne"); }
Wednesday, August 30, 2006 | View Comments
C# 2.0 : Generic methods
This is a typical non-generic method :
void AddMultiple(List<Customer> customers, params Customer[] values)Finally, we can add any type to generic List :
{
foreach (Customer value in values)
{
customers.Add(value);
}
}
In order to add mutiple customer into List :
List<Customer> customers = new List<Customer>();
AddMultiple(customers, new Customer(),
new Customer(), new Customer());
However, the method above only works with type. To have it work
with any List, the method must be written as a generic method.
A generic method has one or more type parameters specified in <
and > delimiters after the method name :
void AddMultiple<T>(List<T> customList, params T[] values)
{
foreach (T value in values)
{
customList.Add(value);
}
}
List<int> listInteger = new List<int>();
AddMultiple<int>(listInteger, 1, 2, 3, 4);
List<Customer> customers = new List<Customer>;
AddMultiple<Customer>(customers,
new Customer(),
new Customer(),
new Customer(),
new Customer());
In the example above, since the first regular argument is type List
listInteger, and the subsequent arguments are of type int 1, 2, 3 ,
4 the compiler can reason that the type parameter must be int. Thus,
we can use shorter syntax without specifying the type parameter
(<int>) :
List<int> listInteger = new List<int>();
AddMultiple(listInteger, 1, 2, 3, 4);
The same for the second scenario :
List<Customer> customers = new List<Customer>();
AddMultiple(customers,
new Customer(),
new Customer(),
new Customer(),
new Customer());
Wednesday, August 30, 2006 | View Comments
C# 2.0 : Constraints in Generics
Problem
public class Dictionary<K, V>
{
public void Add(K key, V value)
{
...
if (key.CompareTo(x) < 0) {...} // Error, no CompareTo method
...
}
}
Since the type argument specified for K could be any type, the
only members that support CompareTo are memberss that implement
IComparable Interface such as Equals, GetHashCode, ToString...
A Compile-time error occurs in the example above.
Solution
public class Dictionary<K, V> where K: ICompareable
{
public void Add(K key, V value)
{
...
if (key.CompareTo(x) < 0) {...}
...
}
}
The Declaration above ensure that any type argument supplied for K
is a type that implements IComparable. It is possible to specify
any number of interface and type parameters as constraints :
public class Dictionary<K, V>
where K: ICompareable<K>, IPersistable
where V: Entity
{
public void Add(K key, V value)
{
...
if (key.CompareTo(x) < 0) {...}
...
}
}
Wednesday, August 30, 2006 | View Comments
C# 2.0 : How to create Generics
Generic Class with one parameter
This is a typical Non-generic Class :public class ListGeneric Class : in order to create generics class we use the type argument T in < and > after class name.
{
object[] items;
public void Add(object item) {....}
public object this[int index] {...}
}
public class List<T>Using Generic class :
{
[T] items;
public void Add(T item) {....}
public T this[int index] {...}
}
List<int> listInteger = new List<int>;
listInteger.Add(1);
listInteger.Add(2);
listInteger.Add(3);
listInteger.Add(new Customer()); // Compile-time error
Note:
T : type argument.
List
Generic Class with more than one parameters
Generic type declarations may have any number of type parameters. The Listpublic class Dictionary<K,V>When Dictionary
{
public void Add(K key, V value) {...}
public V this[K key] {...}
}
Dictionary<string, Customer> dict =
new Dictionary<string, Customer>();
dict.Add("Hung", new Customer());
Customer customer = dict["Hung"];
Wednesday, August 30, 2006 | View Comments
C# 2.0 Generics
Generics Overview
Use generic types to maximize code reuse, type safety, and performance.
The most common use of generics is to create collection classes.
The .NET Framework class library contains several new generic collection classes in the System.Collections.Generic namespace. These should be used whenever possible in place of classes such as ArrayList in the System.Collections namespace.
You can create your own generic interfaces, classes, methods, events and delegates.
Generic classes may be constrained to enable access to methods on particular data types.
Why Generics ?
Type safety casting & performance:
Using generics is not only safer than general old collection class (such as ArrayList, Collections...) but also significantly faster.C# 1.1 :
ArrayList customers = new ArrayList();
Customer customer = new Customer();
// Boxing --> descrease performance. No type-checking
customers.Add(customer);
// Boxing --> descrease performance. No type-checking
customers.Add("Some string");
// throw exception
// Customer customer = customers[0];
C# 2.0 :
List<Customer> customers = new List<Customers>();
Customer customer = new Customer();
// No Boxing, no casting --> increase performance.
customers.Add(customer);
// Type-Checking : Compile-time error
customers.Add("Some string");
// No UnBoxing, no casting --> increase performance .
// Not throw exception
Customer customer2 = customers[0];
// UnBoxing --> decrease performance
Customer customer2 = (customer)customers[0];
Monday, August 28, 2006 | View Comments
Asp.net 2.0 Profile problem in new Web Application Project model : ProfileCommon not found
I spent a lot of time to find out root of problem when using asp.net 2.0 Profile feature in new Web Application Project model. With VS 2005 Website model, when we edit Profile section
in web.config, Vs 2005 will automatic generate strong-typed class ProfileCommon. Developers
can use this generation class/ object by using intellisense feature of vs 2005.
Web.config :
Code-behind :
Unfortunately, Web Application Project model does not automatic generate strong-typed
ProfileCommon to mapping profile section in web.config. In order to use this Profile, we must hand coding mapping class :
Using ProfileCommon :
Hope next release of Web Application Project (SP1) will support automatic generate strong-typed Profile Mapping. Currently, we can do hand-coding or using WebProfile generator from Tim McBride
Tuesday, August 22, 2006 | View Comments
T-SQL : How get only Time Part in DateTime value
DECLARE @CurrentDate datetime
SET @CurrentDate = '8/3/2006 4:09:00 PM'
SET @CompareDate = '8/3/2006 4:09:00 PM'
Get Time part as nvarchar or char :
Using :
select right(convert(nvarchar,@CurrentDate,120),9)
Or :
SELECT Convert(CHAR(24), @CurrentDate,108)
How to compare only time part in DateTime value , we use DatePart function :
DatePart(hour, @CurrentDate) >= DatePart(hour, @CompareDate) AND
DatePart(minute, @CurrentDate) >= DatePart(minute, @CompareDate) AND
DatePart(second, @CurrentDate) >= DatePart(second, @CompareDate) AND
Thursday, August 03, 2006 | View Comments
Recently Released Exams !
The following exams went live between April 14 and June 2, 2006 and are now available for registration at both Pearson VUE and Prometric sites around the world.
70-235 | English | TS: Developing Business Process and Integration Solutions by Using Microsoft BizTalk Server 2006 |
70-282 | English | Designing, Deploying, and Managing a Network Solution for a Small- and Medium-Sized Business |
70-442 | English | PRO: Designing and Optimizing Data Access by Using Microsoft SQL Server 2005 |
70-526 | English | TS: Microsoft.NET Framework 2.0 - Windows-Based Client Development |
70-547 | English | PRO: Designing and Developing Web-Based Applications by Using the Microsoft.NET Framework |
70-548 | English | PRO: Designing and Developing Microsoft Windows-Based Applications by Using the Microsoft .NET Framework |
70-549 | English | PRO: Designing and Developing |
70-551 | English | UPGRADE: MCAD Skills to MCPD Web Developer by Using the Microsoft.NET Framework |
70-552 | English | UPGRADE: MCAD Skills to MCPD Windows Developer by Using the Microsoft.NET Framework |
70-553 | English | UPGRADE: MCSD Microsoft.NET Skills to MCPD Enterprise Application Developer by Using the Microsoft .NET Framework: Part 1 |
70-554 | English | UPGRADE: MCSD Microsoft.NET Skills to MCPD Enterprise Application Developer by Using the Microsoft .NET Framework: Part 2 |
71-262 | English | TS: Microsoft Office Live Communications Server 2005 - Implementing, Managing, and Troubleshooting |
Friday, June 30, 2006 | View Comments
Microsoft Asia Security RoadShow 2006
I've just received "Microsoft Security RoadShow 2006" Invitation from Microsoft, but the show will be taken in my working day , I'm wondering should I go to this event
Sunday, April 30, 2006 | View Comments
SQL 2000 - SQL 2005 Database Upgrade : Database Diagrams problem
I restored Sql Server database 2005 from Sql Server 2000, then I want to add a new diagram, but when I click "Database Diagrams" there an error message "Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects. ". Follow these steps to resolve this problem:
1. Right Click on your database, choose properties
2. Goto the Options Page
3. In the Dropdown at right labeled "Compatibility Level" choose "SQL
Server 2005(90)"
4. Press OK.
The alternating method, you can run sthis store procedure:
EXEC sp_dbcmptlevel 'yourDB', '90';
GO
ALTER AUTHORIZATION ON DATABASE::yourDB TO "yourLogin"
GO
USE [yourDB]
GO
EXECUTE AS USER = N'dbo' REVERT
GO
Monday, April 24, 2006 | View Comments
Team System Brings Project Management to Visual Studio
New features of Visual Studio 2005 Team System (VSTS) will help project managers in two ways: a set of built-in reports will allow project managers to quickly see project status and a set of extensible methodologies will provide specific guidance on how to organize and track a software development project. The reporting tools are useful for any development project that uses VSTS’s source-code control and work-item tracking systems. The methodologies, however, will require organizations to either adopt a specific way of managing their projects or modify the provided methodologies to suit their specific needs.
For background information on VSTS, including its architecture, see "Visual Studio Team System Targets Multiple Roles" on page 20 of the Feb. 2005 Update.
Tools for Project Managers
Many software project managers spend a great deal of time collecting status information from individual developers and testers and trying to collate that information into a useful report. Development teams using the VSTS source-code control system and work-item tracking databases will find that much of that data collection is performed automatically, allowing project managers to perform higher-level tasks such as analyzing trends or transferring work from one developer to another to equalize work loads.
VSTS can create reports from multiple data sources, including its automated code testing, source-code control, and work-item tracking systems, giving project managers a more complete view of their project. Some of the statistics that VSTS can generate include the following:
Bug find and fix rates show the number of bugs found each day compared with the number fixed. The net number of bugs fixed each day is an important tool in helping project managers estimate when a project will reach its quality goals.
Code churn measures the number of lines of code in the project that are being added, deleted, or changed. Since any change to the source code of a project introduces the possibility of a bug, reducing code churn is important to stabilizing a project in preparation for release.
Bugs per developer allows project managers to see which developers are overloaded with bugs to fix and which have time available, helping managers balance the work load.
Number of test cases passing and failing is an important measure of the overall health of a project.
Code coverage shows what percentage of the application’s source code is being exercised by automated test suites and helps managers analyze the effectiveness of their tests. If large portions of the source code are not covered by any automated test, then a manager knows that the number of test cases passing will not provide a complete view of the quality of the application.
Reports Available in Many Formats
Project managers can view and update project information in several ways.
Excel. Excel provides few project management features, but many software project managers rely on it, including those on Microsoft’s own product teams. What Excel excels at is creating, maintaining, and sorting lists of information and generating charts. VSTS allows project managers to view lists of work items within Excel spreadsheets. An Excel add-in can automatically update spreadsheets with the latest data and can update VSTS with any changes made to the spreadsheet.
Project. Although Project is Microsoft’s product for general-purpose project management, it is rarely used for software project management. Nonetheless, Project has some capabilities that make it useful—most notably its support for visually displaying a project’s timeline as either a Gantt or a Pert chart. VSTS can automatically generate a Project file for a project schedule and includes a plug-in so that any schedule changes made within Project are reflected in VSTS.
Web site. Because the middle tier of VSTS is built on top of Windows SharePoint Services (WSS), every software project automatically has an associated SharePoint site that allows developers, testers, and project managers to view and update project data.
SQL Reporting. The data tier of VSTS uses SQL Server, so project managers will be able to use SQL Reporting Services to automatically generate and distribute reports, such as daily or weekly bug status.
Methodologies Provide Process Guidance
In addition to providing reporting tools that are broadly useful to teams, VSTS provides mechanisms for enforcing specific development methodologies. Webster defines methodology as "a body of methods, rules, and postulates employed by a discipline." A software development methodology, such as Extreme Programming, is a set of methods and rules that define how a software project is designed and created. Extreme Programming, for example, stresses the need for frequent, small releases of the project and the creation of software tests before the writing of code.
The final version of VSTS will support two Microsoft-developed methodologies—one for a highly formalized software development process, and one for a less formalized, more iterative, process. Organizations can use or customize one of the methodologies supported by VSTS, use a methodology developed by themselves or by third parties, or use no methodology at all.
In addition, Microsoft hopes to create a market for third parties to sell other popular methodologies, such as Extreme Programming.
Agile Framework Defines Roles, Workstreams
Beta 2 of Visual Studio 2005 (which will be the first beta of VSTS) will include one Microsoft methodology, Microsoft Solutions Framework (MSF) for Agile Software Development (previously known as MSF Agile). The Agile methodology defines a software development process that incorporates several rounds, or iterations, of product planning, coding, testing, and feedback. Although Agile can be used by any development team, it was designed with a typical IT enterprise development team in mind.
The Agile methodology defines several roles, with each member of the team taking on one or more roles:
Architect—responsible for designing the technical foundations of the application, including its usability, reliability, maintainability, performance, and security.
Business analyst—responsible for defining the business needs the application fulfills and working with customers to understand the scenarios and quality of service requirements.
Project manager—responsible for delivering the application on time and within budget.
Developer—responsible for implementing the application within the agreed schedule.
Tester—responsible for assessing and communicating the state of the application, including any problems.
Release manager—responsible for the rollout of the application, coordinating the project with other operations, and certifying any releases for shipment or deployment.
In addition to defining roles, the Agile methodology defines a set of activities performed by each role. For example, the "Fix a Bug" activity is associated with the developer role. These activities are then grouped into workstreams that span roles. The "Fix a Bug" activity, for example, is part of a larger workstream that includes the following steps:
- Open a bug (tester)
- Triage bugs (project manager)
- Fix a bug (developer)
- Verify a fix (tester)
- Close a bug (tester)
VSTS supports this methodology by automatically updating a work item, assigning it from one person to the next as it moves through a workstream. In the case of a bug, once a bug is entered by a tester, a work item is automatically created for the project manager to triage the bug. Similarly, once a bug is fixed, the work item is assigned to the tester for verification.
CMMI Coming Later
In addition to the Agile framework, future versions of VSTS will also provide the Microsoft Solutions Framework for CMMI Process Improvement—a more formal methodology that is compliant with the Capability Maturity Model Integration (CMMI), a set of process management guidelines developed by Carnegie Mellon University’s Software Engineering Institute. Although seldom used by corporate IT departments and broad-market commercial software developers, some government organizations require that their vendors adhere to CMMI guidelines.
CMMI defines five maturity levels, ranging from Level 1 (ad hoc) to Level 5 (optimizing). Microsoft hopes to have a methodology for Visual Studio (VS) 2005 that meets the requirement for CMMI Level 3, which requires that "the standard process for developing and maintaining software across the organization is documented, including both software engineering and management processes, and these processes are integrated into a coherent whole."
Microsoft has yet to provide details on the CMMI framework, but has said that support will not be included in Beta 2 of VS 2005, expected in Apr. 2005.
You Can Go Your Own Way
Adopting a methodology, whether defined by Microsoft or by a third party, is a significant undertaking. Every development team has some "rules of the road"—they may not be formalized or even written down, but they exist nonetheless, and managers will need to understand their team’s current processes before adopting new, more complex, ones.
In addition, the methodologies used by VSTS are defined by a complex XML schema and modifying them (or creating new methodologies) not only requires specific knowledge of VSTS but of XML as well. Most organizations will want to rely on outside consultants or trainers to do this work.
Resources
The VSTS source-code control system is outlined in "VS 2005 Checks in New Source Control" on page 24 of the Feb. 2005 Update.
VS 2005 features for individual developers are described in "Visual Studio Renews Pitch for Developers" on page 21 of the Dec. 2004 Update.
The Visual Studio Team System home page is lab.msdn.microsoft.com/teamsystem/default.aspx.
For more information on CMMI, see www.sei.cmu.edu/cmmi.
Sunday, April 16, 2006 | View Comments
New MCP exam betas already underway
Number | Cert | Beta | Full Name |
70-235 | MCTS | NA | Developing Business Process and Integration Solutions Using BizTalk Server 2006 1 |
70-431 | MCTS | 11/22-12/5/05 | SQL Server 2005 Implementation & Maintenance |
70-441 | MCITP | 11/22-12/5/05 | Designing Database Solutions Using SQL Server 2005 |
70-442 | MCITP | NA | Designing and Optimizing Data Access Using Microsoft SQL Server 2006 1 |
70-443 | MCITP | NA | Designing a Database Server Infrastructure by Using Microsoft SQL Server 2005 |
70-444 | MCITP | NA | Optimizing and Maintaining a Database Administration Solution by Using Microsoft SQL Server 2005 |
70-445 | MCITP | NA | Designing Business Intelligence Solutions by Using Microsoft SQL Server 2005 Analysis Services |
70-446 | MCITP | NA | Designing a Business Intelligence Infrastructure by Using Microsoft SQL Server 2005 |
70-447 | MCITP | NA | Upgrade: MCDBA Skills to MCITP Database Administrator by Using Microsoft SQL Server 2005 1 |
70-526 | MCTS | NA | Microsoft .NET Framework 2.0 Windows-based Client Development 1 |
70-528 | MCTS | 11/7-18/05 | Microsoft .NET Framework 2.0 Web -based Client Development |
70-529 | MCTS | NA | Microsoft .NET Framework 2.0 Distributed Application Development |
70-536 | MCTS | NA | Microsoft .NET Framework 2.0 Application Development Foundation 1 |
70-547 | MCPD | NA | Designing and Developing Web Applications by Using the Microsoft .NET Framework 2 |
70-548 | MCPD | NA | Designing and Developing Windows Applications by Using the Microsoft .NET Framework 2 |
70-549 | MCPD | NA | Designing and Developing Enterprise Applications by Using the Microsoft .NET Framework 2 |
70-551 | MCPD | NA | Upgrade: MCAD skills to MCPD: Web Developer by Using the Microsoft .NET Framework 2 |
70-552 | MCPD | NA | Upgrade: MCAD skills to MCPD: Windows Developer by Using the Microsoft .NET Framework 2 |
70-553 | MCPD | NA | Upgrade: MCSD Microsoft .NET skills to MCPD: Enterprise Application Developer by Using the Microsoft .NET Framework Part 1 3 |
70-554 | MCPD | NA | Upgrade: MCSD Microsoft .NET skills to MCPD: Enterprise Application Developer by Using the Microsoft .NET Framework Part 2 3 |
Table notes:
1. Microsoft Web page says "available early 2006."
2. Microsoft Web page says "available mid-2006."
3. Microsoft Web page says "available summer 2006."
Monday, March 20, 2006 | View Comments
New Generation of Microsoft Certification Exams Released (Worldwide)
If you've been looking forward to taking the New Generation of Microsoft Certification Exams, your wait is over. The following seven exams are now available at our testing providers.
• | |
• | |
• | |
• | |
• | |
• | |
• |
Friday, March 10, 2006 | View Comments
Security Application Block in Enterprise Library
Security Application Block in Enterprise Library provides a few advantages over the old application block. It looks like it will be a lot simpler to use. Notably, it no longer appears designed around Authorization Manager’s peculiarities. In fact, it comes with an authorization implementation that does not depend on Authorization Manager.
There are a few concepts to understand when using the Security Application Blocks:
- Authentication
- Authorization
- Roles
- Profiles
Every person or system that interacts with your application will claim to have some rights to perform certain actions. Authentication is the process of verifying that the person or system is truly the user they are claiming to be. Most systems authenticate users using a username and password combination.
After the user is authenticated, your application must determine what actions or operations the user is allowed to execute. This is called authorization and in Enterprise Library is role-based.
Roles are assigned to users to define how they will use the application. The authorization system can check the user’s assigned roles to determine what actions or operations the user is allowed to execute.
The Security Application Block also provides a facility for storing profile information for each user. A profile can consist of primitive values, serializable objects or a dictionary of primitive values and serializable objects.
One of the new things in the security block is a simple backend database to store user, role and profile information. This removes the dependency of having an Active Directory database and Authorization Manager installed. You can start from this simple database and then upgrade to AD an AzMan in production, if required.
One thing I could not find is the actual provider for Authenticating against Active Directory. It must be in there, right?
Wednesday, February 22, 2006 | View Comments
[patterns & practices: Enterprise Library] Announcement: Enterprise Library for .NET Framework 2.0 Now Available!
Enterprise Library for .NET Framework 2.0 Now Available! The long-awaited update to Enterprise Library for .NET Framework 2.0 is now available - the official release is branded January 2006. This release of Enterprise Library includes six application blocks (Caching, Cryptography, Data Access, Exception Handling, Logging and Security), and provides similar functionality to the previous releases for the .NET Framework 1.1; however, Enterprise Library has been redesigned to use the new capabilities of the .NET Framework 2.0.
Saturday, February 04, 2006 | View Comments