Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing a web app with "no backend" [closed]

With new services like Firebase and Parse, and tools like Angular JS, it is now possible to write a web app which is served simply as a collection of static files. You can write the frontend in purse HTML/CSS/Javascript and the backend is a hosted service.

My questions are:

  • Is this a good idea?
  • Is it worthwhile using something like Heroku or App Engine for an application like this? The user really just needs to download the HTML/JS once and they're set
  • How to handle users? Federated login? Store user data in Firebase/Parse?

Any other suggestions welcome!

like image 654
ian93 Avatar asked May 30 '13 16:05

ian93


People also ask

Can you build a web app without a backend?

As long as your website has no need of storing data and accessing external APIs, you will have no problem building it without a backend system.

Can an app work without a backend?

Not a complete NO but you need at least some backend code to send the HTML file to the client. Then it would not be an application it would be a complete text file only for reading, if they want to do something in it , then you have to type some backend code for their device.

Can you have a frontend without a backend?

Front-end developer: Also called a front-end designer, they can create a site without any back-end development. The site they would create without a web developer, or using the backend, is a static site. A static site is something like a site for a restaurant or hair salon.

Do Web Apps have a backend?

Web apps have the usual backend-end and front-end web development technologies. They are also very similar to websites, so web development and web app development have very similar characteristics. For example, web app developers use HTML, CSS, and JavaScript for front-end development.


1 Answers

It is completely reasonable to write a client-only app with the current browser capabilities. I've personally built a sophisticated application using only Firebase on the back end and HTML/JavaScript served from a CDN as the client. This is particularly suitable for types of apps which have inherently simple security models:

  • single-user apps (where the data belongs to and is modified by one person)
  • chat and communications widgets
  • apps private to an organization, where client connections are authenticated and trusted at least to a minor degree (collaborative editors and CRMs)

It is possible in some cases, but less suitable for tools with heavy calculations where even low level user data must be carefully controlled by a trusted third party (e.g. games where players could hack their own stats and calculating valid stats requires complex algorithms)

You can also greatly reduce server administration and setup by replacing traditional APIs and server scripts with "privileged consumers." These are also listeners to Firebase, with higher access privileges, that listen and process data just like a client, then write to secure data than normal users should not be allowed to access or manipulate.

A disadvantage of client-only models is the increased complexity of security. Each client has to be trusted to calculate and store its own data or that data has to be carefully secured via security rules or some sort of external monitoring (such as a privileged consumer).

You might find some interesting design ideas by delving into literature on "Fat Client" or "Thick Client" design patterns. You might also want to look at distributed gaming for some insights.

like image 86
Kato Avatar answered Oct 26 '22 23:10

Kato