-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata #1
Comments
What do you think about this for groups:
I really don't care for the format... just the idea of making groups by using nested objects. If we decide to use no View Models, it's not a problem, just use text instead of expressions:
|
I liked the idea of being able to render a complex object as a property. Example: You could render an Address object as a property of Contact. However, it also seems a good idea to be able to visually group properties (eg in collapsible panels). For instance, in a Contact, you could group Phone properties even though they don't belong to a Phone object. If we assume we will only have ViewModels and not Models, then it's plausible to force the developer to group Phone properties in a Phone object. Otherwise it's not. |
More ideas regarding your concerns:
The The |
As far as I see this, the developer would have to previously create the This wouild make more sense to me:
This way, |
The I reviewed the code I have posted, and changed it:
What do you think about this? |
I liked your last version :) |
Introduction
Metadata is one of the gearz pillars. Metadata is a collection of JavaScript objects that describe the domain of a gearz application. Metadata includes
entities
,entity-views
,properties
andproperty-groups
.Metadata serves as information for component rendering.
Gearz have three kinds of components:
Property
metadata. Examples:TextBox
,CheckBox
,Autocomplete
.Entity-View
metadata. Examples:EditForm
,DisplayView
.Grid
./contacts/edit/2
, the user then accesses theEdit
page component, which will, in turn, render one or more Layout Components. Examples:Edit page
,Details page
,Search Page
.Entities
Entities are object types the Gearz application can manipulate. Examples: Contacts, Sales proposals and Sales.
Entity properties
Property
): The entity's property collection.Entity views
Entity views are the visual representation of a view for a particular use. For instance, the entity
contact
may have different properties depending on whether you are displaying, editing, or displaying a list of contacts.EntityView properties
PropertyGroup
): The entity views's property group collection.Property group
Entity-views have their properties separated by groups, which can be 1 or N.
PropertyGroup properties
text-expression
): Whether or not the property group is invisible. Defaults to false.text-expression
): Whether or not the property group is disabled. Defaults to false.Property
): The group property collection.Property
Represent a single field in an
Entity
orEntityView
.Property properties
text-expression
): Whether or not the property is required. Defaults to false.text-expression
): Whether or not the property is invisible. Defaults to false.text-expression
): Whether or not the property is disabled. Defaults to false.text-expression
): Whether or not the property is invalid. Defaults to false.Object structure
Metadata is globally accessible through the
window.meta
property.Example of getting whether or not the
name
property of contact is required:Scratch
The text was updated successfully, but these errors were encountered: