Coder Social home page Coder Social logo

Self-hosted saving? about squeakjs HOT 9 CLOSED

pavel-krivanek avatar pavel-krivanek commented on June 12, 2024
Self-hosted saving?

from squeakjs.

Comments (9)

codefrau avatar codefrau commented on June 12, 2024

Huh, that would be quite a hack (in the good sense of the word). Not really useful, but cool if it works.

Then again, if it worked, someone might find an actual use case. Are you using Amber this way?

from squeakjs.

pavel-krivanek avatar pavel-krivanek commented on June 12, 2024

Not really using, I just tried it as (successful) proof of concept. Besides a better debugger, it was one thing that missed for Lively. It could significantly lower the barrier for newcomers because then they do not need to set up the server etc. And once the working version lasts working forever as a snapshot.

For Amber, I needed very slightly (and in defined way that can be reverted) modify the modules definition to be able to concatenate everything into one file. The idea is that you may even modify these scripts from inside the page and save everything as a new version, but if you are serving it from a proper server, you may push the new versions there or reload the newer versions from the server (mostly for updates of external packages, that may be regular versions that everyone is using, just slightly modified during export/import)

from squeakjs.

pavel-krivanek avatar pavel-krivanek commented on June 12, 2024

The hacks to to libraries were moslty like:

content copyReplaceAll: 'define(function' with: ('define("', prefix, moduleName, '",function').

or

content copyReplaceAll: 'define(factory' with: ('define("', prefix, moduleName, '",factory').

or

content copyReplaceAll: 'define([' with: ('define("', prefix, moduleName, '",[').

from squeakjs.

codefrau avatar codefrau commented on June 12, 2024

Not really sure what you mean by "do not need to set up the server". SqueakJS uses IndexedDB as persistent storage, you do not need a server to run in.

from squeakjs.

pavel-krivanek avatar pavel-krivanek commented on June 12, 2024

I know, it is a great feature. However, you need a server for the first time to answer XMLHttpRequests (not big issue, anyway)

from squeakjs.

codefrau avatar codefrau commented on June 12, 2024

You do not need a server. You can just drop an image into the /run/ page.

from squeakjs.

codefrau avatar codefrau commented on June 12, 2024

Ah, I see, we broke that, because the bundled squeak.js is not in the same dir anymore.

But it can be made to work easily by moving the JS file to the same directory as the html. And it would be even easier, as you say, if we inlined the JS in the HTML using a bundler.

from squeakjs.

pavel-krivanek avatar pavel-krivanek commented on June 12, 2024

Ok, great, I think I we can close this issue, it served its purpose :-)

Btw. when working on Lively, have you considered TiddlyWiki-like self-hosting architecture?

from squeakjs.

codefrau avatar codefrau commented on June 12, 2024

That would be a question for Dan - I don't know.

Closing this for now.

from squeakjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.