chaliy.name
Mike Chaliy: Node.NET: Modern non-blocking IO API in .NET
http://chaliy.name/archive/2010/7/node_dot_net
Mike Chaliy's Personal Site. NodeNET: Modern non-blocking IO API in .NET. I am sure you know about node.js. Probably most visible and innovative framework of the last days. In few words, I can describe it as non-blocking or async I/O API for building server side services. Why bother? Let’s see example, for example to read file from disk you need this:. Var fs = require(fs); fs.readFile(/etc/passwd, function (err, data) { if (err) throw err; console.log(data); });. Var file = new FileStream(Program.cs...
chaliy.name
Mike Chaliy: Code-generation DSL with T4 (Text Templates)
http://chaliy.name/archive/2009/10/code_generation_dsl_with_t4_text_templates
Mike Chaliy's Personal Site. Code-generation DSL with T4 (Text Templates). Sometimes you have to write many repeatable code. Good examples are data/message contracts for the web-services or data access layer. This often means writing dozens properties, classes … boring …. Domain Specific Language) that will be the input data. Configuration. The only problem with .NET Configuration is fact that 80% of the custom. Code is useless. Looks like a lie? Well, to prove please view here. So generator should assume.
chaliy.name
Mike Chaliy: NET 4.0: New and useful LINQ extensions to the IEnumerable
http://chaliy.name/archive/2009/12/system_interactive_new_and_useful_linq_extensions_to_ienumerable
Mike Chaliy's Personal Site. NET 40: New and useful LINQ extensions to the IEnumerable. Few months ago I made post. With comparison of Ruby, Java and C# code to read all lines from text file. That time I have to code ForEach. It allows executing arbitrary code against each element of the sequence. I believe most people already have this method. Other languages already have such construct. For example. In functional languages like F# or ForEach for. In ruby. IMHO this construct is really usable. Statment ...
chaliy.name
Mike Chaliy: Mock friendly System.Reflection API, positive changes in .NET 4.0
http://chaliy.name/archive/2010/4/reflection_api_now_mock_friendly
Mike Chaliy's Personal Site. Mock friendly System.Reflection API, positive changes in .NET 4.0. While testing my db move forward. I realized that now you can completely mock. Class Starting from .NET 4.0 most of the stuff is protected and virtual! For example, code below will create assembly representation with types supplied in argument. But as you may expect you can override virtually everything else. For example, assembly level attributes, resources, referenced assemblies. You name them :). Actual cod...
chaliy.name
Mike Chaliy: The right way to do INNER JOIN in LINQ to Entity
http://chaliy.name/archive/2009/9/the_right_way_to_do_inner_join_in_linq_to_entities
Mike Chaliy's Personal Site. The right way to do INNER JOIN in LINQ to Entity. Despite of my last belief. That code will not fly into the production. Why? Because I found the right way to do. The problem I have to solve is the following:. I have regular Order model. A Customer has many Orders, an Order has many OrderItems, many OrderItems have the Product. I have to get all Products that given Customer have bought. So The Right Solution. Is the most easy code. And is actually the most correct one:.
chaliy.name
Mike Chaliy: Can you guess error in this Java code snippet?
http://chaliy.name/archive/2009/12/can_you_guess_error_in_this_java_snippet
Mike Chaliy's Personal Site. Can you guess error in this Java code snippet? Our application has been upgraded from GXT 2.0.1 to GXT 2.1.0. And this snippet causes all our data forms ignore data…. So, can you guess where error is? Public static TextField String textField(final String name, final String label) { return new TextField String (){ setName(name); setFieldLabel(label); } ; }. TextField String f = textField(Test, Test); assert f.getName()! Let me know if you need more information :).
chaliy.name
Mike Chaliy: ASP.NET MVC Web Services (Part #1)
http://chaliy.name/archive/2009/9/asp_net_mvc_services_part_1
Mike Chaliy's Personal Site. ASPNET MVC Web Services (Part #1). What do you think about. As platform for web service based applications? Look at the following code:. This code is actually. The only notable difference is return type. I return custom object. Not inherited from. For me looks good. For example, I can test it without any. And at the end I have endpoint. When action return type not inherited from. Not so useful on the client side. And no less custom. In our production code we use custom. New J...
chaliy.name
Mike Chaliy: Thoughts on non-blocking sequential number generation
http://chaliy.name/archive/2009/10/thoughts_on_non_blocking_sequential_number_generation
Mike Chaliy's Personal Site. Thoughts on non-blocking sequential number generation. Right now we are facing a requirement to generate readable sequential numbers. Yeh… some Order Numbers, some Customer Numbers, that kind of stuff. Nothing new. The problem is that we cannot leverage on the standard patterns that use central authority. Having central authority always means huge distributed locks and this goes even worst in load balanced farms. In worst case process looks like cyclic retry. At this point ma...
chaliy.name
Mike Chaliy: Kiev ALT.NET: First event dedicated to DDD and CQRS
http://chaliy.name/archive/2010/7/kievaltnet_first_event_anounced
Mike Chaliy's Personal Site. Kiev ALT.NET: First event dedicated to DDD and CQRS. Yay, Kyiv is now in ALT.NET. Move :). Well. At least we can try. And our first attempt will take place on Friday. So please welcome very first Kiev ALT.NET. Event specially dedicated to. I hope title is self-explanatory, anyway you can get more details in official invitation. BTW, you can subscribe for further announces by RSS. On photo, actually Kyiv 4AM. This entry was posted 8 months ago. Permalink.
chaliy.name
Mike Chaliy: Not so generic Generic Repository
http://chaliy.name/archive/2009/11/not_so_generic_generic_repository
Mike Chaliy's Personal Site. Not so generic Generic Repository. I know two kinds of people, who use generic repository. And who do not. Personally I do not like generic repositories. I feel that “one size feet all” is not a case here. At the same time I am lazy and do not like to write each repository. Fortunately, I found nice solution that keeps repository custom, but do not need too much code. I have abstract base repository, with most of the stuff I can predict. And I have implementation of the.