Denis Gladkikh
Russian  |  English
rss twitter

Selected Tag: .NET

05.09.2010 13:33 UTC

Wrox–Professional WCF 4–Windows Communication Foundation with .NET 4

0470563141Couple of weeks ago I got a paper copy of book Pablo Cibraro, Kurt Claeys, Fabio Cozzolino, Johann Grabner - Professional WCF 4: Windows Communication Foundation with .NET 4. This book has not a lot of pages, just about 400. Really, I don’t remember when I saw so thin book about some technology. But maybe this book has not a lot pages, but a lot of interesting themes.

First chapter is patterns and principles of SOA applications. This is the best chapter in this book. When I was reading this chapter I saw that authors have a lot experience of creating applications with Service-oriented architecture. Authors described all possible architecture principles, with which you can create SOA applications. And they did not limit themselves to the principles that are possible with WCF. I think that this chapter is “must read” for all developers, it is doesn’t matter what technologies you are using: php, java or .net. And this is good luck that Wrox published this chapter online: Design Principles and Patterns. It is about 30 pages, so read it right now.

Read more...

Leave a comment ( 0 )
.NETC#.NET 4.0WCFMCPSOAMCTS

28.08.2010 09:18 UTC

TSQL: Passing array/list/set to stored procedure (MS SQL Server)

Passing array/list/set to stored procedure is fairly common task when you are working with Databases. You can meet this when you want to filter some collection. Other case – it can be an import into database from extern sources. I will consider few solutions: creation of sql-query at server code, put set of parameters to sql stored procedure’s parameter with next variants: parameters separated by comma, bulk insert, and at last table-valued parameters (it is most interesting approach, which we can use from MS SQL Server 2008).

Read more...

Leave a comment ( 0 )
.NETTSQLSQL ServerTransact SQLBulk InsertTable-Valued ParametersStored Procedures

14.08.2010 14:55 UTC

RESTful WCF Service – How to get browser version at server code

At our product we have a client Silverlight part and server-code part, which contains a lot of WCF methods. We don’t use ASP.NET Compatible mode, because we want to leave an opportunity to deploy server part to server without web-server role (without IIS). Really, I don’t know why we chose this way, because all of our installations at current moment are on IIS. But we have what we have, so we haven’t ASP.NET Compatible mode, and as an expected result we can’t get HttpContext.Current instance at server WCF methods. One of WCF Service is a RESTful service, which at his methods returns report files, so it can handle GET-queries from browsers.

Read more...

Leave a comment ( 2 )
Silverlight.NETC#Internet Explorer 8PDFReportsWCFRESTfulFireFox

15.06.2010 19:03 UTC

C# 4.0 in a Nutshell, Fourth Edition

C# in NutshellJust became a lucky owner of this book C# IN A NUTSHELL 4th edition. This is a fourth edition of this book’s series. I saw previous third edition of this book, we presented it on one of our events at Yaroslavl State University, but that book was a Russian translated version and published in Russia, this is was bad side of that book – all books at Russia printed on really bad paper. I should say that I didn’t read this book by end, but already I was surprised. Why? Why I heard a lot about Richter CLR via C# (English version of 3rd edition of this book I already have, and this book are waiting my attention), and just a few words about C# IN A NUTSHELL, at least in my sphere. I just listen once about this book at one of the podcast of Alt.Net group, and this words was Richter it is really good book, and C# IN A NUTSHELL it is a good handbook. My opinion is - you should read Richter if you want to develop with .NET. But if you want to develop on .NET with C# you should read C# IN A NUTSHELL too.

Read more...

Leave a comment ( 2 )
.NETC#.NET 4.0C# 4DynamicO’REILLYC# IN A NUTSHELLBook Review

05.04.2010 10:42 UTC

Windows Keys Extender – tool for XP/Vista users to using hotkeys Win+[Left|Right|Up|Down]

In Windows 7, I really liked an opportunity to change the position of the windows by pressing hotkeys Win + (Left | Right | Up | Bottom):

  • Win + Left - window attached to the left side
  • Win + Right - window attached to the right side
  • Win + Up - window is maximized
  • Win + Bottom - window in the normal state

So I spent my time and wrote this tool for Vista/XP users.

Read more...

Leave a comment ( 0 )
.NETC#Windows 7KeysExtender

25.03.2010 19:58 UTC

Method extension for safely type convert

Recently I read good Russian post with many interesting extensions methods after then I remembered that I too have one good extension method “Safely type convert”. Idea of this method I got at last job.

We often write code like this:

int intValue;
if (obj == null || !int.TryParse(obj.ToString(), out intValue))
    intValue = 0;

This is method how to safely parse object to int. Of course will be good if we will create some unify method for safely casting.

I found that better way is to create extension methods and use them then follows:

int i;
i = "1".To<int>();
// i == 1
i = "1a".To<int>();
// i == 0 (default value of int)
i = "1a".To(10);
// i == 10 (set as default value 10)
i = "1".To(10);
// i == 1
// ********** Nullable sample **************
int? j;
j = "1".To<int?>();
// j == 1
j = "1a".To<int?>();
// j == null
j = "1a".To<int?>(10);
// j == 10
j = "1".To<int?>(10);
// j == 1
Read more...

Leave a comment ( 4 )
.NETC#ParseConvertExtension Methods

24.03.2010 12:51 UTC

Regular Expressions. Remember it, write it, test it.

I should say that I’m fan of regular expressions. Whenever I see the problem, which I can solve with Regex, I felt a burning desire to do it and going to write new test for new regex. Previously I had installed SharpDevelop Studio just for good regular expression tool in it (Why VS doesn’t have one?). But now I’m a little wiser, and for each Regex I write a separate test.

I find it difficult to remember the syntax of regular expressions (I don’t write them very often); I always forget which character is responsible for the beginning of the line, etc. So I use external small and easy articles like this “Regular expressions - An introduction”.

Now I want to show you little samples of regular expressions and want to show you how to test these samples.

Read more...

Leave a comment ( 2 )
.NETC#TwitterTDDRegexRegular ExpressionsnUnit

19.04.2009 08:17 UTC

Keys Extender (Win 7 Compatible)

In Windows 7, I really liked an opportunity to change the position of the windows by pressing hotkeys Win + (Left | Right | Up | Bottom):

  • Win + Left - window attached to the left side
  • Win + Right - window attached to the right side
  • Win + Up - window is maximized
  • Win + Bottom - window in the normal state
Read more...

Leave a comment ( 0 )
.NETC#Windows 7KeysExtender



The content on this site represents my own personal opinions and thoughts at the time of posting.