Extending the BizFX Commerce Tools for #Sitecore Commerce for Simpletons

Sitecore commerce has some really great features and hidden gems. Recently I was given an assignment to create some custom forms for the BizFX tools that come with Sitecore commerce. Excited as I was to get started I found there was not too much documentation on this. I had some help thanks to Andrew Sutherlands blog. There were things though that I ran in to that I had to figure out how to get through. So I want to make sure I can help others who may get into the same situation as me and also if I ever need to to extend the tools again I can look back at this blog and it will help me figure some of the things out.

Understanding the Master Form and Children

Basically you have a master view. This is usually a summary of your records. Clicking on that master form will show its children views. The children could be any type of detail block of information. So lets say you have a summary of services as your master. The children view when breaking it down further could be notes and description, service dates, vendor information etc… The code below is an example on how to add children view(s) to a master view. You need to make sure you are on the correct master view.

[PipelineDisplayName(Constants.Blocks.GetServicesItemsBlock)]
    public class GetServicesItemsBlock : GetTableViewBlock
    {
        private readonly IServiceService _servicesService;

        public GetServicesItemsBlock(IServiceService servicesService)
        {
            _servicesService = servicesService;
        }

        public override Task<EntityView> Run(EntityView entityView, CommercePipelineExecutionContext context)
        {
            Condition.Requires(entityView).IsNotNull($"{this.Name}: The argument can not be null");

            var entityViewArgument = context.CommerceContext.GetObjects<EntityViewArgument>().FirstOrDefault();
            if (entityViewArgument == null || string.IsNullOrEmpty(entityViewArgument.EntityId)) return Task.FromResult(entityView);

            if (!EntityViewExtensions.IsOnServicesView(entityViewArgument)) //Make sure you are on the correct master view
            {
                return Task.FromResult(entityView);
            }
            
            var entityId = long.Parse(entityViewArgument.EntityId.Substring(entityViewArgument.EntityId.LastIndexOf('-') + 1));
            var services =  _servicesService.GetServiceById(entityId);

            EntityView subView = new EntityView
            {
                EntityId = entityId.ToString(), Name = Constants.Headers.Items, UiHint = "Table"
            };

            entityView.ChildViews.Add(subView);

            var servicesItemList = services.Result.ServiceItems;
            if (servicesItemList == null) return Task.FromResult(entityView);

            foreach (var subitem in servicesItemList)
            {
                EntityView lineView = new EntityView
                {
                    EntityId = subView.EntityId, ItemId = services.Result.OrderId, Name = Constants.Headers.Items
                };

                lineView.AddServiceItemChildView(subitem);
                subView.ChildViews.Add(lineView);
            }

            return Task.FromResult(entityView);
        }
    }

For the master you will have code like this if you need to change the properties:

//Current entity which is the the master view is passed in to the block.
public override async Task<EntityView> Run(EntityView arg, CommercePipelineExecutionContext context)

var status = entityViewArgument.ViewName.Replace("ServicesList-", string.Empty);
            arg.Properties.Add(new ViewProperty
            {
                Name = "ListName",
                RawValue = status,
                IsReadOnly = true,
                IsHidden = true,
                IsRequired = false
            });
            arg.UiHint = "Table";
Example Summary

To sum it up the master/child view structure is simple. You have your master view, but then you can add children views and those children can have children views.

For the children you want to generate a new view.

It would be done in this order (see code for reference):

  1. Get the master view.
  2. Create a subview (child view).
  3. Create and add children to the subview.
  4. Add subview to the master entity view.
using System.Linq;
using System.Threading.Tasks;
using Sitecore.Commerce.Core;
using Sitecore.Commerce.EntityViews;
using Sitecore.Framework.Conditions;
using Sitecore.Framework.Pipelines;

namespace PSP.Commerce.Plugin.Service.Pipelines.Blocks
{
    ///<summary>
    ///displays the service items view in BizFx/services.
    ///</summary>
    [PipelineDisplayName(Constants.Blocks.GetServicesItemsBlock)]
    public class GetServicesItemsBlock : GetTableViewBlock
    {
        private readonly IServiceService _serviceService;

        public GetServicessItemsBlock(IServiceService serviceService)
        {
            _serviceService = serviceService;
        }

        public override Task<EntityView> Run(EntityView entityView, CommercePipelineExecutionContext context)
        {
            Condition.Requires(entityView).IsNotNull($"{this.Name}: The argument can not be null");

            var entityViewArgument = context.CommerceContext.GetObjects<EntityViewArgument>().FirstOrDefault();
            if (entityViewArgument == null || string.IsNullOrEmpty(entityViewArgument.EntityId)) return Task.FromResult(entityView);

            if (!EntityViewExtensions.IsOnSubcriptionsView(entityViewArgument))
            {
                return Task.FromResult(entityView);
            }
            
            var entityId = long.Parse(entityViewArgument.EntityId.Substring(entityViewArgument.EntityId.LastIndexOf('-') + 1));
            var service=  _serviceService.GetServiceById(entityId);

            EntityView subView = new EntityView
            {
                EntityId = entityId.ToString(), Name = Constants.Headers.Items, UiHint = "Table"
            };

            entityView.ChildViews.Add(subView);

            var serviceItemList = service.Result.ServiceItems;
            if (serviceItemList == null) return Task.FromResult(entityView);

            foreach (var subitem in serviceItemList)
            {
                EntityView lineView = new EntityView
                {
                    EntityId = subView.EntityId, ItemId = service.Result.OrderId, Name = Constants.Headers.Items
                };

                lineView.AddServiceItemChildView(subitem);
                subView.ChildViews.Add(lineView); 
            }

            return Task.FromResult(entityView);
        }
    }
}

Example child item.

There are many field types you can use for views, but two of them that stood out for me was the EntityLink and HTML field types.

Below is an example of an link type. Which we can create to navigate to other types of views. The Id for instance could be used to retrieve records for the child views.

var idViewProperty = new ViewProperty
                {
                    Name = "Id",
                    RawValue = service.Id,
                    IsReadOnly = true,
                    UiType = "EntityLink"
                };
                entityView.Properties.Add(idViewProperty);

Below is an example of using a UitType of Html to create an image column value.

  var imageLinkProperty = new ViewProperty
            {
                Name = "Image",
                RawValue =  "<a><img src="+ serviceItem.ImageUrl +" alt=" + serviceItem.Name + " width=\"50\" height=\"50\"></a>", //MediaManager.GetMediaUrl(serviceItem.ImageUrl),
                IsReadOnly = true,
                UiType = "Html"
            };
            properties.Add(imageLinkProperty);

Last thing I want to mention is action view buttons. You can easily defined them (see below).

            ActionsPolicy actionsPolicy = entityView.GetPolicy<ActionsPolicy>();
            List<EntityActionView> entityActionView = actionsPolicy.Actions;
            EntityActionView skipEntityActionView = new EntityActionView
            {
                Name = context.GetPolicy<KnownServiceCancelPolicy>().CancelService,
                DisplayName = Constants.Actions.CancelService,
                Description = Constants.Actions.CancelService,
                IsEnabled = true,
                RequiresConfirmation = true,
                EntityView = string.Empty,
                Icon = "delete"
            };
            entityActionView.Add(skipEntityActionView);

            List<EntityActionView> actions2 = actionsPolicy.Actions;
            EntityActionView cancelEntityActionView = new EntityActionView
            {
                Name = context.GetPolicy<KnownServiceSkipPolicy>().SkipService,
                DisplayName = Constants.Actions.SkipService,
                Description = Constants.Actions.SkipService,
                IsEnabled = true,
                RequiresConfirmation = true,
                EntityView = string.Empty,
                Icon = "hand_stop2"
            };
            actions2.Add(cancelEntityActionView);

Here are the results you will see in the view.

Hope this helps you if you are finding this blog. If not please contact me. Thanks.

#Sitecore Hackathon 2021 The Good and Some Bad. #SCHackathon

Hard to believe this was my fifth year doing the Sitecore Hackathon. It has become a tradition though and would not want to miss it. This year my teammate was a co-worker and we were team Alpha Centauri. Get it? We both work for Alpha Solutions. Anyway here is how it went.

Keep Things Simple

Learned this many times in the past. So anything that wasn’t out of the box was off the table. Nothing wrong with trying something new, but as a marathoner I have to stick to the important rule of not trying anything you haven’t practiced on race day.

Well I Missed Something

So I should of read this more closely. We were supposed to use Sitecore 10.1, but for some reason I installed Sitecore 10 update 1 beforehand. So guess what? I broke my own rule and just learned something new. It was McAvoy vs Stewart. Love the reskin BTW.

Some Great Topics to Choose from, but We Need a Solid Idea

This year was the fastest year my hackathon team came up with an idea. One of the topics was Best of SXA. Working with SXA everyday we had come up with a much needed change we felt is needed.

Divide and Conquer

As in past hackathons that I have worked with others, it is always good to come up with roles on the team. I would handle the documentation/video and my teammate would handle the coding. And we were off.

The Finale

After lots of time spent coding and documenting we put something together. Hardest thing for me was getting the video right. There is a reason why I am not a YouTube star. So this is what we came up with.

So that is a wrap. See you all next year!

Basic Authentication with #Sitecore 9.3

A few months back I was given a task to put in basic authentication into Sitecore 9.3. It was mainly from preventing anyone to get into staging sites. I came across and older blog that is currently missing. I wanted to give them credit since it was the inspiration for this blog. You can find the original blog post on the web archives here. I have made some of my own updates including Rules Based Configuration.

using System;
using System.Web;
using Sitecore.Diagnostics;
using Sitecore.Pipelines.HttpRequest;
using System.Text;
using System.Net.Http.Headers;
using System.Linq;

namespace Abc.SharedSource.SitecoreProcessors
{
    public class BasicAuthentication : HttpRequestProcessor
    {
        private bool CheckPassword(string username, string password)
        {
            string[] userlist = Sitecore.Configuration.Settings.GetSetting("BasicAuthUsername").Split(',');
            string[] passwords = Sitecore.Configuration.Settings.GetSetting("BasicAuthPassword").Split(',');

            if(userlist.Contains(username) && passwords.Contains(password))
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        private void AuthenticateUser(string credentials)
        {
            try
            {
                var encoding = Encoding.GetEncoding("iso-8859-1");
                credentials = encoding.GetString(Convert.FromBase64String(credentials));

                int separator = credentials.IndexOf(':');
                string name = credentials.Substring(0, separator);
                string password = credentials.Substring(separator + 1);
             
                if (!CheckPassword(name, password))
                {
                    HttpContext.Current.Response.StatusCode = 401;
                }
            }
            catch
            {
                HttpContext.Current.Response.StatusCode = 401;
            }
        }
        //Basic Auth Code End

        public override void Process(HttpRequestArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
            if (Sitecore.Context.Item != null || Sitecore.Context.Database == null || args.Url.ItemPath.Length == 0)
                return;

            if (Sitecore.Configuration.Settings.GetSetting("TurnonBasicAuth") != "True" || Sitecore.Configuration.Settings.GetSetting("TurnonBasicAuth") == "") return;
            if (PatternMatch()) return;
            var request = args.HttpContext.Request;

            var authHeader = request.Headers["Authorization"];
            if (authHeader != null)
            {
                var authHeaderVal = AuthenticationHeaderValue.Parse(authHeader);

                // RFC 2617 sec 1.2, "scheme" name is case-insensitive
                if (authHeaderVal.Scheme.Equals("basic",
                        StringComparison.OrdinalIgnoreCase) &&
                    authHeaderVal.Parameter != null)
                {
                    AuthenticateUser(authHeaderVal.Parameter);
                }
            }
            else
            {
                args.HttpContext.Response.StatusCode = 401;
            }

            if (HttpContext.Current.Response.StatusCode == 401)
            {
                string Realm = Sitecore.Context.Site.TargetHostName;//HttpContext.Current.Request.Url.AbsoluteUri;
                args.HttpContext.Response.Clear();
                args.HttpContext.Response.Headers.Add("WWW-Authenticate",
                    string.Format("Basic realm=\"{0}\"", Realm));
                args.HttpContext.Response.Flush();
                args.HttpContext.Response.End();
            }
        }
        bool PatternMatch()
        {         
            string[] mockUrls = Sitecore.Configuration.Settings.GetSetting("ExcludedPaths").Split(',');
            string url = Sitecore.Context.Site.TargetHostName;// HttpContext.Current.Request.Url.AbsoluteUri;
            foreach (var urlval in mockUrls)
            {
                var containsurl = url.Contains(urlval);
                if(containsurl)
                {
                    return true;
                }
            }
            return false;
        }
    }
}

Since this is Sitecore 9.3 the configuration below is using rules based. 🙂 More than likely you would want to require the ContentManagement role, but you can modify the configuration to use any roles and environments. I put the username and settings in the configuration since Sitecore will also have its own and in this case is only for preventing anyone who accidently finds the site from seeing anything.

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:localenv="http://www.sitecore.net/xmlconfig/localenv/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="ContentManagement, Standalone">
    <pipelines localenv:require="DevBuild or LocalDeveloper">
      <httpRequestBegin>
        <processor type="Abc.SharedSource.SitecoreProcessors.BasicAuthentication, BrookfieldResidential.Extensions"
						   patch:before="processor[@type='Sitecore.Pipelines.HttpRequest.UserResolver, Sitecore.Kernel']"/>
      </httpRequestBegin>
    </pipelines>
    <settings localenv:require="DevBuild or LocalDeveloper">
      <setting name="TurnonBasicAuth" value="True"></setting>
      <setting name="ExcludedPaths" value="media,layouts,speak,/sitecore,/sitecore/admin,brpsc.dev.local/about" />
      <setting name="BasicAuthUsername" value="UserTest1,TestUser2,TesUser3" />
      <setting name="BasicAuthPassword" value="testpass1,testpass2,testpass3" />
    </settings>
  </sitecore>
</configuration>

You should then get the default login screen that looks like this:

#Sitecore Virtual Symposium Kickoff and My Plans #SitecoreSYM @AlphaSolutionUS

2020 sure has had its changes and challenges. Right now Chicago should be alive with Sitecore fans enjoying the best pizza in the world, but that is not possible this year. I am excited nonetheless to enjoy they symposium in the Chicago suburbs and can’t wait for the next few days.

My goal for this year is to concentrate on content marketing and learn as much as I can about the Sitecore Content Hub. That is something I have been excited to learn more about and can’t wait to dive in.

Things kicked off tonight with Happy Hour. I will let the pictures speak, but there was drink making, a chef and magic. Most of all enthusiasm.

Happy Hour
Making Drinks
Some great appetizers.
Magic!
Da Bears! Okay they were not part of the kickoff, but they are playing tonight.

Disabling Identity Server in #Sitecore Installation with #PowerShell

Recently I was given the task to disable the identity login for a dev server. It can be done easily by renaming Sitecore.Owin.Authentication.Disabler.config.example and Sitecore.Owin.Authentication.IdentityServer.Disabler.config.example in the [sitefolder]\App_Config\Include\Examples\ folder. We needed an automated way though. Using the PowerShell script below did the trick.

#SitePhysicalRoot and Prefix are optional. If this script is inserted into a PowerShell install script that has these variables already. In my case XP0-SingleDeveloper.ps1.
#$SitePhysicalRoot = "F:\Sites"
#$Prefix = "testsite123"

$filepath = $SitePhysicalRoot + '\' + $Prefix +'.sc\App_Config\Include\Examples\'
$filelist = @()
$fn1 = 'Sitecore.Owin.Authentication.Disabler.config.example'
$fn2 = 'Sitecore.Owin.Authentication.IdentityServer.Disabler.config.example'
$path1 = $filepath + $fn1
$path2 = $filepath + $fn2
$filelist = @($path1,$path2)

 foreach ($file in $filelist) {
    If (Test-Path $file){
        $rn = $file.replace(".example","")
        Rename-Item -Path $file -NewName $rn
        Write-Output $file was renamed to $rn
    } else {
    "{0} does not exist or already renamed" -f $file
    }
}

#Sitecore Rule Based Configuration for Newbies

If you are like me, you must play around with a new feature to understand it better. When Rule Based configuration was introduced in Sitecore 9.3 that was the case for me. Now that I understand it better and have used it in a real application, I will explain it so if I ever read this blog again, I will understand it.

cavemanrules

Role:Define

Depending on if you are running Sitecore locally or have setup a Content Management and Content Delivery server etc… this value will be different for each environment. In the Sitecore 9.3 you will find the following.

<!-- SUPPORTED SERVER ROLES 
Specify the roles that you want this server to perform. A server can perform one or more roles. Enter the roles in a comma separated list. The supported roles are:
ContentDelivery
ContentManagement
ContentDelivery, Indexing
ContentManagement, Indexing
Processing
Reporting
Standalone
Default value: Standalone
-->

In this case we will just use the default for our example.

<add key="role:define" value="Standalone"/>

Localenv:Define

This is used to denote the type of local environment installed. For instance, you can have a CM server setup for staging and production. You might then have one value on the CM for staging that says “StageCM” the one on the production CM could be “ProdCM”. This is done so you can break down the configuration settings further. I will go into this more later. In this case we will pretend the role:define value is Standalone and this is a developer’s install. We are going to add the following:

<add key="localenv:define" value="DevEnviroment"/>

Let’s bring this together. Below is a simple example of how to make sure the configuration looks for the role Standalone and localenv value of DevEnviroment. Notice the xmlns:localenv=http://www.sitecore.net/xmlconfig/localenv/. That is important to tell the process to look for that localenv key and xmlns:role=http://www.sitecore.net/xmlconfig/role/ is used to tell the process to look for the role key. In this example we are doing this for sites, but this can be done for other tags.

<?xml version="1.0"?>
<configuration
xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:localenv="http://www.sitecore.net/xmlconfig/localenv/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone">
<sites localenv:require="DevEnviroment">
//Add your transformation code here.
</sites>
</sitecore>
</configuration>

You can do many combinations. Keep in mind that you can use logical expressions as well. Like or and !.

<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"xmlns:localenv="http://www.sitecore.net/xmlconfig/localenv/"xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentDelivery">
<sites localenv:require="LocalDeveloper">
//Add your transformation code here.
</sites>
<sites localenv:require="DevBuild"> //Add your transformation code here. </sites> <sites localenv:require="Prod"> //Add your transformation code here. </sites> <sites localenv:require="Stage"> //Add your transformation code here. </sites> </sitecore> <sitecore role:require="ContentManagement"> <sites localenv:require="Prod"> //Add your transformation code here. </sites> <sites localenv:require="Stage"> //Add your transformation code here. </sites> </sitecore> </configuration>

What is a good way to test all this? Well Sitecore has though of that.

Using [siteaddress]/sitecore/admin/showconfiglayers.aspx you can select a role and see what the configuration will look like. The result is similar to what you would see with showconfig.aspx.

One thing I should mention is so far, I have not gotten it to work with a non-Sitecore configuration transform. In those cases, you may still need to use something like SlowCheetah. Let me know if you have any questions.

Check out the links below for more reading on the rule based configurations.

https://doc.sitecore.com/developers/93/platform-administration-and-architecture/en/use-a-rule-based-configuration.html

https://jammykam.wordpress.com/2017/10/17/rules-based-configuration/

#Sitecore Data Exchange Framework Gems

There are a lot of things I have found with each version of the Sitecore Data Exchange Framework that I wanted to explore, and others have asked me about. I will call them gems. These are things that might not always be used but can serve a good purpose I believe. I also wanted to get a higher understanding of what they do so here we are. I hope to go into more detail for each one in other blogs.

Telemetry Enabled

With telemetry enabled checkbox checked you can track the performance of each process. This information can be useful to IT support group as well as developers needed to know how the DEF process performs so adjustments can be made to processes/hardware for instance.

Create New Item

In the checkbox option below, it is defaulted as unchecked. Normally based on a unique field value a new item would be created when unchecked after checking if an existing item exists. Checking it the item will be only created in memory. There could be a variety of reasons to have an item in memory only. One of which would be for testing, it saves clean up time when you just need to test processing without worrying about getting rid of the Sitecore items.

Runtime Settings

This setting allows the pipeline step to be run on a different server. This saves resources on the Sitecore server. I can see this used for something where a lot of data is involved from a separate data source and/or if you finish extracting data from Sitecore another system can pick it up and continue. The DEF process can wait for that to be done and continue.

Verification

I have not used this, but from what I understand xDB analytics data migration would be logged here if you have a DEF process that does that. If you do not, make sure not to check any of the options. It can cause the DEF process not to work.

There are some more little gems I am going to look at for DEF in another blog. Also like I said before I am going to try and expand and go into more detail on each one of these. Let me know what you would like to see and I will try and cover it.

Working Remote. Tips from a Veteran Basement Warrior

I have been working remote for a long time and with the current events going on, I thought I would share some of my advice I learned along the way. Everyone is different so not everything I do will work for everyone. I am always tweaking things myself. A happy workplace = happy working. So, here are my top tips.

Get Your Dream Desk. A Sit/Stand Desk Perhaps

I always wanted the desk my old boss had. It was one of the nicest desks I have seen. When I started working remote, I end up purchasing something similar. However, with the stand-up desk movement I added a conversion for it. My tastes have changed since then and I wouldn’t go back to a traditional desk. I am in the process of upgrading my desk now. I wanted to go for a clean look and a sit/stand desk with a motor. I also ended up upgrading my chair to an ergonomic stool. You can find lots of YouTube videos on the clean look or you can always just go for a traditional look. Either way find something that makes you happy. This is the site where I got my current ergonomic stool has free fast shipping and desk that is on its way. Check out Autonomous here.

Get Out of the House

This could be going to the store, meeting up with a group to exercise, going to the gym etc.… It also could mean going out your front door and sitting on the porch for ten minutes. That fresh air will do you good.

Meetups

Find out where professional meetups are in your area and try to attend. If you don’t have one, maybe start one. I attend Sitecore meetups in Chicago and Milwaukee. I have also spoke virtually at meetups. It is a great way to make connections and friends.

Exercise

This is so important. You could run before working in the morning, go to the gym at lunch, take a bike ride, walk the dog etc.… Just get out there and take care of you.

Good Internet Connection and Strong Signal

This is important. Communication and productivity are key when working remote. Without a good internet connection with fast speeds you will run into many issues. Also, your Wi-Fi should reach the whole house. I highly recommend a mesh system instead.

Tweak Your Office

The nice thing about working from home is you can make your office the perfect setting. Tastes change. You get sick of looking at the same stuff or using the same electronics. You can try something new and mix things up. Paint your office or rearrange your desk. Whatever you do it is your choice.

Use Your Webcam

I know a lot of times you don’t want to be seen, because you may be in your pajamas. However, it is nice to get a face with the people you are talking to. I attend a virtual Sitecore lunch every Friday and we have our webcams on. It is fun to talk about our different backgrounds and put a name to a face.

Switch Office Places

Sometimes you need a change of scenery. Go to the coffee shop or library sometimes. Or maybe just sit on a recliner. This a big advantage you have working remote that you couldn’t do working in a company office. Can you imagine leaving and going to a coffee shop before you were remote?

Comfortable Footwear

I have gone through my fair share of slippers. Not a lot of good quality ones so they don’t last long, but they were fun to try. I had a running injury a while back and now I just use shoes. You should wear whatever you are comfortable in.

Dress Professional Sometimes

Believe it or not I miss some of the days of dressing nice for the office. I am not talking about formal wear, but business casual. Occasionally wear something you would wear in the office. It always feels good to dress the part.

Virtual Meetings

I briefly touched on this above. Meeting with co-workers, clients, professionals in the same are of work as you are great ways to keep connecting to the outside world. Most clients will already have virtual meetings, but that does not mean you can’t do lunch and learns with them and your co-workers.

Talk Off Topics with Your Co-Workers

Slack and Microsoft Teams are just a few of the ways to talk to your co-workers. Most modern companies are already are using these tools. Why not use it to talk about stuff you would normally share around a water cooler?

Use a Trackball Instead of a Mouse

This is my personal favorite. Trackballs have been around for a long time and don’t get the recognition they deserve. I am not a fan of using a touchpad or mouse. Trackballs are ergonomic, don’t take up a lot of space, easily portable and they are one of the neatest gadgets. Nobody can judge you for using one when working remote.

Keep Your Office Clean

You don’t have a cleaning crew usually working at your home office. So, you are it. I just threw away a ton of garbage in my office. Stuff like cables and paper (recycled what I could). Don’t be like me. Throw it away or recycle anything you can that you won’t probably need.

Work the Hours You Would Work in an Office

This is a given for most companies, but you may be tempted to work at different times throughout the day. I know there are different situations, but keeping to the 8-9 hour work days really helps make the remote situation more like you are in the office. Also, most people are available from 8-5, 9-5 etc.… Keep in mind time zones come into play, but more than likely the communication will be better when things are not off hours. Now of course these days working remote almost feels like you are always around. Which is true in a way. You will find yourself working off the clock more than when you are in a n office. Sometimes though you need to shut it off, so you are ready for the next workday.

I will update this blog as I think of new things and updates. For the ones who are new at this you will get the hang of it. If you have any questions don’t hesitate to ask.

#Sitecore #SCHackathon 2020 Team Sitecore Daredevil (My solo adventure.)

This was my fourth year competing in the Sitecore Hackathon. This year was a little different for me though. As I had to go in it alone. I am not going to lie; I was a little nervous doing this solo. I thought hey I will try and do what I can, but if after a few hours if I just don’t get it, I will be done. After all I had a lot going on as early in the morning, I would have to stop to do Dad duty. However, this experience made me better and I even discovered some things about myself. So, here is the play by play and what I learned along the way.

Pre-Planning

The last three years I learned a lot of how to prepare as much as I could. You can check out those experiences here. I learned my lesson in the past to install Sitecore beforehand. This year it was the latest version 9.3. Also learned to make sure I had access to my GitHub repo and to download the solution. All good there.


Hours 1-2

For some reason I did not get the topics emailed to me, but that didn’t stop me. I went on Slack to the Hackathon channel and one of the judges sent me them. I looked them over and my first thought was I need a team to do this.

Task were something like this (had to choose just one):

  • Create a meetup website.
  • Create a new site for Sitecore modules.
  • Create a new Hackathon website.

You see these tasks kind of needed a front-end developer to make it look pretty. Not that I can’t do front-end work, but not one of my strengths. However, I was in the same boat as others as I found out in Slack. So, functionality first then I will make it look as pretty as possible. I did need to envision the screen either way and I sketched out something for the meetup website task. Then after an hour of research I said no. I saw someone post in Slack about the KISS (keep it simple stupid) method. One of the best coding philosophies ever. So from the past I have learned go for the path with the least resistance and make it work. I chose to do the Hackathon website. I had ideas on how to make it better and utilize Sitecore out of the box. Just pure raw Sitecore is all I needed.

Hours 3-10

Did I ever mention I have run over ten marathons? If I could do that maybe I could do this I thought. Well in the words of Forrest Gump I was running. Except replace running with coding. Well to be honest I created the templates, layouts and content for the first few hours. Does that count as coding? I had a vision on how I could make the site easy to maintain. I want to mention that I used the icon Sitecore searcher. Thank you Gabrial Streza.

After creating the initial Sitecore stuff it was time to fire up Visual Studio and start integrating. I coded away. With each hour that went by I got a little further. In fact, I didn’t want to stop. I finally got to a point where I had to as I had to make a two-hour drive round trip and be on Dad duty at a sporting event.

Not going to lie. At this point I was really wishing I had a team. When you know you will have to go on little sleep the next day it is good to have someone there with you that you can tag in. Fortunately, just going on Slack helped me feel a little more supported.

Hours 11-13

I slept. Also dreamed about the Hackathon.

Hours 14-19

Drove and went to one of my kids sporting events. Thought about the Hackathon while there and if I will get the documentation done on time. Drove home and then I was back at it.

Hours 20-23

Finish up the code and make the screen look pretty as possible. Okay looks like the 90’s front-end and Netscape only compatible, but the functionality and my vision are there. Let’s package it up. Update the Readme file with installation instructions and screen shots. Okay got that. Now I must do a video. The part I was dreading the most. It was like when Scrooge was going to meet the ghost of Christmas future. So, after trying a few things decided what the heck time to buy Snagit. In one take I had my video. Checked in code and double checked it and checked it in a few more times to make sure it was perfect. Viewed the readme file which contained installation instructions, screen shots, package link and video link. Alright time to call it a day.

Lessons Learned This Year (short list this year)

  • Functionality first. I always knew this, but most of the time with Sitecore projects I prefer the screens done first.
  • Buy Snagit. It is worth every penny.
  • Do a clean install of the package. Not that it would fail, but I am thinking next year have another vanilla Sitecore site at the standby.

Summary

I have to say no matter what happens. I learned a lot about myself and gained some confidence I felt I have been missing. In 24 hours I got to be an architect, lead developer, senior developer and entry level developer. Others may not always believe in you and support you, but for sure you must be your own biggest cheerleader.

My Third #Sitecore Technology MVP Journey. #SitecoreMVP

I debate this every year. Should I write a blog about becoming a Sitecore MVP? I like to blog so why not. It is no secret that I love the Sitecore community and I am honored to be a part of it. Being an MVP last year I was able to help with feedback on a few things before they were released to rest of the community. I felt like the cool kid in class. So here is my goal check and what I would like to do this year.

Last year’s goals:

  • Write some more good quality blogs. (I believe I did this. I really hope my DEF blogs have helped at least one person.)
  • Attend all the local Sitecore meetups including one in Milwaukee. (Chicago didn’t have much for meetups, but drove the 2+ hours to go the Milwaukee meetup. I also got to present at one. Yay!)
  • Reach out help others in Slack and Sitecore Stack Exchange. (I love helping others so I won’t stop trying.)
  • Create Sitecore Runner Buttons and bring them to the Symposium. (Sadly I didn’t get to go this year, but if you want a button I can send you one. :()
  • Using my new MVP status network with the Sitecore family better. (I hope I did a good job with this, but I can always do better.)
  • Participate in the Sitecore Hackathon again. (Did that with a successful submission finally.)
  • Make a VLog. (I still have to make this happen.)
  • Finish that update on my DEF Reddit Module in the Sitecore Marketplace. (All updated and code shared.)

This Year’s Goals:

  • Helping others. I love doing this and feel I can do a better job.
  • Continue updating my blog and sharing my knowledge with the Sitecore community.
  • Come up with a good idea that hasn’t been done before with Sitecore (I got this, can’t share yet until I know it works.)
  • Speak again at a meetup. I was shy once. Hard to believe. I love speaking now in front of others.
  • Make that darn VLog. For my new idea I will need to.
  • Attend the Sitecore Symposium in Chicago. I can take the train. Even if it costs me vacation time and I have to pay for it I will be there.
  • Keep updating my DEF Reddit Module.

cookiecakemvp2020