The weather service on CodePlex

December 4, 2009 at 11:11 AMalex

A while ago, I played with the service which provides weather forecasts and designed a solution to convert the web-page content into a simple text message that is delivered to a mobile phone at scheduled time. Since people seems to be interested in this project, I've uploaded it to CodePlex and here it is: http://gismeteoweathersvc.codeplex.com Gismeteo Weather Service The implementation of weather service delivery to your mobile phone using SMS based on data provider Gismeteo (http://www.gismeteo.ru). The service is offering scheduled delivery of the data according to the user's settings, and is running as a windows service. Use at your own risk and at your own expense as I'm not responsible for text messages fees that may apply while you're testing this service. Neither any guarantees regarding the functionality, completeness, blah-blah, see Ms-PL.

Posted in: Development

Tags:

64 bit and native components parity

October 30, 2009 at 11:00 AMalex

If your scenarios include running an assembly in 64 bit, and there are dependencies on native components, i.e. oracle drivers, COM components, make sure that you're running each one in the same processor architecture. There are the following limitations on 64 bit Windows:

  1. Process cannon run 32 dlls in 64 bit address space.
  2. 32 bit COM components cannot be instantiated in using 64 bit assembly.

You can change assembly's build setting settings to x86 if you need to load 32 bit components. Lets go to a few examples. Microsoft Visual Studio is 32 bit application capable of building 64 bit assemblies. If you need to debug 32 bit COM component, you need to build your assembly into x86 architecture. Another example is TestDriven.NET. Latest version, 2.23, by default, matches VS architecture, i.e. x86. If you want to debug Oracle driver, you need 32 bit. You can switch TestDriven.NET to 64 bit to have architecture parity. To run tests in NUnit, I'd recommend to go everywhere with 64 bit, since there is a NUnit 64 bit, and you will be sure that there are no issues once the code is built into the product.

Posted in: Development

Tags:

Scoping Usings

July 13, 2009 at 3:12 PMalex

 

Consider the following code, which results into an error when Figure class is an ambiguous reference to either N1 or N2 namespace:

using System;
using N1;
using N2;

namespace N1
{
    class Figure
    {
        public void  Method()
        {
            Console.WriteLine("N1::Figure.Method");
        }
    }
}

namespace N2
{
    class Figure
    {
        public void Method()
        {
            Console.WriteLine("N2::Figure.Method");
        }
    }
}

namespace ConsumeUsing

    class Program
    {
        static void Main(string[] args)
        {
            Figure f = new Figure(); // Error, Figure is an ambiguous reference.
            f.Method();
        }
    }
}

More...

Posted in:

Tags:

XAML Essential Tools

December 11, 2008 at 10:26 AMalex

 

If you're doing a developement for WPF/Silverlight, these are the essential tools aiding you in routine tasks such as viewing an object graph or auto-generating a business form from your code:

http://karlshifflett.wordpress.com/mole-for-visual-studio/

Mole is a Visual Studio visualizer. Visualizers have been part of Visual Studio since version 2005. During debugging sessions, visualizers allow developers to view objects and data using a customized interface. Visual Studio ships with several simple but useful visualizers. Many developers have posted visualizers for .NET classes.

http://karlshifflett.wordpress.com/xaml-power-toys/

XAML Power Toys is a Visual Studio 2008 SP1 Multi-AppDomain Add-In that empowers WPF & Silverlight developers while working in the XAML editor.  Its Line of Business form generation tools, Grid tools,  DataGrid and ListView generation really shorten the XAML page layout time.

Posted in: Development

Tags:

The fact: Microsoft Exchange Team was an original developer of AJAX

September 17, 2008 at 10:39 PMalex

This is a really nice story indeed regarding how some techniques were developed just for utility purposed and later evolved into hot technology now known by the name as AJAX. Read on from the former Exchange guy at http://www.alexhopmann.com/story-of-xmlhttp/

 

Posted in:

Tags:

The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.

August 7, 2008 at 3:26 PMalex

 

If you are getting the message in your asp.net web application with Microsoft Enterprise Library installed:

The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.

this means that the category of the performance counter, that your application is trying to use is not registered. Try to find that assembly, that has the installer and using InstallUnit from .Net framework, execute the installer with the following command:

InstallUtil.exe /i YourAssemblyName.dll

In addition, if something went wrong during the installation of Enterprise Library, execute C:\Program Files\<Microsoft Enterprise Library dir>\InstallServices.bat

 

Posted in: Development

Tags:

CoolCommands for Visual Studio 2005 and Visual Studio 2008

July 30, 2008 at 9:16 AMalex

Give a try for the CoolCommands for the Microsoft Visual Studio 2005 and Visual Studio 2008, which includes all the commands Microsoft should've included to the bundle from the vey beginning:

http://weblogs.asp.net/GMilano/archive/2006/02/27/439208.aspx

 

Also, if you're struggling from the poor IDE performance when your solutions are relatively big, following those guidelines might be a relieve: Go to first article to apply the tips and see if that is enough. If not, go to the second article...
http://www.thekua.com/atwork/?p=29
http://weblogs.asp.net/scottgu/archive/2006/09/22/Tip_2F00_Trick_3A00_-Optimizing-ASP.NET-2.0-Web-Project-Build-Performance-with-VS-2005.aspx

Posted in:

Tags:

The thoughts on C# 4.0

July 27, 2008 at 5:10 PMalex

So, what we expect in the next iteration of the C# called C# 4.0 as a development community? You've probably heard that the core team is working on the next version and they put quite an efforts on the expanding the possibilities of the language. If you didn't, check this video from the Channel 9 where they have core guys talking about what is on horizon: http://channel9.msdn.com/posts/Charles/C-40-Meet-the-Design-Team/ C# will contain many features tailored for the better integration with the dynamic constructs of the modern design approaches, which already exist in primitive form today.

I'd like to see more features brought to it to support more parallel programming, such as this addition that exists today: Parallel Extensions for .NET framework http://www.microsoft.com/downloads/details.aspx?FamilyId=348F73FD-593D-4B3C-B055-694C50D2B0F3&displaylang=en This is besides an ADO.NET Entity framework http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx In addition, we want to see tightly integrated with IDE application services for virtualization: http://blogs.technet.com/softgrid/archive/2008/06/17/microsoft-application-virtualization-4-5-release-candidate-is-now-available.aspx

Posted in:

Tags:

Remoting Compression Sample

July 25, 2008 at 10:22 AMalex

There are requests from the business to increase the amount of data to be passed through remoting. Due to the know fact that the default binary serializer is very chatty, the amount of data passed through the channel is very large. There is a global solution, which allows to compress the remoting requests and responses thus alleviating the problem of exceeding the remoting maximum request size.

I was looking at the possible design approaches related to the compression of the remoting and found that extendable remoting framework architecture allows the following as depicted on the diagram:

diagram

Next we will review the sample code with the custom compression sink, which represents the typical application designed with layered architecture.

More...

Posted in:

Tags:

Unit testing user controls in ASP.NET applications

May 30, 2008 at 4:43 PMalex

 

After trying several times to start writing a testing framework for UI layer in one of my applications, which I should acknowledge were not really successful, I finally came across the Scott's blog post on best practices related to reusing the user controls between the projects at http://msdn.microsoft.com/en-us/library/aa479564.aspx. The trick is to reuse the user control from the application in another project, which implements the test harness. In just under an hour, the working prototype was created in Visual Studio 2005. And this does not require any third-party tools such as NUnitAsp and could be build from the scratch, which I prefer over the bloating the code with unnecessary dependencies on the external tools. Alright, so that means that the work can be done in truly test-driven approach and result in to the higher quality of code.

Posted in: Development

Tags: