Archives

Archives / 2015 / December
  • Enterprise Service Bus

    Hello everybody,

    I continue to publish damp of my understnading of the Universe.

    Now it will be about Enterprise Service Bus as part of building distributed systems.

    ESB can be considered as tool for organizing code. 

    There are two kinds of ESB:

    1. Brokered

    2. Decentralized.

    Features of brokered:

    a. Configuration in one point

    b. One configuration team.

    c. Mediator makes decision.

    Samples of brokers: TIBCO, BizTalk, Web Sphere.

    Features of Decentralized:

    a. configured indepenently

    b. coworking between teams

    c. services makes decisions independently

    Samples of decentralized: NServiceBus, MassTransit, Rhino Service Bus. 

    If to continue comparison between Brokered/ … more

  • Domain driven design in one schema

    Hello everybody,

    today I want to share with you DDD in one schema. 

    So, when I first time tried to grasp what is DDD, I heard Bounded context, domain model, Entity objects, Value objects, etc. 

    Then I started to read "Domain-Driven Design: Tackling Complexity in the Heart of Software" of Eric Evans and initially was lost in his terms.

    After a while I was lost what goes in what. After re-reading I've got the point. 

    Enterprise application can have some vocabulary. It can be one, or more. But if it has more then one vocabulary, it can be useful to separate those vocabularis by the definition bounded context.

    Each bounded context can have it's own Domain model. 

    Each domain model can … more

  • Normalization in human brain and artificial neural network

    Hello everybody,

    today I want to write few words about normalization in neural networks and why it is needed or can be needed, but not only from mathematical prospective. Here I mentioned some mathematical reasons why normalization and scaling can be needed.

    First of all, you can be surprised, but your brain also does normalization quite often. As way of example give answers at the following questions:

    1.     What is color of tree?

    2.     What is color of banana?

    3.     What is color of logo of Coca-Cola?

    4.     In which quantities GDP is measured?

    5.     What is color of skin of people in Africa?

    I can’t give 100% guarantee, but most probably you answered that tree is green, banana … more

  • Impedance mismatch

    Hello everybody,

    today I want to boast about one new phrase in my vocabulary: 

    impedance mismatch.

    It means the following: difference between what you have in your C# code ( as example ) and have that is persisted in db.

    For example if you have client, which has orders, and each order thas items, but in C# you'll have clinet, which has list of orders and each order will have list of items, than you can really understand what is impedance mismatch. more

  • CQRS in .Net

    Hello everybody,

    for now I want to make snapshot or dump of my brain about CQRS, so beware from reading of it, because it can be confusing.

    Very simple explanation of CQRS

    As usually if you see some kind of application, you can expect that what you see on the screen, you'll see it in db. It means if you see on screen Order, and order details, you can expect to see in database tables order and OrderDetails, or “one to one” relation between screen and DB.

    Like this:

    But with CQRS following changes can be applied:

    Instead of two tables ( order and order details ), you will see three tables. Now make a pause and tell your assumption what can be their names? As one of the ways it … more

  • DDD or Domain Driven Design

    Hello everybody,

    today I want to share some glimplses of what is Domain Driven Design. 

    One of the main ideas of DDD is to make the problems to guide software design, and not make software to affect problems of client. There is a popular joke, that computers help to solve problems, which didn't appear before inventing computers. 

    So, the same with design of system. Design system in order to solve problem, not just use system to create another problems for business owner.

    How this can be achieved in order to avoid displayed situation:

    First of all, you should apply the following:

    Ubiquitous Language

    Bounded Contexts

    Aggregate Root

    I hope that the first bullet item is easiest … more

  • CAP theorem

    Hello everybody,

    today I started new course at pluralsight.com, which is entitled "Patterns for Building Distributed Systems for The Enterprise". 

    Andd I started watching CAP theorem. CAP theorem is actually abbreviation of four words: 

    Consistensy

    Availabilty

    Partition tollerance.

    I don't know how about you, but I'm pretty happy that it is called CAP theorem, not CAPT theorem, because CAP sounds more pleasant. Sometime it is also named Brewer's theorem. Now lets go to theorem by itself. 

    It claims that among three ( C A or P ) your system always will be able to provide only two. And looks like you'll not be able to always affect which of three your clients will get.

    And reasons why … more

  • AngularJS inheritance in JS

    Hello everybody,

    today  I want to write short notice about another useful feature of AngularJS particularly about extend function.

    So, according to comment in angular.js file function extend does the following:

    /**

     * Extends the destination object `dst` by copying all of the properties from the `src` object(s)

     * to `dst`. You can specify multiple `src` objects.

     *

     * @param {Object} dst Destination object.

     * @param {...Object} src Source object(s).

     * @returns {Object} Reference to `dst`.

     */

    function extend(dst) {

      //herer goes implementation

      return dst;

    }

    You may wonder, why do I need this? 

    Well, one of the reasons, is imitiating inheritance in some way, additional … more

  • AngularJS clean code advices

    Hello everybody,

    today I want to share with you fragment of knowledge from John Papa and his course at pluralsight entitled AngularJS Patterns: Clean Code.

    Inside of course one of the videos he have following structure advice: Function, Inject, Register ( I will name it FIR  ).

    function DashBoardController(service1, service2) {//function

        //here goes code of controller.

    }

    DashBoardController.$inject = ['service1', 'service2'];//inject

    angular

        .module('app')

        .controller('DashBoardController', DashBoardController);//register

    or in the form of image:

    And as John Papa mentioned, Todd Motto also likes that approach:

    "I prefer this sequence: write my function, inject the … more

  • Types of questions in Data Science

    Hello everybody,

    today I want to share with you some notes about Data Science.

    In Data Science everything starts from giving questions, or as to say to giving right questions. Here it goes list of question which data scientists ask in order of rising complexity:

    Descriptive

    Exploratory

    Inferential

    Predictive

    Causal

    Mechanistic

    So, the first goes descriptive analysis. You just describe what you see, and assume what that may be but not necessary is.

    Exploratory analysis goes for searching relationship which you want to discover, but not necessary confirm them. EA is not final conclusion and shouldn't be use for generalizing/predicting. … more

  • Mathematical notes about Neural networks

    Hello everybody,

    today I want to write few words about topic why mathematician believe that neural networks can be taught of something. Recently I've read book Fundamentasl of Artifical Neural Networks of Mohamad Hassoun and want to share some thoughts in more digestible manner with omitting some theoretical material.

    As you heard, when first attempt of neural networks was invented ( aka Perceptron), society was very admired by them, until Marvin Minsky and Seymour Papert showed that Perceptrons can't implement XOR function or in generally speaking any non linear function.

    It lead to big disappointment in area of neural networks.

    But why? Because sometime one line is not enough in … more

  • .Net AngularJS Treeview lazy loading implementation

    Hello everybody,

    who follows my blog.

    Today I want to share with you hierarchical tree view example which displays data as name implies in hierarchical way. There are plenty of tools that display data in hierarchical way with help of AngularJS, but not so many which has implemented lazy loading. Another part which is not common with implementation is joing AngularJS with server side API.

    So if you ever find need to display some hierarchic information with lazy loading, you can consider my code as some kind of base, which you can extend.

    Some details

    As backend I have the following:

    MS SQL

    C# with Entity framework

    Web api

    As frontend I have the following: … more