4 ms·
The main problem is that we are still using XML to do component definition and composition. We need to better language (no, json and yaml are not the answer).
by ezioamf 11y ago
The main problem is that we are still using XML to do component definition and composition.
We need to better language (no, json and yaml are not the answer).
I am working on a new language concept (still at early thinking) but the alert template document would be defined as:
alert#update_available [ //Composition is separated from definition
btn#update,
btn#cancel
]
alert { //All alert elements are defined as alertTemplate
type: alertTemplate
}
btn { //All btn elements are define as button
type: button
}
alert#update_available { //Define the title and description for the alert with ID update_available
title: Get the latest tvOS version
description: Get the latest tvOS version
}
btn#update {
text: Update Now
}
btn#cancel {
text: Cancel
}
//We could override the settings like CSS
(@language = "pt_br") {
//If variable language is pt_br override the content with Brazilian Portuguese texts
btn#update {
text: Atualize Agora
}
btn#cancel {
text: Cancelar
}
}