Category: C#
REST service with ASP.NET MVC: Part 2
posted in Blog, C# by Ilya Ber.
This previous article I showed you how to use ASP.NET MVC controller as RESTful service. Now it’s time to build small application that serves as http client that consumes JSON, produced by our service. We’ll use WebRequest class from .NET Framework to send HTTP REQUESTS and JavaScriptSerializer class to build objects from JSON. First, lets create simple HTTP client for our application: 1. Simple enum to keep HTTP methods organized. public enum HttpMethod { Get, Post, Put, Delete } public … read more
REST service with ASP.NET MVC: Part 1
posted in Blog, C# by Ilya Ber.
In this atricle I’ll show you how to implement RESTful service based on ASP.NET MVC controller. REST stands for representational state transfer. It means that server sends it’s state (data) as a response to client requests. Most common REST service implementation is base on server, that produces JSON or XML data and client, that able to rend request to service, get the server response and use received data. Good idea is to use REST architecture when you need to make … read more
Compressing CSS with YUI Compressor for .Net
posted in Blog, C# by Ilya Ber.
It is a very common task to minimize JavaScript before deploying your application to production environment. But it is impossible to debug JavaScript while using minified files. The best solution is to minimize JS files while building release version and in this atricle I’ll show you how to use YUICompressor.NET in MSBuild task and run it as build event in your project. Step 1. Get a YUICompressor.NET It’s very easy: just go to YUICompressor .NET codeplex page and get most … read more