Sections
     
Blog Control Panel
You must be logged in and have permission to create or edit a blog.
     
     
Skip Navigation Links.
     
     
     
Blog Posts
Author: Venkatarama Uppugunduri Created: 8/28/2006
Currently breathing .NET

I know it is too early to request a new browser from Microsoft. It just released IE 7.0. I agree I am naive. I like the new browser from Microsoft. Cool. But I need more features to it. Microsoft don't take another 5 years to release the next version. I would like to see it to be released in a year or two, probably about the same time you release next version of Windows Server 2007(?). :-) Read More »

Both can be used to define a bond between two objects, then why do we need one or the other, wouldn't one of them be sufficient. Here are my 2 cents. Interfaces are actually nothing but a contract that you are publishing to the external world, so whoever is agreeing to contract must see that their application agrees to that by implementing behavior defined in the contract, where as on the other hand if you something beyond say sharing the state as well as behavior then you need abstract classes.

Error while trying to run the project: Unable to start debugging on the web server. The project is not configured to be debugged. Click on Help for more information. You may receive this error if you have both .NET 2.0 and .NET 1.1 environments and then you try to debug an ASP.NET 1.1 applicaiton in VS.NET 2003. Read More »

Attributes vs. Properties

 

These are one of the confusing terms at least in programmer’s world. Often they get swapped.

 

Here is my opinion about them.

 

Attributes talk about the nature of the subject. Properties talk about the heritage, contents, state or ownership on the belongings of the subject.

 

Say for example I am a human, in this context human is an attribute considering I as subject, where as in my apartment complex there are humans as well as dogs. Here humans are properties of the apartment complex considering apartment complex as the subject.

 

Same thing goes with the .NET World. Serializable is an attribute of an object for instance, and that object might have a property saying bool serializable expecting value of true or false. This tells the .NET runtime that this class is serializable through the attribute and to the world as this class is either serializable or not through the property it exposed.

 

So attribute... Read More »

Marker Interfaces & Custom Attributes

 

Marker Interfaces are dummy interfaces having no methods. These can be used to verify an object type at runtime. They are nothing but contracts without any behavior.

 

Custom attributes are part of metadata that informs the CLR about a type or entity at runtime. Custom attributes are also user defined type derived from Attribute type.

 

In general there is no significant difference once the metadata is loaded, but using custom attributes gives more flexibility. Again flexibility is one thing we should be very careful or watchful. How much flexibility we want to give depends on the need. This holds good for the architecture, design and the solution development. If we start making everything flexible some times we introduce complexity or we deviate ourselves from the original target by missing the deadlines. Like Martin Fowler mentioned in his Analysis patterns book, “Models or not right or wrong, they are more useful or less”. So here in this case deciding on Maker Interfaces or Custom Attributes depends on the need, and if we have to do more than type checking we should go with Custom Attributes. Custom Attributes give more optimistic solution in designer mode. For instance consider ASP.NET, custom attributes make very much sense here, because these would be useful to compile the code at design time. And at runtime everything goes into the control of CLR and reflection, so using marker interfaces over custom attributes doesn’t improve the system that much. But if the domain needs more type checking then probably marker interfaces would make sense. Most of the time you end up doing more than just type checking, and if you just need only type checking then go with Marker Interfaces, because they are much easier to use and readable, otherwise use custom attributes. If your design needs more marker interfaces then recheck your design, there must something wrong in your design or I might be wrong.

... Read More »

Dialog boxes on Windows forms will be hidden if you are actively in a different window and you will not be able to notice, especially Adobe Acrobat Reader and Visual Studio Team Foundation Client Network login credentials dialog box. for example you started Acrobat Reader and opened some other program while the first is still loading. Adobe decides to update itself and waits for your response. You would be noway notified about this pending request no where on Toolbar or system tray alerting you. Sometimes if you try to open a second adobe document without attending the first request, you are freezing your machine for good time. until you hit ok to the first one, good luck to find it out, because that dialog box is hidden under the main document and if you don't see it until you close the main document.

The issue with VSTS is simple, your logon dialog box is not notified but atlest it will be on top of the visual studio 2005 editor, so you can't minimize it unless you answer that dialog box.

Frustrated

... Read More »

Install Visual Studio 2005 RTM. Download and install "Visual Studio 2005 Web Application Projects" at http://msdn.microsoft.com/asp.net/reference/infrastructure/wap/ Install "C# LINQ Tech Preview Update for Visual Studio 2005 RTM Release" from the Downloads section at  http://download.microsoft.com/download/4/7/0/4703eba2-78c4-4b09-8912-69f6c38d3a56/LINQ%20Preview.msi    Start Visual Studio 2005 and create a "New Project" (NOT a New Website). In project templates under Visual C# Project Types, select "ASP.NET Application", type a name for the project and click OK. Close Visual Studio 2005. In Windows Explorer, go to the newly created project folder (typically in My Documents/Visual Studio 2005/Projects/ProjectName/) and open the .csproj file using notepad. Replace the following line:  



... Read More »

I found this thread interesting and kudos to Hector Cruz for. This thread shows how to create a LINQ enabled VB.NET Web Projects Template.

Here is the link: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=290434&SiteID=1

I am able to successfully test LINQ and WWF together.

All you have to do is use C#3.0 in other words compile using C#3.0 compiler.

Open your CSProj file and replace the following lines

   

with

   

And ofcourse I am using the same example to show the simplest and dirtiest way of doing it.

=========================

 

using System;

using System.ComponentModel;

using System.ComponentModel.Design;

using System.Collections;

using System.Collections.Generic;

using System.Drawing;

using System.Workflow.ComponentModel.Compiler;

using System.Workflow.ComponentModel.Serialization;

using System.Workflow.ComponentModel;

using System.Workflow.ComponentModel.Design;

using System.Workflow.Runtime;

using System.Workflow.Activities;

using System.Workflow.Activities.Rules;

using System.Text;

using System.Query;

using System.Xml;

using System.Xml.XLinq;

... Read More »

I know the coding style is totally bad, I ignored it because of two reasons:

Lazy Learning process should be quick. ========================== Begin Code ==========================

using System;

using System.Collections.Generic;

using System.Text;

using System.Query;

using System.Xml.XLinq;

using System.Data.DLinq;

 

namespace LINQCon

{

    class Program

    {

        static void Main(string[] args)

        {

            //Bad way of creating a list of persons, but thats ok, it is only for learning LINQ,

            //not to show my coding skills. :-)

            Person person1 = new Person("John", "Lewis", Convert.ToDateTime("08-11-1973"), "male", "222-33-4444");

            Person person2 = new Person("Sam", "Walker", Convert.ToDateTime("09-11-1974"), "male", "333-44-7777");

            Person person3 = new Person("Sarah", "Lee", Convert.ToDateTime("08-19-1972"), "female",... Read More »

     
WWWCoder.com Weblogs
Host your weblog here at WWWCoder.com for free. Just sign up for membership and you'll see a link on the left which will allow you to create your own weblog. We do ask that all blogs have a technical theme and be in English.
     
     
     
     
Copyright 20010 - Santry Technology Solutions, Box 172, Girard, PA 16417, (814) 774-0970
Privacy Statement | Terms Of Use