stepanian
stepanian

Reputation: 11433

CRUD in AngularJS

I am building an admin panel that involves mostly CRUD operations in AngularJS. I have seen many examples of how to do this on the web. Each example I have seen is a single page application that handles a single type (for example Person, Employee, etc.).

My question is the following: If the admin application I am building will involve a large number of CRUDS (one for each type used in the database), should I still use one single page app for the entire admin panel website or should I make each CRUD a separate single page application?

What is the best practice for this?

Upvotes: 3

Views: 4369

Answers (2)

François Zaninotto
François Zaninotto

Reputation: 7335

We've chosen to use a single app for a multi-model admin GUI built with angular.js called ng-admin (open-source, see code at https://github.com/marmelab/ng-admin).

It works very well, and it's easier to deal with model relationships (one-to-many, many-to-one, many-to-many). Doing so with several apps would imply booting several applications - probably bad for webperf.

Upvotes: 7

adib.mosharrof
adib.mosharrof

Reputation: 1634

Angular is really good for CRUD operations. There are many large scale apps with lots of CRUD operations that have used angular. Go to built with angular and see the apps. You can find the source code as well.

Generally, rest services are used to make CRUD apps.

In my opinion, making each CRUD a separate app would not bring out the best performance of a SPA as some contents like the header and footer do not change much, so it would not be feasible to render them multiple times.

Upvotes: 0

Related Questions