You are here

You are here

5 back-end frameworks for better cross-platform development

Matthew David Digital Leader, Accenture

Front-end software development frameworks focus on web apps, but that's no longer the world we live in. Five years ago, you could get by with just web apps, but in the current digital-first world, you need to develop software for all types of devices.

You can effectively bring front-end tools to mobile, desktop, and IoT apps. But you'll also need a back-end framework designed to help you develop microservices and APIs.

The role of a back-end framework is to allow you to complete server-driven actions to successfully. This can include, but is not limited to, connecting to databases and providing business logic. As with front-end frameworks, standard development languages—such as PHP, C#, and Java—now have widely supported frameworks.

And as with front-end frameworks, the goal of a back-end framework is to accelerate the time needed to build an application. Here's what you need to know about five popular back-end development frameworks. 

1. Node.js

If you are just starting out, I strongly recommend beginning with Node.js. It is incredibly lightweight and fast, allows for a massive (but predictable) concurrency, and boasts a vast ecosystem of libraries. 

Speed is a compelling reason to pick Node over your other options. It is slightly faster than PHP or Ruby, and more than twice as fast as Java.

Node is also more efficient, particularly in terms of processor power. A high-end virtual private server can achieve high performance only when it's using a few things. It's much harder to achieve the same efficiency when running a server that's pulling in lots of database connections or massive IO calls.

Another compelling reason to use Node is its user-friendly features. Building a web app with Node requires virtually no management of database connections or other complex processes, so managing a long list of build tasks becomes much more comfortable.

Node has several features that are incredibly useful for web development. It has a large, diverse library of modules for JavaScript, including ones for databases, authentication, storage, localization, and web sockets.

Node also offers the ability to distribute JavaScript code across different servers and providers. It is built around a central server, so if your app or site is hosted somewhere else and needs to reach some local APIs, you can simply point that server to Node, and it will work.

This setup can, however, create load on the provider you're using (though for a smaller site, or one that isn't using Amazon's cloud, this won't be an issue). But this is still a great feature, particularly for small startups or sites that don't need a lot of flexibility.

Plus, you can use the same Node module across many other platforms, including Node.js for mobile devices, Java for Macs, and Python for Linux.

Node doesn't have a package manager, but it does have a command-line interface that lets you manage packages by downloading them directly from the Node Package Manager (npm) or by fetching them through the npm registry.

This is a highly flexible feature that can be used for any third-party package you need—even libraries or other Node modules. This also allows you to deploy to multiple platforms in a Docker container.

Want to run your Node project on Android? You can just use:

npm install jasmine -g android
Want to run your Node project on Red Hat? You can install it like so:

$ docker run -d -p 5500:5500 jasmine/jasmine $ node mine.js -m android

Of course, you can still use the npm registry if you prefer. But the above examples are more comprehensive ways to manage packages.

With Node, you can build an extensive list of apps. The rich library of plugins offers an almost unlimited number of solutions, from complex web apps to focused mobile apps. Node.js is very much the first tool in my developer toolbox.

2. Django

The good thing about Django is that you can use the same front-end framework to also build a back end. Django gives you a lot of power with its underlying Django ORM (Object-Relational Mapping) tool, and gives you tools for building your own back end.

Django's QuerySet class lets you create your own back end using SQL (sometimes SQLite), but you can also do so asynchronously, writing a database query for a chunk of Python code and then executing it later. The latter approach allows you to leverage the database (even when the back end runs within Django) to generate SQL for all of your application's back ends and then execute that SQL in the runtime. That's the back-end-as-a-service approach.

Testing your back-end code is not a big problem. Django can import any application's database schema as-is into your project, as well as output any query that you want. A developer doesn't need to know anything about that schema to write tests for Django code. Support files are provided to set up the necessary application-specific instance of your database schema to run SQL statements.

You can often quickly deploy your application to a virtual machine with its own database; virtual machines are for software testing purposes only. Using a database with a test or debug logging level allows you to write a report from one code domain into another so that your application can tell you about some system-specific behavior.

As the Django website will tell you, it is the framework for perfectionists with a deadline. That said, the audience does slant heavily toward Python developers. If Python is not your language, then Django is not the tool for you.

3. Express.js

Developers may choose to build with Node.js or with Node.js plus some other runtime such as Express.js. In this example, the Express.js server application will run on a Node.js server.

At this point, Node is a server runtime that you install to serve your code and assets. You can also use a container such as Docker to host the Node server.

So, when do you use Express in your web application? The best use of Express is in a Node web server. Here are a few Node applications that you could easily create using Express:

  • Angular 2 - Express + Angular 2 + MongoDB + MySQL
  • Rails - Express + Rails + Sinatra + MySQL
  • Rocking Rails - Express + Rails + Ruby + MongoDB + MySQL
  • Clojure - Express + Clojure + MongoDB + MySQL
  • JavaScript + Rails + Express (Babel) + Model

Express.js is a full-featured, high-performance, full-stack web framework. You also can use Express.js to build high-quality front-end applications. It offers much more than a similar structure (such as Angular) and client-side frameworks (such as Angular 2). 

Express is designed as a tool for building web applications. My teams have found it useful for building APIs, microservices, and modules, as well as the main frameworks needed for apps.

4. Spring.js

What Spring.js does so well is plugging new technology into your existing application. By doing this, Spring can help you extend the app in a simple and maintainable way.

This feature can be as simple as injecting object instances and extending methods in your classes. This is useful because, with good architecture, those object instances or processes are merely objects representing the state of your application. By creating a Spring example application that can live in a sandbox, you can then quickly plug in classes representing user authentication, user interface, and other business logic to that application.

In many ways, Spring.js is the tool with the smallest developer community on this list. I have included it here because the tool is great for spinning up proofs of concept (POCs) and for experimentation.

5. .NET Core

.NET Core is a cross-platform version of the .NET framework for building apps that run on Linux, macOS, and Windows. .NET Core delivers a runtime lightweight, single-page application framework and a platform for hosting side-by-side applications. 

One common question is whether to use .NET Core or ASP.NET Core. ASP.NET Core runs on servers for web applications and APIs, whereas .NET Core is a framework that can run locally on your device.  

And the answer is that you could choose both, for the following use cases:

  • Static-site generators: You need a tool that can generate static web pages. .NET Core provides this, along with some enterprise features such as creating CRUD applications and using Microsoft Event System and Microsoft Forms to display the page.
  • Scalability: ASP.NET Core provides direct and easy scalability. You can build an essential website with two web apps running on a single machine.
  • Maintainability: You can use these APIs directly from the code rather than DLL, using .NET Core instead of Windows Runtime, and still maintain the same service-level agreement that the .NET Framework provides.
  • Performance: .NET Core is scalable and very fast. It can compile complex applications using frameworks such as ASP.NET and use no server system at all.

APIs and web apps running on Azure Cloud work well when built with .NET Core.

Now add the missing ingredient: Accelerators

Frameworks for front-end and back-end development are just two of the three pieces needed for new development teams. The third component is what I call accelerators. An accelerator is anything that can increase the efficiency of your delivery team. Here are my top five:

  • Cloud services: These continue to make it easier for delivery teams to build apps that can flex up and down to meet customer demand.
  • Open source: Companies such as Microsoft and IBM are investing heavily in open source (GitHub and Red Hat) to offer developers the tools needed to speed up their application delivery.
  • DevOps: The natural progression from agile is DevOps, where teams offer continuous integration and continuous delivery.
  • Security: The foundation for all solutions must be security.
  • Mindset: The concept of a web application continues to evolve, and your perspective must be one of continuous education and experimentation.

Put it all together

The demands on development teams go beyond the web. You must be able to effectively deliver software that can scale across all of your customers' platforms. The one-two-three punch of front end, back end, and accelerators will give you the edge you need.

Note: Each of the frameworks mentioned is popular because it has been tested on sites and web apps used by hundreds of millions of users. For instance, Node.js is used to run sites such as Netflix, The Wall Street Journal, and LinkedIn.

Keep learning