Currently, I am developing a mobile single page website that utilizes technologies like breeze js, angular js, web API, and entity framework.
To enhance the performance of the site, I have decided to include the breeze metadata in a bundled JavaScript file that encompasses all the necessary JavaScript files for the site. My goal is to simplify the process for the browser by only requiring it to request index.html, which will contain everything needed for the app to function smoothly including minified inline styles and JavaScript.
In addition to the breeze metadata, there is a critical complex entity (with deep navigation properties to other entities) that must be present for the site to operate at its full potential. I am looking for a way to embed this entity along with all the referenced entities in the bundled JavaScript. How can I achieve this?
One solution could involve creating a JSON string representing the complex entity and its related entities, then embedding that JSON string within the bundled JavaScript. However, I am not sure how to easily import this complex entity into the breeze entity system using the embedded entity JSON string. Is there a more efficient method to preload the breeze entity system with such complex entity without needing to request it from the server?
Furthermore, I want to avoid writing server-side code to generate JavaScript that constructs the entity on the client side.