Experience Sitecore ! | All posts tagged 'Productivity'

Experience Sitecore !

More than 200 articles about the best DXP by Martin Miles

Sitecore Improvements project

I have done multiple Sitecore presentation and productivity improvements, so this time I decided to unite them all under the same umbrella in GitHub, and this blog post will go through all of them.


1. Sitecore Style Adjustments

2. Device Editors Shortcuts

3. Layout Details Shortcuts

4. Presentation Exists Gutter

5. Publish Item Context Menu

6. Publish Item Ribbon Icon

7. Set Presentation Context Menu Icon


Packages can be downloaded below:

Sitecore 8.0 Style Adjustments-1.2.zip (29KB)
Sitecore 8.1 Style Adjustments-1.2.zip (28.9KB)
Device Editor Shortcuts 1.0.zip (8.6KB)
Layout Details Shortcuts 1.1.zip (10.8KB)
Presentation Exists Gutter 1.0.zip (12.7KB)
Publish Item Context Menu-1.0.zip (11.1KB)
Publish Item Ribbon Icon 1.0.zip (4.2KB)
Set Presentation Context Menu Item 1.0.zip (11.4KB)

Source code (and the docs / more packages) can be taken from project's GitHub page by the following link.

Hope you find this helpful!


Productivity Improvement: Device Editor showing datasource and previewing that right from a pop-up click

After previous post on Layout Details dialog improvements, I decided to look even further and implement one more improvement that came into my head.

Another dialog window, probably most important in Content Editor is missing couple things I just decided to fix. That is a case when a screenshot is better than hundred words, so here is it:


What has been added is a datasource item path, immediately underneath rendering and placeholder. It is clickable in the same manner as from previous posts, immediately opening that (datasource) item for view and edit right in the popup window, that saves so much time!

Additionally, rendering / sublayout name became also clickable with the same item preview popup effect.


Download: please get the package and anti-package to revert changes. Source code is available at GitHub page by this link.

Known minor issue: if open Control Properties dialog from Device Editor, and when you return back from that dialog - look-up links will not work and control will return to default behavior, so you may need to re-open Device Editor again.
The reason for such a behavior is that on returning back, Sitecore runs a series of pipelines that eventually call original class from Sitecore.Client rather than the one we have overridden and referenced above. Fixing that requires patching original DLL and I highly wanted to avoid inclining into any original functionality (moreover, you are not likely allowed to do that by license)

Productivity Improvement: Creating a Presentation Exists Gutter - get even faster access to item's Presentation Details

Previously I have described how easily you can create a shortcut to Device Editor of Presentation Details right at the item's Context Menu - access that as much as in two clicks! But there's even easier (and more visual) way - create a specific Sitecore Gutter.
So, what Gutters are? Gutters are sort of visual markers you can optionally enable / disable in your Content Editor. Have you seen a vertical bar, immediately left hand side from Sitecore tree? That is a Gutters Area and once you do right click on it - you may enable / disable some gutters already installed. Also, gutters can be clickable, and on click handler you may also call Sitecore commands, so why not to call our familiar item:setlayoutdetails that opens Device Editor dialog for corresponding item?

So, let's create our own gutter. Every gutter is configured within core database under /sitecore/content/Applications/Content Editor/Gutters folder. We are going to create a new item called ... derived from /sitecore/templates/Sitecore Client/Content editor/Gutter Renderer template (all gutters derive from that one). There are only two fields we need to set there - Header which is just a gutter name and Type - fully qualified class name:

So now let's implement PresentationExists class. Briefly, every gutter derives from GutterRenderer class which returns GutterIconDescriptor object when gutter should be shown next to corresponded item otherwise just null. Implementation below checks whether current item has a Layout associated, and if yes - it returns a GutterIconDescriptor with a item:setlayoutdetails command for that item.
public class PresentationExists : GutterRenderer
{
    protected override GutterIconDescriptor GetIconDescriptor(Item item)
    {
        if (item != null)
        {
            var layoutField = item.Fields[Sitecore.FieldIDs.LayoutField];
            var layoutDefinition = LayoutDefinition.Parse(LayoutField.GetFieldValue(layoutField));

            if (layoutDefinition != null && layoutDefinition.Devices.Count > 0)
            {
                GutterIconDescriptor gutterIconDescriptor = new GutterIconDescriptor
                {
                    Icon = "Applications/32x32/window_colors.png",
                    Tooltip = Translate.Text("Presentation is set for this item.")
                };

                if (item.Access.CanWrite() && !item.Appearance.ReadOnly)
                {
                    gutterIconDescriptor.Click = string.Format("item:setlayoutdetails(id={0})", item.ID);
                }
                return gutterIconDescriptor;
            }
        }

        return null;
    }
}
So as soon as you compile and place resulting DLL under <web_root>\bin folder, your gutter wil work like below:

Clicking that icon will immediately show Device Editor dialog. Job's done!

Downloads: you can access source code at Sitecore Improvements project GitHub page, or you can download ready-to-use package by this link.

Please note: improperly implemented gutters may affect performance of Content Editor, as the code above runs for each item. So please be extremely attentive on what you're doing within GetIconDescriptor() method.

Sitecore extensions for Google Chrome review

  1. Sitecore Developer Tool
  2. Sitecore Analytics Testing Tools
  3. Sitecore Expand Collapse Sections
  4. Sitecore Keyboard Shortcuts
  5. Sitecore Helper
  6. Dan's Sitecore Shortcuts

1. Sitecore Developer Tool

This is a nice, elegant and non-obtrusive shortcut extension located at the top right of your Chrome browser. It has several most useful shortcuts logically grouped by tabs.


Admin Pages tab contains useful admin pages hotlinks.


Database tab allows to quickly change context database.


Mode tab has 6 switchers - the names are self-describing.


There is also options tab, where you can add / edit favourites, add more databases and perform other settings for the extension.

You may install Sitecore Developer Tool by this link.



2. Sitecore Analytics testing tools

As it comes clear from its name, this is an extension to fit specific analytics purrposes, which are: clearning analytics-related cookies and specifying a forwarded IP address for GeoIP lookups.


Below there are screenshots of its settings screen:





Download and install exension: the link.



3. Sitecore Expand Collapse Sections

Minimal extension that serves just one purpose - expand and collapse data section panels in Sitecore.


What can be easier?


Unfortunately, at the moment this extension does not support Sitecore 8, so the last funcional verison is 7.5

You may install Sitecore Expand Collapse Sections by this link.



4. Sitecore Keyboard Shortcuts

It presents


It is a powerfull extension that allows you to create hot keys to quickly complete common tasks in Sitecore. This is especially useful for demos or for quick access to frequently used items. No need to repeatedly expand the content tree any longer.

it works well for Sitecore 8 as well as with all previous versions I have tested with. It also works well on Mac computers, however mac-specific keyboard extensions (ie. Cmd) are not supported. screenshot below shows settings screen:


And here is a dropdown containing list of possible actions. Quite impressive!


Download and install exension: the link.



5. Sitecore Helper

This extension brings upgrades the Sitecore interface with toggleable usability fixes.Applies several fixes & updates to the Sitecore user interface, use the options menu to toggle them on / off.


Download and install exension: the link.




6. Dan's Sitecore shortcuts

Extension provides a drop down with features and shotcut buttons.


Download and install: the link.


Hope these extensions may help you to improve your productivity while working on Stecore projects!

Software every good Sitecore developer should be aware of

Got your top-spec developer's machine with Visual Studio installed, an instance of SQL Server with databases and Sitecore running on your IIS? So far, so good. You may now start working with platform. However, for real productivity you may need certain extras we'll now go through.

  1. Sitecore Rocks
  2. Team Development for Sitecore
  3. Reflector
  4. dotPeek
  5. Sitecore Instance Manager
  6. Luke
  7. RoboMongo

1. Sitecore Rocks
Today Rocks became a mature plugin allowing unbelievably wide range of Sitecore tasks and activities right from your Visual Studio. It grew from an idea of being able to manipulate Sitecore tree right from Solution Explorer (without permanent switches to browser and back), but with time acquired a mass of killing features, covering all aspects of working with Sitecore. Let's just name few of them:

  • navigate Sitecore tree within VS, create and edit items, layouts, renderings, templates (and their hierarchy), standard values, and also manage Media Library
  • built query analyzer (that was removed from 7.5 into a SPEAK component) that allows to operate all types of queries
  • troubleshooting features addressing tracing and debugging as well as log manager
  • view scheduled jobs
  • all about publishing
  • administration functions to perform maintenance for database, indexes etc; view resulting (after patches) web.config file
  • ability to read Lucene indexes, navigate documents and see field values, terms etc.
  • perform real-time search and replace globally from Query Analyzer
  • view history table
  • everything about creating and managing packages
  • create pipelines
  • all about caching
  • plugin repository to extend functionality further more by applying multiple plugins
Impressive list? But how to manage such wide functionality and not get lost?
Luckily, there is handy Commandy feature that allows you quickly search and access all the features just by a hotkey!

Links:
Sitecore Rocks on Visual Studio Gallery
Documentation page
28 days with Sitecore Rocks technical blog



2. Team Development for Sitecore - TDS
Another Visual Studio extension worth of several separate articles. It is manly focused on resolving troubles of having sitecore itens and sitecore code seperately, so it solves the issue by serializing items and keeping them in source control along with the code so that multiple people working at the same solution can have solid commits and fair versioning policy.

TDS can help you with many other handy tasks like item merging, code generation, packaging and auto deployment, config transformation and others. If you follow the link below - you'll get ver y self-descriptive home page explaining what exactly and how TDS does.

Links:
TDS download page


3. Reflector
Not Sitecore specific, but .NET-wide, Reflector is a tool that decompiles and reveals the code hidden in DLL libraries (if not obfuscated) and allows browse it and drill into system DLLs as well. We use it widely with Sitecore as Sitecore is not allways specific about ints internal architecture in official documentation, but knowing internals is the must for any good developer. A good example can be pipelines architecture - it is not quite documented (if at all) while from time to time one would need to override default behavior or add additional processors. Without knowing what exactly original code does that becomes not possible.

Links:
Reflector download page


4. dotPeek
One more .NET decompiler (which is free, unlike previously mentioned Reflector) have recently joined the market. Apart from doing decompiling job, it has several useful features, like ability to generate PDB files out of DLL, that makes possible debugging of external DLLs in Visual Studio.

  • Exporting decompiled code to Visual Studio projects
  • Support downloading code from source servers or PDB files generation
  • Quick jump to a type, assembly, symbol or type member
  • Effortless navigation to symbol declarations, implementations, derived and base symbols, and more
  • Accurate search for symbol usages with advanced presentation of search results
  • Overview of inheritance chains
  • Syntax highlighting and complete keyboard support
Please read another blog post Debugging and Inspecting Sitecore Libraries to how you can easily do that with dotPeek.
Links:
dotPeek official home page

5. Sitecore Instance Manager - SIM
I have a separate article about SIM, so please read that if you are not yet familiar with this brilliant tool. If briefly, SIM simplifies and automates a process of installing an instance of Sitecore (any version you may have in your local repo) to just few clicks, automatically sets up database and configs, installs additional packages and modules on top of instance and keeps multiple useful housekeeping links (to hosts, configs, iis, database etc.) in one place.

Links:
Sitecore Instance manager on Sitecore Marketplace
My previous article about Sitecore Instance Manager in this blog


6. Luke
Luke.NET is a tool to browse Lucene indexes, see the documents, fields and terms, try writing queries against index and see index physical structure. This functionality is partly covered with Rocks, as described above.


Links:
Luke page on CodePlex


7. RoboMongo
For everyone who is after Sitecore 7.5 (and later) and is working with xDB, Robomongo may seem quite handy. What is does is allows to see what you have in your Mongo instance. RoboMongo embeds the same JavaScript engine that powers MongoDB's mongo shell. It means that you can reuse your existing skills of MongoDB shell in RoboMongo. It provides you with syntax highlighting, auto-completion, different view modes (text, tree, custom), and more.There will be a separate article about it coming shortly.


Links:
Official page

Sitecore Desktop usability improvements (package)

While playing with core database for some useful stuffies - I came across some improvements that can save little of my time in day-to-day activities. A screenshot below can say better than few paragraphs of text, so here it is:


It works across all the versions of Sitecore, I in fact had opportunity to test that package against 6.6 and 8.0 Update 4.


Enjoyed that and want to get for yourself?

Download the package: Sitecore Desktop Improvements-1.1.zip (47.5KB)

Previous version: Sitecore Desktop Improvements-1.0.zip (30.8KB)


Sitecore.Kernel and Sitecore.MVC delivered via a NuGet library

Update (01 Aug 2015):  Here is the alternative approach answer and the solution for blog post:


I was always wondering, why Sitecore yet hasn't hosted Sitecore.Kernel and Sitecore.MVC on the NuGet?

This would have simplified our (developers') life in some way, as for today, we have to keep an additional /Libs folder and reference those 2 DLLs out of it (but couple others will serve good as well, for instance Lucene DLLs etc.). That could also simplify versioning and dependencies issues for us as soon as we still are using NuGet package management, so we now have 2 folders for references, highlighted below:


If they avoid doing that for licensing purposes - that seems quite strange as mentioned libraries are very little part of what Sitecore is, plus they may just supply obfuscated DLLs via NuGet and normal reflection-friendly via standard platform installation.

Here is what I have in my Libs folder and that I use and reference in small proof-of-concept project:


Dear Sitecore, if you read me, please consider using NuGET - today's industry standard for packaging and resolving dependencies .

Sitecore tips

1. Load Sitecore Desktop automatically and pre-select an item

I was wondering, if there is any opportunity to preload Sitecore Desktop automatically on Sitecore enter.

So annoyed of moving mouse across whole big monitor to the very top bottom, then select Content Editor from the menu, then wait till it loads an eventually as content tree loads - navigate to specific item! Even if it does not seem quite complex for a first glance - the number of times I do that per day makes me sadly thinking of wasted efforts for nothing...

Good news, everyone! There a convenient way of creating a shortcut that not only loads Content Editor, but also select any item you would like and loads its data right hand side. Here is the format of url:

http://your.host.name/sitecore/shell/Applications/Content%20Editor.aspx?fo={9CFF486B-9829-416E-8A39-408D3909B4FE}

where fo parameter stands for the item you want to pre-load.


2. If you use Google Chrome - install Chrome extensions for Sitecore


More details in my blog post by this link: Sitecore extensions for Google Chrome