Skip to main content

Posts

Showing posts from October, 2012

Windows Azure Tools - Error 0x80070643: Failed to install MSI package

Today I had to install Visual Studio 2012 and Windows Azure 1.8 SDK for a new project. Everything went as a charm; I didn’t have any kind of problems. But after a while I realized that I had a project that is written in .NET 4.0 and use Windows Azure 1.6 SDK and an update to 1.8 is in this moment is not possible. After installing Visual Studio 2012 and Windows Azure 1.8 SDK I tried to run my old project, but without success. In that moment I realize that I have a big problem, because I will not be able to provide support for that project. I uninstall Windows Azure 1.8 SDK, installed 1.6 but without success. I tried to uninstall Visual Studio 2012 with success. After that I accessed Windows Azure web site and download Windows Azure 1.6 SDK and Windows Azure Tools 1.6 but I received an error when I tried to install Windows Azure Tools 1.6. Error 0x80070643: Failed to install MSI package I tried to repair Visual Studio 2010, uninstall and reinstall all the kits related to Windows Azure

Visual Studio - How to see the source code of .NET framework

Every time when I’m installing Visual Studio one a clean computer I have problems remembering the steps that need to be done on Visual Studio to see the source code of the .NET framework. In the next lines we will look over the steps that need to be done. Next time when I will need to make this configuration I will come back to this post. We need to go in Visual Studio menu, under Tool->Options and select the Debugging tab. In the general node we will need to check/uncheck the following options: Uncheck the “Enable Just My Code (Managed only)” Uncheck “Require source files to exactly math the original version” Check “Enable source server support” In this moment we are almost done, the only think that we need to do is to double check under Symbols node that “All modules, unless excluded” is checked. In general I prefer to create a custom path where the symbols are downloaded. While you are debugging, if you have any kind of problems loading this symbols, go on the

Design a state machine mechanism using Windows Azure Service Bus (part 2)

In my last pos t I presented how we can implement a state machine using Windows Azure Service Bus Topics. In this post we will see the real code that we need to write to make this possible. We will start from a simple example. Let’s imagine that we have 3 states machines: Added Initialized Processed Each state change will required a custom action to be executed. When changing the state from Added to Initialized we will need to calculate some values. Changing the state from Initialized to Processed will required to store the sum value in a repository. Messages in state Processed will be logged. We will implement this using Windows Azure Service Bus Topics. For each state we will have a different subscription that will process messages with the given state. Each action that needs to be done at each step will be made by the process (machine) that receives the given message from subscription. In the next part of the post we will cover all the steps that need to be done to be able

How many fingers point can be tracked by Windows 8

Windows 8 brought to us a native support for touch screens. This is a great feature that opens the tablets world for us. For touch support, we have a lot of gestures that are built in. We need only to subscribe to the event that we want to listen. This can be very useful, because we don’t need any more to implement our custom gestures. Tap - one finger touches the screen and lifts up. Press and hold - one finger touches the screen and stays in place. Slide - one or more fingers touch the screen and move in the same direction. Swipe - one or more fingers touch the screen and move a short distance in the same direction. Turn - two or more fingers touch the screen and move in a clockwise or counter-clockwise arc. Pinch - two or more fingers touch the screen and move closer together. Stretch - two or more fingers touch the screen and move farther apart. If we need a custom gesture we can implement it without any kind of problem. This is not recommended because the user will need

Design a state machine mechanism using Windows Azure Service Bus (part 1)

In this post we try to see a possible solution to implement a simple state machine (with a simple workflow) over Windows Azure Service Bus. Let’s imagine a system that needs to process over 1 million requests per day. Each request that enter in the system will pass through different statutes until the process will be finished. If we have simple rules, it will be very easily for us to implement a system that will process each request and change the state of our request. This can be imagined as a simple workflow, where a request flows from one state to another. At each step, we are making executing a small action. The big question here is how we can design a solution in a way where we will don’t have any kind of scalability problems. The biggest problem that can appear at this step is related to scalability and distribution the logic over machines. This can become a nightmare when death-locks appears or when the system will reach his limits. The costs of hardware’s that will help us t

Day 4 of Software Architecture 2012 & Agile and OO design

Today was the last day of Software Architect 2012 . Last day was dedicated to workshops and I decided to join Allen Holub session: “Agile/OO design from start to finish”. After these days I become a fan of A. Holub and I hope that I will be able to implement a correct OO design. It is pretty challenging, but I promise that I will try to write about this in future. Here are some notes from the presentation that I considered important. A part of them are well known by all of you: Agile is based on communication, but there are people that will not be able to integrate in a team environment. Even if they are great on technical side and have a lot of knowledge, they are not able to communicate and to share data. Sharing is one of the most important things in Agile. The biggest enemy for Agile is EGO. Because of this people will not be able to communicate and different roles will appear – “I am the MASTER and the team need to do as I say.” – WRONG. When we are talking about user-stories

Day 3 of Software Architecture 2012 & Basic Principles of an Object

Day 3 of Software Architect 2012 from London has passed. Today was a great day for science also. I went at 3 sessions sustained by Allen Holub . This man is not only a great speaker, but also knows the programing art extremely good. Like in the other post about conferences where I participate, I will present in some words the things that I consider important. Now we are living in a world that where OOP is everywhere. We are trying to create a model for each object from this world, but there are times when we forget base things. An object should expose a set of functionalities and not information. Sounds odd in our days, where everything is a POCO or a service, but this is how we should write our classes. A world that is formed from POCO and services is not more than a procedural programing. In this case let’s change the name from OO to Procedural Programing. An object should be defined by what can do, what actions contain – public methods; and not by data that he contains. Th

How to NOT expose a read only collection in C#

These days I had the opportunity to make a review over an ecommerce application. They tried to use CQRS and they almost succeeded.  I notified a problem on their queries classes that can become a big problem in time, if you want to sell this solution as a platform. Also, from some perspective, these problems also violate the CQRS principle. Let’s see some code now: public class Order { Collection<OrderItem> _items; public IEnumerable<OrderItem> Items { get { return _items; } } ... } What do you see here strange?  We want to expose the OrderItem collection as a read only collection. To do this, we convert it to IEnumerable. Hmmm… sounds good? Nope. Big mistake! Nobody stop us to convert the Items back to an ICollection and Add/Remove items from it. Order order = new Order(); … var orderItems = (Collection<OrderItem>)oder.Items; What should we do? .NET framework has specials collections that can be used

Day 2 of Software Architecture 2012 & How an architect should be

This week I attended to Software Architecture 2012 conference from London. This was the second day of conference with 4 sessions per day on six tracks simultaneous. Here is the blog post of day one. There were great sessions about how software design and architecture. I really enjoyed the keynote, where Simon Brown talked about how software architecture should be. One thing that he mentioned and I thing that is very important is what an architecture should do. I think that we know a lot of architecture that don’t write code anymore and don’t learn new technologies. They climb on the Ivory Tower and when we have a question throw a response like: “Implementation detail”. How you can define a solution when you don’t know the technology? Yep, that type of “guru” is only a PowerPoint architected and nothing more. He is the perfect person that can draw components on a white paper and the first person that will run when a project will have problems. In that moment he will show t

Different methods to implement Message Aggregator pattern using Service Bus Topic – CorrelationId

In one of my last post I presented the Aggregator Pattern . The main purpose of this pattern is the ability of the consumer to combine (aggregate) messages. This pattern can be implemented in Windows Azure using Windows Azure Service Bus Queues or Topics. There are two different implementation for this pattern. The implementations are extremely different and also can affect our performance. The first implementation requires using the Session support from BrokeredMessage. What this means from the code perspective? We need to set the Session each time when we want to send a message. The consumer will start to consume the messages with the specific session id. This solution is simple and it works great when we don’t have a lot of messages. For example if we have only 9-10 messages. The first advantage of this implementation is on the consumer side. We don’t need to create the consume before messages are added to the Service Bus. The messages will be persisted in the Service Bus infrast

Windows Azure Service Bus Patterns - a comprehensive look at patterns that can be used in combination with Windows Azure Service Bus

In the last period of time I posted a lot about pattern that can be used in combination with Windows Azure Service Bus. This is the list of all the patterns that I presented until now: Message Splitter Pattern Message Filter Pattern  Message Aggregator Pattern Recipient List Pattern    Resequencer Pattern Content-Based Router Pattern Scatter-Gather Pattern  Dynamic Router Pattern  If you want to find more information about Windows Azure Service Bus Topic, please follow this LINK . For more information about Windows Azure Serbice Bus Queue please follow this LINK .

How to force browser to updated the Silverlight package from client?

Where developing an application in Silverlight you will need to create more than one version of the application. Each new version of the application will require each client to clear the cache (CTRL+F5). Normally, you don’t want the application to be downloaded each time.  Because of this, you will not configure the package to expire after a specific period of time. But what happens when you have a new version of the application? You cannot tell to the clients to clear the cache. A simple solution for this problem is to version your assemblies. When you deploy on IIS server a new version of the application with the assembly version updated, the new version of your application will be automatically download from the server. If you don’t know how to version your assemblies you can visit the following link: http://vunvulearadu.blogspot.ro/2012/05/how-to-change-version-of-our-solution.html Don’t forget to update the assembly version each time when you make a deploy.

What should I do when I receive "4.1 Your app must comply with the following privacy-related requirements"

The most of us are developer; we are technical persons, which do their stuff better than anyone. But besides this, when we are developing a Windows Client application for Windows 8 (Metro App) we don’t need to forget about the legal stuff and similar things. We don’t like them, but we need to resolve them also. If you have an application that use internet connection, access a backend server, share data with another 3th party like Facebook, Twitter or another system than we should have a simple privacy policy in our application. From now one this is a MUST, even if in the past was optional. If you try to submit your application without privacy policy that you will receive a big reject with the following message: "Your app doesn't meet requirement 4.1" (Privacy) What I recommend, is to add a privacy policy even if you don’t thing that you store, share the user data. Why? Is safest for you and you don’t need to submit the application again if you will have this problem.