nayaread
HomeFavouritesTopicsSources
HomeFavouritesTopicsSources
NayaRead links to original engineering blogs. All copyright belongs to the respective authors.
Shopify Engineering·Nov 22, 2011·6 min read47

Application Proxies: The New Hotness - Shopify

I’m pleased to announce a brand new feature that we recently added to the Shopify API: Application Proxies. These will allow you do develop all kinds of crazy things that weren’t possible before, and we’re really excited about it. Let me explain. What’s an App Proxy? An App Proxy is simply a page within a Shopify shop that loads its content from another location of your choosing. Applications can tell certain shop pages that they should fetch and display data from another location outside of Shopify. The really cool thing about the implementation we’ve put together is that if you return data with the application/liquid content-type we’ll run it through Shopify’s template rendering engine before pushing it out to the user. This allows you to create dynamic native pages without having to do anything crazy with iframes. I’ll explain this in more detail later. How Do I Set This Up? We have a great App Proxy tutorial over on our API docs that takes you through the steps, but I’ll summarize them here too. The first thing you need to do is set up the path that should be proxied and where it should be proxied to. This is done from your app’s configuration screen on the Partners dashboard. Once you’ve done that, you’ll need to work out what data you’re going to return when the specified URL is hit. You can return anything you want but for now we’re going to show some very simple stats to get the ball rolling. All my examples assume that you’re using the shopify_app gem as a starting point, but the topics I cover translate directly to all languages. Before we do anything else we need a controller to handle the calls. I generated a ProxyController class and mapped /proxy to hit its index method. I also created a template to render the response. Here’s the controller: class ProxyController < ApplicationController def index end end And here’s the template: <h1>Hello App Proxy World</h1> Really easy so

Read original on shopify.engineering

Score breakdown

  • Technical depth73
  • Practical value30
  • Originality85
  • Writing quality100
  • Source reputation0
  • Recency0
  • External engagement0
  • On-site engagement0

NayaRead shows a summary and links to the original article. The full article is hosted on shopify.engineering.

More like this

Shopify Engineering

Developing Shopify Apps, Part 2: Exploring the API - Shopify

Jul 29, 2011·11 min read
Shopify Engineering

Making Apps using Python, Django and App Engine - Shopify

Sep 7, 2011·4 min read
Shopify Engineering

Developing Shopify Apps, Part 3: More API Exploration - Shopify

Aug 3, 2011·14 min read
Shopify Engineering

How Shopify Dynamically Routes Storefront Traffic - Shopify

Apr 9, 2021·11 min read