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
XDG-SETTINGS(1) 						xdg-settings Manual						   XDG-SETTINGS(1)

NAME
xdg-settings - get various settings from the desktop environment SYNOPSIS
xdg-settings {get | check | set} {property} [subproperty] [value] xdg-settings {--help | --list | --manual | --version} DESCRIPTION
xdg-settings gets various settings from the desktop environment. For instance, desktop environments often provide proxy configuration and default web browser settings. Using xdg-settings these parameters can be extracted for use by applications that do not use the desktop environment's libraries (which would use the settings natively). xdg-settings is for use inside a desktop session only. It is not recommended to use xdg-settings as root. OPTIONS
--help Show command synopsis. --list List all properties xdg-settings knows about. --manual Show this manual page. --version Show the xdg-utils version information. PROPERTIES
When using xdg-settings to get, check or set a destkop setting, properties and possibly sub-properties are used to specify the setting to be changed. Some properties (such as default-web-browser) fully describe the setting to be changed. Other properties (such as default-url-scheme-handler) require more information (in this case the actual scheme to set the default handler for) which must be provided in a sub-property. EXIT CODES
An exit code of 0 indicates success while a non-zero exit code indicates failure. The following failure codes can be returned: 1 Error in command line syntax. 2 One of the files passed on the command line did not exist. 3 A required tool could not be found. 4 The action failed. EXAMPLES
Get the desktop file name of the current default web browser xdg-settings get default-web-browser Check whether the default web browser is firefox.desktop, which can be false even if "get default-web-browser" says that is the current value (if only some of the underlying settings actually reflect that value) xdg-settings check default-web-browser firefox.desktop Set the default web browser to google-chrome.desktop xdg-settings set default-web-browser google-chrome.desktop Set the default mailto URL scheme handler to be evolution.desktop xdg-settings set default-url-scheme-handler mailto evolution.desktop AUTHOR
Mike Mammarella Author. COPYRIGHT
Copyright (C) 2009-2011 [FIXME: source] 08/18/2014 XDG-SETTINGS(1)
All times are GMT -4. The time now is 07:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy