What's the minimum amount of JavaScript can a web application get away with?
Tags: web, javascript, discuss
Published: 2018-09-25 16:19:28

---
title: What's the minimum amount of JavaScript can a web application get away with?
published: true
description: 
tags: web,javascript,discuss
---

So I was reading about "bloated" applications and how we, especially web developers, pull in dependencies like it's nothing since _a modern computer can handle it just fine_. The concern is that we're sacrificing too much (?) _performance_ for _convenience_ that it may come back to haunt us and it's time we take performance in front of our priorities again. With some thinking, I can see the appeal of both sides — though the latter one _I think_ is more ideal and is the topic that I'd like to ask all of you about.

## Case in point: MyFaceTweetSter

![](https://635.gtbank.com/wp-content/uploads/2018/06/Social-Media-Graphic.jpg)

The year is 2005. MyFaceTweetSter (MFTS) has risen as the king of Social Media networks. They're reeling in millions in revenue, every college kid uses it, and the CEO can already see a movie being directed about his company a few years down the line. This is all good until _Tom ZukerDorsey_ made a crucial mistake: as he was refactoring MFTS' `inbox.php` script, he accidentally used `in_array ($needle , $haystack)`. (Which is in the wrong order. Or is it? IDK even know). This apparently rips open a void in the timespace plane, freezing the whole MFTS building in time. PHP4 is pretty wild.

Fast forward to 2018, and the timespace void has been filled. Tom is back alive, and is looking to reclaim his throne. He booted up his Windows XP computer, quickly researched WTH is going on in the dev community, and decided to port MFTS in a `<modern-mvc-framework />`. It took him a month (2 weeks spent negotiating since `MyFaceTweetSter.com` is expired and held for ransom) and he's ready for launch!


_"Whoa whoa whoa, hold on!"_, said Justin Timberlake, his main investor. _"Every dev and their dogs uses JavaScript today. How about we hire the guys from dev.to and consult them so we can get up to speed with the JS ecosystem?"_. So here's where we come in. We'll try to modernize the UX of MFTS without pulling in every packge in `npmjs.com`. So currently, every action triggers a page reload as expected in a traditional web app. The core functionalities are as follows:


```markdown
## The Usuals
    - Registration
    - Authentication
    - Feedback forms
    - etc.

## Friends
    - Search through the users
    - Send a "friend request" to a user
    - "Unfriend" a user

## Posts
    - A user can make a post (with photos / embedded media)
    - A chronological list of posts are presented in the home page
        - Paginated with 10 posts each
    - A user can like/unlike a post
    - A user can comment on a post

## Messaging
    - A user can send a message to one of their friends
    - A user can reply to a message sent to them
    - The messages are displayed as "threads"

## Profile
    - A user can upload a "profile picture"
    - A user can put in their personal information to be display in their profile
    - A user can update the said information
    - A user can browse through their friends profile

<!-- Feel free to add more "core" features! -->
```

Which of these do you think are good candidates for using JavaScript? What's the minimum we can go whilst still providing good UX? Would MFTS, granting their huge following a decade ago, be able to compete with today's social media platforms _without using JS at all_?