-3

Our entire codebase is built on just express, we want to build it out and in the process convert it to a single page application. As of now I am opposed to rewriting the code to work with a framework like Angular, or React, to accomplish this.

Thanks for reading.

  • 1
    If you are truly trying to go for a SPA, you could try to avoid one primary front end frameworks but I'm confident you'd find yourself re-inventing many of the patterns they have already defined for you. – AJ X. Oct 05 '17 at 17:50
  • Of course. In the end, the frameworks you mentioned are just pre-created bundles of code covering common functionality and/or define one or more rules along which you create your app. They do not add anything to the runtime environment, nor do they have access to anything you yourself don't. After all, you could just write your own framework, no? – John Weisz Oct 05 '17 at 17:57
  • Does this answer your question? [How to create a vanilla JS routing for SPA?](https://stackoverflow.com/questions/54231533/how-to-create-a-vanilla-js-routing-for-spa) – ggorlen Mar 04 '21 at 15:12
  • @ggorlen thank you for the response, but its been 4 years and I don't really care about this anymore. –  Mar 07 '21 at 18:55
  • @SadekSyed I appreciate that, but the duplicate suggestion is for folks such as myself who arrive at this thread from a search and need to be routed to a more canonical resource. SO isn't just about the original asker; it's about future visitors as well. – ggorlen Mar 07 '21 at 20:26

3 Answers3

3

Are you sure a SPA web application is what you really want to achieve?

If you are, then the answer is Yes: you don't need a framework for any SPA or any other frontend purposes.

A SPA usually consists of following parts:

So, using these technologies, regardless of your backend technology, you can create a SPA with Vanilla JS. Actually, what you use at your backend has little to no affect on your SPA.


However, depending on how big your application is or how much features you need, you might end up using one. Frontend frameworks are designed to make your life easier.

If you are looking for a framework with an easy learning curve, I strongly suggest Vue.js. You can even get started without installing or transpiling anything locally.

tony19
  • 125,647
  • 18
  • 229
  • 307
1

yes, you can - depending on the complexity of your application you may end up transitioning to React, Angular, or another frontend framework in the future depending on your needs.

here are some resources: https://tutorialzine.com/2015/02/single-page-app-without-a-framework

Todo in different frameworks (for comparison): http://todomvc.com/

Angular vs Vue vs React: https://medium.com/unicorn-supplies/angular-vs-react-vs-vue-a-2017-comparison-c5c52d620176

jeanmw
  • 446
  • 2
  • 17
0

If you're going for a real single page application you should be able to continue to use express. You'll find yourself jumping through some hoops though and using React/Angular would be a better approach because of how you could move forward with it in the future with no limitations.

Perniferous
  • 513
  • 6
  • 19