How can a service made accessible as an administrative tool in cq5 - user-interface

What I want to achieve
I want to evaluate which template and which component is used on which page and how often.
This functionality should allow dynamic evaluation.
What does that mean?
I want to be able to focus on special template or components and to select these easily from a graphical user interface.
As this functionality has clearly administrative purpose (to evaluate templates and componets before migrating to a new cq version) it should not be created as a specific page.
Thus I want to create an administrative tool, which can be installed separately.
Coding the functionality and creating a separate package is no problem for me, but I do not have any idea how to create an administrative tool to provide a fitting user interface.
My Question
How can I create an administrative tool in cq5?
Or more specific: How can I create a service with a graphical user interface, which is accessible as an administrative tool?
(a possible example for a tools graphical user interface, which I am thinking of, is the Blueprint Control Center accessible via 127.0.0.1:4502/etc/blueprints.html)

You could actually accomplish what you need using the Bulk Editor tool, located in Tools > Importers. It allows you to query your AEM/CQ instance based on property-based criteria and content types. You would be able to, for example, search for all pages with jcr:template set to a given template type. The tool produces a graphical table with the search results, which you can export to TSV.
One thing to note, though. The tool is buggy. I've had to fix some things, especially when it comes to using the (hidden by default) import from TSV feature. In terms of querying it works ok. You just occasionally have to hit the search button a few times before it works. I'm not sure why.
You could create this administration tool yourself, but see if the Bulk Editor will get you where you need. Could be quite a bit less work.

Related

Editor for Custom file type like YAML

I have created one custom file type. Which will be YAML document but having a particular schema. This document is going to be a huge document, and generating this document is currently quite a pain for users.
I need to ease out the creation of the files for the users. Maybe custom plugin into existing IDEs like IntelliJ idea or Atom might help. This will enable user to
Code completion.
Syntax Highlighting
Adherence to particular to schema
What are the best and quick way to facilitate user with such tools? Any other tools/editors suggestions are welcome.
You can write a plugin for IntelliJ that gives you code highlighting, navigation, search and similar features.
It's quite complicated, so you need to understand:
intellij platform architecture and subsystems (virtual file system, project, document, events, etc)
intellij plugin development
ant-lr style code grammar
AST (code tree)
Here's some links to get started. It is possible, but the last time I did this it took upwards of 200 hours.
https://www.jetbrains.com/help/idea/plugin-development-guidelines.html
https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started.html

Present content like power point or impress

I want to build an application that displays the content that user types on the command prompt to the display like a presentation.
I am writing this application in golang. If there are existing libraries that I can use to do this great and if not would need direction how to approach solving this.
I did search on the internet for pointers but found none.
Have a look at the present tool, it does a similar thing using flat files and might even be useful for you.
https://godoc.org/golang.org/x/tools/present

What effect does declaring the various <accessor style> tags in SDEF have?

When I declare elements in the .sdef file for my scriptable application, I have the option to declare various accessors, like this:
<accessor style="id"/>
<accessor style="index"/>
However, I wonder what consequence these declarations have. So far, I could not make out any changes of behavior in my test scripts whether I add or remove accessors for index and id as long as I implement the necessary methods.
So, how do these affect anything? Are they only for documentary purposes, such as what is shown in the dictionary of the Script Editor?
Or does the scripting engine actually behave differently in certain cases depending on these declarations?
So far, I only noticed one behavior that affects them: Script Debugger appears to use them to decide how to browse values in its Explorer. But I doubt Apple added these declarations only for the purpose of this application.
AppleScript does not validate against these settings in your SDEF. However, other tools may. For instance, my Script Debugger application uses this information to control the object access options presented to the user in its Explorer viewers. Various AppleEvent bridges may also use this information to control the kinds of object access they provide to their host scripting languages. An example from the distant past was my JavaScriptOSA project which bridged AppleEvent access into JavaScript. It used the key form settings to control the keys one could use when accessing element objects.

Apache ACE - Simple folder based deployment / provisioning?

I have many bundles (let's say hundreds) and it is quite difficult to specify relation between bundles+features-distrubutions in UI. Image, at first I define all relations between bundles, features and distribution. Than I want to update some bundles... it is almost impossible to find them in current implementation of UI. They are not groupped and one list of all bundles without any search bar is really hard to work with.
Is there any support for a file based solution. For example Apache ACE would watch a certain folder containing distribnution's bundles. When ever I make a change there, it would be propagate it to all targets.
There is currently no file based solution that matches what you describe, however, I think there are still a couple of solutions that might help you:
There are two types of associations between artifacts and features in ACE: static and dynamic ones. The latter can be of help to you, as they always automatically bind to the highest version of a bundle. So, once you've made all your associations, you can simply upload a set of newer bundles and the associations will adapt.
There is also a REST API you can use to programmatically talk to ACE. You can use that to further automate your process.
That said, you have a valid point that it is difficult to keep an overview when there are a lot of artifacts in the first column. I would advise you to watch, or even contribute to the following issues that were all created to improve this situation:
https://issues.apache.org/jira/browse/ACE-319
https://issues.apache.org/jira/browse/ACE-320
https://issues.apache.org/jira/browse/ACE-321

Document Based App with Core Data vs plain Core Data app?

I am trying to understand the key differences between these two types of Core Data application templates.
My understanding is that with a document based core data app you get access to NSDocument instances and a lot of document based behaviors for free (save dialogs, undo, etc).
Assuming I want to create an application that is more "Project" based and not necessarily focused on creating individual savable documents should I still use Core Data with Documents?
To be more concrete, I am trying to build a simple CMS application using core data and that outputs html pages in a structured way. The idea of the app would be focused on "sites" that are really projects and not single documents. The projects contain a consolidated model for various posts, pages, sidebar content, and whatever content might need to go into a website. But the app doesn't save individual pages as documents in the traditional sense. I want a unified model of the all the project data and provide export functionality where the entire application model would become expressed as a set of html documents in a specified project folder.
This is both a learning exercise and something I want to try and build for myself.
Any tips on specific documentation to read? In particular information about "Project" based cocoa apps, and useful samples and tutorials.
It is conceivable that the CMS data model could be stored in a single Core Data document but that doesn't necessarily seem right from an architectural point of view.
A project can be a document and a document doesn't have to be a single file. Read the NSDocument related documentation and decide if it offers any functionality you might be interested in.
I look at the difference as being that a Document based application lets the user have multiple sets of information stored separately.
The best example, from a functionality perspective, is iTunes. Apple doesn't let you have multiple libraries, it's all or nothing, one "database" for the entire application.
A simple document based application would be something like TextEdit.
I don't think what you are proposing is too different from a single document based application, though - you just need to remember that the web pages you produce are an OUTPUT, not a part of the project. The same way you don't think of printed output from TextEdit being part of the document. Or object/executable files in XCode being part of the project.

Resources