Is there any sense in using server side MVC framework when using angularJS routing? - angularjs

I'm new to AngularJS(it's great!) and I suddenly realized that I don't need server side MVC framework when using AngularJS routing... Am I right? I mean off course I need some sort of Restful Web API but the use of MVC is redundant no?

Related

ADAL, Angular and WEB API strategy

I am a Microsoft developer. Making an ASP.NET application with authentication to Azure AD is very easy. The traditional multi page application with Vue (as an example) can be created within two minutes (by using the Authentication wizard in Visual Studio). However watching some Angular and NPM videos I liked the CLI/npm approach. So I decided to build my next project using ADAL.js, ASP.NET Core API and Angular 6 (deploy to Azure web app). But I haven't been able to succeed, and have only been met by complexity and issues.
Is the combo of these three technologies just a bad mix, Visual Studio not suited for SPA, or have I just gotten a bad start? Any suggestions on a good setup? I am considering to split the API and front end in two apps, so I can use clean Angular without having to worry about who is building TypeScript (VS or Node) etc. But then I need two web apps, and have to worry about CORS. Any suggestions here, what is a good setup to get started?
I have followed a lot of articles like:
http://www.talkingdotnet.com/how-to-create-an-angular-6-app-with-visual-studio-2017/
https://www.npmjs.com/package/microsoft-adal-angular6
But all of them had issues.
Refer to this Microsoft published GitHub sample. This sample demonstrates the use of ADAL for JavaScript for securing an AngularJS based single page app, implemented with an ASP.NET Web API backend, that calls another ASP.NET Web API using CORS.
Call an Azure AD protected Web API in an AngularJS Single Page App

Best Frontend for API RESTfull expres.js and mongodb?

I am beginning with node.js, mongodb ... I want to make a web application that connects to a mongodb and to create a CRUD product. I've created my API Restfull with express.js and mongodb. Now I have to do the frontend and I'm lost. For the Frontend I plan to use AngularJS, ReactJs or EmberJS but I do not know what should I choose to start, because I've never used any of these technologies and I would use it more easy to use and understand if possible (or if there are other, easier). Any tips?

Connecting yeoman (+angular) with database

I am rewriting my JavaScript app using Yeoman and AngularJS. So far, I used simple webpy framework and everything was fine - I used ajax calls to get data from server, server was connected to sqlite database and everything worked.
Now, I'm deeply confused and have no idea how to connect webapp scaffolded by yeoman and angular with my sqlite db. I know that yeoman is built on node.js but I'm not sure what should I do to get working server side.
I know that this question is more about architecture but I was not able find on the internet how to connect this two technologies: yeoman (with angular) and sqlite database.
What should I use?
Angular is a front-end framework. You must have a back-end server to communicate to your database. You talk to it with Angular via a RESTful service using $resource or $http or some 3rd party library like RestAngular.

Spring Security REST and Angular

I have a full Spring application (security managed by spring-security and the controller Layer is build with Spring MVC).
I am using in the front-end AngularJS .
I need some example of how I will handle REST authentication with Spring Security and how I will call these services in the Angular side.
Note: Basic authentication will be perfect in my case .
Some code is needed to integrate AngularJS and Spring Security, as Spring Security wasn't meant to be used by a full Ajax framework.
Here is a sample application that does this integration, you will get both the Spring Security configuration and some classes used to do this integration:
https://github.com/jhipster/jhipster-sample-app
One of the great things about AngularJS is that its pretty flexible and can operate with a number of different backend configurations. While I haven't personally used spring MVC or spring security I have used Angular with .NET MVC, Node, and PHP all with slightly different authentication systems and it worked out very well.
Dave Mosher has a great tutorial series that incorporates authentication concepts(his example is PHP with Laravel) but the concepts may be helpful:
https://github.com/davemo/end-to-end-with-angularjs
For a more advanced example of authentication with AngularJS you might want to check out Angular-App:
https://github.com/angular-app/angular-app

Building a Sencha based mobile app with a CakePHP backend

I am using Cakephp 2 as a backend for a cafe shop mobile application. I would like to use Sencha as the mobile framework.
I have the following questions:
Should I be building the frontend within the CakePHP framework as layouts/views or should I use CakePHP to create a RESTful webservice in order to access my data?
Can a complete cake application be wrapper using phonegap?
Thanks.
I would recommend building your mobile application separately from your Cake app. Like you mentioned, I would go with building a RESTful web service to provide your data. I would recommend using JSON, but that's your decision.
Cake provides built in support for building RESTful web services, but you probably knew this. :) http://book.cakephp.org/2.0/en/development/rest.html
A Cake application cannot be wrapped up inside PhoneGap since it needs to be run on a web server (Apache, IIS, etc)
There is also a framework which does a lot of work for you, it's specifically to integrate CakePHP with Sencha Touch http://banchaproject.org

Resources