You do not need to call Initialize or DesignerCreateView yourself. These methods will be called internally when the layout file is loaded. See the example here: Custom View with Designer Support
There are two ways to implement a custom view. It can be implemented as a class (which can also be compiled to a library) or it can be implemented in Java. A tutorial about Java implementation will be available in the "libraries developers forum".