Skip to main content

Posts

Showing posts from February, 2014

AOP using RealProxy (custom implementation) - Part I (RealProxy)

This days I read a post from MSDN Magazin e about RealProxy. Using RealProxy you can control the call itself of a method, alter the result or the input. We could say that this is the door for AOP (Aspect Oriented Programming) without using a specific stack. The most important method of RealProxy is “Invoke”. This method is called each time when a method from you specific class is called. From it you can access the method name, parameters and call your real method or a fake one. Before saying “Wooww, it’s so cool!” you should know that this will works only when you use also the interfaces. Reading the above article I had the idea to see if and how we can implement a duration profiling mechanism that is based on attributes. If a method from your specific implementation had the custom profiling attribute, than automatically, the system will measure how long it takes to make a specific call. First step is to create a custom attribute, which accept a custom message that will be written...

Automated Backup - Windows Azure Web Sites

We have a new feature available for Windows Azure Web Sites – we can create backups automatically of our site and database that can be used later on. To be able to use this feature, you will need to change the web site mode from free to standard. Only for standard web sites this feature is available. When you are in the standard mode you have multiple instance sizes and you can scale your site automatically. From the cost perspective you should know that there are no additional cost to it (automatically backup feature). You only pay the space used by the backup on the storage. This is a nice think, we have another nice service that is free. When we activate the automated backup feature we will need to specify the storage account where we want to make the backup and what is the frequency. In this moment we can specify only in days the frequency, but I don’t see this a real problem. In normal cases, you don’t want to make a backup every 5 minutes. Beside this, you can specify the ti...

Where to store the ID’s of the entities used by external services

A normal medium or complex application that discuss with different services of 3rd parties or stores data in the different repositories has different modules for each communication layer. In general, we can have a different component for each external service that is used (as in the image below). Each external service usually has its own custom entities that are used to send data on the wire. For example the user entity for Twitter, Facebook and your own repository would be different. Each of this modules would have a wrapper for that specific service that is used over the wire (and to convert the entity to the POCO of the specific service). It is not important where the logic from the yellow box is (in the same class, in different class or modules). But in one way or another we would have something like this. The logic of your application could work with specific objects that are defined only in your application. For example you could have your own entity User, which would co...

ITCamp 2014 - Call for Content

From 22-23 May 2014, the 4 th edition of ITCamp will be organized in Cluj-Napoca. The last 2 days are dedicated to technical talk related to architecture, IT trends, technologies, web, cloud, big data, agile process, tools, different development techniques and so on. In one word at ITCamp we are talking about IT and software development. The main focus at this conference is Microsoft stack and related technologies, but in our days this is not only C#, we have JavaScript, F#, Hadoop, PHP over Azure and many more. If you want to sustain a session and speak to a mature and high trained audience, that this is your chance. ITCamp is the biggest IT conference from Transylvania. The duration of talks is 60 minutes in a lectures format. Also, each year we are open to try other formats also, so if you have an ideas than you should contact ITCamp team. For more information related to the Call for Content please visit the following link:  http://itcamp.ro/callforcontent.cshtml  ...

Software Metrics Tools that are 'Pushed' by companies

In the last period of time I have been involved in different projects where quality is extremely important. Because of this we started to look around us and search for tools that can measure the quality of software (of the code itself) – software/code metrics. This is why, this year I had some posts related to Sonar and different software metrics. Personally I looked on different tools that can measure this metrics and can share the content in a consistent and easy way. Until now, my search stopped over Sonar – that is a great tool, but can give you headaches when you need to configure it. There are many companies that tracks the software metrics. This is a very good think. But in the same time I observed that this companies usually push only one tool that can be used to measure this metrics – THE TOOL. For them it is not important what kind of language you use for developing or if the given tool suites your needs. For them that tool is a standard and you need to obey. Is this a g...

Windows Phone Developer Registration (Unlock) - Error Code 0x64

Each time when I need to unlock a Windows Phone device is a new experience for me. I think that each time I face the 0x64 error code. First time when you see this error you look at the device time and date. You check it and see that it is okay. After that you start to look over the internet and see different solutions, from the one that say that you should click register button immediately when the error is displayed to the one that say that the problem is from 64 bits system and give different solutions. I all the time forget about the root cause of this problems. Usually the device that I registers are company devices that are for development. Because of this I don’t have a SIM inside them or are connected to the Wi-Fi network. It seems that when you want to register for development you need to have access to the internet from that device. All that you need to do is to connect to the Wi-Fi network from the device and of course set a valid time and date. I don't know why the p...

[Software metrics] Lack of Cohesion of Methods - LCOM4

In one of my latest post we talk about Mean Time Between Failure software metric (MTBF) . We saw that this metrics is very useful when we need to make an idea about what is the quality of our software that is in production. Today we will talk about LCOM4 (Lack of Cohesion of Methods). The main information that we receive from this metric is the number of responsibilities (functions) that a class has. When we have a low cohesion means that we have a bad design, with classes that are very complex. This can also indicates that the class are complex, very big and can produce a lot of bugs. When we have a high cohesion that we have a very good encapsulation, each class do only one thing but it does very good. Normally, this class are not very long, the complexity of them is not very high and are simple to understand and work with. The only problem that can happen with this class is related to testing. Sometimes, this class are pretty hard to test because the coupling level between them i...

Different methods of creating CRON jobs on Windows Azure

In the last couple of weeks we saw a lot of new features related to Windows Azure. In this moment if want to run a task or a job on Azure we had a lot of possibilities starting from Worker Roles and ending with Web Jobs or Schedulers on Mobile Services. In this post we will look over a part of the services that are available on Windows Azure to run different jobs. For each of them we will try to identify the best case when we can use them. We will start with Worker Roles . Theoretically behind the Worker Role we have a VM that gives to us the full power of the CPU and Memory that is available on it. On such machines we can run the most complex jobs that we can have. On such roles we can implement any kind of jobs, without any kind of limitations. Because the VM is managed by Azure platform we don’t need to be worried about OS, security updates and so on. I would use this kind of machines if I would need to process an audio stream, generate an ISO with a custom content or doing so...