Saturday, December 23, 2017

Is this bad design?

I have inherited a fairly large application build with ASP.NET MVC and AngularJS. The 2 parts I am specifically curious about revolve around authentication and routing.

1.) When you hit a route, ASP.NET picks it up and hits a corresponding controller. The controller hits the Index method (all routes hit the Index method, by design, utilizing Route Attributes) and spits out a "blank" view with a layout page. The layout page contains all the JavaScript script references.

After this happens, the AngularJS app's routing picks up the called route and the single page application portion of the app does its thing.

It seems odd going through 2 rounds of routing.

2.) Authentication is solely handled on the ASP.NET MVC side. Login is a Razor view, not an AngularJS view with corresponding controllers/services. No cookies are being passed around in the AngularJS code. It kind of makes the application a hybrid in this regard, not solely an AngularJS app with an ASP.NET MVC backend.

Can I have the sub's thoughts on the 2 situations above?

Is this bad design? Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team