We developed Apostrophe because we found ourselves repeating the same tasks, making the same changes, and expressing the same complaints whenever we started a project with another framework or CMS.
So what are the advantages of Apostrophe, and how do they make CMS development more efficient and effective? We'll answer those questions here.
One programming language: no context switching
It boasts a large and active community of developers, contributing to a rich ecosystem of libraries and tools. This community-driven approach ensures that there are plenty of resources available, from tutorials to plugins, to support both new and experienced developers. Vue's flexibility and community support make it an excellent choice within Apostrophe's architecture.
Apostrophe's own built-in query builder uses chainable methods, similar to ORMs (Object-Relational Mappers) you may have used, to build queries while automatically taking care of fundamentals like choosing the right type of document and enforcing permissions. However, the door is open to including MongoDB queries to filter data as you see fit.
MongoDB also contributes to the performance of Apostrophe. Because it is designed from the beginning to support structured documents rather than just table rows, MongoDB can efficiently represent and query an entire page as a single document in the database.
DRY (Don't Repeat Yourself)
In some frameworks, CMS work requires a lot of boilerplate code and repetition. Apostrophe is designed from the start to avoid repetition.
Pieces: reusable content for your site
When you want to create a new content type, you can use Apostrophe's object-oriented features to extend our
@apostrophecms/piece-type module to create a new "piece type" module with all the functionality of the base module but still independently customizable. This is perfect for content types like blog posts or products. Creation of a new module immediately gives you a user interface for managing content, a database layer to store and access said content, and the option of also extending our
@apostrophecms/piece-page-type module to present the content to your site's audience. All of these features automatically draw on the same schema, avoiding code repetition.
Widgets: editable content on the page
Apostrophe's schemas provide a way to define the fields that make up your content types in a single place. Schema field types include the usual choices, like strings, integers, floats, and booleans, but also array fields which can have their own schemas, and relationships that connect documents. This lets you take advantage of MongoDB's support for building nested documents.
Smart media handling
We understand that content creators often struggle to manage media on CMS sites. This can lead to real problems when images of the wrong size or type are inserted into the design.
This is why Apostrophe has built-in features to scale images to a set of suitable sizes, crop images, enforce aspect ratios, and pick "focal points" for better responsive results. Apostrophe also includes a helper function to generate srcset attributes for the best responsive outcome.
Not all CMSes are designed to scale up smoothly for the largest audiences. While Apostrophe starts out configured for simple development and production environments, Apostrophe's uploadfs module already includes support for storing media with Amazon Web Services, Azure, or Google Cloud Storage. With the addition of a MongoDB Atlas cloud database, Apostrophe becomes "stateless," allowing you to load-balance as many instances as you need for a high-traffic site.
Better for your content creators
All the features in the world won't help if content creation is an unpleasant process. Apostrophe's user interface provides an intuitive way to edit content right on the page. Throughout Apostrophe, care has been taken to keep the interface clear and friendly for the editor.
In addition, Apostrophe's
improve feature allows us to ship "improvements" to core functions without code duplication and maintenance problems. This takes object-oriented programming and inheritance a step further than most frameworks. The
@apostrophecms/piece-type-exporter npm module is a good example, adding the ability to export CSV and Excel files from any "piece-type" (content type).
A rich library of optional modules
Taking advantage of its extensibility, Apostrophe maintains an official library of optional npm modules. You can learn more about our official npm modules here.
Approvals, localization, and internationalization
Apostrophe provides an approval flow for content, as well as localization and internationalization capabilities (l10n and i18n) right out of the box. Any document can be translated into multiple languages, with no performance impact on the rest of the site.