Episerver Commerce SearchProvider – demystifying

This post is an excerpt from my book, but it’s the short one. It looks like there is a confusion of where the searchprovider is used in Commerce

Many important features in Commerce Manager use index-based search provider to search for entries – it’s simply faster and more flexible to work with. They might not be truly “real-time”, but they’re close (with the right configuration). The only drawbacks are they require extra processing (for indexing entries), external files/configurations, but the advantages easily overweight any of those drawbacks.

There are three search providers provided by Episerver Commerce: LuceneSearchProvider, Solr35SearchProvider, and FindSearchProvider (four if you count SolrSearchProvider as well). LuceneSearchProvider comes as the default option with EPiServer.Commerce.Core, and it’s the only one does not require extra configurations.

Continue reading “Episerver Commerce SearchProvider – demystifying”

UX design lessons – from a metro perspective

When I come to a new city, I usually pay close attentions to its metro system. Of course, it rarely shows up in TripAdvisor as an attraction of the city, but for me, it’s not only a necessity (based on a quite tight budget, public transportation is almost always our first choice), but also can tell a lot more about the history of the city, the people and the daily life here.

rsz_112909433_10154138750224038_5364040389823582540_o
New York metro system . Make sure you don’t look at the rails.

I’m not a traveler myself, I have visited only Rome, Paris,  Venice, Florence London, San Francisco and New York, and of course Stockholm – where I am living. Venice and Florence have no metro I’d know of, and I only tried BART (Bay area rapid transport) in San Francisco, so only metro systems in remaining cities count. In those five, I know Stockholm metro system (tunelbanna) the best, and like it the most, so this post can be highly biased opinion. If I did misunderstand a metro system, kindly point it own.

Continue reading “UX design lessons – from a metro perspective”

Import catalog: beware of warning messages

Recently I worked with a support case from a customer. They complained that the catalog import is too slow for them, it took them 6-7 minutes to import 200 entries. Their catalog is about 50k entries, which is not particularly big, but not small neither, and with that rate, it does mean they will have to wait for days for the catalog imported. This is of course not good and I jumped in when I became available. (In the end, I like performance tuning so much that I find it hard to refuse a case like this)

I did try to import their catalog on my development machine – a relatively powerful desktop with Intel Core i7 4790 CPU, 16GB of RAM and 256GB SSD on Windows 10/.NET 4.5.2. Everything went quite well – I achieved a rate of 200 entries per 9-10 seconds, which is, IMO, more than enough. (And this is on Commerce 9, on Commerce 8 then I would suspect it’s 3-4 times slower).

After some conversations with Episerver’s developer support team, it seems that the slowdown only happens with the re-import. I tried it again with re-import. Hmm, something is wrong here. The import is much slower and it eventually stops at some points. The debugger shows that it starts quite well, even faster than a new import (200 entries per 3-4 seconds, a very recent version of Commerce made an improvement of skipping the entries which are not changed to speed up the import), but it slows down by time. Profiling does not show anything obvious, most of the time was spent with loading the MetaObject:s – which is kind of expected.

I was starring at the import tab, and wondering what can be wrong, and suddenly I realized the answer is what I was looking at:

Continue reading “Import catalog: beware of warning messages”

What not to do with your login/register page

This post is strictly my personal opinions, it does not represent my employer’s views in any way.

Login/register page is essential to any site, especially any Commerce site. You should always follow the proven, established practices, but yet many sites still have issues with their login and register page. Make sure that you do not do anything mentioned below:

  • Use HTTP for login/register page.

You might say “What?”. It’s 2016 already and certificate is cheap as hell (even free, if you count Letsencrypt). Still, there are Commerce sites use HTTP for login/register. This, sadly, happens to one of my favorite sites, itsajten:NonHttps (1)

In case of itsajten, there is not much of sensitive information an attacker can get if he sniffs the network and gets my password. I’m in Sweden and almost everything is transparent, even my income. But still, it does mean that I’m subject to social engineering attack. I notified itsajten about this but never heard from them since – which is a pity. They are otherwise very nice and they offer some of the best prices on the item I interested.

 
Continue reading “What not to do with your login/register page”

Diagnose your Episerver site: find and fix the issues

It’s quite often to see some questions related to issues posted in Episerver World forums. While I (and most of people there) are willing to help, it still takes time for you to write the question and wait for an answer. Sometimes, the answer can be incomplete or even incorrect, because the people answering your question do not have the full context as you do. The truth is, you’re the person who know the most about your site, and you can do something to diagnose it. Those steps below are in the order you should take to diagnose your site:

  • Browser console is your friend. It’s the thing which seemingly ignored the most. When something does not work in Edit UI (CMS) or Catalog UI (Commerce), make sure to open your Browser console and switch to Console tab. If their was a network issue, such as a 500 “Server error” response, make sure to open it. (Right click and choose “Open in a new tab” in Chrome). More often than you might think, it can reveal the underlying problem. If it’s a JavaScript error, how does it look like?
  • Logging is your (another) friend. When something seems to be wrong, check your log file, or turn down your logging level to see if you can see any trace there. In some case, no log found can also be a trace to solve the problem.
  • Does iisreset solve your problem? No I’m not suggesting you to run iisreset every minute on your production site, but it might isolate the problem – if it does, then the problem might relate to cache, or initialization modules. If it does not, well, it can be anything else. But at least it’s not caused by certain things – the key is to narrow down the causes of problem. You can also try to call

ISynchronizedObjectInstanceCache.Clear();

    • if the issue seems to related to the “modern” cache – such as ContentProvider. Note that ISynchronizedObjectInstanceCache does not control everything and iisreset is still the more powerful cache-clearing option.

Continue reading “Diagnose your Episerver site: find and fix the issues”

Microsoft Build 2016 – impressions and thoughts

I was lucky enough to be able to attend this year Microsoft Build conference. Almost 5000 tickets were sold out in just 1 minute – according to Microsoft. And that was with a pretty hefty price – 2195 USD for 3 days conference.

rsz_sam_0576
At the registration

Yes I’m pretty excited. This conference is for developers so Microsoft intends to shows their most exciting technologies for the year ahead.

One thing I was most disappointed about is this year Microsoft gives no hardware as gift. Instead, they gave us an Azure account. I haven’t checked it, but it is supposed to value at $1000 or so (It is an account for some of the Code Labs, it’s not a gift from Microsoft). Last year, it was a HP x360 Spectre laptop, and the year before that attendees got an Xbox One (which was 499$ at the time) and 500USD credit in Microsoft Store. Microsoft explained that they want offer a “deeper technical experience” instead. I don’t know if they’ll deliver that promise, but a hardware gift would be really nice. I did hope for a HP Elite X3 this year. Lesson learned: Never set your expectation too high.

And today the show starts.

Continue reading “Microsoft Build 2016 – impressions and thoughts”

Git: In easy steps – Another book project

Git: In easy steps cover
Git: In easy steps cover

Well, I might start a living based on writing. If my books sell good enough. Yes, it’ll be available on Leanpub and you can register now to get a notification: https://leanpub.com/gitineasysteps.

In this Easter I decided to start a new book project, based on what I’ve been doing daily: Git in easy steps.

Who is this book for?

This book explains Git concepts in a simple way, with examples in Git Extensions – the Git client to beat. It will walk through the flow and see what should we do, and why. Needless to say, it’s a beginner book. If you are already a Git expert, look else. (Of course you are still welcome to buy this book, well, you know, to complete your collection).

Continue reading “Git: In easy steps – Another book project”

How Episerver Catalog content versions work

This is an excerpt from my book – Pro Episerver Commerce. Use http://leanpub.com/proepiservercommerce/c/Easter2016 to get 20% off the book during Easter holiday (Mar 24th – Mar 28th)

One of the most important features in CatalogContentProvider is it bring versioning to catalog content. It was somewhat limited with Commerce 7.5 (the languages handling was a bit sloppy), but it has been much more mature since Commerce 9. The versioning system in Commerce 9 is now more or less on par with versioning in CMS, and it’s a good thing.

If you’re new to Episerver CMS/Commerce, then it might be useful to know how version and save action work in content system. Of course, you can skip this section if you already know about it. The version status is defined in EPiServer.Core.VersionStatus. When you save a content, you have to pass a EPiServer.DataAccess.SaveAction to IContentRepository.Save method.

Continue reading “How Episerver Catalog content versions work”

Lessons learned from running a blog

Expect yourself to do many things, if not everything. You’ll be an administrator, a developer and a writer, all at the same time. This blog is the first time I install WordPress, first time I install and configure Apache, first time I configure CNAME or so, first time I use Google Adsense. It was not smooth all the way, but it’s not that hard and it’s really rewarding when I got it works. One after one. I failed sometimes, like when I tried to make WordPress runs on PHP7 (I’m not a PHP developer after, so I run away when the problem gets out of hand), but for most parts, I can find an answer from here and there on the Internet. Thank you, internet.

Attracting visitors is hard. Internet is full of things and no matter how you try, there are always other content somewhere more interesting than yours. Except if you are exceptional good at writing, or you are famous person, most of the people will not visit your website. Not even one. And sadly enough, many of your visitors will not return, even if your website was helpful to them. You helped them to solve a problem and that’s it. Attracting visitors is already hard enough, and keeping them coming back is even harder.

Continue reading “Lessons learned from running a blog”