B4J Question When to use a WebServer vs WebApp

socialnetis

Active Member
Licensed User
Longtime User
Hi, I'm totally new to web technologies and a little confuse in the difference between web apps and web servers. When should it be better to use one over the other?

For example, what would be appropiate for this scenarios (I put what i think in parenthesis)?:

- An informative page like basic4ppc.com (web server)
- A newspaper (web server)
- An online poker (web app)
- A chat room (web app)
- Pages like Twitter/Instagram where users post a text/photo and other users can like it/retweet it/comment it. And you get real time notifications (this is the most confusing type. I would say web server, but you get real time notifications which confuses me)

If you could put some others popular examples that would be great!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can (and in many cases should) combine both types of handlers in the same app.

WebSocket handlers are useful when you want to interact with the user browser.
Regular handlers are useful when you want to implement an API. For example to allow a mobile app to interact with the server.

WebSockets handlers can also be used with apps when you need to maintain an active connection. However this is less common.

Static files (html, js, css, ...) are served automatically by the server.
 
Upvote 0
Top