Parse is a suite of cloud based APIs, services and libraries that focus on letting developers build out rich applications and less time dealing with the overhead of setting up and managing databases, push notifications, social sign on, analytics, and even hosting and servers.
In this series I'll overview the options around developing an application that leverages Parse, including using Cloud Code to deploy your Node.js app to Parse's own hosting service.
Learn how to focus on creating a great user experience and forget complex infrastructure. Instantly add a powerful core, push notifications, and analytics to your app with Parse. We will take a deep dive at Parse's native SDKs for Android and see how to build an app that scales to millions of users.
Parse: A Mobile Backend as a Service (MBaaS)Ville Seppänen
Parse is a mobile backend as a service (MBaaS), a subcategory of PaaS. This is a presentation evaluating the service for a post-graduate seminar course.
Parse is a suite of cloud based APIs, services and libraries that focus on letting developers build out rich applications and less time dealing with the overhead of setting up and managing databases, push notifications, social sign on, analytics, and even hosting and servers.
In this series I'll overview the options around developing an application that leverages Parse, including using Cloud Code to deploy your Node.js app to Parse's own hosting service.
Learn how to focus on creating a great user experience and forget complex infrastructure. Instantly add a powerful core, push notifications, and analytics to your app with Parse. We will take a deep dive at Parse's native SDKs for Android and see how to build an app that scales to millions of users.
Parse: A Mobile Backend as a Service (MBaaS)Ville Seppänen
Parse is a mobile backend as a service (MBaaS), a subcategory of PaaS. This is a presentation evaluating the service for a post-graduate seminar course.
Async/await is a new language feature that will ship with Swift 5.5 this year. There’s no doubt it will have a significant impact on how we write asynchronous code.
In this talk, we’re going to look at some use cases for async/await, how we can call existing Swift APIs using this new feature, and why your decision to write your SDK in Objective-C might turn out to have been a very clever move.
We’ll also have a look at the refactoring support Apple is adding to Xcode and how it will help you migrate your existing code base.
Most AWS APIs will have limits on the amount of data you can send in one request and sometimes you really need to send a lot of data! To try to maximise the amount of data you can send, while still staying within the limits, some APIs support sending gzip-compressed payloads. But how can you send a gzipped request when using the Python SDK for AWS (boto3)? Well, I needed to answer this question recently and it turned out not to be as easy as I anticipated… Let’s jump into this rabbit hole together and let’s find out the answer!
This presentation covers:
The main components in the connectivity path.
Best practices in your code to avoid connectivity issues.
How to solve most common connectivity problems.
Promises are a popular pattern for asynchronous operations in JavaScript, existing in some form in every client-side framework in widespread use today. We'll give a conceptual and practical intro to promises in general, before moving on to talking about how they fit into Angular. If you've ever wondered what exactly $q was about, this is the place to learn!
Async/await is a new language feature that will ship with Swift 5.5 this year. There’s no doubt it will have a significant impact on how we write asynchronous code.
In this talk, we’re going to look at some use cases for async/await, how we can call existing Swift APIs using this new feature, and why your decision to write your SDK in Objective-C might turn out to have been a very clever move.
We’ll also have a look at the refactoring support Apple is adding to Xcode and how it will help you migrate your existing code base.
Most AWS APIs will have limits on the amount of data you can send in one request and sometimes you really need to send a lot of data! To try to maximise the amount of data you can send, while still staying within the limits, some APIs support sending gzip-compressed payloads. But how can you send a gzipped request when using the Python SDK for AWS (boto3)? Well, I needed to answer this question recently and it turned out not to be as easy as I anticipated… Let’s jump into this rabbit hole together and let’s find out the answer!
This presentation covers:
The main components in the connectivity path.
Best practices in your code to avoid connectivity issues.
How to solve most common connectivity problems.
Promises are a popular pattern for asynchronous operations in JavaScript, existing in some form in every client-side framework in widespread use today. We'll give a conceptual and practical intro to promises in general, before moving on to talking about how they fit into Angular. If you've ever wondered what exactly $q was about, this is the place to learn!
Fundamental Node.js (Workshop bersama Front-end Developer GITS Indonesia, War...GITS Indonesia
Salah satu front-end developer GITS Indonesia, Warsono, mengisi workshop di universitas, mengenai Vue.js.
Ikuti kami di kanal berikut, agar tidak ketinggalan acara seru:
Instagram: @gitsindonesia
LinkedIn: GITS Indonesia
Website: gits.id
AngularJS primer, covering the pros and cons of AngularJS, basic concepts with code snippets, testing, caveats and a lot of links forward. It's good for getting a glimpse on AngularJS and getting hint on how to write your first templates, controllers, services, directives etc.
SC5 has used this training internally and given it to several customers with very successful results. The training has been given in a workshop form, is accompanied by a few practical exercises (that are not public yet).
The original set is made by SC5er Kari Heikkinen, published here by Lauri Svan for Aalto University course T-111.4360 Design of WWW Services.
Is your web app drowning in a sea of JavaScript? Has your client-side codebase grown from "a snippet here and there" to "more JavaScript than HTML"? Do you find yourself writing one-off snippets instead of generalized components? You're not the only one. Learn about a handful of strategies you can use to keep your JavaScript codebase lean, modular, and flexible. We'll cover all the major pain points — MVC, templates, persisting state, namespacing, graceful error handling, client/server communication, and separation of concerns. And we'll cover how to do all this incrementally so that you don't have to redo everything from scratch.
Serverless computing is becoming increasingly popular in cloud native development. It provides advantages to an organization in terms of cost, scalability, and agility. Ballerina was created to make integrations simple. It also adds agility to the development process. What will happen when Ballerina meets serverless? A couple of serverless platforms have already started supporting Ballerina as a runtime.
This presentation will discuss the advantages of adopting a serverless strategy, the work done in running Ballerina in OpenWhisk and Kubeless, and other efforts going on to support Ballerina in the serverless world.
Using the SharePoint Framework as a surface to express yourself through client side solutions is great but at some point in time, you will require that this beauty you built interacts with APIs holding data that lives within the Office 365 environment. In this session, you will learn how to utilize and optimize your calls to SharePoint via its REST APIs, to the Microsoft Graph and to external services that you might find useful to deliver a rich experience in your solution. You will also learn about how to simplify those calls using the Community-Driven library PnP JS Core that aims to save your time (and sanity) by simplifying the access to the SharePoint REST APIs and to the Microsoft Graph. Goodbye URLs, hello intellisense!
Quick and Easy Development with Node.js and Couchbase ServerNic Raboy
Build an API driven Node.js application that uses Couchbase for its NoSQL database and AngularJS for its front-end. Presented by Nic Raboy, Developer Advocate at Couchbase.
Using the SharePoint Framework as a surface to express yourself through client side solutions is great but at some point in time, you will require that this beauty you built interacts with APIs holding data that lives within the Office 365 environment. In this session, you will learn how to utilize and optimize your calls to SharePoint via its REST APIs, to the Microsoft Graph and to external services that you might find useful to deliver a rich experience in your solution. You will also learn about how to simplify those calls using the Community-Driven library PnP JS Core that aims to save your time (and sanity) by simplifying the access to the SharePoint REST APIs and to the Microsoft Graph. Goodbye URLs, hello intellisense!
9. Cloud Functions
S Actual API end points on server
S Written in Javascript
S Allows asynchronous response
S Typical cloud function -
Parse.Cloud.define("hello", function(request, response) {
if(request.isError)
response.error("No Hello for you");
else response.success("Hello World");
});
10. Cloud Functions
S Call cloud code APIs using ParseCloud class -
Map<String, Object> params = new HashMap<>();
params.put("isError", true);
ParseCloud.callFunctionInBackground("hello", params, callback);
S Params can be of any data type supported by Parse.
S Response – either data or error, is handled in callback.
S Synchronous version - callFunction
11. Object Triggers
S Enables us to write hooks during object saving and
destroying.
S beforeSave and afterSave are triggered for object.save();
S beforeDelete and afterDelete are triggered for
object.destroy();
Parse.Cloud.afterSave(”ToDoItem", function (request) {
if (request.object.existed() == false) {
request.object.setACL(getDefaultAcl(request.user));
request.object.save();
}
12. Promises
S A value that may not be available yet, but will be resolved
at some point in future.
S Allows us to write asynchronous code in a more
synchronous fashion.
S The only interface requirement of a Promise is having a
function called then, which can be given callbacks to be
called when the promise is fulfilled or has failed.
S Better error handling
14. Promises
S A simple cloud code to save an object
object.save({
success: function(object) {
},
error: function(object, error) {
}
});
S In the new Promise paradigm, that same code would become
object.save().then(
function(object) { //Success
},
function(error) { //Failure
});
16. Promises
S Actually Yes. But the real power of promises is when
multiple of them are chained together.
S Calling promise.then(func) returns a new promise, which is not
fulfilled until func has completed.
S If a callback supplied to then returns a new promise, then
the promise returned by then will not be fulfilled until the
promise returned by the callback is fulfilled.
18. Promises
S Log in find an object update it
Parse.User.logIn("user", "pass", {
success: function(user) {
query.find({
success: function(results) {
results[0].save({ key: value }, {
success: function(result) {
console.log(“YAYY!”);
}
});
}
});
}
});
S All this even without any error handling code!
19. Promises
S Log in find an object update it
Parse.User.logIn("user", "pass").then(function(user) {
return query.find();
}).then(function(results) {
return results[0].save({ key: value });
}).then(function(result) {
// the object was saved.
});
S What about error handling?
20. Promises – Error Handling
S Error handling in every promise
Parse.User.logIn("user", "pass").then(function(user) {
return query.find();
}, function (error) {
console.error("Login Failed: "+error);
}).then(function(results) {
return results[0].save({ key: value });
}, function (error) {
console.error("Query Failed: "+error);
}).then(function(result) {
// the object was saved.
}, function (error) {
console.error("Save Failed: "+error);
});
S Things are getting messy again.
21. Promises – Error Handling
S Collective error handling
Parse.User.logIn("user", "pass").then(function(user) {
return query.find();
}).then(function(results) {
return results[0].save({ key: value });
}).then(function(result) {
// the object was saved.
}, function (error) {
console.error("Operation Failed: "+error);
});
22. Promises – Error Handling
S If a Promise in a chain fails, all of the success callbacks
after it will be skipped until an error callback is
encountered.
S The error callback can transform the error, or it can
handle it by returning a new Promise.
S Parse.Promise.error
S Parse.Promise.as
23. Complex Error Handling
query.find().then(function(students) {
students[0].set("valedictorian", true);
// Force this callback to fail.
return Parse.Promise.error("There was an error.");
}).then(function(valedictorian) {
// Now this will be skipped.
return query.find();
}).then(function(students) {
// This will also be skipped.
return students[1].save({"salutatorian", true});
}, function(error) {
// This error handler WILL be called. error will be "There was an error.".
// Let's handle the error by returning a new promise.
return Parse.Promise.as("Hello!");
}).then(function(hello) {
// Everything is done!
}, function(error) {
// This isn't called because the error was already handled.
});
24. Custom Promises
S All of parse methods returns a promise.
S What if you need to create your own method?
S Parse.Promise class
var promise = new Parse.Promise();
promise.resolve("The good result.");
promise.reject("An error message.");
25. Custom Promises
S setTimeout promisified .. promified -
var delay = function(millis) {
var promise = new Parse.Promise();
setTimeout(function() {
promise.resolve();
}, millis);
return promise;
};
S Usage
delay(100).then(function() {
// This ran after 100ms!
});
26. Background Jobs
S BG jobs are schedulable parse cloud functions.
S Mainly used in operations which run independent of API
calls
S For ex: Payment expiration, Redundant data cleanup, etc
S Created using Parse.Cloud.job
S Schedule is created using Dashboard at parse.com
27. Background Jobs
Parse.Cloud.job("clearHeldSlots", function (request, status) {
Parse.Cloud.useMasterKey();
var d = new Date();
d.setTime(d.getTime() - constants.TRANSACTION_EXPIRY_TIME);
var blockedSlotsQuery = new Parse.Query("BlockedSlot");
blockedSlotsQuery.equalTo("isHoldingForBooking", true);
blockedSlotsQuery.lessThanOrEqualTo("createdAt", d);
blockedSlotsQuery.find().then(function (blockedSlots) {
if (blockedSlots != undefined && blockedSlots != null) {
return Parse.Object.destroyAll(blockedSlots);
}
}).then(function () {
status.success();
}, function (error) {
status.error(“Job Failed!);
})
});
32. Cloud Modules
S Cloud Code supports breaking up JavaScript code into
modules.
S Each module is a separate JS file and all the APIs and
data it wants to expose should be added to exports
variable.
S Use require(“path_to_module.js”) to use that module.
S 3rd party modules available for integration with services.
S Ex: underscore, stripe, mailgun
34. Bolts for Android
S Keep long-running operations off of the UI thread.
S If several inter-dependent operations execute in
background, its hard to coordinate.
S Almost all internal Parse Android SDK APIs use bolts
S continueWithTask and onSuccessTask
S continueWith and onSuccess