Another Way to Localize Application

Total: 7 Average: 2.9

I would like to introduce a simple way to localize applications. I do not like the standard mechanism with resource assemblies for the following reasons:

  1. When receiving a value of a localized string in the code, I would like to rely on OOP and compiler prompts. It is very unpleasant to generate a project on Friday evening, and on Saturday morning, to get a call from QAs working overtime that someone inattentive wrote GetResource (“asdf”) instead of GetResource (“assf”). Thus, now something crashes or is displayed incorrectly. In addition, the project is to be “put to print” on Monday… Read More

Implementing OOP Inheritance in Classes that work with SQL and Entity Framework

Total: 5 Average: 2.6

This article is about creating a data model that would nicely fit SQL and contain “proper” OOP inheritance. I must say that I encountered this problem at various times on different projects, and I solved it in different ways. The names of the approaches are taken from the terminology that has developed on the relevant projects.

Read More

Steps to Reduce Code Size after Use of Strategy Pattern

Total: 2 Average: 3

This article features a few tricks to reduce the size of the code resulting from the use of the ‘strategy’ pattern. As you can deduce from the title, all these tricks will be related to the usage of generic types.

1. Hierarchy of classes involved in magic rituals

Suppose we have an abstract ‘vehicle’ class that can move (the Move method). This class has 3 descendants: a car, a plane, and a rickshaw. Each of them implements the method in its own way: Read More