Some Thoughts on Vue.js at UNIX.com


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Some Thoughts on Vue.js at UNIX.com

Recently, have been learning Vue and, as always, learning-by-doing, which means writing code for real-world applications. In this process, I have learned something that is not really mentioned in the majority of online Vue tutorials.

Basically, when you create a Vue instance in your browser, you bind that Vue instance to a root DOM element. This means that everything you do within a Vue instance stays in that same Vue instance. In other words, to move information between two or more Vue instances running in your browser, you need an interprocess communication (IPC) in your browser. Also, when you load another page, the Vue instances in your prior page are destroyed, so state is not maintained when a Vue process closes and a new Vue process is created.

This is perfectly fine, of course; and what I discovered was the same thing that others before me have discovered: We generally use cookies, localStorage, or sessionStorage in the browser as a kind of primitive IPC. I guess you could consider this a kind of file system IPC (but not really), where each process running in the browser has access to data stored on the disk by the browser.

I have not found any additional IPCs available for interprocess communications in the browser (if you have, please post in reply and tell me). All the web frameworks I have reviewed run in their own sandbox, so to speak; and all of these frameworks require browser-based cookies, localStorage or sessionStorage to share persistant information between browser processes, or to be accessible to the user when they close and then open their browser again.

This also means that reactive Javascript frameworks like Vue are really designed to shine in reactive web SPAs (single page applications). In these apps, when you bind a Vue instance to a DOM root element, you can manage state as long as the page is not closed or reloaded.

What does this mean?

Well for starters, a "progressive web app" using Vue is one where you take your legacy web app, like ours here at unix.com, and add Vue SPA features. However, because legacy sites like unix.com are mostly build on a synchronous web model which is not SPA and each new area of the site is a page which tends to be reloaded, this make retrofitting to a modern framework like Vue challenging, to say the least.

On thing is for sure, applications like vBulletin and other CMS which use a legacy (old fashioned) synchronous web design architecture are losing popularity while reactive SPA apps are on the rise. For web developers, is a bit like riding a dinosaur (if your site was built on a legacy CMS like vBulletin) while trying to complete with those now riding in a F1 race car.

What does this mean for the future of unix.com and the underlying dinosaur-ish CMS system that was very popular years ago but now in fast decline? Well, I'm not 100% sure.

We must move toward a reactive SPA framework like Vue while at the same time keeping the old legacy system working. It's really a lot of work for a small development team, which at the moment is most me with some occasionally brainstorming with Scott.

I'm still working through what this means for the future of unix.com.

If you have any ideas, please feel free to share them here.
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Vue JS 2 Tutorial by The Net Ninja: A Recommended Vue.js Video Tutorial Series
Neo
A number of people have asked me how to get started with Vue.js and my reply before today was to Google "Vue.js". That has changed and my recommendation to anyone who wants to learn the fastest growing, easiest to learn and use Vue.js web dev framework is to watch this video tutorial series: ...... Web Development
0
Web Development
Simple Vue.js Component to Redirect to External Web Page Using Vue Router
Neo
Vue Router has some quirks and on of the quirks is that it is not reliable when adding external links using the vue-router library. After struggling with many solutions, I have found that creating a simple Vue.js component like this one seems to work the best (so far): Component Example: ...... Web Development
0
Web Development
Regarding thoughts for encourage more users to post/participate on UNIX.com site.
RavinderSingh13
Hello All, Greetings!! Have a thought about how could we encourage more users to post and participate more on UNIX.com(because more we get questions, more we learn more), few are my ideas which I am posting feel free to add/edit more ideas in here. Keeping this as a POLL too. I- Allow...... What is on Your Mind?
10
What is on Your Mind?
UNIX and Linux

Unix (trademarked as the UNIX certification mark) is a very mature family of multitasking, multiuser computer operating systems that evolved from the original AT&T Unix. Unix development starting in the 1970s by legendary Bell Labs programmers Ken Thompson, Dennis Ritchie, and others. Unix was first targeted for the Bell System and AT&T licensed Unix to outside parties. In the 1970s time period, this lead to a variety of for-profit as well as not-for-profit Unix variants.
In the early days, this included the University of California, Berkeley (BSD), Microsoft (Xenix), IBM (AIX), and Sun Microsystems (Solaris). In the early 1990s, AT&T sold their Unix rights to Novell. In 1995 Novell sold their Unix business to the Santa Cruz Operation (SCO). The UNIX trademark was passed to The Open Group, a "neutral" industry consortium. The Open Group promoted the use of the UNIX trademark for certified operating systems that comply with the Single UNIX Specification (SUS). In 2014 Apple's macOS became the Unix version with the largest global install base and macOS remains the largest Unix-user base today.
Linux is a family of open source Unix-like operating systems based on the Linux kernel. The Linux kernel is an operating system kernel first released by Linus Torvalds on 17 September 1991. Linux distributions include the Linux kernel, system software and libraries. Popular free open source Linux distributions include Debian, Fedora, and Ubuntu. Commercial Linux distributions include Red Hat Enterprise Linux and SUSE Linux Enterprise Server. Linux may be freely modified and redistributed. Anyone on the planet may create a Linux distribution for any purpose.
Please enjoy and help our forum community by "showing your work" and posting your code, even when your code is not working as expected. To help others help you, please wrap your code blocks, sample input, sample output, error messages, and other data in CODE tags and wrap your short commands and short data objects in ICODE tags. We were all beginners in the beginning. If you have any questions about how to register or how to post, please contact us in Live Chat. Thank you and enjoy this "forever free" technical support community for UNIX, Linux and computer information technology in general.