Sponsored Content
Top Forums Web Development Some Thoughts on Vue.js at UNIX.com Post 303026026 by Neo on Sunday 18th of November 2018 04:19:49 AM
Old 11-18-2018
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.
 

6 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Partitioning Thoughts

I'm pretty new to UNIX and i'm planning to set up a server for my company.... i'm wondering if anyone could suggest a partitioning scheme for a standalone Solaris server with two 40GB disks and 1GB of memory... It would also be supporting 100 users... thanks ! (1 Reply)
Discussion started by: martin11
1 Replies

2. What is on Your Mind?

Thoughts on Dystopian Future as we know it!

Greetings Fellow NIX'ers, For a while now I've been pondering the (to Me) Dystopian possibilities of "Cloud Computing", Web Apps (Pay Per Each Use) of course, and... the Most Troubling of All: The possible time when we will not be allowed to own a "Real" computer, only some silly little... (7 Replies)
Discussion started by: Coding Coolie
7 Replies

3. What is on Your Mind?

Regarding thoughts for encourage more users to post/participate on UNIX.com site.

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... (10 Replies)
Discussion started by: RavinderSingh13
10 Replies

4. Web Development

Simple Vue.js Component to Redirect to External Web Page Using Vue Router

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: ... (0 Replies)
Discussion started by: Neo
0 Replies

5. Web Development

Vue JS 2 Tutorial by The Net Ninja: A Recommended Vue.js Video Tutorial Series

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: ... (0 Replies)
Discussion started by: Neo
0 Replies

6. What is on Your Mind?

Video Overview of the Vue.js UserCP @UNIX.com

Here is my second live video screencast (in my life, using Camtasia) with voice for the new usercp: Overview of the Vue.js UserCP @UNIX.com Shout outs to Don Cragun, Corona688, Rudi, Wolf, Made in Germany, stomp, Ravinder, Creative Tim, PubNub and others in the video. Thanks. If you are... (1 Reply)
Discussion started by: Neo
1 Replies
GIT-WEB--BROWSE(1)						    Git Manual							GIT-WEB--BROWSE(1)

NAME
git-web--browse - Git helper script to launch a web browser SYNOPSIS
git web--browse [OPTIONS] URL/FILE ... DESCRIPTION
This script tries, as much as possible, to display the URLs and FILEs that are passed as arguments, as HTML pages in new tabs on an already opened web browser. The following browsers (or commands) are currently supported: o firefox (this is the default under X Window when not using KDE) o iceweasel o seamonkey o iceape o chromium (also supported as chromium-browser) o google-chrome (also supported as chrome) o konqueror (this is the default under KDE, see Note about konqueror below) o opera o w3m (this is the default outside graphical environments) o elinks o links o lynx o dillo o open (this is the default under Mac OS X GUI) o start (this is the default under MinGW) Custom commands may also be specified. OPTIONS
-b <browser>, --browser=<browser> Use the specified browser. It must be in the list of supported browsers. -t <browser>, --tool=<browser> Same as above. -c <conf.var>, --config=<conf.var> CONF.VAR is looked up in the Git config files. If it's set, then its value specifies the browser that should be used. CONFIGURATION VARIABLES
CONF.VAR (from -c option) and web.browser The web browser can be specified using a configuration variable passed with the -c (or --config) command line option, or the web.browser configuration variable if the former is not used. browser.<tool>.path You can explicitly provide a full path to your preferred browser by setting the configuration variable browser.<tool>.path. For example, you can configure the absolute path to firefox by setting browser.firefox.path. Otherwise, git web--browse assumes the tool is available in PATH. browser.<tool>.cmd When the browser, specified by options or configuration variables, is not among the supported ones, then the corresponding browser.<tool>.cmd configuration variable will be looked up. If this variable exists then git web--browse will treat the specified tool as a custom command and will use a shell eval to run the command with the URLs passed as arguments. NOTE ABOUT KONQUEROR
When konqueror is specified by a command line option or a configuration variable, we launch kfmclient to try to open the HTML man page on an already opened konqueror in a new tab if possible. For consistency, we also try such a trick if browser.konqueror.path is set to something like A_PATH_TO/konqueror. That means we will try to launch A_PATH_TO/kfmclient instead. If you really want to use konqueror, then you can use something like the following: [web] browser = konq [browser "konq"] cmd = A_PATH_TO/konqueror Note about git-config --global Note that these configuration variables should probably be set using the --global flag, for example like this: $ git config --global web.browser firefox as they are probably more user specific than repository specific. See git-config(1) for more information about this. GIT
Part of the git(1) suite Git 1.8.3.1 06/10/2014 GIT-WEB--BROWSE(1)
All times are GMT -4. The time now is 04:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy