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-INSTAWEB(1)                                                     Git Manual                                                     GIT-INSTAWEB(1)

NAME
git-instaweb - Instantly browse your working repository in gitweb SYNOPSIS
git instaweb [--local] [--httpd=<httpd>] [--port=<port>] [--browser=<browser>] git instaweb [--start] [--stop] [--restart] DESCRIPTION
A simple script to set up gitweb and a web server for browsing the local repository. OPTIONS
-l, --local Only bind the web server to the local IP (127.0.0.1). -d, --httpd The HTTP daemon command-line that will be executed. Command-line options may be specified here, and the configuration file will be added at the end of the command-line. Currently apache2, lighttpd, mongoose, plackup and webrick are supported. (Default: lighttpd) -m, --module-path The module path (only needed if httpd is Apache). (Default: /usr/lib/apache2/modules) -p, --port The port number to bind the httpd to. (Default: 1234) -b, --browser The web browser that should be used to view the gitweb page. This will be passed to the git web--browse helper script along with the URL of the gitweb instance. See git-web--browse(1) for more information about this. If the script fails, the URL will be printed to stdout. start, --start Start the httpd instance and exit. Regenerate configuration files as necessary for spawning a new instance. stop, --stop Stop the httpd instance and exit. This does not generate any of the configuration files for spawning a new instance, nor does it close the browser. restart, --restart Restart the httpd instance and exit. Regenerate configuration files as necessary for spawning a new instance. CONFIGURATION
You may specify configuration in your .git/config [instaweb] local = true httpd = apache2 -f port = 4321 browser = konqueror modulePath = /usr/lib/apache2/modules If the configuration variable instaweb.browser is not set, web.browser will be used instead if it is defined. See git-web--browse(1) for more information about this. SEE ALSO
gitweb(1) GIT
Part of the git(1) suite Git 2.17.1 10/05/2018 GIT-INSTAWEB(1)
All times are GMT -4. The time now is 12:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy