3

I'm new to SPEAK and would like to develop an application for my current project, which is in Sitecore 8.2.

I did go through the SPEAK developers cookbook for 7.2 and some other examples available online, but they all are similar and talk about displaying lists of Sitecore items.

My requirement is to have pages which will be used by content authors or administrators, for example:

  1. Show a list of all Sitecore users and have the search functionality to search by name or domain.
  2. Show a list of all orders with pagination, search, edit etc. The orders here are not Sitecore items. They are maintained in another non-sitecore database.
  3. A page to allow creation of fake items under a parent

I have already developed these pages using custom controller renderings (which use Ajax calls to save/retrieve data). The page items are now in the master Db (of-course set to never publish), and are working fine.

As you can see, the content for some tasks is NOT from Sitecore items. I would now like to have these pages as SPEAK apps, mainly to be in-line with the CMS design, look & feel.

Because, after going through the material, I feel it is easier & quicker for me to write code and develop such apps, instead of all the configurations to be made for SPEAK.

Can anyone please point me with any examples that suggest how to develop SPEAK apps in the regular Controller rendering approach.

3
+100

Answer

The direct answer to this question is that there is no way to build a SPEAK application without using Sitecore items. This is because using items out of the core database is the foundation upon how/why SPEAK was written. It was intended to be a pattern that utilizes Sitecore structure, association to datasources, and presentation rendering in order to build HTML structure without having to "need to code views".

Background

The way SPEAK uses Controllers is for data fetching and data saving only. All UI is managed by Sitecore Item Structure in the core database and flavored with referenced CSS files and PageCode (aka Javascript include). There is no concept of a view in SPEAK per se. SPEAK is built upon the idea of Atomic Design, so razor view renderings are at a discrete element level, and precompiled into the DLL.

It is possible to create your own SPEAK view rendering following Sitecore's examples for the built in components, however, it still requires the use of Sitecore items to build structure.

As mentioned in the Daniil's answer, the way some folks have gotten around it is to create the barebones items needed to start a SPEAK app, and then use a bunch of custom web api to display inside of a single SPEAK component.

Closest Solution

The closest solution I have seen come close to what you are looking for is the Express Profile Tab module that Jeff Darchuk wrote. In this, he uses code to create the underlying SPEAK wiring needed and then creates an additional tab via normal view renderings.

Check out the Express Profile Tab closely to understand how he injects this. I am not sure if this method is completely usable for the use case presented in this question as the Experience Profile already exists as a full SPEAK application.

Online Tutorial

The best tutorial that I have used to learn and understand SPEAK is this 6 part tutorial that Martina Welander made. https://mhwelander.net/2014/06/27/speak-for-newbies-part-1-creating-a-new-application/

1

I had similar requirements a couple of times and I found that the most efficient way here is to create an application wrapper with SPEAK 1/2 - header, footer, sidebars, OK/Cancel buttons etc., and then develop all core functionality as a single big SPEAK component with a bunch of custom web api controllers and simple require.js/jQuery on UI.

  • So, seems like it isn't straight forward n simple. – Qwerty Jul 11 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.