September 6, 2017

Building an Episerver Component with Dojo including Localization and Context

I'm rather torn about whether or not to break this up into multiple, topical posts as it threatens to be a bit long. We'll see how it goes... (ended up being one very long post)

I recently released a new "Page Preview" package for Episerver 10+ that adds a (somewhat large and obvious) Page Preview button to the author components / gadgets. The add-on is documented in the Git repo linked. This article (or series) is more about creating such a gadget - I'm going to keep it as high-level and logical as I can.

My add-on uses a Partial Router to function, which is merely utilized by the functionality the add-on is meant to provide, not core to the fact that it is a component. So though that is in my code, it's not covered here. I do cover building a partial router in the docs I wrote for my Episerver Ascend 2017 presentation and the topic is definitely worth a Google if you've a mind to check it out.

August 31, 2017

Now Available: Episerver Property Validation

I'm trying to do more to get code wrapped up into packages and put into the Episerver Nuget feed.

The first of these I've managed to get posted is a collection of validation attributes that can be applied to different types of content properties. Some of them affect strings, some affect media, and some affect lists/arrays, including ContentAreas.

I won't go into full detail for each here. For that, see the ReadMe on Github. What I will do is pick one or two and go through why I thought these were important to share and use.

Quick Tip: Localized Strings in Episerver Attributes

I have a few blog posts I want to get done, but for now I'm starting with a quick tip I wanted to put out there for any newbie developers working in Episerver or working with translations in the authoring environment. I'm rather new to it at the moment, so every little bit helps.

This post is a quick solution to providing translated (or translatable) text that's being set within one of Episerver's class or property attributes - where only constants are expected.

August 16, 2017

Episerver Shared Content with *Partial* Override Control

I was asked to create a quick proof of concept for sharing content between sites in Episerver. While there are many ways to do this, I wanted to create one that allowed for only part of the content to be overridden while the rest was enforced from the parent. The View shows how the output to the page can be determined on whether there is content available.

I don't claim it to be perfect nor production-ready. Just a bit of fun and a PoC.

April 17, 2017

Episerver Automatic Image Tagging with Microsoft Cognitive Services

I must admit I'm enjoying messing around with Microsoft's Cognitive Services, as is probably evidenced by the SMS App I made for my Dad, I also figured I could turn this into a practical application for work as well.

I'm willing to bet that most organizations are still a bit behind on the content strategy curve at this point and aren't adequately tagging their content and images. So I decided to build out a demo-ware / proof of concept for auto-tagging images, which will soon grow into processing content text, possibly as an add-on for the community. We'll see.

It's worth noting that the results that come back are suspect at best. Machine-based tagging should be looked at much like we look at machine-translation. It'll get close, but if you use it then there should be some human moderation put into play. Either pre-publish or post-publish doesn't matter, just know that you're not going to get 100% accuracy. You should expect some tags you'll want to remove and that you'll want to step in and add your own as well.

Still, I find that the tagger inserts values that are likely helpful as well as likely un-thought-of by some authors.

April 13, 2017

200 Lines or Less: Combining Twilio, AWS Lambda, and MS Cognitive Services into an SMS Image Analyzer

(Cool story. Show me the code!)

I've been doing a bit in the way of personal projects and a major source of inspiration for them is my Dad, who has been slowly but surely losing his eyesight for the past decade or so. I really want to help him navigate an intensely, naturally visual world as his affliction progresses. Through hours... and hours... of searching Google, I've found very few resources that are practical enough for every-day use.

That's not to say that there's nothing out there. Apple has been doing a fairly great job making iOS accessible for him - he zooms and has text read to him all the time on his phone. He uses his phone camera to snap pictures of items he wants to zoom in on to read. Not to mention Siri and the help she/it has provided so he can stay in touch with family and friends. Siri also helps him find how to get home, which is pretty critical to a man who walks nearly everywhere and can't read road signs. If he takes a wrong turn, it's easy for him to ask "Where am I?" to regain his bearings.

I've introduced my Dad, an avid reader all his life, to the wonder of audiobooks. He now has multiple Alexa-enabled devices around his condo that he uses to control lights, set timers, manage lists, and get tide schedules (he lives by the beach).

So there's not nothing for him to use, but there are a lot of things that are not as good as they could be for him. And some of what I've found online, such as desktop magnifiers, that are simply absurdly priced as medical equipment rather than the convenient household electronics they could or should be. The cheap ones I've seen hover around the $1,500 mark. For a camera and a screen. I'm considering building one out of an old monitor and a Raspberry Pi with a camera. Maybe even a Pi Zero. I figure it'll set me back about $200.

The point is that the resources are few, expensive, or only moderately effective.

What's a developer to do? Why, build something of course!

March 20, 2017

Quick tip: Checking the version of your Episerver Database

Just a quick post on this one. A friend was recently having problems trying to make updates to his local Episerver site via Nuget. Even after running updates to the DB via the package manager console (update-epidatabase), he was getting errors and he was concerned that there was a DB version mismatch between what he had and what the code was expecting.

(Note: he was trying to use the auto-create schema function in a version prior to when it was implemented.)

If, for whatever reason, you want to verify your DB version against what you should have for your code to work correctly, check the version for your DLL first and go to Episerver's nuget site, which has a handy Compare Database tool. Plug in values for the from/to that at least encompass your DLL version number. This will give you a list of DLL versions paired with DB versions, so you can see where changes to the database have been made.

Next, open up SQL Server Management Studio and connect to your DB server. Navigate the tree to [YourDB] > Programmability > Stored Procedures and execute dbo.sp_DatabaseVersion. The return value of this function will be the version for your DB.

A screenshot of Sql Server Management Studio running the Database Version stored procedure.

Compare and proceed accordingly.