0

I am developing a project in backbone, but I believe I am mixing concepts.

Basically I want to represent a model root (FRAME) which can hold objects (OBJECT) and objects may be of various types (Text, Image, Button etc). Each sub object has different attributes.

After studying the API, I'm trying to connect through a relational model but I believe this structure to be in serious trouble.

Basically, a frame may have many objects and an object can have a single frame. Each object may be of different types with different attributes.

What I started to do, was to represent the model frame and then create a model for each object type because they have different attributes. For the documentation, I noticed that there is no definition of attributes defaults in relationships. Should I just create a model object and instantiate the attributes of each type in the creation, or the concept of creating a model for each object type is correct?

Thank you.

4

1 回答 1

0

我意识到使用主干关系,存在一个巨大的抽象。基本上,通过关系建立我的模型。在此之后,每个键都代表关系并开始,然后一切变得更简单。

简单的更新,现在变得简单。基本上,与正常相比,使用关系模型有很大的优势。

所以,现在我将框架作为根,其中包含对象,每个对象都是完全抽象的。

于 2013-10-02T13:50:52.927 回答