How to Build an Angular App with Server Side LogicPosted by Itay Herskovits on May 26, 2015
Actions are a powerful tool that allow you to perform customized tasks when a number of different types of events occur within your application. They provide a great alternative to server-side custom code, and can add a lot of flexibility to how your application interacts with outside services. Below we’re going to look at the types of actions that Backand offers application developers, and how they can easily be used.
Server-Side Activity in a Front-End App
Actions are activated via triggers in your application. Generally speaking, there are two types of action triggers in Backand – database-related triggers, and “On Demand” triggers. Database triggers fire under certain conditions when your application interacts with your database. You can add custom triggers to each of the standard database actions that update the database – record creation (Create), record updating (Update), and record deletion (Delete). Furthermore, you can assign your actions to occur either before the action takes place (such as “Before Update”), while the action is taking place as part of the same transaction (such as “During Create”), or after the action has completed (such as “After Deletion”). Through clever use of these actions, you can create a very complex database experience with a deceptively simple front-end.
On Demand triggers, on the other hand, happen whenever you like. These are associated with a specific table, and are performed in the context of a row via a simple call to an associated URL. These actions operate within the context of the provided row, allowing you to perform any custom actions you need to on that specific object. This allows you to build out a true API, providing the hooks for many custom server actions that would often need a framework surrounding them.
Types of Actions
Actions are pretty easy to use with Backand. Watch this video tutorial and see for yourself.
One of the common concerns with outsourcing the back end of an application is “What happens when I need something more from the server?” With Backand’s actions, you have the opportunity to perform a number of different types of actions at several highly-configurable trigger points, and all in the context of your application’s server! This can allow you to implement sensitive web calls to third parties, maintain complex analytics back-ends, and protect your sensitive data from attackers – all with a few clicks in Backand’s application dashboard. While actions are not ideal for all situations, they should suffice for the vast majority of server-side activity that web apps most commonly need.
Sign up for free and start creating your app today.