Wednesday, November 21, 2012

Flattening Hierarchical Data

Flattening Hierarchical Data: I'm not a big fan of hierarchical data structures. They can be a pain. For example, I hate having to perform recursive loops to find matching elements. Recursion makes my brain fry. Unfortunately, many UI controls require hierarchical data (i.e. the Tree component) and sometimes it is unavoidable.Therefore, if hierarchical data is required, I like to "flatten" the hierarchical data and maintain two data structures - a hierarchical one and a flat one. Flat data structures are much easier to navigate and thanks to the power of object references, each data structure contains references to the same objects so updating

DIGITAL JUICE

No comments:

Post a Comment

Thank's!