tag:blogger.com,1999:blog-56022637604917857582024-02-16T14:59:14.290-08:00DevArchive.net BlogKirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.comBlogger56125tag:blogger.com,1999:blog-5602263760491785758.post-45758685804208143212018-04-29T10:59:00.001-07:002018-04-29T10:59:27.432-07:00
Sample — Authentication using JWT token and resource owner flow using Angular-6 and ASP.NET Core-2.1
Get the code here: https://github.com/kirill-chilingarashvili/sample-jwt-token-angular-6-aspnetcore-2.1
open and run “api” using Visual Studio 2017 (or command line dotnet run)
run frontend by opening “web” and running npm i && npm start
navigate to http://localhost:5555
use Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com0tag:blogger.com,1999:blog-5602263760491785758.post-83783822148502716342016-12-01T21:16:00.003-08:002016-12-01T21:46:31.776-08:00Comparing DDD + ES + CQRS with DDD without ES, CQRSWhen using DDD with ES, CQRS, events are used in four ways:
1) they are used to reconstitute aggregate state
2) they are used to build read model
3) they are used to drive back-end workflows
4) they can be used as audit log
The flow of events in ES model is:
You can use standard approach of working with tables representing state of aggregates, or whatever persistence approach is in place,Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com0tag:blogger.com,1999:blog-5602263760491785758.post-83502374341334992492016-08-26T12:56:00.000-07:002016-08-26T12:56:15.284-07:00CQRS Application Building BlocksFrom time to time I try to rethink the architecture of an application I work on, do some sanity check, find hidden things which were not realized before, make them explicit.
div.csharpcode
{
border: solid 1px Silver;
padding: 2px;
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com0tag:blogger.com,1999:blog-5602263760491785758.post-14953582058916272032016-03-30T05:23:00.001-07:002016-04-07T05:21:21.266-07:00Generate C# Code for Google Protobuf Definition in VS 2015I created small extension for Visual Studio 2015, allowing to write .proto files with Google Protobuf definitions, and generating C# code on save. The extension is really a custom tool for .proto files.
The code is available on github
To use it -
- clone the repo,
- build the solution
- navigate to bin\Debug\ and run ProtobufCSharp.vsix
- run Visual Studio 2015, Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com0tag:blogger.com,1999:blog-5602263760491785758.post-43993687523368974752015-11-11T05:45:00.003-08:002015-11-11T06:30:25.385-08:00Saga vs. Process ManagerAs I already blogged recently - I build application using Domain Driven Design, Command Query Responsibility Segregation and Event Sourcing patterns.
I want to post implementation details of Sagas and Process Managers
In my implementation both - Sagas and Process Managers consume event messages and execute some actions in response.
Saga has no state while Process Manager has.
Another Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com3tag:blogger.com,1999:blog-5602263760491785758.post-75564872429066208042015-11-08T22:12:00.000-08:002015-11-10T10:43:59.071-08:00Process Managers and Event SourcingIn my latest application I use Domain Driven Design, Event Sourcing and Command-Query Responsibility Segregation patterns.
I implemented ES infrastructure layer for SQL Server.
To read events back from event store I use polling mechanism and also "fast channel" (you can read details here)
I need to read events for two reasons:
1) To build read model
2) To process events by using Process Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com0tag:blogger.com,1999:blog-5602263760491785758.post-20120046343474764112015-11-04T22:31:00.002-08:002015-11-08T21:37:42.397-08:00Reducing Latency in CQRS Applications
div.csharpcode
{
border: solid 1px Silver;
padding: 2px;
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com0tag:blogger.com,1999:blog-5602263760491785758.post-86995514875233700842013-03-15T07:31:00.000-07:002019-08-12T11:27:19.524-07:00Fast Dijkstra’s Algorithm - implemented in .NET C#
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf';
SyntaxHighlighter.all();
Few days ago I had to write an algorithm for finding fastest route between two points on an Open Street Map.
One of the most popular routing algorithms is Dijkstra’s Algorithm. To perform route search we need a data Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com25tag:blogger.com,1999:blog-5602263760491785758.post-6238841550108387622012-05-04T05:11:00.001-07:002012-05-04T05:11:41.241-07:00Silverlight Double Animation HelperOften we need to quickly animate something on the screen without initializing storyboards, animations, setting targets etc. Also sometimes we need to be able to change animation direction or target value. All this is about double animation. Suppose we need to move a scroll viewer vertical offset with some speed but depending on user actions we may change speed and even direction of scrolling.Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com2tag:blogger.com,1999:blog-5602263760491785758.post-7673726114088521302012-04-25T02:54:00.001-07:002012-04-25T09:15:36.389-07:00Don’t use non indexed “Item” CLR property in bindingToday I found rather strange problem.I was getting strange exception from MS internal code related to bindings.The exception was raised when code was trying to set SelectedItem of DataGrid control.Stack Trace is very large but most important lines are as follows:Message: Object reference not set to an instance of an object.
ExceptionType: System.NullReferenceException
DetailsKirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com1tag:blogger.com,1999:blog-5602263760491785758.post-62926903773809996412011-11-11T00:53:00.001-08:002011-11-11T01:02:03.131-08:00Reformatting All .xaml Files in Visual Studio Solution  Today I decided to format all .xaml documents in a solution so that all attributes are placed on a separate line and also to line nested tags on correct positions. Actually I already setup settings in Visual Studio Tools menu a long time ago, but some developers working on the same project forget to format documents before check in – the result is - to comfortably read the file in Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com1tag:blogger.com,1999:blog-5602263760491785758.post-84716666277193639742011-05-23T01:48:00.001-07:002011-05-23T01:52:04.079-07:00VisibleBinding – Markup Extension Allowing to Only Enable Binding When Target Is VisibleI tried to solve a number of performance problems while tuning WPF application I work on currently. One of things I wanted to do is – make bindings effective only when control that uses them becomes visible, and don’t update binding target when target is invisible. I end up creating the markup extension allowing me to do so. Just use markup extension in format “{namespace:VisibleBinding Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com1tag:blogger.com,1999:blog-5602263760491785758.post-30130367937324928752011-04-01T04:48:00.001-07:002011-04-03T22:55:32.533-07:00I have a new computer :)Finally I decided to buy new computer My old one is not enough to do my daily work anymore. The old one was AMD Athlon-64 5400 Dual Core CPU 2 Gb DDR 2 RAM memory 250 Gb HDD Well it worked, but it became slow with years – VS versions and heavy apps load this CPU and memory with ease. Especially it is hard to do Silverlight and WPF development on such CPU. This month I have Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com0tag:blogger.com,1999:blog-5602263760491785758.post-24333147433587805392011-02-09T21:33:00.001-08:002011-02-09T21:37:15.531-08:00Silverlight Spy – Free EditionWhen I work on WPF projects I like very much the Snoop application. It allows me to debug visual tree of WPF app and look into what properties of controls are having what values in real time – to see what can be done to improve layout (like fixing margins etc.), what data bindings and data contexts are currently used and many other things. If you did not try Snoop – just try it – it is free and Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com1tag:blogger.com,1999:blog-5602263760491785758.post-32685203853990801312010-12-21T13:02:00.001-08:002010-12-21T13:02:35.834-08:00Code Generation Using Custom Item Template, Custom Template Wizard and T4 Engine, VS 2010This post is an update to previous post: Code Generation Using Custom Item Template, Custom Template Wizard and T4 Engine I changed the code to support Visual Studio 2010. You can download latest version here. Hope this helps. Kirill Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com1tag:blogger.com,1999:blog-5602263760491785758.post-51768495333243722932010-10-29T03:02:00.001-07:002010-10-29T03:07:58.746-07:00Code Generation Using Custom Item Template, Custom Template Wizard and T4 EngineNot long time ago, I faced the following requirement: Company uses custom Data Access Layer, which is developed within company and which does not have any designer tool as Entity Framework or Linq to SQL frameworks have. (Actually the company uses CSLA – but it is modified and cannot be upgraded to latest version even if latest version of CSLA does have any designer tools – but as I know it Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com9tag:blogger.com,1999:blog-5602263760491785758.post-52179722923524391772010-10-28T01:43:00.001-07:002010-10-28T23:05:27.298-07:00C# Coding Standards, What Standards Do You Use?  Coding standards is important to have in any software organisation. Here is definition for “Coding Conventions” from Wikipedia: Coding conventions are a set of guidelines for a specific programming language that recommend programming style, practices and methods for each aspect of a piece program written in this language. These conventions usually cover file organization, Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com2tag:blogger.com,1999:blog-5602263760491785758.post-54291946875765844372010-10-20T06:04:00.001-07:002010-10-21T02:03:07.278-07:00Memory Leaks in WPF applicationsBe aware of the following possible reasons of memory leaks in WPF applications: Don’t register non-static handlers using EventManager.RegisterClassHandler for example if you register handler using this code: Declare the handler as static ! Otherwise this will cause memory leak. See also: WPF possible memory leak with EventManager.RegisterClassHandler Try to avoid Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com0tag:blogger.com,1999:blog-5602263760491785758.post-45138764799397121482010-07-20T23:47:00.000-07:002010-07-20T23:54:38.521-07:00Well, I did not post too longI did not make any new posts on my blog too long time.
The reason is - technology shift -
I was working on new technologies for me last 2 years
- Silverlight
- WPF
I have collected a lot of goodies that I can share with world.
I will definitely share some god tips and trick shortly :)
Always it is not easy to leave technology you are familiar with, and you were working on for years, and make a Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com1tag:blogger.com,1999:blog-5602263760491785758.post-15391858405200352942008-12-14T13:20:00.001-08:002008-12-14T13:28:00.559-08:00Simplify Inline Editing using GridView, GridViewControlEmbedder ASP.NET AJAX Extender.I created another nice ASP.NET AJAX extender for GridView. With it's help you can enable inline editing for Grids in web pages relatively faster, comparing to time needed to implement this feature from scratch using pure JavaScript. For example having the following GridView on the page: You can add an extender that allows editing of values of cells right in place: Extender has inner Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com5tag:blogger.com,1999:blog-5602263760491785758.post-58554622169159787972008-11-09T11:05:00.001-08:002008-11-11T12:43:38.448-08:00Code generation technique using MS codename "Oslo", T4 templating engine and VS Custom toolYou can download full source code for this post here. Not long time ago Microsoft announced new product named "Oslo". Quote from Microsoft Oslo Developer Center: "Oslo" is the code name for our platform for model-driven applications. The goal of "Oslo" is to provide a 10x productivity gain by making model-driven applications mainstream with domain-specific Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com4tag:blogger.com,1999:blog-5602263760491785758.post-1008939751724096682008-08-26T11:16:00.001-07:002008-08-26T21:53:58.452-07:00Auto Generate References for Controls Residing in Naming Containers, ASP.NETCurrently I work on a big project with quite a big amount of UserControls in it. Many controls in the system have quite complex markup. And often I need to reference controls residing in the naming containers, or simply inside another controls. for example if you have the markup like this: you cannot simply reference control name rb1 or rb2 from the code behind of that control. So I use Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com1tag:blogger.com,1999:blog-5602263760491785758.post-71004949714941758102008-05-12T13:12:00.001-07:002008-05-12T13:38:28.892-07:00Loading and Executing JavaScript Files From JavaScript, ASP.NET AJAXDownload source code with samples for the article here. Quite often we need to load js files dynamically right from javascript. With ASP.NET AJAX it is simple. ASP.NET AJAX library has internal ScriptLoader class that can be used to load js files, specify callbacks that will be invoked when script is downloaded and ready, and execute functions inside newly loaded files. I will not list all Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com1tag:blogger.com,1999:blog-5602263760491785758.post-38664252354175497812008-05-12T08:53:00.001-07:002008-05-12T11:38:30.333-07:00Using AjaxRepeater Control, ASP.NET AJAXYou can download full source code with samples and controls for the article here. Recently after reading blog post Ajax Templates by Nikhil Kothari I really liked the idea, the source code is great, and the control is huge help for AJAX development. In this blog post I want to share what I learned after investigating sample more carefully, and in what scenarios I feel this control is doing it'sKirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com6tag:blogger.com,1999:blog-5602263760491785758.post-71174617626839977632008-05-03T14:21:00.001-07:002008-05-03T14:57:53.700-07:00Cross Browser GridView Fixed Header Extender, ASP.NET AJAXI have created ASP.NET AJAX Extender control. It extends GridView control fixing it's header on the top while adding vertical scroll bar to it's contents. The control also supports maintaining scroll position inside grid between postbacks. The control works fine inside or outside of UpdatePanel. To extend GridView, just drop extender onto the design surface and set its TargetControlID: Kirill Chilingarashvilihttp://www.blogger.com/profile/09906215698720468631noreply@blogger.com24