Posts

Showing posts with the label parse (BaaS)

Parse | IOS Library for Cloud Code

If you are IOS developers who is using parse, then you must know that there is a class in parse IOS library called "PFQueryTableViewController" which has got nice feature to query a parse object and display the results on IOS App's table view. But like me if dont want to access Parse object directly instead using a Cloud Code (CC) to access all your parse object then you will not be able to use the above class as it works only when accessing the parse objects directly. bummer..... I searched for a while and couldn't find any library which can work on Cloud Code, so ended up making my own Parse extension which will work for CLOUD CODE. yay..... eCT_PFCloudTableViewController   - has got the following features Pagination with "Load more" options. With or without "Search Bar" Pull to refresh. Integrated MBProgressHUD for Nice Activity Indicators. Completely customisable. Pre-requisites: Since you will be using a Cloud Code to access th...

Parse | Identify Changed Columns

Sometime it is important to identify if the value of the column is changed and perform a action based on it. In the parse we have an method called request.object.dirty(<column_name>) . But the only issue is that this works only on the beforeSave. But most of us want to perform an action only when we are sure that data is saved. In other word we would like to do it on "afterSave". for eg. If you want to send a email or push notification based on a status flag getting updated. We would like to do that on the "afterSave". But on "afterSave" Here is the code how to do it. Parse.Cloud.beforeSave(" ", function(request, response) { //--find the columns which got changed var arrChangedAttributes = new Array(); var vAttributes = request.object.attributes; var query = new Parse.Query(" >> id >>>" + request.object.id ); //--means it is an INSERT. This is to identify it is an INSERT or UPDATE if(!req...

Parse | Adhoc JavaScript Request to execute Cloud Code

I'm doing an IOS app which uses Parse's(www.parse.com) Cloud code. Being a IOS developer I found it a bit tedious to test the output of my Cloud Code(CC) using objective C (especially when I'm changing and developing the cloud code) I thought it would be easy if I can check the output of my CC using a JavaScript directly from the browser, because you can see the output of you CC immediately and also get a better understanding of what values are being returned. so I made a quick template which uses Parse JS API to   Login to Parse( In my app you can call a CC only if you login as a App user) Call could code and display its result. Download the template from this link - Venkat-GitHub-Page-Parse Remember to edit the index.html file and put your <app_ID> and <java-script-key> at Parse.initialize Edit the login details Edit the Cloud code function details and parameters( if any)