I used to do things like below:

```
class A {
   var param1:String?
   var param2:[B]?
}

class B {
   var param1:String?
   var param2:String?
   var param3:[C]?
}

class C {
   var param1:String?
   var param2:String?
}

```

But recently I found that dictionaries are more flexible. Class A can be replaced by the following dictionary.

```
[
    "param1":"some string",
    "param2":[
        "param1":"some string",
        "param2":"some string",
        "param3":[
            "param1":"some string",
            "param2":"some string"
        ],
        [
            ...
            ...
        ]
    ],
    [
        ...
        ...
    ],
    ...
]

```

If we want to add "param3" into class C, we need to modify a lot of associated code if using class. But if we use dictionaries, we can just use "param3" as if it already exists.

A dictionary is just like a runtime defined class. I am wondering should we use dictionaries to replace data storing classes (i.e. models in MVC pattern) in all situations.