Skip to the content

I've been working on a new website for the past month or so. Things started well, I got a new SQL server built for the project and I installed Umbraco via Nuget

>> Install-Package UmbracoCMS

Then I setup some Doctypes and Templates within the back office but then things started to get messy and confusing. I ended up with loads of Datatypes which I quickly lost track of. I ended up with loads of them as I was creating a new one each time I needed it e.g. "Oh I need another textbox", new one created.

Before I knew it I had lost track of what I was trying to build and what I had used and what I hadn't.

  • Lesson 1: Create a textbox with a name like "standard textbox", and use it for most things. Only create a new one if there is a specific reason, e.g. You need specific validation on it.

To try and help the user experience I also decided to use Nested Content. In the past, projects I have worked on have used a folder structure to organise pages. There is a parent node, then a child folder which would then have child components.

With Nested Content, it keeps everything a lot tidier in the backoffice and I feel it makes it more user friendly.

  • Lesson 2: Work out what components you need before building them, are there any that are similar in functionality? Name components in a thoughtful way, e.g. All components are named "componentTextblock", "componentCallToAction". This makes it easier to remember what that partial is for. I also put the component partials in their own folder called "ContentBlocks".

Once I had the components setup and working, I then moved on to creating a page that pulled out all the news articles and listed them on a page, via Examine. I thought this was going to be straight forward but I was wrong. Or to be more exact, I over complicated it once I got started.

I've been so stressed due to this section! I've been sitting at my desk in the office almost in tears. Feeling completely rubbish at my job, questioning if I should be a developer and loosing so much sleep it's not even funny.

I've done all the Umbraco training. I've the Umbraco Master Certification against my name and here I am, thinking WTF! How can I just get a list of articles that are filtered by docType, date published and/or a category that is set in the backoffice. On top of all of this, I'm expected to the 'The Umbraco Guy' since I'm part of the Community and the pressure was really getting to me. 

After trying to find a solution via Google for far too long, I asked for help. I posted on the Umbraco Slack channel and the first to come to my aid was Nik. What Nik did though wasn't to go - "Here is how you do it", he guided me through my thought process. He guided me to articles on the Umbraco Documentation and he made the think. He did proved code when I was totally baffled but he was a great teacher and mentor. A top bloke and if there was one person who embodies what I feel the Umbraco community is all about, he is that person. 

We started with a couple of screenshare sessions so that he could see what I had attempted and then we took it a bit at a time.

  • Lesson 3: Ask for help much sooner than you think you need too. When asking for help, don't ask for the answer, because you wont learn anything from doing this. Ask for guidance or pointers. This will help you in the long run - even if it doesn't feel like it at times!

As it turned out, I was trying to run before I could walk in many cases. Over thinking things and over complicating things. Nik's help was invaluable. His process of getting things working will stay with me for a long time.

Step one: Write down what you are trying to do in plain english, in a notepad or on a scrap of paper if you want.

Step two: Build the solution a bit at a time. For example, in MVC, get your controller to just output a "hello world" message to a view.

Step three: Ignore the view and start using Visual Studio breakpoints in your controller. Check to see you're getting the information you are expecting.

Step four: Keep on building up your solution in small steps and don't panic!

I was over the moon when I got this section to work and thought my next task was going to be really straight forward - building a site search. You know the kind, you enter a keyword in to a textbox, click search and you get results back. This my dear reader, almost broke me!

Days past, more sleep was lost, self worth was at an all time low.

I found out that the project is now running over it's allocated time and I really need to get it finished. It was time to ask for some more help! 

In come some more Umbraco savours - I had Nik checking I was still living and that I hadn't jumped out of any windows! Mads and Ismail also started to help me out, between them all, I got there but it really shouldn't have been as difficult as I was making it.

An issue for me was, I was determined to get it to all work via a Controller because that was what I felt was the 'right way' of doing things. What I should have done is, follow the tutorials from the Examine and Indexing course and then rework it if I felt the need or if time allowed.

Because I was being stubborn, I wasted days on this project, when I say days, I probably mean a week or so! A week on a search field!! I know! Crazy!

  • Lesson 4: Just get it working, then think about improvements afterwards!

I'm not finished the project yet but it's far closer to completion thanks to these great Umbracians. #h5yr 

So with all this in mind, what am I going to do in future? Well, I've found areas that I can improve on.
I've got a couple of courses I need to get back to finishing, one is C# and the other is about MVC. That should help me with some fundamental knowledge.

I will blog about what I am learning and have done so that a) I can look back at it in the future and remember what I've done and b) hopefully it will help others so that they don't get in to the mess I got in to. 

I'd be interested to hear from others with recommendations for reading, learning materials etc. 

About the author



Owain is an Umbraco MVP, an Umbraco certified master and works on Umbraco projects on a daily basis. When not coding, he enjoys running, spending time with his wife and building lego! 

He is also a GitKraken ambassador and helps look after the website.

comments powered by Disqus

Where to find Owain

Twitter: @ScottishCoder
Linkedin: Owain Williams
Our: Our Umbaco