Question

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.

Was it helpful?

Solution

I realized that using the backbone relational, there exists a huge abstraction. Basically, build my model through relationships. After this, each key comes to represent the relationship and starting then everything becomes simpler.

Simple updates, become simple now. Basically, there are great advantages to using the relational model compared to normal.

So, now I have the frame as root which contains objects and each object is fully abstract.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top