OnePageCRM Developer Portal : Rails to AWS lambda: Communication and authentication

Latest developer blog from @OnePageCRM #tech #reactjs #developement #javascript

  • There is a third option, of using the AWS SDK (in our case the ruby gem) from within a rails server to invoke lambda functions directly.
  • For this, AWS API Gateway needs to be configured to accept HTTP requests and pass them onto the corresponding Lambda functions.
  • The alternative of AWS SQS (simple queue service) needs to be paired with AWS SNS (simple notification service) so that the lambda function can be informed that there is a new message for it to process.
  • Compared to interfacing with the AWS SDK lambda gem to execute functions, these solutions have the advantage of being fire-and-forget requests made by the rails server.
  • As in this scenario, we are generating auth data in a Rails server to be passed to Lambda functions, cookies fall away as a possibility (though they would work if both rails and lambda were accessible on sub-domains on the same parent-domain).

Continue reading “OnePageCRM Developer Portal : Rails to AWS lambda: Communication and authentication”

Mike Heavers

Tutorial: How to use AJAX data in a #reactjs app using #axios:

  • The tutorial shows how to utilize JSON data obtained via AJAX on initial load, and how to pass that data to components.
  • Also note that, while we could just pass all the data down to each component, it’s best to pass only the data your component will need, so there’s less payload each time the app’s state needs to be refreshed.
  • axios.get(‘/[data_url]’) .then(function (response) { //pass the data on to the app }) .
  • You’d want subcomponents to pass the data down to.
  • You need to store all that data in the app’s state.

This tutorial shows how to utilize JSON data obtained via AJAX on initial load, and how to pass that data to components.
Continue reading “Mike Heavers”

How to write amazing React Native applications with Apollo-react.

  • Now I would like to tell you a bit more about the data prop that is attached to our component after calling a query.
  • The way we can attach data to any container or component we like.
  • You already know the .mutate() function attached to our component – we can use it the way we’ve seen above, but we might have a problem with attaching multiple mutations to one component.
  • In the next steps I’ll show you how to attach data from server to our components.
  • Apollo React – Queries and Mutations

When about to start writing a new React Native application, one of the first things I ask myself is “How to handle the logic within the application, and what tools should I use to communicate with…
Continue reading “How to write amazing React Native applications with Apollo-react.”

GraphQL with the Serverless Framework

  • These two libraries form the core of the Web client for this project.
  • The Lambda function retrieves data from DynamoDB and returns it to the client via API Gateway.
  • There are already great libraries for retrieving data from GraphQL endpoints.
  • Letting the client choose what data to fetch is more efficient and flexible.
  • GraphQL allows the client to select ad-hoc data.

Building a dashboard for my garden
Continue reading “GraphQL with the Serverless Framework”