Overview of Kinvey
Kinvey is a high-productivity serverless application development platform that provides developers tools to build robust, multi-channel applications utilizing a cloud backend and front-end SDKs. As a platform, Kinvey provides many solutions to common development needs, such as a data store, data integration, single sign-on integration, and file storage. With Kinvey, developers can focus on building what provides value for their app - the user experience (UX) and business logic of the application. This approach increases developer productivity and aims to enable higher quality apps by leveraging Kinvey's pre-built components.
Apps built in Kinvey are made up of several distinct, decoupled parts that work together.
Client App: The client application is the frontend, user-facing part of a Kinvey app. This is where most of the development occors, and focuses on delivering a frontend experience to users.
Client SDK: The client SDK is the interface between the client and the Kinvey service backend. An SDK exists for each platform - NativeScript, iOS, Android, etc. Client SDKs provide abstractions for each of the backend APIs and services that the app needs, such as data, auth, files etc. In addition, SDKs provide functionality that apps commonly need, such as offline storage, caching, token management etc.
Backend App:. The backend app contains all APIs and services - data, auth, server-side logic, etc. available for a frontend client app. A single backend app can have one or more client apps that use it (for example, a NativeScript mobile app and an Angular web app).
Backend Environment: Each backend app can have one or more environments to support the development lifecycle. For example, a backend app can contain environments for development, testing, staging, and production. Each environment contains its own individual settings, APIs and services, with the ability to migrate between them.
Service: A service is an abstraction for connecting to external systems or implementing custom business logic. Services can be shared across applications to facilitate reuse.
Kinvey's architecture encourages agile decoupled development - allowing individual developers to work on different parts of an application independently and integrate them together when ready. In a single application, each target platform could have an indivdual front-end developer (e.g. NativeScript, web, or native ios/android), and a backend developer for building data integrations and writing server-side business logic.
Regardless of team size, the decoupled nature of the platform encourages focus on one abstraction at a time, leading to smaller development increments which increase velocity and reduce risk.
For example, a developer building an app that presents sales opportunities from Salesforce could begin by focusing on the user experience first, utilizing mocked-up data in Kinvey's built-in DataStore. Once the UX is complete, the integration with Salesforce can be configured. Using a RAPID connector, the developer maps the Salesforce Opportunity object into the format expected by the client application. Finally, without changing a line of client code, the data source can be switched from Kinvey's DataStore to Salesforce and the app works end to end.
The Kinvey platform presents developers with a number of abstractions that can be implemented in various ways, all while maintaining the same interface. The most central abstraction, the
data collection is a collection of homogenous data that can be implemented by any number of sources - a Kinvey-backed document DataStore, a RapidData integration for common data sources, or a Flex Service for connecting to less common data sources, custom data sources, or for implementing complex data orchestration logic.
Regardless of the source, the interface to the collection abstraction is constant from the point of view of the client app. Whether a collection is backed by the Kinvey DataStore, a RapidData Connector, or a FlexData Service, a client app will use the same methods to read and write data from that collection. It also enables complex functionality such as offline cache and sync, for all sources of data. The abstraction makes it possible to leverage multiple features via a common interface, which leads to lower development efforts.
When building an app on Kinvey, the focus should be on the user experience and the value that differentiates the app. The first task should be centered around the user experience and user interactions. When designing your app's UX, the following questions should be asked:
- Who is the audience for the application?
- How will your users interact with your application?
- Given the channel (web, mobile, etc), what is the simplest way to achieve those interactions?
- What is the data model for the application? How will users read and write data with this model?
- What is the offline strategy for the application? Which data needs to be available offline?
- Do I need to leverage an existing or legacy data source?
- Do I need to utilize an enterprise or social authentication provider?
With the above answers, start building your app UX-first, by leveraging the built-in data sources and worrying about integrations later.
As you're building the application, keep in mind these best practices:
Focus on UX and the unique value of your application first When integrating data, only transfer the data needed for the application data model to the client. Returning a subset of data needed by the client and returning a subset of data properties provides a more performant, more manageable experience.
* When writing server-side logic, avoid large functions or large services. Keep your functions/services single-purpose and small.