What Programming Language are Data Blocks? #
All Data Blocks utilize Python for coding purposes.
Does the Data Block Editor Support Languages Other than Python? #
No, all code is done in Python, though in some cases, such as with Configuration Data Blocks and API keys it may appear as though the Data Block is written in plain text.
Is There a Style Guide for Data Block Code? #
As Data Blocks utilize Python, Assette suggests that organizations follow the PEP8 style guide and use Object Oriented Programming (OOP) when creating Data Blocks.
Is the Assette Data Block Editor a Code Editor? #
While python can be edited directly in the Assette Data Block Editor is does not have all the features one might find in a purpose build code editor, IDE, or debugging tool. Therefore, it is not suggested to use the Assette Data Block Editor in the same way as a Code Editor.
How Do I Edit Data Blocks in Visual Studio Code (VS Code)? #
All tutorials and demos on learn.assette.com utilize Visual Code Studio (VS Code). If you have not already, please consider reading Assette’s article on Visual Studio Code & Python Setup.
What Naming Conventions Should We Use for Data Blocks? #
When it comes to naming a Data Block (or, for that matter, any content in Assette) it is best practice to choose a standardized naming convention that is to be used throughout the entire organization that is functional and descriptive. Choosing one of the following common naming conventions. Data Block may only use letters (either upper or lowercase), numbers, hyphens or underscores in the name.
- Camel Case
- First letter of every word is capitalized with no spaces or symbols between words.
- Examples: UserAccount, FedEx, WordPerfect. A variation common in programming is to start with a lower case: iPad, eBay, fileName, userAccount.
- Pascal Case
- Popularized by Pascal programming language, this is a subset of Camel Case where the word starts with uppercase. Thus, UserAccount is in Pascal Case but not userAccount.
- Popularized by Pascal programming language, this is a subset of Camel Case where the word starts with uppercase. Thus, UserAccount is in Pascal Case but not userAccount.
- Snake Case
- Words within phrases or compound words are separated with an underscore.
- Examples: first_name, error_message, account_balance
Can Multiple Data Blocks Have the Same Name? #
Data Blocks, as with all other content in Assette, must have a unique name—though names may be shared across content type (e.g., two Data Blocks cannot have the same name but a Data Block and a Data Object many share a common name).
While it is possible to have shared names between content, it is not suggested (e.g., a Data Block and Data Object named “Performance”) as this may cause unnecessary confusion. Assette recommends that names be both functional and descriptive.
Can I Name a Data Block “New”, “Old”, or “Test”? #
Yes, you can name the Data Blocks as you see fit, however Assette recommends that Data Blocks remain descriptive and functional names. Assette also recommends that if users must create such Data Blocks that they are renamed or removed as soon as practicable.
How Do Users Distinguish Between Functionally Identical Data Blocks? #
Sometimes it’s impossible to avoid having to create a Data Block with nearly identical functionality as an existing Data Block. In this case, Assette suggests using adding an extra adjective to the name to help differentiate the two. Assette highly suggests that the “Description” field be utilized in the Data Block’s General Info tab, specifically for this reason.
Can Users Search for Data Blocks in the Authoring or Output Center by Name? #
No, users can only search for a specific Data Block by name directly in the Data Block Editor. However, users can view the Data Blocks and Data Objects that are used in a Smart Shell or Smart Page using Assette’s X-Ray feature.
I Accidentally Deleted a Data Block, Can I Restore it? #
Yes, users can email the Assette Client Service Team to restore the deleted the Data Block. Please be sure to include the name of the deleted Data Block or other identifying information. Additionally, users are prohibited from deleting any Data Blocks that are used by other Data Blocks or Data Objects.
Can Users Share or Save Data Block Filters? #
Data Block search filters cannot be saved or shared. For more information, please see