How does code structure differ from client/sever development?

I am a traditional web front end developer (Vanilla Javascript, HTML, CSS), and back end (Node.js, PHP)

what para-dime shift is needed (if any) to develop sites/dapps here?

6 Likes

Everything in a site is done client side. Users have a universal login directly to the network. From there, any app/site that the user uses will read and write to the user’s private account data that is stored on the network, or read and write public data that any user of the network can see. Different apps/sites can use the same data - data doesn’t get locked away into separate solos for each site as we have on the internet today. Sites need to request permissions. There will also be some consideration needed for how much safecoin it will cost to store data on the network (we don’t have details on how that UX is expected to work yet).

5 Likes

The SAFE Dev Hub website is a good place to start. The tutorials on there show how to make a basic Node.js Native or Web app, amongst other things. Bear in mind though that the APIs are likely to change over the next few months as different data types are introduced. However the principles should remain the same. I think the APIs are considered relatively low level, so you might have to do things a bit more explicitly than you’re used to.

https://hub.safedev.org/

5 Likes

Welcome @benzmuircroft :slight_smile:

Also take a look at SafenetworkJS which is a layer I built on top of the SAFE APIs. It is still in development but used in some of my projects (SAFE Drive for example). If you do look at this I welcome any feedback.

As noted, the low level SAFE APIs are going to change a bit, but in addition Maidsafe are building their own higher level APIs (see the SAFE CLI in last week’s Dev update). That might change the usefulness of SafenetworkJS.

2 Likes

For a simple frontend webpage(js, css, html) there is no difference in development. You can actually just upload your existing website files to the SAFE Network by using the Web Hosting Manager and it will work.

For backend code there is no support yet. It will be in the future by using ‘secure enclaves’
https://safenetwork.tech/roadmap/#secure-enclaves

1 Like

@benzmuircroft There are demos/tutorials using:

3 Likes

Actuallt there is. Any p2p communication can be used to create client-server pattern. What prevents him to run regular server and instead of http/websocket layer use SAFE client libraries as network layer? I expect there will be soon some wrapper which will try to simulate some kind of old client - server architecture using safe net messaging system. People often reject to learn best way how to use software and if they can, they use it the most common way they were used to use it before. I think we all will be surprised how many crazy implementations of old internet patterns will pop up on safenet in the future.

2 Likes

I see what you mean, and yes we will probably see a lot of these hybdrid solutions. But I think he was more interested in what SAFE itself has to offer.