AngularJS directives are the commands which communicate with angular library and tell angular to do a job on the HTML tags, they extends the functionalities of the HTML elements. AngularJS provides many built-in directives e.g. ng-app, ng-model, ng-repeat, ng-controller etc. Thus, ng-model is used to do data binding. AngularJS also gives us the ability of writing our own custom directives, We can extend the abilities of HTML’s template to do anything, we can imagine.
Factory pattern is one of the most used design patterns. The Factory pattern is a design pattern used to define a runtime interface for creating an object. It’s called a factory because it creates various types of objects without necessarily knowing what kind of object it creates or how to create it.
The repository pattern is closely related to data access and allows us to have an abstraction of the implementation of data access in our applications, so that our business logic does not know or is uncoupled to the data source. In a nutshell this means that the repository acts as an intermediary between our business logic and our data access logic to be centralized in a single point, and thus be able to avoid redundancy code. This abstraction of the data access allows us to decouple and test a simpler way our code, since being uncoupled we can generate unit tests more easily.
The power of caching in ASP.NET is exposed via the Cache object. Using the Cache object which is in the namespace System.Web.Caching, you can store any serializable data object, and control how that cache entry expires based on a combination of one or more dependencies.
Here we go again, this time I will show you an example about how to implement the decorator pattern using a DI container, in this case I will use Simple Injector . I have been working with this container at the office and it has worked really well, it is well documented and has a good performance.
I have finally decided to create my blog about programming and technology in general,I hope this blog will be useful for those who can read these lines.
I will begin for something simple, how we can serialize or deserialize a xml file using DataContractSerializer. The .Net framework release 3.5 included a new serialization engine called DataContractSerializer, this class is the replacement of the old XMLSerializer.