Using JSON data source for offline pages

Amazing resource that mockup json generator! Cool thank you!

1 Like

Thanks, I’m working it.

This leads me to the question of why are you so sure that using a JSON file is what you need to do? What are you trying to accomplish? Why not just use a MySQL database and make things more easy on yourself?

Hi Brad,
The business model looks like this. We are going to build an album/catalog type of application in which a collection of events can be depicted with a collection of pages containing a photo, title and description (There could be hundreds of events). But, all events will be placed on pages built on the same or similar template/templates. But we need each app to be portable and reproduceable on demand. So we want to put it on a portable thumb-drive. Then we will reproduce the thumb drives in as many copies as the customer desires. We already have such a catalog on Magento and hosted in a datacenter but it is too cumbersome and slow to have any commercial value. And, even though the JSON file has to be generated for each customer, it can be replicated and edited pretty easily (according to what I read). Anyway, I’m trying to prove to myself that this tool can be used to handle the large amount of simple data that I anticipate.

Hmmm, so what you are basically doing is creating an offline catalogue. I haven’t heard of this being done for years now but I suppose it’s still possible. I believe you are going to also need some sort of server such as MAMP on the drive as well to get data from the JSON file.

I’ll be honest and say I am not sure if it will work or not. If it will, I hope you will stick with it and share your experience. I’m very curious. :wink:

Hey Brad, it’s the same as discussed in this topic:

It will be possible, but some browsers as Chrome will not load the JSON data, due to CORS policy :slight_smile:
That’s why I already suggested using a wamp/mamp version that doesn’t require installation on the USB drive.

1 Like

Hi Brad, I’m glad to share my experience. I’m not sure it will work either, but I’ve been asked to see it will. So I’m spending some time to see if two dozen of these could be put into a box.

Hi Teodor
So I’m back with a small JSON file with two entries. I have an html file with an image in it. I get through the “Working with JSON data” article as far as this screenshot, and do not know how to proceed:

JSON file:

  "events": [
    {
      "EventsID": 1,
      "Photo": "Hydroplane_1.jpg",
      "Title": "Whirlaway",
      "ShortDiscription": "On the way to Hall of Fame",
      "LongDescription": "This is text for Whirlaway"
    },
    {
      "EventsID": 2,
      "Photo": "hydroplane_23.jpg",
      "Title": "Hall oh Fame",
      "ShortDiscription": "Gulf Oil Compny: New York City",
      "LongDescription": "This is text for Hall of Fame"
    } 
  ]
}

Just be aware those “ ” quotes around the text may cause you an issue. They do on a Mac so I’m not sure if they are formatted correctly or have been corrupted during the copy paste procedure. I converted them to use " " before any information was returned to the page.

I could show you the basic Wappler code to return data to the page but I won’t as that is not going to be of any help to you. You need to do all this through the UI, which I don’t use, which is the whole point of Wappler. As my handle suggests I’m a coder and do everything direct in the editor.

Ok, Thanks.
I’ve checked them here. They came across from the Real Estate Demo correctly.
I do want to get this right.
My real problem so far is the terminology. The Wappler has gone way down the road from the “Theme menus” that a lot of us have used to make design easier and faster. The Wappler is full of gottcha’s and redo’s, although I’ve not even used it a week yet.
When I get asked for an expression I don’t know the technical difference between a field, expression and template. And then I don’t know whether to choose to “Add App Connect Data Formating or not” , etc., etc.,
I just need a better readout of the steps for using the data. And there is no mention of running the “Generator” and whether Bootstrap 4 Table or Paging. What is a 'Unique Key."
Frustrating.
I’m not asking you to answer all of this, but letting you know what designers may not know without a source for the information.
The DOCS got me a long way quickly, but it seems clear that not very many people plan on using the JSON files approach for handling their data.
John

So what is not clear exactly here, can you tell me which part you don’t understand?

That’s not important here John, you just select your dynamic expression and hit OK.
When it’s needed, these are explained in the documentation!

We also don’t know John. Do you need to format your data on the page?

These are already explained in the documentation. Not sure what is not clear here, the table generator generates a … dynamic table, when the paging generator generates … pagination.

Not important here, it’s explained in the docs where it’s used. It’s an option where you select an unique ID for your repeat region, from your data source.

Reading through your posts the last few days, most of the questions you ask are already answered in the documentation. I really recommend going at least through the basics - dynamic attributes, binding data, using data formatter.

Hi Teodor
Well, this response did not get me anywhere. I have read all of the docs that you recommended and that I could find. Judging by your posts, you believe that I am incapable or unwilling to read them. I sense your frustration and do not want to impose on your patience any longer.

Do you know any freelancers or associates that would be willing to work with me to develop a 5 page demonstration of using the Wappler and JSON for putting 2 cards and a paragraph on a page/template that I lay out? I would provide the images and the copy for the paragraphs and titles. If it is as simple as you say, any of you coders could do it quickly.

@gpetrov71

Probably if you explain which part of the Working with JSON Data tutorial is not clear for you we will be able to help you:

Please tell me which step there is confusing or not showing what you expect to show?

Alright. First of all. Do you find the JSON file that I provided to be adequate?

Yes, the JSON structure looks fine.

Hi John, late to the debate, sorry.

Have to ask the question nobody else has.

Why are you using a json data source?
Is this because you need to or is this a choice as you don’t have the expertise to go down the database route?

If the latter, perhaps you should reconsider that decision and look at a database solution as it will actually be much easier ultimately and far more flexible. Lots of support form that on here as it is the most common approach

Hey Brian,
That’s already been discussed in another topic:

John wants to create html pages which run offline, not on a server but from his usb drive. To get dynamic data on them he needs to use JSON files.

OK, got it, sorry

1 Like

OK. Then I will return to the Wappler and lay out the test page that I wanted to build. This will take me a little while because I threw them all out in my own frustration. But I will get back to you this morning when I get to the same spot.
Thanks,
John

So Teodor,
I’m back with the reconstructed page and the article. The page consists of a container with a row with two columns and a card in each column (see screenshot). I am at the point in the article where “We will create a repeat region and bind some data to repeat on the page. We’d like to repeat a column with a paragraph, so we select the row(1) and click the make repeat children button(2):” I’m starting here because I think maybe I am not setting up the repeat function correctly.


What do I do next?