A NEW TODAY IS DAWNING!

Tutorial: Working with the Blob Editor

Introduction

The Developer Blob Editor provides a full screen editor for non-binary blobs. The editor is used for creating and editing text, XML, XSLT, or HTML content that is stored in BuildProfessional Repository.

Why Blobs?

Blobs allow developers to store small (max 32k) segments of binary or ASCII data in the Application Repository. While limited in size, the blobs are convenient because they are part of the application archive. Applications that rely on external files are always complicated to install or update. Having the complete application as a single .tdy archive simplifies the management of application code.
 

The Editor

In Version 8 Blobs have become an excellent place to store static XML data, XSLT stylesheets and HTML pages. The Blob Editor makes it easy to manage those blobs. Depending on the content type, the editor has different features and tools that help the developer is daily tasks.

Text Content

The most basic content is plain text. While the Blob Editor is a poor text editor compared to any other editor, it does provide some product features:

Document Centric Access to Blobs.

Text blobs are accessible in simple and standard document centric manner. Once open, a text blob is immediately available for editing making quick changes easy. There is no longer the need to Import and Export blob content. Save, Rename, Delete as you wish.

Edit View

Along the left side of the view there are a number of buttons to control the view of the blob content. The default edit view provides an editable window to access the text content.

Net View

The NetView provides a read-only browser view of the text content. Standard browser functionality is available by right-clicking on the content. This allow the content to be printed as well as other features.

External Editor

To edit the content in an external editor, select the External button. This allows you to define a default editor and a simple method of launching that editor. You can also simply select the complete content from the edit view (Ctrl-A) and copy and paste it between editors.

Open from File
 

The File menu provides an "Open from File" option to open a file. You can edit the file and save it back to the disk file. The important feature is the ability to open a file and then save the content as a blob. Once you open the file, use "Editor / Switch to Blob" and then press Save. In the same way you can open a blob, switch to file, and save the content as disk file.
 

Change Content Type

At anytime you can change the content type (on the toolbar at top right). When opening a blob, the editor makes its best judgement of the content type.

HTML Content

If the text content is HTML, you have all the features of Text content.
 

NetView

In NetView the content is actually rendered as a web page and provides a preview and the ability to print the document.

XML Content

With all the above features, using XML content will enable the following additional features.
 

NetView

The NetView provides colour mark-up and collapsible tree view of the XML data. Visual feedback is provided for not well-formed XML data making it easy to pinpoint the missing end tag or other error.
 

Tree View

The Tree View provides an expandable tree view of the XML data displaying the structure of the document with or without the element and attribute values. Individual node values can be edited by selecting the desired node and changing the value. The value can be entered as plain text rather than properly escaped text string (i.e. "Bill & Bob" instead of "Bill & Bob").

An important feature is the XML key that is displayed as you select nodes in the tree. This is a quick method to obtain the XML key that BuildProfessional's XML commands require to modify an XML structure.

Indent and Validate

At the lower left you will find tool buttons to indent or validate XML data.

The Indent tool cleans up the XML data, removes unnecessary end tags and white-space and indents the element tags.

The Validate tool ensures the that XML is well-formed and optionally valid against an XML Schema. An XML Schema can be associated with the current blob from the "Editor / Associate with Schema" pull down option.

XML Container Content

If the blob content is to be used as input to an XML Container (i.e. listview, treeview etc.), the Blob Editor provides additional features.

Open from Template

From the "File / New" option you can create a new blob from templates for each type of XML Container. For example if you want to create a set of property tabs, select a tab view template and edit the XML data as required.

Test in XML Container

Immediately test the XML data in a sample XML Container by selecting the third view button. The sample view displays both the XML data and the XML Container as it would display at runtime. This allows you to quickly go between the edit view and test view to sample different features of the XML Container.

An added benefit is that the editor will display the XML returned from an event that occurs in the XML Container. So for example, if you display a blob with content to generate a list view, you can click on one or multiple rows to display the event XML.

XSLT Content

While is XSLT is XML data, the editor provides the ability to run a transformation from the editor.

Run Transform

While working with XSLT, you can specify a Source document at the upper right of the screen. The source document is a path to an XML file to be used as input to the transformation. Run the transformation from the editor tools. If successful, the result is displayed as a new document.
 

Limitations

While we want to emphasize that there will always be better text editors, HTML editors, XML and XSLT editors, there are some limitations of the Blob Editor that will be addressed in future releases:

  • Ability to perform text search and replace.
  • Ability to enter input parameters for the xslt transformations.

Your feedback on the Blob Editor or other functionality on the Developer is always welcome at support@todaysystems.com