Creating for the Safe Network as a web developer

Imagining a newspaper homepage that varies throughout the day. Pre-generated pages will load faster than an SPA that does ajax calls to grab all the content (on a traditional server set up). Even if you’ve been on the SPA before and cached the app itself, it still has to do a call to request the up to date articles etc, which will slow things down.

That said, I wonder how Safe will speed things up in terms of network access, especially for larger sites. That and the fact that if GET requests = safecoin (I wonder if that will be a meaningful amount…) a SPA could be a more beneficial set up (requiring more GETs), that perhaps the Safe network’s inherent optimizations could make up for the lack of pre-rendered HTML that’s the main benefit of server side processing.

HMMMMmmmm.

Either way, I’m excited to play around once testnet 3 comes online for sure!

Yeah I guess. In your example, it’d probably be one call to get a list of articles IDs, then the calls for the specific articles themselves (concurrently).

But let’s not forget that pretty much all native iphone/android apps work this way already, and I don’t see any complaints about speed. Many new websites are made such that the frontend is separate to the backend (which has API endpoints), and this is done specifically so that the same API can be used on mobile. Most APIs don’t have an endpoint that says “give me all frontpage article IDs, the actual articles, comments on each article, and amount of likes on each article, all in one go”. So I don’t see it being an issue, personally.

But, the proof is in the pudding. We’ll see when the network comes out.

You’re downloading your entry point(your site) from the network too via the browser not just the results for data requests generated by this site. Granted if it’s a portable app, you can retrieve that binary too from the network, but here I meant by static sites as sites whose initial load is also retrieved from the network and after that point it doesnt rely on any server side processing. That url(key) can correspond to anything you want in that public share, as long as the browser/app making that request can get the results → render the data → and make future requests, it’s functional.

Yep as long as the app(desktop or web) don’t rely on a server for server side processing, that’s what I meant.

Yes that’s correct. With this plugin example you can consider the url in the browser as the key and the returned file contents as the data which the browser then renders. Now that can then make further API requests for more data from the network depending on any client side requirements.

Hope that helps and I haven’t confused you further

1 Like