FR: Visual Cloud Code Builder

Not sure which repo this is relevant to, so opening here.

For a lot of novice users, the complexities of Cloud Code can be hard to comprehend, often leading to confusion or inefficient cloud code.

It would be good to have a sample cloud code builder, where users can “drop in” what they would like the code to do.

For example:

  1. Select Type: Cloud Function, Cloud Trigger (explain the differences)
  2. Select Class / Function Name
  3. Select options for the cloud trigger (i.e Cloud Validator)
  4. Drag and drop some simple Parse features, such as ‘Query first Object’, ‘set x to x’ save object with the master key

Output should be something like:

Parse.Cloud.define('myFunction', async ({params: {name}}) => {
  const userQuery = new Parse.Query(Parse.User);
  userQuery.equalTo('name', name);
  const users = await userQuery.find({useMasterKey:true});
  // add your code here
}, {
  requireUser: true,
  fields: ['name']
});

2 Likes

@dblythy would be great if this gets implemented.

I also posted something like this a while ago:

@dblythy
In the meanwhile, do you know of any library/tool/workaround which can help to quickly write the cloud code by selecting components visually.

I realise some initial work will be required to map the visual components with the corresponding code templates, but i expect it would still be a significant improvement to the current experience.

Thanks @shrey, your original post is the reason why I posted this :blush: .

I don’t know, sorry. I have never used any tools / don’t know of any tools to “visually”. Do you have any suggestions?

Here is one: Blockly  |  Google Developers

I have only seen visual code builders more or less successfully work in environments with a limited and clearly defined scope, such as MATLAB, electronics simulators, funnel-like data lake extractors, hardware high-level block building such as Arduino configs or simple educational / demo environments.

I think that trying to implement visual code builders for anything beyond that naturally fails but the idea is kept alive due to fundamental misconceptions about textual programming, IDEs and development workflows.

Nevertheless, this is an interesting topic, and I am excited to see where this is going.

Personally I don’t think introducing a tool with that level of complexity would provide much value. Especially on a self managed parse server, I think it’s best to expect the developer to become familiar with JS. I would see the tool as a way to support best practise / teach things such as Cloud Function validation, good JS, etc.

I’ve seen Quasar’s Flexbox Playground which would be along the lines for how I’d see this come to life - a simple way to lay the framework for your cloud code. Not a replacement for logic, just a way to visually understand what all the different options are, with maybe at most some helpful snippets for reoccurring Parse Cloud uses.