solace-samples-javascript icon indicating copy to clipboard operation
solace-samples-javascript copied to clipboard

Issue 49: adding old SolCache JS sample

Open aaron-613 opened this issue 3 years ago • 3 comments

@TamimiGitHub could probably use your help here..? @solace-dmckay dug up the old SolCache JS sample that used to be included with the old (pre-Guaranteed-messaging?) API. I've pushed it into a new branch, and also included a rough working sample I hacked together from the TopicSubscriber sample.

Looking briefly at the code, the old SolCache sample uses jquery, and I don't think our new ones do. Perhaps this is something we can get the API team to help with, but thought I'd give you a crack first..?

aaron-613 avatar Feb 17 '22 07:02 aaron-613

⚠ NOTE: this branch is not ready to be MERGED, at all. Needs some work. Just checking in for collaboration.

aaron-613 avatar Feb 17 '22 07:02 aaron-613

A couple of notes:

  • Not sure why you included sol-cache.js and sol-cache-ui.js? couldnt you just use the createCacheSession from the solace client API
var cs = client.session.createCacheSession({
          cacheName: 'dc1',
          maxAgeSec: 25000,
          maxMessages: 1,
          timeoutMsec: 10000 
        });
  • What old SolCache sample are you referring to? We dont need jquery for a simple html landing page. The other samples here dont use it

Happy to look at this further

TamimiGitHub avatar Feb 17 '22 19:02 TamimiGitHub

Hey. Doing cleanup and stuff.

  • the old SolCache sample that Dave was asking for used to be bundled with the API years ago. It's the index.html, sol-cache*.js. It's super old, uses jQuery, looks super out-of-date.
  • the working-rough-sample.html I made. But it's not pretty

All the newer JS samples use basic HTML & JS, and pure.css for styling. Wondering if we go about that route, trying to hack/salvage the GUI elements and put them into the same format as other other newer samples?

aaron-613 avatar Apr 18 '22 23:04 aaron-613