No, there are methods and settings that can be set via code that cannot be set via the XML, and vice-versa - I'm not talking about mixing them together. Yes, they are the same classes. No, they are not created and instantiated and configured in exactly the same fashion; there are occasionally differences.