Creating template based pages and layout in Wappler with NodeJS

The problem with PHP/ASP/ASP.NET is that you have a lot of different configurations and versions that you need to support. With node we have lot more control over the environment and the server is build-in.

With PHP we always had to check which version is installed, are the required PHP modules installed on the server, which database drivers are installed, what server does it run on (nginx doesn’t support htaccess files which we use for routing). With node we don’t have this problem, we bundle all the required modules directly with it and we choose which modules we are going to use.

3 Likes

Yeah, I figured that was the case. NodeJS is clearly the way forward. I’m just realising I need to be using that ASAP or I’ll be missing out on features. I’m about to start another project so the logical thing is to go with NodeJS for it but should I wait until v3 stable is released or is it safe to use at this beta 4 stage?

Hi @patrick will the data node be editable via UI.

And if it’s in the plans, should I flatten it or is it OK if I nest?

image

Data will be editable via the UI. @george will work on the implementation of that, not sure if it will support nested data.

2 Likes

How do we convert existing html pages to .ejs pages without losing any of the required dependencies / files e.g. css and dmx references?

What actually is included in this current beta function I don’t want to be wasting my time trying to figure why something is not working or submitting bug reports if the functionality is not supported in this version? What is incomplete and just wont work?

Hi @George, do you know already if it will support nested data?

I’ve found the beta very interesting because it is allowing me to take a deeper look at how Wappler has designed the solution and will most probably give me an edge in the future. It also has allowed me to make the right questions and provide interesting feedback. But it does require time, constant rebuilding and researching. Time that if you don’t want to spend I would just recommend you to wait for the final version.

4 Likes

If you have static html files, just move them to the views folder and rename it to .ejs. If you use the same folder structure as in the public folder then it should work directly and all dependencies also. You will need to create routes for them to make them reachable.

1 Like

6 posts were split to a new topic: Firebase hosting and NodeJS

With an index.ejs file already created, the layout view didn’t attach to the index content page.
If anyone has the same problem, I did this to fix it:

-Go to the routing panel
image
-Delete the existing root path
image
-Add a new route set to the same “/” with the same properties
image

Do you have some temporary work around for this?

What’s your use case?

I would like to create a mostly single page app with dynamic meta attributes.

Here you are. It is explained here.

1 Like

Is it not possible to add partials inside of a layout page?

Use case?

A partial is normally a piece of code that you are planning on reusing throughout your app, but is not common to all your app.

But adding a partial to a layout makes it available to all the pages that use that layout. Are you planning on using several layout files where some will have a partial and others won’t?

Are you planning on using several layout files where some will have a partial and others won’t?

Something like that yes, im still really having a hard time understanding layouts, routing etc.

My goal is to have a single page type app with no refreshing on navigation.

app.com/ this would be the main page left empty
then I will have some pages like app.com/settings for logged in users.
And I would like dynamic page for profiles. app.com/{profileid}

In bubble have one main page “/id” then I use collapse/hide conditions for all the sub/fake pages displayed by the url paths. I find building with bubble much more intuitive then here sadly.

If you disregard the PWA bit, this may be of help:

1 Like

SPA for node with the template system is not available yet.

1 Like

On the other side, SPAs were used a lot in Bubble to make the app look quicker. I only used SPAs in Bubble for that reason.

You won’t necessary need that if you redo your app with Wappler stack and deploy to a fast server.

So make sure you take a good look at pros and cons of SPAs and MPAs before you take a decision based on a bad experience with Bubble :slight_smile:

2 Likes