-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathparams.json
More file actions
1 lines (1 loc) · 2.96 KB
/
params.json
File metadata and controls
1 lines (1 loc) · 2.96 KB
1
{"name":"Spinnaker","tagline":"Global Continuous Delivery","body":"**Imagine how much easier it would be to build your web application if all the data in the cloud was available in-memory?** ***Falcor let's you code that way.***\r\n\r\n### One Model Everywhere\r\n\r\nFalcor lets you represent all of your cloud data sources as *one Virtual JSON Model on the server.* On the client Falcor makes it appear as if the entire JSON model is available locally. Falcor retrieves any model data you request from the cloud on-demand, transparently handling all the network communication and keeping the server and client in sync.\r\n\r\n**Falcor is _not_ a replacement for your MVC framework, your database, or your application server.** Instead you add Falcor to your existing stack to optimize client/server communication. Falcor is ideal for mobile apps, because it combines the caching benefits of REST with the low latency of RPC.\r\n\r\n### The Data is the API\r\n\r\nYou retrieve data from a Falcor model using the familiar JavaScript path syntax. The only difference is that the API is asynchronous.\r\n\r\n```JavaScript\r\nvar person = new falcor.Model({\r\n source: new falcor.HttpSource(\"/person.json\")\r\n});\r\n\r\nperson.getValue(\"location.address\").\r\n then(address => print(address));\r\n\r\n// outputs \"344 Seaside\"\r\n```\r\n\r\nYou can also retrieve multiple paths from a Falcor model, and the model will batch them into a **single network request.**\r\n\r\n```\r\nvar person = new falcor.Model({\r\n source: new falcor.HttpSource(\"/person.json\")\r\n});\r\n\r\nperson.get(\"genreLists[0..1][0..1].boxshot\").\r\n then(json => JSON.stringify(json));\r\n\r\n// outputs...\r\n// {\r\n// genreLists: {\r\n// “0”: {\r\n// “0”: { boxshot: “/237843.png” },\r\n// “1”: { boxshot: “/328432.png” }\r\n// },\r\n// “1”: {\r\n// “0”: { boxshot: “/7832443.png” },\r\n// “1”: { boxshot: “/432432.png” }\r\n// }\r\n// } \r\n// }\r\n```\r\n\r\n### Bind to the Cloud\r\n\r\nFalcor's asynchronous model allows you to bind your views directly to the cloud using the *Asynchronous Model-View-Controller Pattern (AMVC).* This pattern can be used in any MVC framework (ex. React, Angular, Ember), but works best with those that allow you to template bind directly to asynchronous values:\r\n\r\n```\r\n// Controller\r\n\r\nmodel.\r\n bind(\"genreLists[0][5]\").\r\n then(titleModel => new TitleView(titleModel));\r\n\r\n// View (Angular 2.0 Template)\r\n\r\n<div>\r\n <h1>{{ model.getValue(\"name\")|async }}</h1>\r\n <p>{{ model.getValue(\"description\")|async }}</p>\r\n</div>\r\n\r\n// outputs\r\n// <div>\r\n// <h1>House of Cards</h1>\r\n// <p>A Congressman works with his equally conniving wife to exact revenge on the people who betrayed him.</p>\r\n// </div>\r\n```\r\n\r\n### Try It\r\n\r\n```\r\nnpm install falcor\r\n```","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}