In C# we have
Extension methods enable you to add methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type.
An extension method is a special kind of static method, but they are called as if they were instance methods on the extended type.
However in one of our lesser design moments, we started replacing concrete classes which contain business logic and moving them to
The advantages seemed neat at first e.g we could replace something like this (very simplified example).
var AddressUtils = new AddressUtils(); AddressUtils.CleanAddress(order); var ValidationUtils = new ValidationUtils(); ValidationUtils.ValidateCustomer(Order);
I.e we were replacing a lot of Stateless instantiable Classes with short-hand static methods (syntactic sugar) that made the code more readable. This has really never sat well with me.
We now have a bunch of static classes with miscellaneous methods in them, the vast majority aren’t even generic or interface driven. I.e single use.
Adding to this there is this common notional that static classes are not a good fit for test driven development.
So the alternatives really are
- Go back to concrete util style helper classes
- And/Or Encapsulate the logic in some sort of DI service
- Or add the logic to the Model it self.
- Or having reusable logic sprinkled out over the various services that need to use them.
In regards to the second last option, order (as most of the the models) are actually Data entities, (and that once again) doesn’t seem right (or even feasible) to push the business logic down to the domain models
So i’m left with (unless there are some better patterns) helper classes, Extension methods, DI services, some sort of entity based logic, or a unpredictable spaghetti factory.
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!