Using model property of type IEnumerable<T> for table column headers in ASP.NET MVC
I have paged results class that I am using to display paged data to users. I had problem with getting names of returned result properties to table headers in views. It works automatically if model implements IEnumerable but not if your IEnumerable is property of model. Here is the solution I found from Stack Overflow with little improvement.
Command Pattern
Command pattern is object behavioral design pattern that helps you handle different activities in application using same interface. I’m Command pattern is object behavioral design pattern that helps you handle different activities in application using same interface. I’m using Command Pattern in some of my systems to handle similar actions together and to split more comples operations to smaller steps by example. In this posting I will give you overview of Command Pattern.
Transaction Script Pattern
Transaction Script (TS) is the simplest domain logic pattern we can find. It needs less work to implement than other domain logic patterns and therefore it’s perfect fit for smaller applications that doesn’t need big architecture behind them. This posting focuses on TS pattern by illustrating and analysing it. Also some good hints for implementation are provided.
Microsoft .NET: Architecting Applications for the Enterprise
Enterprise applications need good architecture to survive ever-changing demands of customers. At same time these systems must be stable, convenient and easy to use which leads us to need of good architecting skills. Some customers need desktop applications while others need web-based and mobile applications. Making good architectural decisions is not easy and this is where brilliant book Microsoft .NET: Architecting Applications for the Enterprise by Dino Esposito and Andrea Saltarello comes in. (more…)
Using web.config transforms with NLog configuration
I’m building a web based hybrid system that can run on-premises and on cloud. On development machine I want NLog to write logs on disk. When system is deployed to cloud I want NLog to write logs to Windows Azure Table storage. In this posting I will show you how to use web.config transforms with NLog configuration.
Design Patterns: Elements of Reusable Object-Oriented Software
Design Patterns is golden classics of software design books written by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides (aka Gang of Four – GoF). When this book was published first it was revolutionary because it contained still undocumented knowledge from software development field that needed some systematic work and organization on it. Today we see these patterns in many programs and developers on different platforms are more and more aware of these first defined design patterns. If you are software developer then this is must-have book for you.
How to avoid throttling SQL Azure database with NHibernate
Lately I had one weird experience on with running NHibernate on Windows Azure and I think it’s worth to share with you. NHibernate is matured industry-level ORM that is proven itself over years. Although it is not so easy to use as Entity Framework it is still my favorite due to flexibility and wide databases support it provides. In this posting I will show you one important trick with enum mappings. When ignored you may put huge unnecessary load to your database. (more…)
OneNote as personal travel guide: Using OneNote on trip
We are ready to go and use OneNote as our main source of information when travelling around. Before going we have to make sure we have our travel guide available in our pockets. We need also some good plan how to use it and how to update it if needed. This posting tells you how to travel with OneNote effectively.
SharePoint 2013 Autohosted apps
MSDN subscribers can activate Office 365 developers benefit that gives them free Office 365 development instance for year. If you have this subscription then you can use your local Visual Studio to develop new style applications and then run and test them on Office 365 environment. In this posting I will introduce you hybrid development of Office 365 SharePoint applications.
SharePoint 2013 app hosting models
SharePoint 2013 introduces new application model that externalizes all custom code from SharePoint environment and keeps SharePoint environment this way clean of bad code and hacks in system files. It seems that new app model will dominate over next versions of SharePoint. In this posting I will introduce you new application model and describe different deployment models.