As a mobile developers, we want to develop app that states among the others. We create beautiful UI and challenging animations. We include create new features even before the customers think of them. We predict the future. That is our job.
But under any mobile apps there is a hard work for the whole team. What on the surface looks like the job of few, usually required a lot of teamwork and hours of consultations.
Backend – long story short
The designers, backend, frontend and mobile developers works day and night (literally) to deliver products that exceed expectations, amazed people and makes life easier. But all that work can’t be done with complex data structures. What lies under the hood of the transportation app? How can we see the search results for nearest coffee shop almost instantly? Databases are mobile developers bless and worst nightmares in the same time.
Whenever you are developing an app from scratch or add new functionalities to existing one, the choice of right data structure and the place when you can store that date is a crucial decision.
Millions of users, thousands of queries. Maybe your current solution can works well with of that stuff. But what about offline access? What if we want to use more complex queries? How do we handle frequent updates? There isn’t a one solution to rule them all. That would be too easy right?
In this article I want to cover the Parse server usefulness when developing a modern app.
What is Parse exactly?
Parse serve is an open source version of Parse backend and is meant to be mounted on a app using Node.js web framework called Express. It uses MongoDB directly as a place to store data.
MongoDB is cross platform solution. It is noSQL, document oriented, schema less database that is praised for it scallity and flexibility with powerful queries tools and performance as main objective.
So how do we use it?
Thankfully you don’t need to host Parse server by yourself. There are few hosting platforms from which you can choose (e.g you can visit one of the main Parse Server providers at https://www.back4app.com/ for more information and support). They supply you with all necessary tools and even incorporate new features to further speed the app development process.
They work however on freemium business model, which means that at some point you will be faced with additional costs. It is good to take that into account during cost calculation phase to avoid unnecessary surprises.
Enough theory. Let’s practice!
Setup Parse on mobile side is easy and enjoyable process. No matter what mobile platform do you use (Parse works on both Android and iOS, it even support Flutter!) all you need to do is initialize Parse platform at start and you ready to go.
Its requires at least 3 thing: server url, client key and application id. As easy as that. Now you can work with all kind of data including custom objects and even Geopoints. All models in Parse database extends base Parse model -> Parse Object. It allows user to implement all necessary actions such as saving, adding deleting an object and many many more.
When there is a need for certain data to extract, Parse gives user a handful set of tool to pull out any data. It support nested objects in queries, complicated relational queries, distance queries and more. Parse database supports offline storage in easy and straightforward way.
The all actions mentioned above are well documented on Parse server website with dedicated sections for each platform. It is easily readable and if you have any questions, there is a broad community that can help you in resolving any possible issues.
Real time support
But what if the pull model of Parse query is not enough? What if the app relies on information whenever specific part of an object has been modified or added?
When app need a real time support Parse introduced a key solution in the form of live query. It allows user to subscribe to certain Parse query. Parse will then notify user when the object that matches the query were created or updated, so that the app can proceed. It requires both the Live Query Server and Live Query Client implementation.
Many times there are performance heavy tasks that the mobile app should not handle on their own. Cloud Code is a tool for a complex apps to transfer heavy logic and complicated calculations to Parse Server instead. This allows developer to instantly add new features and change app behavior on fly as the Cloud Code is broadly available almost instantly with every update.
With all feature mentioned I think that decision of database for mobile app development is far more complicated than it seems on the first sign and should be analyse thoroughly in order to achieve all goals and provide smooth user experience. It should include all feature ideas and that is why it is one of the most crucial decision on early app development stage.
Do you need an application? Just contact us.