Nonsense Not Withstanding

ian mariano : tech music cuisine flight

January 22, 2014
by Ian Mariano
Comments Off

the importance of being earnest … with your sitecore ia

The information architecture (IA) of a website is very important when it comes to surfacing content in an an effective and appropriate manner for your users.  Once you have a website’s IA, wireframes, comps, annotations and [hopefully] copy samples from creative it’s very important that you can translate the IA into its Sitecore representation.

From a high-level perspective the top-level navigational elements of the IA usually translate directly into the nodes in the Sitecore content tree, e.g. /home, /news, /about, /products, et al. with the appropriate child nodes representing further navigational subdivision or actual content.  But what of items such as layout, data templates, configuration and others that underpin the IA implementation?  It is just as important that these invisible elements are treated as equally important as the visible elements of the IA.

At NorthPoint (Digital) I encourage my teams to follow some key best practices when implementing an IA.  These few listed below may be Sitecore-specific but can also translate to other content management systems as well as to non-CMS implementations.

Work Early and Often with Creative and Actual Users

As much as possible be involved with creative and actual users early on as part of the process.  This helps to ensure that there is as complete a picture of the IA, UX goals and content vision as is possible and that there is a [reasonably] sane plan for implementation.  When possible the UX and overall IA should be proofed by real end-users and not just by creative, business and development teams.  Real end-users include representatives of the target audience, content curators and administrators (admins are end-users too.)

Doing this work early certainly helps to mitigate risk and sometimes may even be serendipitous.

Use Production Content as Soon as Possible

This may not be possible in the early stages of a project but becomes increasingly important as a project moves forward.  Lorem ipsum, stub images and grey box placeholders are not content – they’re filler and not truly representative of what the site experience will be.  Using production content as soon as possible helps to proof out the IA, its Sitecore representation, the UX and any content presentation issues that may arise.  Finding and fixing these issues early on is preferable to reworking them later.

Use Dynamic Configuration

Rather than relying on configuration driven by static files such as the web.config, define runtime dynamic configuration in a well-known place in the Sitecore content tree.  This configuration node should have logically defined sub-nodes for specific configuration scope, e.g. “constants”, feature-flags, pick-lists etc.  Use helper classes to access configuration rather than repeating boilerplate code.  For multi-site deployments global configuration can be defined as well as per-site overrides or customizations.  Again, configuration should always be defined in a consistent, well-known place.  And don’t forget to clearly document your dynamic configuration!

Use Data Template Composition / Inheritance

One of the most powerful features of Sitecore is its ability to construct data templates by inheriting from other data templates.  Think of this as analogous to class inheritance in object-oriented programming.  Data templates define the structure for content items.  They also define default data as well as presentation (display parameters).  This is powerful stuff and when leveraged properly can yield a highly robust and extensible infrastructure to support the IA.  When composing data templates always set defaults in the “standard values” for the template.  This insures that any derived data templates or content properly inherit the template’s defined behavior, especially if you need to change that behavior.  Making one change is preferable then having to replicate that change many times.  Remember you can always override behavior for edge cases.

The Display of Content is not Content

When crafting how content from the IA is represented in Sitecore as data templates remember that for the most part you assign presentation behavior to the data template (on the standard values!) not as part of the structure itself.  This ensures a clean separation between the content itself versus the display of that content and from that a robust UX can grow.

And Never Forget People

Finally, through all the work we do in technology it helps to keep in mind that People are the Heart of the System.

January 1, 2014
by Ian Mariano
Comments Off

mmxiv

another year passed

and here I give

a tip of the glass to those absent friends

those who were more than brothers

those who were more than sisters

those who inspired by just being there for us

companions

oft taken for granted – yet treasured as true wealth

for you we stride proudly forward

tearful, yes

and also basking joyfully in your light

 

November 30, 2013
by Ian Mariano
Comments Off

44

Happy birthday to me!

It was a crazy busy year with its own share of ups and downs but delightedly more ups.

I am so very thankful for my friends and family, especially my wife Ashley and son Eli.

October 9, 2013
by Ian Mariano
Comments Off

goodbye random numbers

Floored by my wife’s words in remembrance for our cat, Random Numbers … she chose me and then chose us …

“My hibiscus plant rarely blooms so when I woke up this morning and noticed this lovely flower I paused and was thankful. Hibiscus flowers are unique because they open and wilt in only one day. You only have one day to enjoy their full beauty. Our sweet-angel-kitty-girl, Randy, was lucky. She was rescued as an adult cat by Ian in 2001 and bloomed for twelve years. She only severely wilted over the last four. Tonight we said good bye. I opened our window and held her in my arms … we breathed the outside air and watched this amazing October sunset. Too colorful for October. She was lethargic but perked up and sniffed the wild aromas for a minute or ten. She was contented yet curious … always curious. I, however, knew what was coming and still hoped with all hopes the vets diagnosis would would prove me wrong. Before we left to ultimately hear the words I didn’t want to hear I clipped the Hibiscus flower and put it in my purse. After all was said and Randy took her last breaths I pulled the bloom from my purse and left it with her. Before leaving the stark, fluorescent-lit room I grabbed Ian’s hand, remembered the sunset, paused and was so very, very thankful. Sleep well our sweet-angel-kitty-girl. We love you.”

(http://instagram.com/p/fOwGDxRTzN/embed/)

September 10, 2013
by Ian Mariano
Comments Off

t+12

T+12 years.

Distance and time from the event has its virtue and there are plenty of other sources rather than mine to wax about cause, effect, rebuilding, learning, loss of innocence and fluidity of permanence.  I do not minimize the events of 12 years ago but rather seize upon the awakening, quickening and both saddening and joyous growing pains of the human race.

We watch, interact, not react, criticize, be silent, scream, question, flow with it, like, love, hate, favorite, fight, pray and prey, be on the fence, galvanize around a cause, reject, accept, help, hurt, brutalize, tenderize, etch, sketch, compose, de-compose, revel, rebel, debate, reject, raise and raze, dream, visualize, theorize, skeuomorphize, de-skeuomorphize, anthropomorphize, assert, question &c. (How does one state the sum total of human experience and history in a blog post?)

We are story.

Quite ephemeral in the rich tapestry of infinity yet still…

July 19, 2013
by Ian Mariano
Comments Off

godspeed lauren

A tearful goodbye to Lauren (@LongLiveLauren) – you will be missed. Thank you for your light and your mark on this world – my wife’s words serve best for this as I am quite speechless …

This world lost a light today. Lauren Zaleski, your physical heart couldn’t be saved. It had too much spirit. You lived, you loved, you worked your ass off. You transformed fear like a pro. You will never be forgotten and I know you’ll be be fighting for good on the other side. Thomas Zaleski your devotion and openness to pain is unmatched. The least everyone can do is tell the people who effect them, the people they love how much they mean. You did more than words. You lived love with Lauren. It was an honor to watch. Be strong. You’re prepared for this. It’s a cruelly beautiful world. Always beauty.

http://onehundredheartbeats.com/

July 6, 2013
by Ian Mariano
Comments Off

service and scale

Mark Cavage has a nice article over at ACM about building a distributed system. This is good reading for all technologists and designers working at scale, even those who aren’t so in touch with actual engineering.

Services are not just for the end users but also for those who build and operate them. Service designers must understand how services will be delivered but must not lose sight of service design’s primary goal: human focus.

June 11, 2013
by Ian Mariano
Comments Off

embedded razor views in mvc 4

Here’s a little fun you can have with very little scaffolding that let’s you ship ASP.NET MVC 4 razor views as embedded resources in a shared assembly and allows you to override them as needed.

The technique is to create a VirtualPathProvider that supports translating virtual paths to embedded resources.

For the code below, we’re assuming the FunWithMvc assembly has .cshtml files under a folder called /views in an appropriate subfolder for the controller or for shared views. Each of these files in the view folders must be marked as embedded resources.

To override the embedded resource you merely have to create the replacement .cshtml file in a corresponding website /views folder.

using System;
using System.Collections;
using System.IO;
using System.Linq;
using System.Web.Caching;
using System.Web.Hosting;
using System.Web.Mvc;

namespace FunWithMvc
{
    public class EmbeddedVirtualPathProvider : VirtualPathProvider
    {
        // Nested class representing the "virtual file"
        public class EmbeddedVirtualFile : VirtualFile
        {
            private Stream _stream;

            public EmbeddedVirtualFile(string virtualPath,
                Stream stream) : base(virtualPath)
            {
                if (null == stream)
                    throw new ArgumentNullException("stream");

                _stream = stream;
            }

            public override Stream Open()
            {
                return _stream;
            }
        }

        public EmbeddedVirtualPathProvider()
        {
        }

        public override CacheDependency GetCacheDependency(
            string virtualPath,
            IEnumerable virtualPathDependencies,
            DateTime utcStart)
        {
            string embedded = _GetEmbeddedPath(virtualPath);

            // not embedded? fall back
            if (string.IsNullOrEmpty(embedded))
                return base.GetCacheDependency(virtualPath,
                    virtualPathDependencies, utcStart);

            // there is no cache dependency for embedded resources
            return null;
        }

        public override bool FileExists(string virtualPath)
        {
            string embedded = _GetEmbeddedPath(virtualPath);

            // You can override the embed by placing a real file
            // at the virtual path...
            return base.FileExists(virtualPath)
                || !string.IsNullOrEmpty(embedded);
        }

        public override VirtualFile GetFile(string virtualPath)
        {
            // You can override the embed by placing a real file
            // at the virtual path...
            if (base.FileExists(virtualPath))
                return base.GetFile(virtualPath);

            string embedded = _GetEmbeddedPath(virtualPath);

            // sanity...
            if (string.IsNullOrEmpty(embedded))
                return null;
            
            return new EmbeddedVirtualFile(virtualPath,
                GetType().Assembly
                .GetManifestResourceStream(embedded));
        }

        private string _GetEmbeddedPath(string path)
        {
            // ~/views/sample/x.cshtml
            // => /views/sample/x.cshtml
            // => FunWithMvc.views.sample.x.cshtml

            if (path.StartsWith("~/"))
                path = path.Substring(1);

            path = path.ToLowerInvariant();
            path = "FunWithMvc" + path.Replace('/', '.');

            // this makes sure the "virtual path" exists as an
            // embedded resource
            return GetType().Assembly.GetManifestResourceNames()
                .Where(o => o == path).FirstOrDefault();
        }
    }
}

You would then install the EmbeddedVirtualPathProvider in your application start up code before anything else:

protected void Application_Start()
{
    HostingEnvironment.RegisterVirtualPathProvider(
        new EmbeddedVirtualPathProvider());

    AreaRegistration.RegisterAllAreas();
    // ...
}

This same technique can be used to pull razor views from a database or other sources and I leave that as well as mitigating filesystem i/o pressure under high load as an exercise for the reader.

April 3, 2013
by Ian Mariano
Comments Off

banks

Author Iain Banks announced today that he has terminal cancer.

As an fan of his sci-fi and fiction works this is sad news indeed.

As I stated when I launched this blog:

… about the title of this blog, it’s a nod to the wonderful and absolutely creative body of work by Iain M. Banks, specifically about the Culture.  I’ve become quite an ardent reader of his works lately and am on a bit of a ship-mind-like naming kick.

UPDATE:

Iain sublimed on 9 June, 2013.

Here is his obituary in the Guardian and an entry from Neil Gaiman.

December 7, 2012
by Ian Mariano
Comments Off

stories service design

Something has been bubbling amongst my colleagues. Something we’ve all been trying to articulate over many years in one form or another in blogs, posts, tweets, re-tweets, speeches - stories. And once in a while, an event happens akin to a Rayleigh-Taylor Instability – from whence a new mixture occurs – and here it is:

“The Hero with a Thousand Faces”, a keynote speech by one of my beloved friends, Louisa (@customdeluxe), at NEXT:

(Source: http://nextberlin.eu/2012/12/the-hero-with-a-thousand-faces/)