Entity Framework

I’m working on my game engine, and I need a way to add entities. There needs to be a way to attach one to another, (Like a light, and a gun to a character). I was thinking of maybe just having two different types of entities, World, and UI. World entities are lit, and rendered before UI entities. UI entities cannot be lit, and can be attached to world entities for health bars and such.

I was also thinking of maybe having a “root” entity that all of the entities can attach to. Then, you can specify rotation, scaling, and translation for the root. Without having to deal with pesky screen shake caused problems.

But basically what I’m asking is that if you were to make a entity framework with a nice working and learning curve, how would you do it?