I am exploring the creation of single page applications using the following stack (offers can be opened here)
- Angular
- JQuery
- ASP.Net MVC 4
- Entity Framework 5
I pretty much sell this stack and angular, but there are a few things that I'm not sure about. Different users have different roles, and we will need to hide / show certain pages and / or controls on the pages depending on the role. I am familiar with some solutions for more traditional web applications, but I'm not sure where I will start when it comes to a single page application.
I was hoping not to use partial MVC views, but rather to send and process server code as WebApi. But then angular will have to process all the templates, and this will mean that someone will have access to the template on the front side, and he will be able to figure out what functions they do not need? Or should I check the role in the WebAPI methods and make sure they have the right role?
The next problem is localization. We will need to support several languages. I was hoping that we could only have different languages, en_gb.XML, and they would contain keys and their various translations. Then, if the user changed the language, I could just change something in angular, possibly using the value
angular.value("language", 'en_gb.js');
or
angular.value("language", 'en_gb.xml');
Has anyone else solved such problems.
angularjs asp.net-mvc single-page-application
uriDium
source share