Who doesn’t know Angularjs?!? Everyone worked is web, mobile, server, windows, mac, Linux, Google, Microsoft or anyway related to this knows about it. And its fun when people tell me You know about angularjs. Its pretty hot now a days. I’m planning to learn it. Oh man… Ok I am no expert here in Angularjs. And I prefer not to be expert with any framework. Be it anything.
Command pattern is a pattern which allows executor of the pattern to execute or playback the commands. In most of the application wherever Undo/Redo is implemented this pattern is used. Here is C# code. Now, in this code Command Pattern is not in its purest form. As, normally in command pattern we are saving state of outside object. Instead I just returned the result to mock out side object.
Another pattern that is widely used in Object Oriented world. And as far as .Net world is concern it is may be most used pattern in wide range of .Net API. And it heavily used in heavily used LINQ API. So, I guess giving a understanding of that is kinda waste of space. Have a look at C# code. People familiar with LINQ and lovers of Lambda will definitely argue that this is can be replaced by delegates.
The fun part working or explaining functional pattern is word functional can be used in very fun way. Just like it is used in title here. Now, factory pattern may be the most used pattern in Object Oriented world. Here is code in C#. Factory method is basically used to abstract away the object creation. I am not worried how object is created but I am worried about the behavior of the objects that are created.
As functional programming is taking pace in current software development. There is always a question what is the difference and why on the earth I should bother about it. Most of the time reason of the question comes because of human nature of resistance towards learning new things. And then there are people who can easily learn new things but even for them unlearning something and re-learning new things is pretty tough.
There is a continues war between typed and untyped data. But then there is need of finding a middle ground for ever growing application. There is place, a requirement when I feel application should be typed and data store should be untyped. So, I created this little code snippet to access cloudant (a couchbase fork) NOSQL database. I was knowing about Cloudant from long back. Even before IBM bought it. It is indeed a wonderful service and also kinda free for small stuff.