.NET Design Patterns: What they are and why we need them?

dpHi! In this article, I would like to talk about design patterns, what they are and why we need them. Do not want to show you whole list of patters because, I think, it does not make any sense from my point, I think better understating will be in case if I will show you a problem in the code and after, solution of resolving this problem by using pattern. I know, that until current time were wrote many articles about patterns and we can find hundreds of pages which describe them. But anyway, my aim in this article is to describe the concept of patterns in my vision, as simple as possible, Continue reading “.NET Design Patterns: What they are and why we need them?” »

ASP.NET MVC: jQuery image upload and crop

ASP.NET MVC: jQuery image upload and cropThis is, probably, most used case when you have to use ajax upload of the image and after that you need to use croppind. Please, notice, in this article I described how to crop static image by using Jcrop library, in current post describes almost the same, except image will not be a static and will be uploaded by jQuery. Before reading this, I strongly recommend to read ASP.NET MVC: Crop image by using Jcrop, because in this one I will make accent only on how to upload image and how to save cropped one and will not describe cropping process. But anyway, it will be completed and working example that you can download at the end. Continue reading “ASP.NET MVC: jQuery image upload and crop” »

ASP.NET MVC: Crop image by using Jcrop

ASP.NET MVC: Crop image by using JcropHi all, I’d like to show you today very very simple example of how to crop image by using Jcrop library. Jcrop is a very powerful jQuery image cropping plugin. So, why I chose this one – because this plugin supports many browsers and devices like Google Chrome, Mozilla FireFox, IE 8 (even for IE 8 for Windows XP!), 9, 10, 11, Safari (Mac OS), iPad, iPhone and Android. To avoid confusing, especially of newbies in jQuery and ASP.NET MVC, I decided to split current topic by three separated articles. The main goal in these three articles is to show how to use Jcrop in ASP.NET MVC web application and please take a look on what will be described:

1) This post: First and very simple cropping example with static image that we already have on the page.

2) Second post: On the page we only have select file input, after selection image, system uploads file by using ajax file upload as described here and shows image on the page and after that we can crop this one.

3) Third post: The most interesting from my point, there will be all things from the second post, but only difference is that after selecting and uploading, image will be shown in the popup. And also will describe how to crop image with a big aspect ratio like 1900 x 1900 and submit data to the server. Continue reading “ASP.NET MVC: Crop image by using Jcrop” »

Visual Studio 2013: NuGet Package restoring does not work

Visual Studio 2013: NuGet Package restoring does not work Recently I have noticed very strange thing with NuGet Package Manager in Visual Studio 2013 when was trying to restore missing packages for my asp.net mvc 5 web application. At this moment I have next Visual Studio:

Microsoft Visual Studio Ultimate 2013
Version 12.0.21005.1 REL
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Ultimate
Continue reading “Visual Studio 2013: NuGet Package restoring does not work” »

Patterns: MVC, MVP and MVVM

In this article I would like to tell you what the difference between these patterns. Let’s start with the first main one – Model-View-Controller – it is a fundamental pattern that applies in the many technologies and every day makes easier life for programmers. If you ask software Architects about “How to implement this pattern”, I think you will get a couple of different answers and respectively a couple of solutions. Basically, there is one common thing in these patterns – is separation of User Interface (UI) from business logic, it allows do work for front-end developers not thinking about program code. If you remember school or university programming, it was a huge bunch of lines of code, written in code behind (for instance) of .aspx files, that’s not a good practice.
Continue reading “Patterns: MVC, MVP and MVVM” »