To SPA or not SPA, that is my Question... AND writing a CMS from scratch

I’ve searched and read, and read more. In the case of https://webill.net/, this SPA was started over 3 years ago. I just asked Marcel about that here.

While its nice, and I’m certainly not knocking it, I just don’t see THAT much of a difference between it and a non-SPA site. And we know @Antony says he has a massive SPA - don’t recall why he felt he needed to do it that way.

I’d like to know under what circumstances I DO NOT want to pursue a SPA - just to make sure I’m not making a wrong decision up front.
What functionality will not be available in a SPA?

Specifically, I have a colleague who needs to do a new website for a club - will allow new members to join and pay online. And will have a few events a year where a registration form is needed and payment. Will have articles published each month. An events calendar. Member only functions. Basic CMS stuff.

He was going to do a WORDPRESS site, using Gravity Forms (which I’ve seen and is really slick to register and pay for Events thru Stripe). When I look at @brad’s Theater website, to me, thats a CMS - but I don’t know how he wrote it on the backend. Can he add new articles and they appear on a page? Or is all that custom/planned/static pages. I could see using Wappler to make a CMS but I still don’t think it will have as much visual flexibility (at first) as WORDPRESS. (ie. It will only have as much visual/layout/master pages/templates flexibility as he can code into it, which would be minimal at first.)

Would anyone argue against doing a WORDPRESS site in favor of a system from scratch in Wappler? I’m sure someone would :slight_smile: but you have to admit its a lot easier to spin up a WP site and voila! Maybe there is a Wappler CMS system already built?

I would be more comfortable staying with MSSQL, so it appears for $14/mo he could get a DO Ubuntu w/free MSSQL Express. Don’t really need MSSQL but if he needs help, I hate MySQL and wouldn’t be much help to him. I’m not familiar with how Wappler deals with other databases or SQLLite.

Thx for any advice.

Yes, the content is CMS and all done in Wappler. All really basic stuff that really only took me a couple days to build out. Except for the ticket ordering which took me about 4 months as it was before the Stripe integration in Wappler.

I am comfortable saying that pretty much everyone here would tell you using Wordpress is not a ideal and building from scratch is easier than trying to ‘make something work’.

Can all be done with Wappler and a little patience to learn how the Stripe tools work. :wink:

In my whole “rant” on other page, I should have summed it up as building a SPA was more my pursuit of building a site that is easier to manage by splitting and re-using code rather than performance or using the latest tech.

@pixlapps
lol
I only understood about half of that big post… Libraries made no sense, and other stuff at the end.
Like I said it was from 3 years ago - so hoping someone will make a case for/against NodeJS SPAs given the current state of Wappler - or at least point to a thread about that - but I couldn’t find a “Why SPA” post.

1 Like

And I hate redundant code - one thing I just experienced was this.
Thanks to Ben/Hyper’s videos about security and registration, I decided to have a public section and a internal “Staff” section (only if you were logged in). All of that went fine.

But for my main page I had this decently complex widgets listing (for the public), and then when I wanted to have the secure version (which comes from a ‘staff’ subdirectory) I had to copy that and I tweaked that a bit. Now, I had 2 code bases which both need to be updated - the code is 95% the same - and now thats a pain. It ended up being 2 more pages also. Make a change one place and I have to remember to duplicate it on the other page too.

I wouldn’t say Partials was the answer tho.
I stripped out stuff in the public page, because I didn’t want the extra Server Connects causing 100% unneeded traffic (ie. Public didn’t need an option to login, or the UserName shown, or security being checked – so I decided to remove all that to cut hits to the db for 99% of the traffic). But now I have almost duplicate code. So I’m with you on the -reusing- code stuff for sure, just not far enough in to know the tricks.

Hey folks…

Yes, my app is a very big single page with lots of PHP includes. I’ll have to check how big the complete size is, but it is big and downloads from AWS in next to no time. It seems to run just fine on most computers… we ran it on an iPad last week and it performed perfectly.

Sorry for the lack of specific data… can provide some if any of you want it!

Thx A for the reply.
Well, I guess I would ask you the same as Brad or Marcel…
Why SPA?
What would your users lose (or notice) if your app was non-SPA ?
If you were to start over from scratch, would you do it the same?
If someone needed to write a CMS App (like Wordpress off the shelf) would SPA be the correct choice?

Still waiting on someone from the official team to make a case either way.

THX in advance for your time @Antony

My apologies, I am not from the official team, yet would like to hand in my two pennies worth.

I love the idea behind SPA’s. The initial loading time may be a bit longer than that for a single page; the benefit lies in subsequent page loads which are seamless. Development time is also affected with SPA’s being a winner.

However, I have had a few setbacks implementing a SPA. Think of Google Analytics (GA) that requires a page refresh. Not only GA, there are other instances that require a page refresh. SEO comes to mind.

Thinking through the process of SPA and MPA and comparing the two, I have found that a SPA is worth its while when there is a large amount of user activity, as in the case of an adinistration or CRUD module.

When a user wades through more or less static pages, the benefit of a SPA is lost.

My conclusion is to use MPA’s for public modules where SEO is important and to use SPA’s for restricted parts of the web site. This is especially true in the case of NodeJS applications.

I confess, the concept of an SPA and it’s benefits kind of faded into a forgotten age for me when Node with layouts/ partials became available. It has the ease of writing a multi page app integrated with the efficiency of an SPA out of the box

@ben @Hyperbytes
Its proven (Antony) that a “Big” app can be via SPA, so that doesn’t seem to be a determining factor.
(Will be interesting to see if he would re-write his app as SPA if he restarted.)

For a public CMS app (a colleague is considering Wappler for a small club with public facing website), that would also sell Ad revenue, one would certainly want Google analytics - that might be an issue.

RE: Static pages - this potential site being a CMS would by nature be dynamic (just like Brad’s Theater website) so per Ben, I guess SPA would be a benefit. Users would be posting articles and other things for sure.

Thx for replies.

Yes, think most of us have done huge CMS type apps during our careers and node has been a huge help.
Antony’s is an old style PHP app and i think relies heavily on SSI’s for it’s functionality. This means SEO becomes a bigger issue as the pre-render service at page level is required to do decent dynamic SEO. Not sure how Antony has dealt with this but i cant see the solution being simple
NODE does make things easier as SEO tags can be dynamic when attached through a layout page.
Personally i would also attach any google adwords to the layout page if possible.
If i recall correctly, as when using node as the URL changes (even though only the content part of the page is refreshed), google analytics does a pretty good job of detecting the change although to be safer you can update the gtag path also suppose (never tried)

Brad, I can tell you that when you don’t know WP and start a new site, its VERY intimidating. Def. falls into the “you don’t know what you don’t know” category.

BUT, with some pointing in the right direction by a knowledgeable friend, its amazing, fast, easy and flexible.

I was turned onto a theme called Flatsome and that revolutionized my experience.
The key was in their UX editor which was lightyears ahead of how most people edit pages in WP. (Another popular framework is DIVI).
I used Dreamweaver 15-20 years ago (if I remember correctly, it was my fav) - so Flatsome is the same as using Dreamweaver vs Notepad to write websites.

And then there is GravityForms (and plugins/addons from GravityWiz).
And I use ImageHopper for users to upload/edit images.

I could probably re-write your site in a few days, including registration and payments for member, sponsor and seats, collecting all data online in forms, which is stored in a db and payments via stripe.

Brad, I only say this because of your comment “make something work” which I guess is implying that WP would be inferior or you’d have to “settle” or fight to get your objectives achieved.
AND
“Well, Robert, if WP is so good, then why doesn’t your friend just use WP then?” – thats why I’m asking Questions about Wappler. I can say this… the fees start adding up a bit using WP.
Forms & plugins are going to be $600/YEAR (of course those pro plans let you do multiple sites, so if he did multiple sites, then that goes down quickly). ImageHopper is $100. Plus a few more. Maybe a $1000 invested in the total framework, compared to $500 for him as a Wappler freelancer. Thats basically a wash. So it doesn’t really come down to pricing.

The BIG problem with Wordpress is you very quickly hit limitation due to reliance on plugins (unless you know how to manually deal with data taxonomies etc yourself). The when you add all those plugins the site becomes bloated and very slow which negatively impact of your google rankings.

DIVI makes things simpler but really slows things down

sounds scary, but I don’t know what this is. :grimacing:

No offense intended, but you make 2 statements here that are very close to FUD. (BIG problem and then Bloated)

“big problem” - how big? Big like no Stripe when Brad wrote his site and it took 4 months?
“quickly” - how quickly is too quickly?
“reliance” - like no one is extending Wappler to do new things?
Bloated
Slow
Poor google rankings

To believe all this, no one should choose WP for anything.
I’ve got CURRENT experience with WP and disagree - thats all. Nothing is perfect.

Not saying this is “bloat”, but a lotta stuff being loaded here at Pukka:

I still use WordPress from time to time, been using it for about 15 years, I am a programmer who has used PHP for more years than i care to admit and I know how to extend WordPress via PHP code changes rather than plugins.

Lets start with plugins, every plugin adds additional load time on your server, the more you add the more you slow down. Generally the bigger the plugin, the bigger the load. That’s the bloat. the more plugins, the quicker the issue

As to reliance on plugins, the simple answer is what if you cant find a plugin to do what you want, either not at all or not in the way you want?

That’s kind of the point, Wappler allows you to do most things without the reliance on plugins. Yes, there are a few custom extensions for specialized stuff people have developed but generally you can do pretty much anything directly from the Wappler interface. The resulting code is so much more efficient and the process is much more flexible.

WordPress has it’s place in the world, it is dearly loved by design agencies who can make a site look good with basically no technical skills, i know, they are a great source of income for me when they come to me to customize the code for things they cant do.

It’s all here, its basically about defining data and structures. It’s the basis on which many plugins are written.

https://developer.wordpress.org/themes/basics/categories-tags-custom-taxonomies/#:~:text=Taxonomies%20are%20the%20method%20of,can%20also%20create%20your%20own.

1 Like

By the time this topic has happened you could have built the site in Wordpress with a membership plugin.

I find myself going back to Wordpress because of the plugins that are out there, I want to use Wappler but I just don’t know enough about coding and unless I want to bug the great group of folks here over and over it hard to find resources on how to do things out of the Wappler community for Wappler.

Wordpress on the other hand is so large you can find so some much information on the internet, actually too much as times.

You pair a good page builder like Elementor along with a plugin for dynamic content like Crocoblock suite there is so much you can do with ease. Wordpress gets a bad wrap for being bloated but if you know just enough (like me) you can tweak it to be very fast.

When it comes to super complex sites I think something like Wappler is the way to go if you know what you are doing.

@sevenrice
I looked into Croco once because of Ajax Seach - thats nice.
But I doubt I will ever move to Elementor.

While this is easy to do in Wappler, I’ve never done this in WP. This is from Brad’s Theater site. Not sure who’s add-on would do this - or might just have to write a tiny PHP widget.

1 Like

You can do that with Crocoblock JetEngine SQL Query builder using a dynamic table to display those queries.

So why not just do it in wappler? No plugins needed and it is just a very basic query and repeat table created with the table generator. Literally 5 minutes. If that. :wink:

Hey gang… thanks for referencing my SPA! Yes, it is PHP and SSIs… Node was not available when I started the development 3 years ago.

As it is an app, I don’t need SEO… I need SEO on the web site that markets the app, and that is page based.

I’d look at other options before doing it again… but since I only use Wappler to build and support my one app then that is unlikely to happen any time soon!