Perhaps not used too much but it’s very usefull to know. I had to implement data validation on several occasions outside of asp dotnet context.Read more
Perhaps not used too much but it’s very usefull to know. I had to implement data validation on several occasions outside of asp dotnet context.Read more
A less known yet usefull component in dotnet is the TypeConverter component. This component provides means to convert between data types. If you are wondering which data types are by default supported, just take a look under the hoodRead more
As developers we have a tendency to lean over the functional requirements of our problem in hand but we most of the times ignore the non-functional aspect of our solution, that of code optimization. Too often I’ve noticed a tendency to pin-point the “architecture” or the “programming language” or even the computing power when itRead more
HTTP means Hyper Text Transfer Protocol. It’s the underlying protocol used by the World Wide Web and it defines the formatting of transmitted messages between client and server. This protocol was designed for distributed, collaborative and hypermedia information systems. In 2015 the Internet Engineering Task Force (IETF) released HTTP/2, the second major version of thisRead more
What is dependency injection and why is it important? According to wikipedia is a technique whereby one object supplies the dependencies of another object. This concept may be confusing for some and for others that are in their beginnings in programming it may seem a bit overwhelming or perhaps not necessary. To understand why DI was conceivedRead more
Adding a Day suffix in a DateTime variable is not a complex task, but it should be done properly. In programming while most of the times we deal with logic that is not exposed to the UI there are times when we have to define and format an output for the client UI. In thisRead more
A lazy object is an object that is not initialized when the application runs, but when it’s first needed. This improves the overall performance of the application and ensures that the memory is not misused. One basic approach is to use the classical construct:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
private static Settings settings; public static Settings Settings { get { if (settings == null) { mutex.WaitOne(); if (settings == null) { settings = new Settings(); } mutex.ReleaseMutex(); } return settings; } }} |
This approach actually works for me and I have usedRead more
“Value object is an object whose equality is based on the value rather than identity.”. “A Value object has no identity and it’s immutable.” Entities are defined by their identity and they represent the fundamental component of a domain. However not all objects may be “identified” and it’s not desirable to do so. As anRead more
It is often a good practice to limit the visibility of third party solutions to the most of your application. Most of the time you will create your own wrapper around a third party library to limit this kind of exposure. Wrapping is similar to the adapter pattern (but in reverse). One problem I recentlyRead more
According to wikipedia a data structure is a data organization, management and storage format that enables efficient access and modification. Data structures are based on the computers ability to fetch and store data in the memory, by a pointer representing a memory address. Keywords vs CLR: All components in .NET derive from System.Object. This means that everything inRead more
Reflection allows data to be determined at runtime by levereging the PortableExecutable file (PE) having metadata information from MSIL and IL. In this example I will show you how to categorize class types using class Attributes. Attributes provide a powerful method of associating metadata, or declarative information, with code. After an attribute is associated with aRead more
Description The factory design pattern belongs to the creational design patterns, it decouples the creation of the concrete object from the parent. In provides an interface that must be implemented by sub-classes and mandates the implementation of factory methods. These methods handle object initialization. This technique will require a bit more work to implement, butRead more
Email Adress
ramihamati@digitteck.com