Разделение содержания и представления (или разделение содержания и стиля ) - это принцип разделения задач, применяемый к созданию и представлению содержания. Согласно этому принципу, визуальные и дизайнерские аспекты (представление и стиль) отделены от основного материала и структуры (содержания) документа. [1] [2] [3] Типичная аналогия, используемая для объяснения этого принципа, - это различие между человеческим скелетом (как структурный компонент) и человеческой плотью (как визуальный компонент), которая составляет внешний вид тела. Общие применения этого принципа можно увидеть в веб-дизайне ( HTML против CSS ) [4] [5] и набор документов (текст документа Ламберта против его преамбулы).
Использование в веб-дизайне
This principle is not a rigid guideline, but serves more as best practice for keeping appearance and structure separate. In many cases, the design and development aspects of a project are performed by different people, so keeping both aspects separated ensures both initial production accountability and later maintenance simplification, as in the don't repeat yourself (DRY) principle.
Использование при верстке документов
LaTeX is a document markup language that focuses primarily on the content and structure of a document. When a document is prepared using the LaTeX system, the source code of the document can be divided into two parts: the document body and the preamble (and the style sheets). The document body can be likened to the body of a HTML document, where one specifies the content and the structure of the document, whereas the preamble (and the style sheets) can be likened to the CSS portion of a HTML document, where the formatting, document specifications and other visual attributes are specified.
Under this methodology, academic writings and publications can be structured, styled and typeset with minimal effort by its creators. In fact, it also prevents the end-users — who are usually not trained as designers themselves — from alternating between tweaking the formatting and working on the document itself.[3] Similar to the case with HTML and CSS, the separation between content and style also allows a document to be quickly reformatted for different purposes, or a style to be re-purposed across multiple documents as well.[6]
Смотрите также
- CSS
- Form follows function
- HTML
- LaTeX
- Markdown
- Model–view–controller software architectural pattern
Рекомендации
- ^ "Separation: The Web Designer's Dilemma". A List Apart. Retrieved 24 May 2017. CS1 maint: discouraged parameter (link)
- ^ Ferrel, P.J.; Meyer, R.F.; Millet, S.J.; Shewchuk, J.P.; Smith, W.W. (March 6, 2001), Method for delivering separate design and content in a multimedia publishing system, USPTO, Patent #6199082
- ^ a b "The Definitive, Non-Technical Introduction to LaTeX, Professional Typesetting and Scientific Publishing". Math Vault. 2015-09-05. Retrieved 2019-07-18.
- ^ "Separating Content and Appearance". Simon Fraser University. Retrieved 24 May 2017. CS1 maint: discouraged parameter (link)
- ^ Clark, Dave (2007). "Content Management and the Separation of Presentation and Content". Technical Communication Quarterly. 17 (1): 35–60. doi:10.1080/10572250701588624. ISSN 1057-2252. S2CID 62706215.
- ^ "Separation of Presentation and Content". LispCast. 2014-04-18. Retrieved 2019-07-18.