Hello, world.
This is a blog about application development web, desktop & mobile across a range of programming languages incl. JavaScript, C# and more.
These are interesting times for the web. Tag along as I get amazed on what the web can do, how AI is taking over the world, and sympathize my spectacular failures and stupidity.
Explore
- š Posts ā In-depth articles on web development, JavaScript, TypeScript, Vue.js, ASP.NET, and more
- šļø Categories ā Browse topics: JavaScript, Vue.js, TypeScript, ASP.NET, and more
- š Apps ā Simple, powerful tools built for real-world use
Stay in touch!: š¤Twitter | šRSS | šGitHub
I recently had to pick up an old project on Wordpress and deploy the site on a CPanel server. So, I thought it was just the right time to document the steps needed to migrate Wordpress site from one host to the other, or from one domain to the other. While there are references to CPanel, the migration is almost the same for any control panels (or even when you donāt use one).
...
I switched to Caddy recently on one of our servers to host multiple applications and am super happy about its simplicity and ease of use. Hereās how I use Caddy with Quasar.
What is Caddy? Caddy is a web server much like Nginx. It calls itself āa new kind of extensible platform for server appsā. Features include -
Easy configuration (super readable config. files - we will get to this in a bit) Configuration is exposed as APIs (JSON files can be used to create/change configuration) An extensible plugin system Automatic https using Letās Encrypt Caddy does all this with a single executable, and a single configuration file.
...
I create virtual private servers at least 8-12 times an year for client and personal projects. The steps to go live remain the same -
Get a cheapo VPS on Digital Ocean, Vultr (get $100 credit), Hetzner, OVH, and friends - I end up choosing Ubuntu as the OS Secure your server Setup app server, database server and tools Stitch together various components through configuration files I have thought about switching to Docker (or Caprover) for months, but keep putting off any kind of automation. The adhoc sharing of DB servers, file systems, report/analytics servers make it a tricky exercise. I donāt quite spend more than 4 hours on a crazy day - so itās not quite a big deal.
...
Hereās a good guide to get you started on Javascript in a practical way.
Why another guide? Practical - donāt learn for the sake of learning, learn for the sake of doing! Tactical - learn what matters, fast (yes, thatās what everyone says) Strategic - see the big picture This guide will get you started from the beginning, graduate you to using industry standard tools, and point you towards the right direction for learning even more than what can be offered in one guide or course.
...
WSL2 was released yesterday along with Windows10 May 2020 update (v2004). WSL2 enables to work with Linux kernels within Windows, and it brings some crazy possibilities for those of us who refuse to dual boot or switch over completely to Linux.
I am assuming that you already have installed Windows v2004 through the normal Windows update channel, or through the update assistant.
Once you are on Windows10 2004, hereās how you can setup a cool WSL2 development environment.
...
I had to work on a MVP where there were specific instructions to use Vue directly from a CDN. The Vue build available in this way is also called UMD (Universal Module Definition) build since you can use Vue from anywhere and the project does not need specific setup to build and package your code. Hereās a demo of how a simple Vue setup from CDN can be used for quick demo projects.
...
Hereās a quick way to use Vue plugins in Quasar.
Use Case: Frappe Charts in Vue Letās consider a simple use case for using Vue plugins - we want to use Frappe charts.
We can simply use vue2-frappe to easily do that. Just install the package in your project -
npm i --save vue2-frappe Next, register it as a Vue plugin -
import Vue from "vue"; import Chart from "vue2-frappe"; Vue.use(Chart); Frappe in Quasar In Quasar you canāt do a Vue.use like the above. There is no main.js to orchestrate that.
...
Quasar CLI structures project differently as compared to a standard Vue CLI app. As a result, you cannot just follow examples on the Internets blindly and use Vue.use(), or start changing code in main.js. There are, however, great ways of addressing the same problems with slightly different solutions.
Enter boot files. These were simply called app plugins which led to them being mixed up with Quasarās own plugins. Now they are simply referred to as āboot filesā.
...
Hereās a quick demo of how you can convert XML to JSON in NodeJS.
Problem You are given a slew of XML files and you have to convert them to JSON.
But why JSON?
It takes lesser space Faster and easier to work with What are we dealing with here?
Convert this input -
<?xml version="1.0" encoding="UTF-8"?> <root> <string name="msg">Message</string> <string name="hello">Hello</string> </root> .. to something that we can relate to in JSON -
...
Quasar is great. But, it is also a bit different when it comes to accessing the Vuex store from your code.
Why is Quasar any different? āIs it not just Vue?ā
Well, yes. But.. the project structure created by Quasar CLI differs from a ānormalā that by Vue CLI. Quasar CLI builds on top of Vue as well but may not follow similar practices to other frameworks / libraries using Vue.
...