Can a single-page application be created using Express without utilizing React, Angular, or similar frameworks?

Our codebase is currently exclusively built on express, and we are looking to expand it while transitioning into a single page application. At this point in time, I am hesitant to rework the code using frameworks such as Angular or React to achieve this goal.

Thank you for taking the time to read this.

Answer №1

Do you really think a Single Page Application (SPA) is the right choice for your project?

If so, then the answer is Yes: You can build an SPA without the need for any frontend framework.

An SPA typically involves the following components:

  • Client-side routing (like HTML history mode)
  • Client-side templating (check out this Smashing Magazine article for examples)
  • Data retrieval (using technologies such as Fetch API or Axios

With these tools, regardless of your backend setup, you can develop an SPA using Vanilla JavaScript. The backend technology has little impact on the functionality of your SPA.


However, if your application is large scale and requires advanced features, you may consider utilizing a frontend framework. These frameworks are designed to simplify development tasks.

If you're seeking a framework with a gentle learning curve, I recommend exploring Vue.js. You can even start building without needing to install or transpile anything locally.

Answer №2

Absolutely, it is possible - depending on the complexity of your project, you may find yourself transitioning to React, Angular, or another frontend framework in the future based on your specific requirements.

Check out these helpful resources:

To-do lists implemented in various frameworks (for comparison):

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

Answer №3

When creating a comprehensive single page application, it is advisable to stick with express. Although you may encounter some hurdles along the way, opting for React or Angular would be a more advantageous choice as it allows for better scalability and flexibility in the long run.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Finding out whether the current date falls between a startDate and endDate within a nested object in mongoose can be done by using a specific method

My data structure includes a nested object as shown: votingPeriod: {startDate: ISOdate(), endDate: ISOdate()}. Despite using the query below, I am getting an empty object back from my MongoDB. const organizations = await this.organizationRepository.find( ...

Error: Import statement is not allowed outside a module while running on live server

//this is the Greetings.js file import React from "react"; function DisplayGreetings() { return ( <div><h1>Welcome</h1></div> ) } export default DisplayGreetings //This is the Main.js file import React,{Compone ...

Backbone "recalling" stored data in attributes

Presented here is a basic model: myTestModel = Backbone.Model.extend({ defaults: { title: 'My Title', config: {}, active: 1, } }) While nothing particularly stands out, there is an interesting observation regardi ...

Is there a way for me to locate a forum using a JWT Token?

I am searching for a way to retrieve forums using JWT Token. If a user has created 3 forums, I want to display them in a list. My Request is structured like this : ### http://localhost:8080/forum/getByOwnerID Authorization: Bearer {{adminToken}} Alternat ...

Restrict the duplication of div elements with JQuery

Here is the structure I'm working with: <div class="checkmark-outer"> <div class="checkmark-33"> <div class="fa-stack fa-1x checkmark-icon"> <i class="fa fa-circle fa-stack-2x icon-background"></i> ...

Having trouble deciphering the JSON data structure in JavaScript

How can values be passed back to a form that was submitted to the server using Ajax? In this view (shown below), a simple data structure is returned for testing purposes: def detail(request, widget_id): widget = get_object_or_404(Widget, pk=widget_i ...

Is there a parameter I am overlooking when trying to remove an item from a state-stored array using the delete button at line 55?

Need help with the code in the app component. I know it's not ideal, any assistance would be greatly appreciated. I'm a bit lost and can't figure out how to remove an item from the list after it has been added. Everything else seems to work ...

Having trouble reaching an injected dependency beyond the controller method

Can an injected dependency on a controller be accessed outside of it? function clientCreateController(ClientsService, retrieveAddress) { var vm = this; vm.searchCep = searchCep; } function searchCep(cep) { retrieveAddress.find(cep) .success ...

Angular 1.6 limits the ability to include multiple custom components on a single page

I'm currently working with angular 1.6 and have encountered an issue with two components, config-list and request-dates. Both components function correctly individually on a page, but when I attempt to add both components to the same page, only the s ...

What is the best way to style the currently selected option element in a select dropdown?

I am trying to change the font color of specific option elements within a select dropdown by adding style="color: #D4D4D4". When I apply this style directly to an option element like <option value="TEST" style="color: #D4D4D4">TEST</option>, it ...

Error arises on Github when submitting a pull request due to a conflicted package

When facing conflicts in the package.json file while submitting a pull request, what is the best approach to resolve them? I usually attempt using git pull origin, but it tends to generate numerous merge commits. ...

Gain a comprehensive understanding of the JavaScript syntax utilized throughout the code

I stumbled upon this JavaScript code that enables asynchronous file uploads, but there are certain parts of it that I'm struggling to grasp. Any insights or explanations would be greatly appreciated - many thanks in advance. // Utilizing Ajax for Fil ...

Utilizing Express and Nginx to Serve Static Files

I'm experiencing a strange issue with my application. I need to include multiple static paths in my app.js file. Firstly, for the main application: app.use(express.static(path.join(__dirname, 'public'))); And secondly, for landing pages l ...

Adjusting the size of a dynamically generated rectangle using DrawingManager

I am currently working on a web application using Azure Maps along with the DrawingManager library. My goal is to allow users to save a drawn rectangle and potentially edit it by resizing later on. The strange thing is that while resizing rectangles works ...

Leveraging personalized design elements from a theme in Material UI without the need for makeStyles

Is there a way to access the theme.customElements.actionButton in MyComponent without relying on makeStyles? For instance, can I directly use className={theme.customElements.actionButton}? theme.js const theme = createMuiTheme({ customElements: { ...

Separate and add on the change validity status of an AngularJS form

If you want to test it out, check this jsFiddle link: HERE (it's recommended to view on a new jsFiddle, refer to the EDIT section of this post) I've noticed what seems like a bug in AngularJS or at least an unexpected behavior. When I detach a f ...

Utilizing the Twitter API with Next.js to automate tweets even when the website is not actively engaged

Currently, I am utilizing next.js for the development of a web application. My goal is to have this app automatically post to my Twitter account. I have already set up a developer account on Twitter and an API in nextjs. By calling the API, it will trigger ...

What sets apart the following: ( import React from "react"; ) and ( import React from 'react'; )?

When it comes to imports, is there a distinction between using single quotes (') versus double quotes ("), for example in import React from 'react'; and import React from "react";? Are there any notable differences? ...

Manipulating JSON data fetched through AJAX beyond the success callback

I'm facing an issue with storing JSON data received via AJAX in an external variable for future use. I came across this answer on Stack Overflow (load json into variable), which provided some basic insights, but it seems like I might be missing someth ...

Steps to remove a specific child element using jQuery:

CSS: <h1><br style="clear:both;"></h1> I am currently working on a project that involves using the Wikipedia API. One issue I've run into is cleaning up the raw HTML output from Wikipedia, specifically dealing with removing a speci ...