I am building an application and I'm using the SPA (Single Page Application) approach. This means my page never reloads and everything is done through AJAX or sockets. However, I do have one exception: The login/logout is done in the traditional way. So, my application is essentially two SPA's one "public" (if you're not logged in) and a "private" (for logged in users).
I was wondering if other people have adopted my approach or if I should instead try to make a single SPA. Here are few advantages/disadvantages I can think of.
Advantages (of having two SPA's)
- When the user opens the public app, he doesn't have to load all of the "private" assets which can be quite substantial. This makes the initial page load faster.
- The page load makes the user feel something has happened. This is hard to explain but, it's kinda like that feeling when you see the gmail loader fill up and your app appear.
- I think the process of login/logout is slower because each time you have to reload the assets.
- We're breaking away from the SPA approach.
- More server requests which can potentially slow down the server.
So, I'm just curious if you have used my approach before or if there are other pros/cons to add.