How to create a simplified jsFiddle version

Asked

Viewed 351 times

4

jsFiddle uses json to save CSS/HTML, Javascript/Jquery? Probably this json is saved in a bank. The series 4fh0xdpc would be the ID in the bank.

http://jsfiddle.net/4fh0xdpc/

Each update generates a number after this id.

http://jsfiddle.net/4fh0xdpc/1/

Or does it simply send the . json file to the server and save (a folder is created)? for example:

  • briefcase 4fh0xdpc for the first project created.

if there is an update:

  • briefcase 4fh0xdpc subdirectory 1 (always varying)

I am developing a system that the user can build a form dynamically (include questions, validation of each question, generate the form database automatically etc). Part of the system is developed (I’m already generating .json with all the questions, number, etc). However, I would like to do something else: save the project to be later moved by the same user or another. Are there any tips to implement this part? Wanted to follow the molds of jsfiddle, in case there are any good tips, I’m open to tips.

  • 6

    You’d better ask them.

  • Reverse engineering on top of a tool that we don’t have access to the source code, is something I would say outside the scope (?)

  • I was thinking about doing something like that, but it’s not for developers. is to build a form dynamically (mount the .json on the front and send to the server to assemble the form and return it to download). wanted to do similar to jsfiddle - update, something collaborative).

  • @Marcelobonifazio If you have a tip where to start, rsrs. I’m working recently with javascript (4 months). I didn’t want to copy, but get the same idea from them (if it was implemented the way I said).

  • It turns out that this is very relative, there are n ways to achieve the same goal, there has to be a whole case study, I personally read your doubt in the comment and understood bulhufas.... try to explain your goal better in the question itself, who knows not to be more understandable

  • modified the post. Maybe you can understand what I’m looking for.

  • jsFiddle was developed by Oskar and Piotr, at the time active members of the Mootools community and has a API to create already filled jsFiddles. What features do you want? Just create new urls for new forms? and keep the idea in the url base/versão as in your example 4fh0xdpc/1/? Also want to fill in with json? what language do you have on the server?

  • Interesting question, but out of focus. While Jsfiddle can be a source of inspiration, try to think of a structure that fits your solution, then ask specific questions about this architecture. For example, first you need to define what information will be edited by the user on the screen, then how it will be transmitted to the server, then how it will be identified (single hash?), persisted (tables), and versioned (new versions 2, 3, 4...)Then you have to worry about permission and security and so on. Not necessarily things are in that order.

  • ["would like to do something else: save the project to be later moved by the same user or another"] only Jsfiddle already does this rsrsr

  • What do you care about is the server side? For example, how to save, how to compose Urls, etc.? Or jsfiddle functionality itself?

  • @Sergio would like to create the urls, and display the content (I have a .json file that I mount on the server and dynamically Gero the inputs populated in html). - bfavaretto yes something like this, the person enters the url if something has been saved.

Show 6 more comments

1 answer

3

Testing or debugging a small script can be an unnecessarily laborious task. After all, it is necessary to create a new html page, write its markup, insert scripts, add libraries, save and then test it in some browser to track the result. All to often come to the conclusion that the big problem of the code was an missing semicolon or a poorly identified selector.

jsFiddle emerged from this need to test scripts quickly. Originally developed for Mootools, the tool has been gradually expanding, and today supports major Javascript libraries on the market, such as Mootools, jQuery, YUI, Prototype, Dojo, Glow, Processing, Extjs, Raphael and Right JS. Its interface is simple and intuitive, simply selecting the desired library and filling the XHTML, CSS and Javascript fields with the desired data to test a script. By clicking on the "Run" button, you can see the script in action, without the need to create new files or use multiple programs to view it.

Here’s what you need to start your project. It’s a simplified clone of jsFiddle created by nwoike.

DOWNLOAD

HOW ABOUT?

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.