CloudKit - no server-side logic?

前端 未结 5 910
梦谈多话
梦谈多话 2020-12-25 13:09

With CloudKit, you can focus on your client-side app development and let iCloud eliminate the need to write server-side application logic. Cl

5条回答
  •  没有蜡笔的小新
    2020-12-25 13:52

    Believe it or not, you can actually get REALLY far with this approach.

    I've not used CloudKit, but I can describe for you my application stack:

    AngularJS (or your favorite client side HTML rendering framework): A single page will host a series of templates/controllers selected by the router and driven by users changing the anchor to select which page they're on.

    Firebase.io (or your favorite cloud storage): Any dynamic data goes into the cloud document store. The controller needs to load the data and render the template on the client, and when the data changes, send the data back. This also provides the authentication and authorization as well, since you can limit access to the data.

    Now you need a place to serve the HTML/CSS/JS/images... which requires no 'server side code execution', just a web server where you can put the assets.

    Using this technique you could store all the user's topics in the database for that user, and when the page loads, go and aggregate all the sources for those topics (also stored in the database) completely client side. There's nothing in your example application which actually requires server side execution that I can see, so long as you have cloud storage which will provide you with authentication and authorization services, and a 'dumb' web server for serving up static assets.

提交回复
热议问题