Ratnakar’s Weblog

Auckland Code Camp 2008

Posted in .Net Framework 3.5, .Net Training, ASP.Net MVC, C#, General I.T, Visual Studio 2008 by Ratnakar Garikipati on August 2, 2008

For the code enthusiasts who live around Auckland  – The Auckland Code Camp 2008 is a free-of-charge .Net Community event and that’s where you want to be!


This all day event is on
Sunday, 31 August 2008 (the day before TechEd), 9:30 a.m. – 5:00 p.m. and at Crowne Plaza Hotel, 128 Albert St, Auckland.

Clik here to find more details.

 

As it is a free event with limited funding, I suggest you register ASAP – there’s also an option to pull out.
See you there!

heard of VisualWebGUI (www.visualwebgui.com) yet???

Posted in ASP.Net, C#, General I.T, Sliverlight, Visual Studio 2008 by Ratnakar Garikipati on July 28, 2008

I haven’t until I bumped into a post by David Hayden.

According to it’s web site (http://www.visualwebgui.com/) – “Visual WebGui (VWG) is an open source rapid application development (RAD) framework for Line-Of-Bussines AJAX & Silverlight GUIs. VWG cuts down development time (proven up to 90%) , without compromising on extensibility, scalability, performance, security or complexity.

Visual WebGui is the only framework that provides seamless integration to Visual Studio and the .NET framework and extends ASP.NET. VWG is unique and not more of the same (200 AJAX frameworks)! Visual WebGui replaces all of the ASP.NET methodologies which were designed for developing sites, with WinForms methodologies, which were designed for developing applications.

VWG provides the developer with an extremely efficient designer to design interfaces using drag and drop instead of hand coding HTML layouts.”

I am not advocating to use it or promoting it by any means as I myself haven’t used it yet but I must say I watched this webcast and I am now intrigued to have a dig at it when I get a spare moment.

Also there’s this rescheduled MSDN event (webcast) originally planned for 23rd July, register if you are keen as mustard as I am – http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&EventID=1032379516&CountryCode=US

ASP.NET MVC CodePlex Preview 4 – released!!

Posted in .Net Framework 3.5, ASP.Net, ASP.Net MVC, C#, Dynamic Data, Visual Studio 2008 by Ratnakar Garikipati on July 19, 2008

The installer and source for Preview 4 is now available on CodePlex for download (http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=15389).

Here’s a list of changes that have been made between Preview 3 and the current release Preview 4 –

  • New Simple Membership Features in the Default Project Template
  • New Filter Types for Authorization and Exception Handling
  • New Output Cache Filter
  • Changes for ASP.NET AJAX
  • Namespaces in Routes
  • New Interface for Enhanced Testability of TempData
  • ActionInvoker Extensibility Improvements

As I highlighted in my previous post – Scott Guthrie has an excellent post with an example covering the new changes – http://weblogs.asp.net/scottgu/archive/2008/07/14/asp-net-mvc-preview-4-release-part-1.aspx

A sneak peek into ASP.NET MVC Preview 4 Release

Posted in .Net Framework 3.5, ASP.Net, C#, General I.T, Visual Studio 2008 by Ratnakar Garikipati on July 15, 2008

If you are keeping a close eye on what’s happening in the ASP.Net MVC space – Scott Guthrie has a post suggesting that the next Preview version (# 4) is to be expected later this week – which I can’t wait to get my hands on!!!

This is perfect for me in terms of timing because for the last few months I have been spending most of my time at one of our client’s place training/mentoring their application development team while trying to employ/adopt a long-term/future-proof Enterprise Development Strategy.

I was reluctant to introduce MVC yet to the team as it is still early stages. Although with some level of custom coding you can implement the core aspects of AJAX  etc, I wanted to wait until I check out Preview 4 – rightly so and as expected here comes an announcement from Scott that preview 4 has new features such as Caching, Error Handling and Security plus further additional support for AJAX.

http://weblogs.asp.net/scottgu/archive/2008/07/14/asp-net-mvc-preview-4-release-part-1.aspx

 

 

ASP.NET 3.5 Extensions Preview

Posted in .Net Framework 3.5, ASP.Net, ASP.Net MVC, C#, Dynamic Data, General I.T, Sliverlight, Visual Studio 2008 by Ratnakar Garikipati on May 7, 2008

is available for download now..(click here)

The ASP.NET 3.5 Extensions Preview is a preview of new functionality being added to ASP.NET 3.5 and ADO.NET. The release includes ASP.NET MVC, ASP.NET Dynamic Data, ASP.NET controls for Silverlight, ADO.NET Data Services, Entity Framework runtime, and new features for ASP.NET AJAX.

Both ASP.NET MVC and ASP.NET controls for Silverlight have been updated since this release. The latest versions can be accessed at:
http://go.microsoft.com/fwlink/?LinkID=111960.

a couple of LINQ tools

Posted in .Net Framework 3.5, C#, General I.T, Visual Studio 2008 by Ratnakar Garikipati on May 4, 2008

Visual LINQ Query Builder  

Visual LINQ Query Builder is an add-in to Visual Studio 2008 Designer that’s developed to help you build LINQ to SQL queries through a friendly interface. The tool can be seen in action here – http://blogs.msdn.com/mitsu/archive/2008/04/02/visual-linq-query-builder-for-linq-to-sql-vlinq.aspx  and available for download from the MSDN Code Gallery – http://code.msdn.microsoft.com/vlinq
 

LINQPad 

LINQPad is proving to be quite successful and seen as a tool that’s not only useful to learn LINQ but also for dev purposes.  This tool:   

       supports C# 3.0 and Framework 3.5 (LINQ to SQL, LINQ to Objects, LINQ to XML)

       comes with 200 preloaded examples

       offers code snippet IDE

       free and only 2mb in size

more here –  http://www.linqpad.net/

.Net Framework 3.5 Enhancements Training Kit

Posted in .Net Framework 3.5, ASP.Net, C#, Dynamic Data, General I.T, Visual Studio 2008 by Ratnakar Garikipati on April 29, 2008

 

If you haven’t subscribed to Microsoft’s Download Notifications and aren’t aware of .Net 3.5 Enhancements Training Kit then check it out here – http://go.microsoft.com/?linkid=8741672

 

The .Net Framework 3.5 Enhancements Training K it features presentations, hands-on labs, demos, this content is designed to demonstrate how to use the 3.5 enhancements like ASP.Net MVC, ASP.Net Dynamic Data, ASP.Net AJAX History, Silverlight, ADO.Net Data Services and ADO.Net Entity Framework.

 

Also, if you want to keep on top of new downloads I suggest you subscribe here – http://go.microsoft.com/?linkid=8741740

Dynamic Data Preview for ASP.Net now available for download!!!

Posted in ASP.Net, C#, Dynamic Data, General I.T by Ratnakar Garikipati on April 10, 2008

ASP.NET Dynamic Data is a powerful new feature that provides two significant usability improvements to working with data controls in ASP.NET Web sites and Web applications.

The first improvement is for existing applications that use DetailsView, FormView, GridView, or ListView controls. The DetailsView and GridView controls have been extended to display fields by using templates instead of by using hard-coded rules that are programmed in the controls. These templates are part of the project, and you can customize them to change their appearance or to specify what controls they use for rendering. This makes it very easy to make a change in one place that specifies how to present dates for editing, as one example. FormView and ListView controls can implement similar behavior by using a DynamicControl control in their templates and by specifying which field in the row to display. Dynamic Data will then automatically build the UI for these controls based on the templates that you specify.

The second improvement is that the controls look at the metadata for a LINQ to SQL or Entity Framework data model and provide automatic validation based on the model. For example, if a column in the database is limited to 50 characters, and if a column is marked as not nullable, a RequiredFieldValidator control is automatically enabled for the column. (The controls also automatically support data-model-level validation.) You can apply other metadata to take further control over display and validation.

You can find more details here – http://code.msdn.microsoft.com/dynamicdata, and Scott Gu has a good post with an example here (http://weblogs.asp.net/scottgu/archive/2008/04/10/asp-net-dynamic-data-preview-available.aspx) plus links to other useful posts about this topic.

Add to Tecnorati Favorites

Repository Factory for VS 2008

I have seen many people wanting to know the future state of the Repository Factory (formerly known as Data Access Guidance Package) – the news from Microsoft is that it will be retired and there won’t be any further releases. 

As you probably know the current version available on CodePlex isn’t VS 2008 compatible – so if you have moved on to using VS 2008 and are looking to use the repository factory further then write to me (leave a comment), I will flick you a copy. The version I have was tweaked and compiled for VS2008 and it uses Partial Classes etc so it is indeed better than the previous release!!!

Note:
There’s one issue with this version of the Repository Factory that I would like to highlight –
If you encounter an exception of type ‘System.Configuration.ConfigurationErrorsException’ it is because the code generated web.config entry for the repository interface will look like the following:

<add interfaceType=”CustomerMgmt.DataAccessLayer.ICustomerRepository, DataAccessLayer” repositoryType=”CustomerMgmt.DataAccessLayer.BusinessLayer.CustomerRepositoryArtifacts.CustomerRepository, DataAccessLayer”/>

instead, this is how it should have been:

<add interfaceType=”CustomerMgmt.DataAccessLayer.Interfaces.ICustomerRepository, DataAccessLayer” repositoryType=”CustomerMgmt.DataAccessLayer.BusinessLayer.CustomerRepositoryArtifacts.CustomerRepository, DataAccessLayer”/>

I will correct and repackage the project but for now modify the web.config mannually.

Note: This issue is now resolved in the new version of the package that I created.

PowerCommands For Visual Studio 2008

Posted in C#, General I.T, Visual Studio 2008 by Ratnakar Garikipati on March 3, 2008

PowerCommands 1.1 is a set of useful extensions for the Visual Studio 2008 adding additional functionality to various areas of the IDE. The source code is included and requires the VS SDK for VS 2008 to allow modification of functionality or as a reference to create additional custom PowerCommand extensions.

More details about extending the Visual Studio can be found here – http://www.visualstudiogallery.com/ExtensionDetails.aspx?ExtensionId=df3f0c30-3d37-4e06-9ef8-3bff3508be31 and visit the VSX Developer Center at http://msdn.com/vsx

Web Client Software Factory and Data Access Layer

Posted in .Net Framework 3.5, ASP.Net, C#, General I.T, Visual Studio 2008 by Ratnakar Garikipati on November 30, 2007

I was exploring the Web Client Software Factory recently and one thing that I thought would be important to share with you all is – it does not come with a recipe to create data access layer for web applications – might feature in the next version though.

The current recommendation according to Microsoft’s Patterns and Practicses is to use the Data Access Guidance Package that comes with the current version of the Web Service Software Factory – From what I read, the next version of the Web Service Factory might not feature the Data Access Guidance Package as well but will be released separately.

The Data Access Guidance Package is fairly impressive with the features like Command Factories, Entity Factories and allows to create a flexible Framework for your Data Access Needs.

There are other Data Access Packages/Tools available if you wish not to use Microsoft’s Data Access Guidance Package inconjunction with the Web Client Software Factory – here’s a list of few – NTiers, NHibernate, WilsonORMapper, TableAdapters, ActiveRecord…

thoughts/comments?

C# 3.0 demo

Posted in C# by Ratnakar Garikipati on August 24, 2007

My previous blog talks about the new C# language enhancements/extensions.

 

Here’s an excerpt from Luke’s C# demo at TechEd 2007 which covers things like Auto-Implemented properties, ‘var’ – Local Variable Type Inference, Collection Initializers, Object Initializers, Lambda Expressions etc

 

If you are a C# enthusiast…I would suggest you subscribe to his feeds at: http://blogs.msdn.com/lukeh/

 

using System;

//using System.Linq;

using System.Collections.Generic;

class Customer

{

    // C#3.0 Feature:  Auto-Implemented Properties

    public string CustomerID { get; set; }

    public string ContactName { get; set; }

    public string City { get; set; }

}

public delegate TResult Func<TArg, TResult>(TArg c);

static class Query

{

    // C#3.0 Feature:  Extension Methods

    public static IEnumerable<T> Where<T>(this IEnumerable<T> source, Func<T,bool> filter)

    {

        foreach (var item in source)

            if (filter(item))

                yield return item;

    }

    public static IEnumerable<TResult> Select<TSource,TResult>(this IEnumerable<TSource> source, Func<TSource,TResult> selector)

    {

        foreach (var item in source)

            yield return selector(item);

    }

}

class Program

{

    static void Main(string[] args)

    {

        List<Customer> customers = LoadCustomers();

        // C#3.0 Feature:  Query Expressions

        var query = from c in customers

                    where c.City == “London”

                    // C#3.0 Feature:  Anonymous Types

                    select new { c.CustomerID, c.ContactName };

        // C#3.0 Feature:  Lambda Expressions

        //var query = Query.Select(Query.Where(customers, c => c.City == “London”),

        //                         c => new { c.CustomerID, c.ContactName });

        //var query = customers.Where(c => c.City == “London”)

        //                     .Select(c => new { c.CustomerID, c.ContactName });

        foreach (var item in query)

            Console.WriteLine(“{0}, {1}”, item.CustomerID, item.ContactName);

    }

    private static List<Customer> LoadCustomers()

    {

        // C#3.0 Feature:  ‘var’ – Local Variable Type Inference

        // C#3.0 Feature:  Collection Initializers

        var customers = new List<Customer>()

        {

            // C#3.0 Feature:  Object Initializers

            new Customer { CustomerID = “ALFKI”, ContactName = “Maria Anders”, City = “Berlin”},

            new Customer { CustomerID = “ANATR”, ContactName = “Ana Trujillo”, City = “México D.F.”},

            new Customer { CustomerID = “WOLZA”, ContactName = “Zbyszek Piestrzeniewicz”, City = “Warszawa”}

        };

        return customers;

    }

}

C# 3.0 language extensions

Posted in C# by Ratnakar Garikipati on August 17, 2007

C# 3.0 (“C# Orcas”) introduces several language extensions that build on C# 2.0 to support the creation and use of higher order, functional style class libraries. The extensions enable construction of compositional APIs that have equal expressive power of query languages in domains such as relational databases and XML. The extensions include:

  • Implicitly typed local variables, which permit the type of local variables to be inferred from the expressions used to initialize them.
  • Extension methods, which make it possible to extend existing types and constructed types with additional methods.
  • Lambda expressions, an evolution of anonymous methods that provides improved type inference and conversions to both delegate types and expression trees.
  • Object initializers, which ease construction and initialization of objects.
  • Anonymous types, which are tuple types automatically inferred and created from object initializers.
  • Implicitly typed arrays, a form of array creation and initialization that infers the element type of the array from an array initializer.
  • Query expressions, which provide a language integrated syntax for queries that is similar to relational and hierarchical query languages such as SQL and XQuery.
  • Expression trees, which permit lambda expressions to be represented as data (expression trees) instead of as code (delegates).

Rosario now available for download

Posted in C#, General I.T by Ratnakar Garikipati on July 20, 2007

Visual Studio® Team System Code Name “Rosario” is the version of Team System that follows Visual Studio Team System 2008. This release provides the earliest public glimpse of the work in progress on the next generation of Team System.

you can download this from:

http://www.microsoft.com/downloads/details.aspx?FamilyId=8450EFF5-24AD-44C3-AB91-1ED88EF2F4F0&displaylang=en

Visit http://msdn2.microsoft.com/en-us/teamsystem/bb725993.aspx to get an idea of what to look out for.

I got to play around with it during the Tech-Ed 2007 in New Zealand and it’s awesome.