Archives

Archives / 2007 / December
  • Computers for Kids

    UPDATE:  Thanks to all those who bid on eBay.  The auction is over now.

    Interface Technical Training (my excellent employer) and AZGroups.com are auctioning off two training certificates on eBay this holiday season.  All of the proceeds from the auction will be used to purchase computers for kids who would not have access to a computer otherwise.  The certificates are valid for any training class at Interface throughout 2008 (which is located in Phoenix, AZ).  If you or your company are looking for .NET programming, Microsoft Systems, or Cisco training please take a look at the auctions on eBay since it's all going to a great cause.   

    Read more...

  • ASP.NET 3.5 Extensions Preview Released

    For those of you that like to stay on top of the latest technologies, Microsoft just released the ASP.NET 3.5 Extensions Preview today which provides the following new functionality (quoted from the http://www.asp.net Website):

    ASP.NET MVC

    ASP.NET MVC provides model-view-controller (MVC) support to the existing ASP.NET 3.5 runtime, which enables developers to more easily take advantage of this design pattern. Benefits include the ability to achieve and maintain a clear separation of concerns, as well as facilitate test driven development (TDD).

    The ASP.NET MVC Toolkit provides HTML rendering helpers and dynamic data support for MVC.

    ASP.NET Dynamic Data

    ASP.NET Dynamic Data helps developers build a fully customizable, data-driven app quickly. It provides a rich scaffolding framework that allows rapid data driven development without writing code, yet it is easily extendible using the traditional ASP.NET programming model.

    ASP.NET AJAX

    New additions to ASP.NET AJAX include support for managing browser history (Back button support).

    ADO.NET Entity Framework

    ADO.NET Entity Framework is a new modeling framework that enables developers to define a conceptual model of a database schema that closely aligns to a real world view of the information. Benefits include easier to understand and easier to maintain application code that is shielded from underlying database schema changes.

    ADO.NET Data Services

    ADO.NET Data Services provide new services that find, manipulate and deliver data over the web using simple URIs. Benefits include an easy and flexible way to access data over the web, while enabling the separation of presentation and data access code.

    Silverlight Controls for ASP.NET

    You can integrate the rich behavior of Microsoft Silverlight into your Web application by using two new ASP.NET server controls: a MediaPlayer server control that enables easy integration of media sources such as audio (WMA) and video (WMV) into your Web application, and a Silverlight server control that allows an ASP.NET page to reference both XAML objects and their event handlers.

    If you're still trying to get your head around new features released in Visual Studio 2008 and .NET 3.5 (and who isn't since they just came out) then this new preview release may really make your head swim.  We're all in that boat though. :-)  There's a lot of new things to look into and get to know that can significantly enhance developer productivity which is the ultimate goal.

    Read more...

  • New Article: Create Rich Web Apps with AJAX

    I recently finished up a new article for Visual Studio Magazine that's now online for those that are interested.  It discusses how to integrate ASP.NET AJAX with back-end Web Services including Amazon.com's e-commerce service.  Read the article at the link below:

    http://visualstudiomagazine.com/features/article.aspx?editorialsid=2374

    Those interested in Silverlight can follow my Silverlight programming article series here.

    Read more...

  • C# 3.0 Features: Automatic Properties

    .NET 3.5 is out which means all of the great features available in C# 3.0 are available to use now.  Here's a quick list of the main language enhancements available in C# 3.0:

  • Object Initializers
  • Automatic Properties  
  • Anonymous Types
  • Extension Methods
  • Lambda Expressions
  • LINQ
  • Collection Initializers
  • One of the things I can't say that I've enjoyed doing in the past when writing .NET classes was creating properties and associated fields.  I leveraged the "prop" code snippet a lot in Visual Studio 2005 so that I didn't have to type much, but I still had to go through and define the field name and property name in the code.  While public fields could certainly be used in some cases, they don't provide any control over the data being assigned (especially if the field is a string type) and aren't supported well when it comes to data binding.  As a result I always create public properties to wrap fields even if I don't have any "extra" logic that needs added into the get or set blocks.  Here's the standard way of creating fields and properties using C# 2.0:

    public class Person 
    {    
       
    string _FirstName;
       string 
    _LastName;

       public string 
    FirstName 
       {
            
    get return _FirstName}
            
    set { _FirstName = value; }
       }

       
    public string LastName 
       {
            
    get return _LastName}
            
    set { _LastName = value; }
       }
    }

    With C# 3.0 a new feature called "automatic properties" is now available.  When you use the "prop" code snippet in Visual Studio 2008 you'll see that empty get and set blocks are added and that no associated field is added into the code.  The compiler will automatically generate the backing field at compile time if it finds empty get or set blocks saving you the work. You can still add get and set blocks that have additional filtering logic in them as well although you'll have to type all of that yourself of course. 

    Here's an example of how properties can be written in C# 3.0....you gotta love it especially when you compare how much more compact this technique is compared to the older way of doing things.

    public class Person 
    {    
       
    public string FirstName  { get; set; }
       
    public string LastName  { get; set; }

    Read more...

comments powered by Disqus