• CMS,  Commerce,  Episerver

    Watch out for Singletons

    If you are a seasoned Episerver developer, you should (and probably, already) know about the foundation of the framework: dependency injection. With the Inversion of control framework (most common, Structuremap, but recent versions of Framework allow much more flexible options), you can easily register your implementations, without having to manually create each and every instance by new operator. Sounds great, right? Yes it is. And Episerver Framework allows you to make it even easier by this nice ServiceConfiguration attribute: [crayon-5c116db9e5a50602624859/] so your class will be automatically registered, and whenever you need an instance of MyClass, IoC framework will get the best instance for you, automatically, without breaking a sweat. Isn’t it nice?…

  • Catalog,  Commerce,  Episerver

    Multiple catalogs: Without catalog name(s)

    My previous blog posts about multiple catalogs in multiple sites setting here and here has helped one customer (hopefully more) to address their problem. They tried the approach and it works for them. Now they came back and ask if they can remove the catalog name from the URL entirely. Is that something that can be done. Fortunately, yes. Before moving on, let’s be clear: this is obviously custom development and is not officially supported by Episerver. I.e. it’s neither tested and documented. Normally you would have to go to Expert Services for such requirement. For this blog, I provide those samples for free (you don’t even have to buy…

  • gaming,  reviews

    Super short review of Mario + Rabbids: Kingdom Battle

    Mario + Rabbids: Kingdom Battle is the second Switch game I played, and the first one I actually enjoyed. Plus: It’s a Mario game Beautiful and vibrant world designs. In fact it might be the most cute game I’ve played. Can’t wait to play it with my children (but given it’s rated ESRB 7+, it’ll be quite some time. It’s XCOM without creepy creatures and scary moments. It does not have the strategy/tactical depth XCOM 2 has to provide, but it’s fun nonetheless. It’s easy to restart a battle and play differently for different outcome. The game is, surprisingly, smooth on Switch. Can’t say the same for XCOM 2 on…

  • gaming,  reviews

    Super short review of God of War PS4

    One of the iconic characters on PlayStation, Kratos is known for his super violent nature, a tragedy past of betrayal, a thirst for revenge – and God of War is known for its brutal combat when you kill your enemies in most violent ways possible. The last major game in the series was God Of War 3 on PS3, released in 2011. 7 years is a long time to wait – and did Sony Santa Monica soft reboot of the series live up with the expectations? I’m happy to say, it does, and some more. I’m still early hours into the game, but yet I’m very impressed. An older Kratos…

  • Commerce,  Episerver,  Performance

    Index or no index, that’s the question

    If you do (and you should) care about your Episerver Commerce site performance, you probably know that database access is usually the bottleneck. Allowing SQL Server works smoothly and effectively is a very important key to the great performance. We are of course, very well aware of this fact, and we have spent a considerable amount of time making sure Commerce database works as fast as we could. Better table schema, better stored procedures, better indexes, … we have done all of that and will continue doing so when we have the chances. (And if you find anything that can be improved, you are very welcome to share your finding…

  • gaming,  ranting,  reviews

    A super short review of Xenoblade Chronicles 2

    I’m still just 1/3 way through the game. Here’s some of my thoughts so far Hit: Gorgeous world. No it’s not the level of graphic detail of Horizon Zero Dawn, but given Switch’s processing power, the game looks absolutely amazing. Pyra is really cute (Talking about her face) Miss Pyra is overly sexualized. .Does Monolith need to let her wear a thong into battle. While it’s common in Japanese Role Playing Games (“fans service”, they said), it’s not what gaming should be. The fetch quests are really, really boring. They need to die. Looting is tedious. Too many “collection points”, too little value or interest for each of them. The…

  • Uncategorized

    Why I left Metacritic, for good.

    I’m a mediocre gamer, by any measures, but that does not defy the fact that I love playing games. Great games, only. With my very limited time and budget, I must to be very selective about the games I play. For a very long time, Metacritic is my to-go website to check if I should play a game – and I set my rules rather high: anything less than 80 is a big no-no. Less than 85 is a no, unless it’s a sequel of a game I loved so much (so I can see how the story turned out to be). More than 85 is “I’ll think about it” (when…

  • Tips

    Delete the undelete-able folder – Windows 7, 8, 10

    If you are using Windows 7, 8, or 10, sometime there are some folders appear to be super stubborn, and refuse to go away. No matter how much you try, it just can’t be deleted. It’s undelete-able. Any attempts would result in this dreadful dialog box: “Are you f*cking kidding me? This is my computer and I have the the absolute control over everything” – You said. Naturally, you would go to open the Security tab in Properties dialog to grant the permissions to everyone. Strangely, the tab is empty! In other words, there is no one granted permission to nothing. What? Why? How? The truth is quite shocking: the…

  • Tips

    Debuging React tests with Visual Studio Code

    Visual Studio Code is awesome and it is getting more and more popular in front end development. It’s great to write code, but you know what, it can be an IDE and allow you to debug your tests as well: Go to Debug/Add Configuration menu and add this setting: [crayon-5c116db9e7752046027677/] You can see that we are invoke the react-scripts-ts command with test argument. This also means we are not limited to tests – but I’m yet to debug the normal code. Now it’s important to remember: you have to open your root folder, in most of the cases, the parent folder of src, in Visual Studio Code. This is to…

  • Catalog,  Commerce,  Episerver

    Multiple sites: Building the outgoing URLs

    In previous recipe we talked about multiple catalogs with same “UriSegment” – which we had a working implementation for incoming URL, i.e. when a customer visit a product url, we know which catalog we should choose from. But we still need to cover the generation of outgoing URL. I.e. when we link a product (For example, from a campaign page), we need to generate an URL which take the “catalog-less” pattern into account. We need to understand how the outgoing URL is built. The hierarchical router builds the URL by the RouteSegment of contents. However, we want to the urls appear to have same catalog, so the RouteSegment part for…