Custom Code is the code that a developer writes and runs on the cloud. This Custom Code can be accessed by his App using a REST API. It helps them to execute their business logic on the cloud or to send updates that enhances the functionality of their App.
Even though, with 400+ APIs and 20+ services, App42 Cloud API provides a huge bouquet of backend functionalities but there might be a case where the App developer would like to have some server side custom code for his App.
We get a lot of questions from developers whether to use custom code or to host their code on cloud servers. We certainly feel custom code gives App developers some flexibility in terms of modifying their App at a later stage. Custom code service providers generally offer a safe, secure and scalable way to update your App.
Here are some guidelines which can help you while working with Custom Code:
- You can use the App logic that is likely to be changed
- Code functions consuming high processor time which cannot be stored in your mobile device can be used in custom code
- When you don’t have the resource or personnel to manage servers
- You can add server side validation and custom logic on the input data instead of on the client side
- You can make a custom service by aggregating two or more APIs
A few limitations which you should keep in mind are:
- Be careful in using custom code when your feature requires frequent interaction with your cloud servers. This will lead to numerous API calls which will increase your billing for the cloud service.
- Avoid choosing a service provider who does not provide the import and export features. This will lead to a lock-in situation in case you want to change your service provider.
- Custom Code deployed in cloud runs inside a sand-boxed environment for each service. There are restrictions on using certain JAVA APIs like System, FileIO, Reflection, ByteCode injection etc.
It would be great to hear the views from the readers of this blog. In case you have any more questions, please write to us at firstname.lastname@example.org