How to Get Set Up with Kinvey for Your Hackathon App

Posted May 3, 2018

So you read my last post about the reasons why you may want to use Kinvey for your hackathon app. Also note, winning teams who use Kinvey in their submitted application will be elible for a $500 bonus prize. Hopefully these reasons, along with my ability to create beautifully persuasive prose was enough to convince you to give Kinvey a try on your app. But how do you get started?

Don't sweat it - it's easy. Let me walk you through the basic setup and share some resources that can help you get going.

The Kinvey SDKs

The first thing you are going to want is the appropriate SDK for your app. I'm gonna take a guess, since you are signed up for Angular Attack, that you want the Angular SDK at the very least.

npm install kinvey-angular2-sdk

Or, if you are building native mobile apps with Angular using NativeScript, install the NativeScript SDK...

npm install kinvey-nativescript-sdk

There are a number of other SDKs if you are using server-side JavaScript in Node.js or plain client-side JavaScript in the browser to native iOS and Android SDKs - to name just a few.

You may be asking, why should I even use the SDK? Why not just use the REST API? The reason is that there is a lot of functionality built into the SDKs such as handling HTTP/SSL, keychains for secure user storage, encryption of caches, local caching with sync and much more. You can learn more about some of the benefits of using the SDKs in my article Top 4 Developer Features in Kinvey.

The Kinvey Web Console

Once you have a Kinvey account, you'll frequently manage many of your services via the web console. This is where you'll need to create your first Kinvey "app" which will function as the container for all the services related to whatever application you are building.

From the console you can create and manage "Collections," which is how Kinvey refers to the cloud data store. These collections can even be connected to external data sources via RapidData. You can create and manage users or connect your authentication to a third-party authentication service using Mobile Identity Connect. You can configure push notifications. Or, you can test many of the service calls via the built in API console.

Much of the web console is fairly straightforward to understand - especially if you are used to the mazes that are the consoles for many other cloud services. However, feel free to refer to the DevCenter if you want to know what a particular feature is and how to use it.

The Kinvey CLI

If you want to create serverless functions or low-code auth and data integrations using FlexServices, you'll need the Kinvey CLI. As you'd expect, you'll install it via npm.

npm install -g kinvey-cli

If you prefer to manage your Kinvey services from the command-line rather than the web console, version 4.0 beta includes features for managing your apps, environments and collections. If you're the type of person who prefers to leave the command-line as infrequently as possible, give it a try!

npm install -g [email protected]

For a full guide on how to use the command line to build and test FlexServices, refer to my tutorial Getting Started with Kinvey FlexServices.

Let's Get Building!

As you can see, getting set up is pretty easy. So, let's stop installing and start building something cool!


Key Kinvey Resources for Your App Development

Posted May 3, 2018

So you're ready to start actually coding your hackathon app, and you've decided to give Kinvey a try based on my last two posts. Well, keep this post handy, because it has links to a variety of resources that you may need as you code.

Get to Know the DevCenter

The Kinvey DevCenter is going to be your go-to resource throughout the app development process. It has documentation, tutorials, code samples and other useful resources catered to the specific language or framework SDK that you are working with. Here are some key DevCenter home pages that you may need:

Download the Appropriate SDK

I assume you'll be using Angular for your Angular Attack hackathon app, but, even if there are other aspects to your application, we've got you covered. Here are some of the most relevant (but by no means all) of our SDKs.

Tutorials and Blog Posts

Since joining the Kinvey team about six months ago, I have been busy creating resources to help developers like you get started with Kinvey. Here are some that I hope you will find helpful in your development.

General

Data/Collections

  • Using Kinvey’s RapidData Connectors - RapidData is a feature that allows developers to connect their Kinvey app to an enterprise data source like SalesForce, SAP, Sharepoint, Microsoft SQL Server, or even REST endpoints. Learn how to use the feature here.

Authentication

  • Understanding Users in Kinvey - This post explores some of the various types of users and authentication in Kinvey - from anonymous users to Kinvey authentication to Mobile Identity Connect using a social identity provider.
  • Enterprise Authentication with Kinvey - Mobile Identity Connect is a feature that allows developers to connect their Kinvey app to enterprise authentication sources such that rely on Active Directory, OAuth2, SAML, LDAP and OpenID. This tutorial walks through how it works.
  • Using Enterprise Authentication - This is the documentation for the Enterprise Authentication template in NativeScript Sidekick. It not only can help you integrate enterprise authentication into a mobile app built with NativeScript, but it also has walk throughs showing how to connect Kinvey to SAML-Redirect, OpenID Connect, and OAuth 2.

FlexServices


Get the Things Every Hackathon App Needs with Kinvey

Posted May 1, 2018

Every app is unique - to be sure. Yours will be world changing - I'm confident. However, no matter how different your concept is, there are still things that pretty much every app needs regardless of what kind of app you are developing. These are:

  • Data
  • User authentication
  • Business logic

While each of these things is critical to the success of your app, they likely play more of a key supporting role rather than that of a key differentiator. Then, the goal of any hackathon developer worth their salt is: how can I build these pieces with the minimum code and effort so that they just work.

Well, let me take a moment and introduce you to Kinvey and offer you some ways that it can help solve each of these three things your app needs, while offering some unique differences that can help make your app shine.

Data

A lot of services offer cloud data solutions, including Kinvey. If you are looking for just a cloud data store, Kinvey is definitely a worthy option to consider. You can find a lot of resources and code samples on how to use Kinvey's cloud data store in the DevCenter.

However, Kinvey is different in that it offers some fast solutions to some notoriously difficult and/or time-consuming problems. For example, does your app need to connect to SalesForce, SAP, Sharepoint, Microsoft SQL Server, or even REST endpoints? If so, Kinvey's RapidData feature can offer you a fast, no-code way to build these connectors into your app.

connectors

Another benefit, especially for a Hackathon app, where the speed of development can be extra critical, is that these connectors actually tie into the cloud data store. What this means is that I can mock up my app using the cloud data store and dummy data, and when the connector is ready to go, I can just swap it out without changing a single line of code. In the animation below, I am swapping my cloud data source with dummy data for a SQL Server running on Azure with just the click of a button.

switching data sources

If you'd like to learn more about how to leverage this feature check out my tutorial on using Kinvey’s RapidData connectors or the DevCenter documentation on RapidData.

User Authentication

If you are like me, building another login for another app is one of those tasks you dread. It feels like a problem I am forced to solve over and over and over again - like Sisyphus pushing the stone uphill for eternity, but the hill (i.e. the requirements) is always changing.

As with some other solutions, Kinvey offers built in authentication tools for handling basic authentication. It will allow users to register, login, get password reminders or change their passwords all with minimal code.

But, what if your application needs to connect to an existing authentication system - whether it be a social identity login or something more complicated like Active Directory, OAuth2, SAML, LDAP or OpenID?

Kinvey's Mobile Identity Connect offers easy-to-use, no-code integrations with all of these options and more.

Mobile Identity Connect options

This means you can spend less time rebuilding yet another login form and more time on what makes your app special.

For more details on how to manage standard authentication as well as social identity logins in Kinvey, see my tutorial on understanding users in Kinvey. For a full tutorial on enterprise authentication using Mobile Identity Connect, check out my post on Enterprise Authentication with Kinvey as well as the DevCenter. Also, NativeScript Sidekick offers a mobile app template with Mobile Identity Connect integration. Check out the the enterprise authentication template documentation for some great details on how to set up mobile identity connect with multiple types of sources.

Business Logic

The server part of server-side business logic has often been the most painful. What should I run it on? Where should I host it? How should I secure it? How do I connect it to my data? Not all of these problems are necessarily hard to solve, but they add complexity and time of development to your app development without really offering a differentiator. This has been a big part of why developers have embraced the idea of "serverless" app architectures.

Kinvey offers FlexServices and the FlexService Runtime that is a easy to use platform for deploying serverless functions. It is built on Node.js, so building FlexServices is just a matter of knowing how to code in JavaScript. But FlexServices can be more than just a simple bit of business logic that you call as a custom endpoint from your app.

For instance, you can use a FlexService as a collection hook to modify or clean data as it is being retrieved, saved or deleted in a Kinvey collection. You can use FlexData to build low-code data integrations that allow you to connect to just about any data source (even those not covered by RapidData) and have more fine-grained control. Or you can do the same with authentication using FlexAuth.

If you want to learn more about adding serverless business logic to your application with FlexServices, check out my tutorial on Getting Started with Kinvey FlexServices as well as the series of example services. If you want to learn more or are interested in using things like FlexData and FlexAuth, check out the DevCenter documenation. Also, for an easy method of testing your FlexServices locally during development, check out my post on developing and Testing of Kinvey Flex Services the Easier Way.

But Wait...there's more!

Honestly, I've only touched the surface of the many features in Kinvey. I haven't even gotten to things like push notifications, user roles, file storage and the API console to name a few more. Be sure to check them out if you are curious - and let us know what you build with Kinvey. Good luck!