CategoryArticles

C# 6.0 New features compilation

Follow me

Joan Vilariño

Senior .NET Developer at Ohpen
Developer for more than 25 years and IT, gadget, mobile and electronics enthusiast working and publishing from Barcelona.
Follow me

As most of you know, or some may not, the new 6.0 versión of C# is baking, and will be out shortly. This new version codenamed “Roslyn” is part of the new Microsoft’s “Opennes” change, and so, can be found as open source at Github.

I’ve been reading articles about the new features it’s gonna bring for some time now from official sites and from people testing the Visual Studio 2015 Preview. I link to the sources at the end of this article.

Some articles point to their favorite feature/s, while some other other try to get a global view. In this article, I’ll try myself to make a compilation of all (or most) of these new features, and, as part of my contribution, will also try to give some “real life” uses of them, so you can judge for yourself if they will or won’t be useful for you.
Continue reading

Automatic Dependency Injection library with example MVC project

Follow me

Joan Vilariño

Senior .NET Developer at Ohpen
Developer for more than 25 years and IT, gadget, mobile and electronics enthusiast working and publishing from Barcelona.
Follow me

When we start a new project there are some utlity tasks, not related to the project’s target itself which we have to deal with. If we want a testable, easy-to-maintain and elegant code, we will need to implement #IoC and #DependencyInjection.

I’ve created a little multi-ioc-engine library that will take care of registering your interfaces or services for you, and any other additional class you need to, with the help of class attributes. It supports from scratch Autofac, Unity and nInject IoC containers.

Download the code from my repository at BitBucket with Git: http://repo.joanvilarino.info/diautoregistrationformvc
Or download it in a zip file: http://repo.joanvilarino.info/diautoregistrationformvc/downloads
Continue reading

Configuration and Optimization of view engines

Follow me

Joan Vilariño

Senior .NET Developer at Ohpen
Developer for more than 25 years and IT, gadget, mobile and electronics enthusiast working and publishing from Barcelona.
Follow me

Mi colleague and former co-worker over the years in many projects, Jose Martínez, has written this great article to start his new blog, about #configuration and #optimization of the different view-rendering engines available in #ASP.NET #MVC.

It’s a very complete and documented article, so you could be punished for not reading it! It’s worth a bit of your time… the only thing, it’s written in spanish, but our buddy Google can lend a hand translating…

http://josemartinez.info/2015/01/14/configuracion-y-optimizacion-de-los-motores-de-vista-view-engines-de-mvc/#comment-4

ASP.NET performance tips

Follow me

Joan Vilariño

Senior .NET Developer at Ohpen
Developer for more than 25 years and IT, gadget, mobile and electronics enthusiast working and publishing from Barcelona.
Follow me

I’ve come across a little article that gives us some good advice to enhance performance in our ASP.NET applications, here they are:

Tips to improve the performance of asp.net application

    • Session State : If you are not using session state then disable it. You can disable it for the particular page instead of every pages
    • Validations : Try to use client side validation, instead of server side validation. Server side validation will make load on server
    • Use HTML Controls : Try to use html controls instead of asp.net controls
    • Use Repeater : Use repeater instead of datagrid, datalist, listview
    • Data Caching : Use data caching where you can implement it. Identify static data, which is not frequently updated and implement caching for that
    • Null Check : Always check null before accessing cache items
    • IsPostback : Always use IsPostBack on your page
    • Disable Tracing : In web config file disable the tracing
    • HTTP Compression : Make sure HTTP Compression is turned on
    • Paging : Use paging to retrieve the data, only show small subset of data, for faster page load
    • Combine CSS – JS files : Combine css & js files, it will reduce no of requests and will help to faster page load
    • CDN : Use CDN for hosting images and script files
    • HTTP Modules : Remove http modules which are not used
    • Garbage Collection : Always dispose object once you have used it
    • Avoid Exceptions : Your code should attempt to avoid exceptions to improve performance because exceptions incur a significant overhead.

Source: http://performanceimprovementaspnet.blogspot.in/2014/11/aspnet-performance-improvement.html

 

Explicit Interface Implementation in .NET

Follow me

Joan Vilariño

Senior .NET Developer at Ohpen
Developer for more than 25 years and IT, gadget, mobile and electronics enthusiast working and publishing from Barcelona.
Follow me

Explicit Interface Implementation in .NET is a language feature that, not being very commonly used, can be very handy in some situations.

In most scenarios, everyone implicitly implements interfaces, because it’s what they are used to and it’s what they find in examples about interface definition and loose coupling patterns. But implicit implementation is not the only way, nor the best. It always depends on the scenario itself.

Anyway, our interface will never depend upon the kind of implementation we are going to use. Every interface can be implemented either way.

In this article, we’re gonna see what is, how it’s done, what can we use it for, and I’ll give you a project with some examples so you can start rockin!

Continue reading

© 2019 My Coding Corner

Theme by Anders NorénUp ↑

%d bloggers like this:
Skip to toolbar