Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export ASP.NET MVC Application Source Code for PhoneGap

My team and I are currently developing an application for both Android and iOS using ASP.NET MVC 4, HTML5, and PhoneGap. The development works perfectly fine; however, one question remains unanswered: What is the recommended approach to generate the three files PhoneGap needs (one HTML page, one JavaScript file, and one CSS stylesheet) from our MVC solution?

Would you recommend using a Razor template-based approach? Or would you simply automatically copy the output HTML source after each build? Or would you suggest something completely else?

like image 321
Marius Schulz Avatar asked Jun 11 '12 11:06

Marius Schulz


1 Answers

This morning, we decided to let ASP.NET MVC render a single view containing all our application's HTML which references several JavaScript files and CSS stylesheets. We then automatically grab the rendered HTML source and copy an index.html into a certain export folder on our local machine. That folder is ready to be deployed because it contains only one HTML file and additional JavaScript and CSS resources – exactly what PhoneGap expects.

like image 67
Marius Schulz Avatar answered Sep 18 '22 18:09

Marius Schulz