Thursday, June 30, 2016

DotNext - Conference .IT-Technology, Moscow, December 11

Within 2 weeks in Moscow will host the next conference of .NET-DotNext. And to be able to share lessons learned, share their updates at the same time just to talk with one of the largest communities of .NET-developers of the former Soviet Union to have become a good tradition to take active part in it.

In general, it is great that there is such a conference, where you can listen to interesting technological reports and experience the real hardcore-in .NET and various fields.

DotNext 2014 Moscow

Enhanced functionality EPLAN. Creating a Simple Add-In in C #

Expanding functionality EPLAN using Add-Inov in C #

EPLAN - a platform for cross-cutting design, covering the following sectors: electrical engineering, instrumentation, hydraulics / pneumatics and mechanics (design cabinets and wire harnesses). The open architecture and standard integration modules EPLAN can be cost-effectively integrated with a wide range of third-party solutions: mechanical design systems, ERP and PDM systems, building engineering systems, industrial plants and ships.

The use of EPLAN

• Automotive
• Mechanical Engineering
• Metallurgy
• Chemicals and Pharmaceuticals
• Food Industry
• Oil and gas
• Pipeline transportation
• Oil and gas processing
• Production of heat and electricity
• Transmission and distribution of electricity
• Railway transport
• Water supply and sanitation
• Machine
• Light industry
• Building Automation

Basic Platform Modules

Modular application on WPF + Caliburn.Micro + Castle.Windsor

First I want to specify that this article refers to a modular application. So, we assume a modular application is an application that consists of so-called shell and a set of plug-ins. Between them there is no direct relationship, only through contracts. This allows to make changes independently of each components composition change them, etc. I think, all without me well aware of the benefits of a modular architecture.

image

Perhaps the most well-known framework for creating WPF applications with such architecture is a Prism. In this article I will not make comparisons, because I have no experience of using the Prism. After reading the tutorial, the Prism with all its regions, mefom and other artifacts, seemed much complexity;. If the reader who knows the Prism, rightly tells me my wrong and advantages of the framework - I will be grateful.


Tektronix oscilloscopes Office from Visual Studio

With similar problems faced rare, but if it happens, it is very nice to read a comprehensive article that will quickly begin productive work, not to break the whole day head the question "What to download?", "Where can I find?", "How is it working?" . I have a similar problem arose in the development of automated test bench for testing boards. In the process of solving a number of problems, and information on the internet about this fairly small due to the narrowness of the problem. This article is the most detailed and clearly describes the main points for a quick start working with Tektronix oscilloscopes from Visual Studio.

First you need to download and install TekVISA driver (need to be registered, otherwise you will not be able to download the necessary drivers).

Wednesday, June 29, 2016

Conference DotNext 2015 Moscow: final review of the program and reports

Prior to Russia's only .NET-conference DotNext left nothing at all - two and a half weeks. The conference program is formed, and we are proud to introduce you to her:
26 reporting - 2 keynouta and 24 session.
22 Speaker, of which seven (!) Are the title of Microsoft MVP
4 rooms in which the reports will go hand in hand.

Participants can not worry - all of the reports that they will miss, will be available to them in the video the next day.

The grid will be updated this week: Rooms have different sizes, and need to understand what the reports within the timeslot popular to the most popular report put on the first, the biggest, the hall, not very popular reports - the fourth hall.

A month ago, I announced the first 7 of them, and now it's time to short run and others.


Component-oriented engine in C #

Independent components minimally know each other, who can perform only the goal - it's incredibly cool! On the initial sketches and ideas, I wrote in a previous post.

Since then, it happened to encounter new challenges, which forced to expand and modify the system.

All the advantages and disadvantages, as well as a small experience I will consider the example of a very simple 2D physics with gravity, forces and collisions. Welcome to a cat, my friends!

introduction

In his free time intensively engaged in his own project, which was created exclusively for the sake of learning, but because just teeming with bicycles. Probably the "engine" - one.

Note: of course, I understand that in the context of real problems it is advisable to take a ready-made solution and use it as the woodcutter takes the ax and chop wood to them. Just sometimes you want to understand how these axes, hell, are arranged.

Another way to implement a binding-computable properties in WPF

For example, there is a project in the WPF and the ViewModel in it, in which there are two properties of Price and Quantity, and computable property TotalPrice = Price * Quantity

Code
public class Order: BaseViewModel
    {
        private double _price;
        private double _quantity;
        public double Price
        {
            get {return _price; }
            set
            {
                if (_price == value)
                    return;
                _price = value;
                RaisePropertyChanged ( "Price");
            }
        }
        public double Quantity
        {
            get {return _quantity; }
            set
            {
                if (_quantity == value)
                    return;
                _quantity = value;
                RaisePropertyChanged ( "Quantity");
            }
        }
        public double TotalPrice {get {return Price * Quantity; }}
    }
    public class BaseViewModel: INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void RaisePropertyChanged (string propertyName)
        {
            var propertyChanged = PropertyChanged;
            if (propertyChanged! = null)
                propertyChanged (this, new PropertyChangedEventArgs (propertyName));
        }
    }


If Price will be changed in the code, the price changes are automatically displayed in the View, because ViewModel View report of Price Change by calling the event RaisePropertyChanged ( «Price»). Computed TotalPrice did not change in the View, because no one is RaisePropertyChanged ( «TotalPrice»). You can call RaisePropertyChanged ( «TotalPrice») in the same places where called RaisePropertyChanged ( «Price») and RaisePropertyChanged ( «Quantity»), but do not want to spread over a plurality of information on places that TotalPrice depends on Price and Quantity, and I would like to store this information in one place. To this end, a variety of people write dependency management, but let's see what is the minimum code is actually needed for this.

Tuesday, June 28, 2016

Simply write a plugin for ReSharper

The goal: to write, test, and deploy a simple plug-in for R #, contains custom Quick-Fix and Context Action.

Article Plan:
Setting up the development environment
Example №1: the simplest extension stub
Installing the plugin
Debugging tips
Example №2: code modification using the R # API
Functional testing tools plugins R # API

Cast:
Visual Studio 2015
ReSharper Ultimate 10

I invite interested under the cut.

1. Setting up the development environment


The most simple and reliable implementation of the Dispose design pattern

It would seem that this pattern is not just easy, and very simple, not analyzed in detail in a well-known book.

However, so far, even within the same project, it can often be implemented in different ways, creating a zoo bicycles, crutches and leaks.

I would like to share their way of implementation, which is based on the minimization of the invention, a bike, a maximum reduction of the amount of code and increasing its expression and transparency.

Preconditions

No mixing managed and unmanaged resources

Monday, June 27, 2016

Chapter 2 Automatic calculation of the properties of computable representations of models in .NET

For example, to support the last-described relationship, the programmer must write a large number of routine code (the situation is even more complicated if there is a chain of dependence is not one, but several collections):

Subscribe to ObservableCollection changes (via INotifyCollectionChanged interface) representing Orders.
Subscribe to PropertyChanged each item in the collection (order) to monitor changes in the properties of Quantity.
Maintain the relevant subscription date: unsubscribe from the elements removed from the collection, and to subscribe to add, unsubscribe when you change an instance of the collection itself from an old collection, and to subscribe to the new event.

Automatic calculation of the properties of computable representations of models in .NET

Motivating the example representations of models for WPF UI

Start a discussion and get acquainted with the issues under discussion is offered as an example approach to architecture, user interfaces in WPF.

As you know, one of the main features WPF - bayndingov is a powerful system that allows easy enough to separate the model representation (the model) from the presentation (the View) as such. Typically, a programmer creates XAML to represent, bind properties of elements to the model in the same XAML by bayndingov and, in fact, forget about the View. This is possible because most UI-logic can be realized through the impact on the model and automatically prokinut on the UI by bayndingov. With this approach, the model plays the role of the state of View, as its proxy for a layer that implements the UI-logic. For example, changing the property of the model, we thereby change the corresponding property of the View (or its components). The latter occurs automatically thanks bayndingov system which tracks changes in the model and in View, synchronizing state at both ends as required. One of the ways in which the model can notify observers (whom in this case is baynding) of its change is throwing PropertyChanged event with the name of the changed property as parameter. This event belongs interface INotifyPropertyChanged, which, accordingly, must be implemented in the model.

Development on the .Net Solution Corp

Hello! The main speech will go about developing on .Net, that is, using Microsoft Visual Studio, ReSharper, Nuget and others.
I think many of you have developed great solutions (in msdn - solution), with many sub-projects. And in this case often becomes a problem of synchronization Nuget packages, build settings, etc. And, of ReSharper here to help little, except that he also begins to be confused in a variety of libraries.
To check the source code has been made an Open Source solution - SolutionCop, which is free to use.
For a start I will give a couple of examples of when not prevented verification of our solutions.

Example 1: The different versions Nuget libraries.

For example, there are three projects: exe, dll1 and dll2. exe refers to both libraries, each of which refers, for example, at RX. But dll1 uses RX 2.2.0, and dll2 - RX 2.2.5. In fact, you can not immediately get an error, because the function signature is more or less the same, moreover, MsBuild often collects projects at one and the same order. However, this configuration can lead to problems that appear after deployment'a when all the unit tests pass (as they refer only to your library), and when the result will prepare a set of files.