1. A computer-readable storage medium containing instructions which, when executed by one or more processors disposed in an electronic device, perform a method for implementing a user interface (UI), the method comprising the steps of: receiving an in-memory op-code stream in an object construction and scripting section of binary code in a file, the in-memory op-code stream not comprising cached bytecode, the binary code being encoded from a declarative markup that includes embedded script, the markup defining a UI including UI control objects; and interpreting the op-code stream to construct the UI control objects and execute the script at runtime to render the UI in a runtime environment on a device, the interpreting being performed while maintaining a single stack through operation of the object construction and execution of the script.