Safe-js tutorial website (WIP)

May I also suggest you annotate your code. For example I may know something of javascript but I still don’t know what “const” does. I’ve only seen it in relation to node.js not pure javascript. You might want to take a look at what other tutorial sites like www.w3schools.com have done with their tutorials.

1 Like

thanks for the feedback, i think it’s a good idea

was going for the least text possible I guess, just to give people exactly what they need to make the function work

I will look for a way to make notes in there that will not confuse people

thanks good idea! will use that. the whole site is open source if you want to take it and make any changes also but no pressure :smiley:

2 Likes

So like don’t assume your reader can translate code into English in their head. Especially if they are new at coding. So your code might be annotated like this (my best guess).

/* Declare a function called authorize. /
function authorize() {
/
Inside the function create a json table containing the SAFE API and your app information /
const app =
{
name: “SUCCESS!!!”,
id: “id”,
version: “0.0.0.0.0.0.0.0.1”,
vendor: “SUCCESSFULMAN!!!”,
permissions: [“SAFE_DRIVE_ACCESS”]
};
/
I’m not quite sure what this does */
window.safeAuth.authorise( app );
};

/* Create a form button to launch the authorization javascript you just wrote. */
< button onClick=“authorize()”>Click to Authenticate!!< /button>

2 Likes

a few more updates.

busy day today, but had to make some more progress with the site at least

3 Likes

“etc with permanent, annonymous and secure apps that ensure” *anonymous

Hard to see what the updates are…

A lot of it is placeholder text for now

Looks like I need to update my readme and other projects in general. This evening I was reading about the significant performance difference between ES6 (4x slower) and bluebird promises.

It’s got me wondering what the performance difference is between regular callbacks and promises as well.

Perhaps safe-js and safe_app_nodejs might also switch to bluebird library. Cc: @joshuef @Krishna_Kumar

5 Likes

Revisiting and finishing this website, as per MaidSafe Asia’s request.

Pushed some updates just now.

It really is a great website idea if I don’t say so myself :smiley: an all-in-one site that will continue to be updated, that teaches brand new coders how to create web apps, desktop apps and mobile apps for the SAFE Network!

We are examining ways to let people go through the website and possibly earn 5 MAID for doing so through a CCP CoinPayments wallet.

Just trying to think of ideas to stop people from going through over and over again and continuing to get the 5 MAID? IP Address tracking? IDK that’s where I get stuck. Sounds like an exciting idea though!

2 Likes