[참조] SAP UI5 Model Type


SAP UI5 Model Type

여기서는 UI5의 MVC 패턴 중 M(Model)에 해당하는 3가지 Type의 Model에 대해서 작성한다. 3가지 Type은 JSON Model, Resource Model, ODataModel이다. 이 장에서는 간단한 소개만 작성하고, 실제 사용 방법은 다음 글에서 작성한다.  
(Three types of models corresponding to M (Model) among the MVC patterns of UI5 are created. The three types are JSON Model, Resource Model, and OData Model.)

JSON Model

  • JSON 형식({id:value} 구조)의 Data를 관리하기 위한 Model로 UI5에서 Data를 처리하기 위해 사용되는 가장 기본이 되는 Data Model이다.
    (It is a model for managing data in JSON format ({id:value} structure) and is the most basic data model used to process data in UI5.)
  • 예시(Example): 

    1
2
3
4
5
 {recipient: [
                {name:"Tom"},  
                {name:"Joe"}
             ]
}
cs


Resource Model

  • UI Module(버튼, 컬럼, Text 등)에 다국어 처리를 위한 Model로 i18n property 파일과 연동하여 동작을 한다. 
    (It operates in conjunction with the i18n property file as a model for multi-lingual processing on the UI Module (button, column, text, etc.).)
  • 예시(Example): showHelloButtonText=Say Hello


ODataModel

  • ODataModel은 Network를 통한 Data 처리(CRUD)를 담당하며, JSON 형태의 Data를 OData 통신 프로토콜을 사용하여 서버와 통신하여 처리한다.
    (ODataModel is in charge of data processing (CRUD) through the network, and JSON-type data is communicated with the server using the OData communication protocol to process it.)
  • UI5 Controller에서 Data의 조작을 위한 Model 용도보다는 Controller와 서버 사이에 data를 통신하기 위해 사용되는 일종의 connector 역할을 수행한다.
    (UI5 Controller serves as a kind of connector used to communicate data between the controller and the server rather than the use of Model for data manipulation.)

댓글

이 블로그의 인기 게시물

SAP UI5 개발환경 구성하기(Creating a Development Environment)

9. SAP UI5 Custom CSS 적용(Apply)

7. SAP UI5 Multilingual Application (다국어 적용)