Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Single Page Application for Enterprise Level Systems

I have one general question about SPA.That is,Is SPA suitable only for the Dashboard kind of applications ? Or Can we use SPA for any size of Enterprise level application development (say for ERP solution)?

SPA

UPDATE :

Please check below link for GREAT discussions of this topic with John Papa,Dan Wahlin and others....

Single Page Application for Enterprise Level Systems

like image 339
Sampath Avatar asked Oct 30 '13 10:10

Sampath


3 Answers

AngularJS is a very hot project that I've also used, but you come back to having all the logic in JavaScript, which will add complexity and pain if the project gets huge (it's enterprise).

The rule of thumb is: the more complex/enterprise a software solution should be, the more you should use professional tools and static languages (Java/C#).

Maintenance is 80% of software's life. Putting that in JavaScript might be very tricky. Refactoring, structure and developer independence are a little bit more difficult in scripting languages.

Some use cases where SPAs are a good approach:
1. When you want a high performance app for all types of mobile devices (if you can't afford native development and if you don't want to pay fees to Apple, Google, Microsoft when you sell stuff).
2. News sites where you want to engage the user as much as possible (www.usatoday.com is a great example).
3. Social networks where you must do everything possible to keep the user active (ex: Facebook is mostly SPA).
Bottom line for SPAs = fastest web performance & best user experience.

like image 85
zmirc Avatar answered Oct 24 '22 06:10

zmirc


Great question. I really cut my teeth in SPA developing an enterprise mobile first application. I learned so much from the experience. The application had about 40 modules or apps,if you like. Each app had about 3-6 views. I realized early on that traditional web architecture would not cut it, remember it was a mobile first project, so I started doing a spa.

There is so much to it, and not enough or here to articulate, but it is not really that hard. Here are some principles I believe you have to stick with:

Avoid heavy frameworks, they get in the way too much and they come and go, so don't be married to them Vanilla JavaScript is your friend in many ways. All browsers are pretty consistent with supporting the same standards, Apis etc. Leverage local storage to cache data as well as markup Do not download large chunks of markup at one time Do not create an unnecessarily chatty application, localStorage and indexDB are your friends Create a mechanism to serve only modified markup content each time the app is loaded Keep your DOM small, too many elements, even hidden creates a sluggish machine starving for memory. Use appcache for offline, but understand its quirks

I general most of my enterprise apps can be done with 100kb of JavaScript or less, that is the entire application. My DOM is usually less than 100 elements baring a long list or table in the view. All my apps load in less than 1 second, and load sub module content in the background.

like image 37
Chris Love Avatar answered Oct 24 '22 04:10

Chris Love


A definite positive answer will only be possible if someone builds a successful ERP as single page application using Angular.

The Civilian web framework contains an elaborate sample [1][2] where the makers explored that direction. This seems not to be a complete solution but probably gets some steps closer to an architecture.

[1] http://www.civilian-framework.org/doc-samples.html#crm
[2] https://groups.google.com/forum/#!topic/angular/Q3GrhAH39AU

like image 22
wero Avatar answered Oct 24 '22 06:10

wero