Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News

SYS-CON.TV
Cloud Expo & Virtualization 2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Cloud Computing & Enterprise IT: Cost & Operational Benefits
How and Why is a Flexible IT Infrastructure the Key To the Future?
Click For 2008 West
Event Webcasts
Book Review: "Microsoft .NET 2.0 Generics"
Everything you need to know about this powerful new feature

.NET 2.0 Generics is my favorite book of 2005. Well, other than Harry Potter anyway. This book is not for new programmers. To understand this book, I would recommend that you have about a year of programming experience, and at least six months with C++, C#, or Java. This book is well written and is best used as an introduction to generics, so it is of most use to an advanced beginner. The reader should be familiar the syntax of a C-derived language such as C++, Java, or C# 1.x, and be familiar with object oriented-programming issues such as inheritance, overloading, and overriding. No knowledge of generics is needed to make use of this book.

On the other hand, unless you are a wizard with .NET generics, you are likely to learn a lot from this book. For example, C++ programmers: What is the difference between templates and generics? The easy answer is that templates work at compile time, and generics work at run time, but there is a short chapter that details the real differences. Although most of the book concentrates on C# and VB.NET, there are two chapters that detail the nuances of using generics with C++ and J#. The C++ chapter also discuses how to combine templates and generics together to get the best of both worlds, and has a short discussion on the STL.NET library that actually makes use of the combination.

The book starts off discussing the way collections in .NET 1.1 work by having members be objects, and how the need to cast types to and from objects clutters and complicates programs. It then shows how generics can clean up the clutter and make programs clearer and more flexible. It is also pointed out that the complexity of templates in C++ has to some extent given generics a bad name, and how generics, although not quite as powerful as templates, keep some of this complexity at bay. It then covers simple generic classes and follows up with chapters on generic methods and generic delegates. It also covers constraints, which allow only types with certain attributes or capabilities to be added to the collection. An example is a generic container that is meant to hold data table objects, and is given constraints that require any object added to it to have sort and update methods.

The book also contains an advanced chapter on how generics can be created or analyzed using reflection, how they are serialized and deserialized, and how they work with remoting and Web services.

For those who want to know what is happening "under the hood," this book has a chapter that gives details on how compilers and the run time implement and execute generics, and shows how the use of generics affects code speed and size.

There are three chapters in this book from which I expect to get heavy use as a reference on a day-to-day basis. The first is a chapter on BCL generics, or the generic classes that come with the .NET Framework. Most of these are container classes, and this chapter covers how they work, including how to add, access, and remove items to each type of generic collection. The second chapter I expect to reference almost daily covers the "Power Collections" sponsored by Wintellect at www.Wintellect.com. There are several open source projects creating generic collections for .NET (as well as a lot of private companies doing the same). Of these, Power Collections is one of the larger and better known, and they also work closely with Microsoft (rumors are that the best and most popular of the Power Collection will be included in future versions of the .NET Framework). There is a long chapter at the end of the book that covers the Power Collections in the same way the earlier chapter covers the current .NET generics.

The third chapter that will get continued use from me is a set of rules and principles to apply when creating your own generic classes. A key premise of this book is that generics are so powerful that you should not only use the ones provided by Microsoft and others, but you should also create new ones as a part of all of your applications, just as you do classes. The rules in the Generics guidelines chapter distill a lot of experience with generics and can help programmers avoid many of the most common mistakes.

This is a must-have book for anyone using .NET 2.0.

About Dennis Hayes
Dennis Hayes is a programmer at Georgia Tech in Atlanta Georgia where he writes software for the Adult Cognition Lab in the Psychology Department. He has been involved with the Mono project for over six years, and has been writing the Monkey Business column for over five years.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

.NET 2.0 Generics is my favorite book of 2005. Well, other than Harry Potter anyway. This book is not for new programmers. To understand this book, I would recommend that you have about a year of programming experience, and at least six months with C++, C#, or Java. This book is well written and is best used as an introduction to generics, so it is of most use to an advanced beginner. The reader should be familiar the syntax of a C-derived language such as C++, Java, or C# 1.x, and be familiar with object oriented-programming issues such as inheritance, overloading, and overriding. No knowledge of generics is needed to make use of this book.


Your Feedback
SYS-CON Australia News Desk wrote: .NET 2.0 Generics is my favorite book of 2005. Well, other than Harry Potter anyway. This book is not for new programmers. To understand this book, I would recommend that you have about a year of programming experience, and at least six months with C++, C#, or Java. This book is well written and is best used as an introduction to generics, so it is of most use to an advanced beginner. The reader should be familiar the syntax of a C-derived language such as C++, Java, or C# 1.x, and be familiar with object oriented-programming issues such as inheritance, overloading, and overriding. No knowledge of generics is needed to make use of this book.
Latest Cloud Developer Stories
Can you bring services from the cloud to your customers faster and have them adopt it with ease of use or bring the power of bundled services to the fingertips of your clients without creating new rigid ‘apps stove pipes'? Do you want to prevent your business running away to publ...
OCZ Technology Group, a provider of high-performance solid-state drives (SSDs) for computing devices and systems, on Tuesday announced the Z-Drive R4 CloudServ PCI Express (PCIe) flash storage solution, designed to accelerate cloud computing applications and reduce operating expe...
Many organizations have embraced, or are considering, the benefits of cloud computing – speed, flexibility, increased expertise, shared workload, reduced costs, etc. The benefits are many – but so are the risks. What are the threats to cloud security? Which parties assume respons...
In August 2011, SHI Enterprise Solutions (ESS) division launched the SHI Cloud, offering reliable and cost-effective industrial-grade cloud computing platforms. That same division achieved an 82 percent increase in revenue over 2010.
SoftLayer Technologies on Tuesday announced the immediate worldwide availability of SoftLayer Object Storage, a redundant and highly scalable cloud storage service that allows users to easily store, search and retrieve data across the Internet, with optional CDN connectivity, or ...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON Featured Whitepapers
ADS BY GOOGLE

Breaking Cloud Computing News
Salary increases will remain negligible in Japan this year, with employers instead turning to benefi...