Tag Archives: Ionic

Back to blog home page

Deep Dive Series: Integrating Backand with Ionic Creator, Mandrill & More

Posted by on Mar 14, 2017

Over the next several days, we’ll be running a set of deep-dive blog posts. Each post will cover a different topic in-depth, providing a deeper look at integrating Backand into a number of different application development scenarios. The posts will cover three differing topics, showing a range of functionality that can be implemented into a serverless app. A brief overview of each topic is provided below, to serve as a reading guide.

Integrating Backand with Ionic Creator

Ionic Creator is a powerful online development environment for Ionic apps. While it provides a convenient, UI-focused means for implementing a multi-platform application, it can make some tasks – such as integrating with a third-party service provider like Backand – challenging. In the article on integrating with Ionic Creator, we’ll cover the steps necessary to get Ionic Creator working with our new SDK. By following the steps in this article, you’ll be able to make your apps truly portable through the use of our serverless platform and Ionic’s core offering of cross-platform capable and consistent user interfaces.
Read more

Sending Email Attachments with Mandrill

While we can easily send email messages over MailChimp’s Mandrill API with simple HTTP calls, any message that includes an attachment needs to be created on the server side. In the Mandrill Attachments article, we’ll cover the process for creating a Node.JS Server-Side JavaScript action that can add an attachment to a transactional email sent via Mandrill. We’ll cover the JavaScript code you need to fetch a file from the web, convert it to a format Mandrill can accept, and then initiate the message send.
Read more

Batch and Bulk Processing in Backand

Backand’s automated REST API generation provides developers with a significant amount of functionality right off the bat, allowing your app to quickly begin working with the objects represented in your application’s database. However, these APIs are limited to working with a single record or retrieving a list of records. If you wish to create multiple records at once or update several objects across multiple database tables in a single API call, then you’ll want to make use of our bulk processing API. We’ll provide all of the details you need to create bulk processing requests, allowing you to easily update large numbers of records in your application’s Backand database.
Read more

Other topics

We’re always looking to help developers understand how to better work with the Backand platform. Our goal is to make developing your app easier, and we’d love to hear from you if you have an idea that would help us achieve that goal. Simply contact us via social media, or using our contact form to start a conversation!

Back to blog home page

Upgrade Your Apps to Work with Our New Serverless SDK

Posted by on Mar 02, 2017

This post is a quick guide to upgrading your existing Backand-powered applications to work with the new Backand Serverless SDK we announced a couple of weeks ago. We’ll cover the changes made in the SDK, and explore the steps you need to take to get your Backand application up and running with the new API.

What’s changed?

We’ve made a number of changes in our new SDK that make developing against Backand faster than ever. Here’s a brief overview of what changed:

  • Streamlined authentication, making it easier for you to authenticate your users.
  • Improved the process for registering with – and signing in via – social media providers with the addition of new SDK methods.
  • Greatly improved the method in which you interact with Backand objects. Gone are the days of needing to manually construct a URL – simply specify the object name as part of a clearly-named function call to the API, and we handle the complexity for you.
  • We have also streamlined our response data, allowing you to work with the results of calls to your Backand back-end in a more straightforward manner.

And on top of all this, we continue to offer the same secure, scalable, and responsive backend-as-a-service that we always have!

Converting old app code to the Serverless SDK

Next, let’s look at what steps are needed to change a Backand application to work with the new SDK. For reference, we are basing this code off of our base Ionic starter app – see it on the Ionic marketplace at https://market.ionic.io/starters/backand-simple.

Step 1: Add new SDK to bower.json

First, you’ll need to add the new SDK to your bower file.

Step 2: Update Script includes in index.html to include the new SDK.

Start with removing the old SDK by commenting out – or deleting – the following line:

Then, replace it with the new SDK links:

Or, use the CDN files:

Note: You may want to check your dependencies directory for any lingering versions of the old Backand SDK – this can cause cache issues due to competing HTTP Interceptors. Simply remove the old folder from the appropriate directory in your project.

Step 3: Update the user authentication method

User authentication is largely unchanged, with a few notes below:

  • If you have previously disabled anonymous auth in your app, you can re-enable it using Backand.useAnonymousAuth(). This value defaults to true, so if you do not modify the default value you do not need to make any changes.
  • We’ve added new social media authentication functions: socialSignin, and socialSignup. Please note that while some of the examples in our github repos – and some of our documentation – used socialSignUp to refer to the specified function in the Backand SDK, this is no longer valid – the “up” will not be capitalized in the new SDK.

Step 4: Update the method used to detect unauthorized users

The getToken() method has been expanded, to use a promise. Originally this method would return undefined when a user was unauthorized, but this functionality can now be managed via the promise method. In the new SDK, the getToken() method is not as prominent as it was in previous versions, and you are likely to not need it as you work on your app.

Step 5: Change $http usage to use the Backand SDK REST methods:

The Serverless SDK features wrapper methods that can be used in place of the direct HTTP calls used in the previous method. Here’s a quick comparison of the old SDK’s HTTP communications, as compared to the new function-based Serverless SDK:

Step 6: Update data result usage

The old SDK would use code similar to the following when handling responses from Back& API calls:

The new SDK does not store the results in a nested data member, but rather in a root data element. The old SDK stored the response contents in a root property, meaning that the actual data was a subset of this data property – hence the use of result.data.data in the old SDK. With the new SDK, you no longer need the extra level of disambiguation, and can store the data in your application’s object with the following code:

Conclusion

In this post, we covered the Backand Serverless SDK. We touched briefly on the features the new SDK has to offer and walked through the process necessary to convert an existing Backand-powered app to the new API. Most importantly, though, is that we built this SDK based on your feedback, and we want more! Connect with us via social media (Twitter, Facebook), or on StackOverflow, or even directly via comments on our Git repos and contacting customer support – we’d love to incorporate your thoughts and suggestions into the next version.

Don’t have a Backand account? You can get one for free

Back to blog home page

Another Hybrid Framework Battle Begins – Ionic vs Kendo

Posted by on Apr 30, 2015

Overview

In the web development world, there are a number of different frameworks used to varying degrees by developers looking to save time in their application development efforts. These include frameworks like AngularJS, ReactJS, and even just plain JQuery. This division of frameworks has bled into the mobile realm, as JavaScript UI frameworks for mobile development have evolved into robust suites of functionality that make mobile app development quick and relatively painless. Below we’ll look at two different mobile UI frameworks: Kendo and Ionic. We’ll take a look at the ideas underpinning each one, and examine situations in which one or the other will serve best.

Continue reading

Back to blog home page

The Hybrid Framework Battle is On: Ionic vs Famo.us

Posted by on Apr 28, 2015

Overview

As hybrid mobile development has accelerated over the past few years, many developers have had to solve the same problems repeatedly. As any competent developer will do, these developers began looking for ways to reduce the number of times they had to reinvent the wheel, as well as ways to speed up their general development process by abstracting away common components. Out of this desire, hybrid frameworks were born. Below we will look at two common frameworks – Ionic and Famo.us – and examine what they provide developers, as well as where they fall short.

Continue reading

Back to blog home page

Perfect Recipe for Building Mobile Apps with Ionic and a Backend

Posted by on Apr 21, 2015

Today many AngularJS developers are using Ionic to build the user interface for their mobile apps.  AngularJS provides the app structure.  But these mobile apps still need a backend.  In this blog we’ll give you the recipe you need to build an Ionic mobile app with Backand’s Backend as a Service (BaaS). Review working demo.

Continue reading