Toastr – notification messages

toastr_example

https://www.nuget.org/packages/toastr/

Toastr is one of those GUI items everybody is familiar with. It is the standard in feedback on webpages. Adding this to your solution is almost mandatory.

After installation of the nuget you’ll need to include the js and css files in the _layout.cshtml razor page. Now add some helper classes like the MVC Wrapper for Toastr from Johan Ohlin. This makes creating and showing the Toastr messages really easy by extending the Controller.

Posted in Development, Tooling | Tagged , , | Leave a comment

Common.Logging – generic developer logging

Image courtesy of Ales Krivec / unsplash.com
Image courtesy of Ales Krivec / unsplash.com

https://www.nuget.org/packages/Common.Logging/

Common.logging provides an abstraction for the logging framework of choice. For IoC the common.logging offers an interface. NoOpLogger is a fake implementation used for unit testing.

I prefer to use the nuget from log4net with the Common.Logging implementation. https://www.nuget.org/packages/Common.Logging.Log4Net1211/ With log4net I log to a database table for easy access to the logging and to a file for fallback if the database is unavailable.

Posted in Development, Tooling | Tagged , , , , , | Leave a comment

Ajaxload

http://ajaxload.infoJust a tip for creating that loading image everybody uses or your custom version of it. Goto http://ajaxload.info

Posted in Tooling | Tagged , | Leave a comment

AutoMapper – converting objects

Image courtesy of Mike Enerio / unsplash.com
Image courtesy of Mike Enerio / unsplash.com

https://www.nuget.org/packages/AutoMapper/

Mapping two objects using convention and coded/configurerd mappings. This comes in handy when moving through the layers of a solution (data > business > viewmodel) Every property with the same name is automatically mapper – hence the name.

The newest version of AutoMapper offers an Interface for use with IoC. Save the MapperConfiguration and use it every time to construct the IMapper impementation (config.CreateMapper())

Posted in Development, Tooling | Tagged , , , | 1 Comment

Unity – IoC container

Image courtesy of Tim Gouw / unsplash.com
Image courtesy of Tim Gouw / unsplash.com

https://www.nuget.org/packages/Unity/

Dependency Inversion is one of the SOLID principles. An IoC container is a must for me when developing. Unity is my goto framework for the last year.

I prefer Unity for it’s lifetime control options. Do I need a new object every time, singleton or per thread? With Unity I can specify this in the configuration.

Posted in Development, Tooling | Tagged , , , | Leave a comment