framework and castle