refactor the struction of  yiframework and serialize the part of  View