Skip to content

v0.5

Compare
Choose a tag to compare
@jovotech jovotech released this 07 Sep 10:17

🎉 Jovo Framework v0.5 is now available on npm: https://www.npmjs.com/package/jovo-framework 🎉

Release Notes

  • Create contextual experiences with the User object
  • Refactoring
  • Bugfixes

User Object

We just made a big update to the User Class to make a few things easier while developing your voice apps:

  • Database integration
  • Metadata
  • More to come

Database Integration

The Jovo Framework now comes with easier database integration, directly tied to the User object. Previously, you had to do something like this to store user specific data:

let score = 300;
app.db().save('score', score, function(err) {
    // do something
}

Now, you can directly access and save the data in the user object. Our database integration will do the rest in the backend:

app.user().data.score = 300;

If you're already using the database class for storing data, no worries, it will still work. However, we encourage you to switch to the user object functionality, as it comes with clearer structure and better functionality, like metadata:

Metadata

The user object metadata is the first step towards building more contextual experiences with the Jovo Framework. Right now, the following data is automatically stored (by default on the FilePersistence db.json, or DynamoDB if you enable it):

  • createdAt: When the user first used your app
  • lastUsedAt: When was the last time your user interacted with your app
  • sessionsCount: How often did your user engage with your app

Here's some example code:

let userCreatedAt = app.user().metaData.createdAt; 
let userlastUsedAt = app.user().metaData.lastUsedAt; 
let userSessionsCount = app.user().metaData.sessionsCount;

More to come

As mentioned above, this is just a first step towards more contextual experiences that adapt to your users' behavior, the number of devices connected to your app, and more.

Suggestions for more interesting things to use the User Object with? Please let us know at [email protected]!