Understanding web apps

If I am building a website (web app) with Xojo, what is the paradigm to have multiple pages? For example, if I were building a blog site, I might have:

  1. A main page with blog entries
  2. A login page
  3. An admin page for managing posts (once logged in)

Is the method with Xojo to add multiple “WebPage” objects?

I looked at the “quick start” tutorial but it was a little too simple. Is there a more elaborate example with multiple pages?

Xojo WebApps can have multiple Webpages. So in your case you would have for example 3 different pages and you can navigate between them using Buttons or Toolbars.
Its like

Var Page as new AdminPage
1 Like

Not the best option for a blog, but you can found a little more elaborate example in… The EXAMPLES.

Open xojo, in the “choose proyect” window go to Examples - Sample applications - Edies electronics - Web

If you want that Google likes your page, then better don’t use Xojo to build your web site.

Xojo is good for web apps not web sites.

I suggest something easier, faster and more common like Wordpress for creating a web site with a blog and such.


Yeah, no… don’t go that route and don’t confuse web apps with web sites. For a blog, stick with Wordpress. No need to reinvent the wheel in a tool that was not made for this (websites).

Thanks. Yes, I don’t actually mean to create a blog. I’m just trying to understand the basic structure of a web app in Xojo and didn’t see anything obvious in the documentation / tutorial.

I have a fairly large Xojo webapp and it has only one page. I use containers to switch between each view.

1 Like

Did you have a look at the new videos (tutorials) ? That may help you get how that works.

What is specific to Xojo is that you create Web Apps as you create Desktop Apps.

In a Desktop App, you have Windows, in a Web App you have pages. You drag controls to your page much like you to with a Desktop App. It’S very similar, except that Web Apps pages are seen in a Web Browser, and you see only one page at a time. This is a short description, but it should help you get an understanding of Web Apps.

Would the whole page load longer with all these containers compared to having webPages instead? I’m not familiar with WebApps, just trying to understand.

You can Embed each container control as needed. I even use a container for the login.

It is the same as Desktop, you can use a single window and create/destroy containers without having to instantiate all of them at the start

FWIW, this technique is exactly what the app does for you with webpages. They’re all just views that are swapped out when you call Show.

1 Like

@Greg_O that is good to know. I just wish some one had told me that a long time ago. :grinning:
I always like to learn new stuff, makes me want to make a new webapp just to try it.

Like if there was real documentation instead of videos?

1 Like