Ampt vs. Nitric

Nitric is a framework that empowers developers to build complete cloud applications on their preferred cloud platform, combining infrastructure declaration and application code in one place. Ampt is a development platform tailored for rapidly building cloud applications using JavaScript or TypeScript. Both serve the purpose of simplifying cloud application development but operate in different ways and cater to different specific needs. These are the main differences between the two:

  1. Cloud Provider Support: Nitric is provider-agnostic, capable of deploying to multiple cloud providers such as AWS, Google Cloud, and Azure. Ampt is a platform, which currently runs on AWS.
  2. Language Support: Nitric provides multiple libraries for TypeScript/JavaScript, Python, Go, C# .NET and Java, allowing developers to choose their preferred language. Currently Ampt supports TypeScript and JavaScript.
  3. Infrastructure Provisioning: Nitric uses Pulumi by default for provisioning cloud resources, but also allows the use of custom providers. Ampt uses a hosted provisioning engine via their online platform. While resources deployed with Nitric are statically determined at deployment, Ampt is able to reallocate resources between AWS services at runtime to optimize applications.
  4. Local Simulation: Nitric provides a fully offline local cloud simulation tool, allowing you to test your applications locally before deploying them. This is a feature that Ampt does not offer. However, for local development Ampt deploys and syncs your application to the cloud via a sandbox environment, allowing for rapid testing of local changes.
  5. Open Source: As an open-source framework, Nitric does not require a platform or subscription to deploy applications. Ampt is a hosted platform which requires an account and provides both free and paid offerings.

Code Comparison

To get a deeper understanding of the differences, let's see the same app built in both Nitric and Ampt.

Nitric

import { api } from '@nitric/sdk'
const helloApi = api('main')
helloApi.get('/hello/:name', async (ctx) => {
const { name } = ctx.req.params
ctx.res.body = `Hello ${name}`
})

Ampt (Experimental)

import { api } from '@ampt/api'
const helloApi = api('main').router('/hello')
helloApi.get('/:name', async (event) => {
const { name } = event.params
return event.status(200).body(`Hello ${name}`)
})

Differences

NitricAmpt
LanguageYour choiceJavaScript / TypeScript
Lines of code99
Cloud InfrastructureInferred, StaticInferred, Dynamic
ExtensibilityCustom providers can be createdNone
Local developmentBuilt-in local simulator with instant hot reloading and offline supportActive project synchronization to a cloud sandbox with a local proxy
Cloud providersAWS, Azure, GCP and Custom providersAmpt Platform (AWS)
Provisioning enginePulumi by default, other custom providers can be createdHosted provisioning engine
Last updated on Nov 4, 2024