Pull to refresh
12
0
Eugenie Krotchenko @EuGeniec

c#

Send message

SmartTraits or lets add «multiple inheritance» to C#

Reading time13 min
Views1.5K


One of our clients, a developer who used to work with php technologies for quite some time, frequently complained that with the transition to C# and .Net stack, he misses one of his favorite features from the php world — traits and he would like it very much to be able to use such functionality in .Net.

At one point, we decided to make him a present and implemented a proof of concept of similar functionality for C#.

To our surprise, it was quite easy to implement the PoC and the process of development was a lot of fun.
Read more →
Rating0
Comments0

SmartTraits или добавляем «множественное» наследование в C#

Reading time13 min
Views7.6K


Один из наших клиентов, приверженец технологий php, жаловался что с переходом на C# и стек .Net лишился одной из своих любимых возможностей – использовать в своих скриптах traits и что он хотел бы добавления подобной функциональности в продукт разрабатываемый для его компании.

В один прекрасный момент, мы решили сделать ему подарок и реализовали proof of concept схожей функциональности для C#.

На удивление, всё случилось довольно быстро и интересно. Кому любопытно что из этого получилось и как можно попробовать, добро пожаловать под кат.
Читать дальше →
Total votes 24: ↑22 and ↓2+20
Comments31

Aspect-Oriented Programming (AOP) by source-level weaving

Reading time39 min
Views1.8K
image

Aspect-oriented programming is a very appealing concept for simplifying your codebase, creating clean code, improving modularity, structure of code and minimizing copy-paste errors.

Today, in most cases, weaving aspect's advices is implemented at the bytecode level, i.e. after compilation, a certain tool «weave» an additional byte code with the support of the required logic.

Our approach (as well as the approach of some other tools) is modifying the source code to implement aspect logic. With introduction of the .NET Compiler Platform (aka Roslyn), it is quite easy to achieve this goal, and the result gives certain advantages over the modification of the byte code itself.
Read more →
Rating0
Comments0

Aspect Oriented Programming (AOP) через исходный код

Reading time40 min
Views12K


Аспектно-ориентированное программирование очень привлекательная концепция для упрощения кодовой базы, создания чистого кода и минимизации ошибок типа копипасты.

Сегодня, в большинстве случаев, внедрение аспектов идёт на уровне байт кода, т.е. после компиляции, некий инструмент «вплетает» дополнительный байт код с поддержкой требуемой логики.

Наш подход (также как и подход некоторых других инструментов), это модификация исходного кода для внедрения логики аспектов. С переходом на технологию Roslyn, добиться этого очень легко и результат даёт определённые преимущества по сравнению с модификацией непосредственно байт кода.

Если вам интересно узнать детали, прошу пожаловать под кат.
Читать дальше →
Total votes 24: ↑20 and ↓4+16
Comments14

Information

Rating
Does not participate
Location
Новокузнецк, Кемеровская обл., Россия
Registered
Activity