Fullstack Wizard. First installment.

avatar

fullstack-wizard.png

Let's make a landing website

Before word...

The Fullstack Wizard is a multiple parts series where I aim to teach you some tricks and give you a little bit of insight into full-stack web development.

Since this is the first post in the series we will discuss some general notions and I'll make clear to you what technologies are used, what we'll be doing, and what's the end-goal. OK, without any further ado let's dive into our today's main topic.

What is a full-stack developer and what are we going to work on

In simple words, a full-stack developer is someone that takes care of all the aspects related to software development from designing the app, to writing the logic behind the app to creating and connecting the database, etc. In a way, a full-stack developer is someone that can create an application from A to Z all by himself.

In this series, we are going to play full-stack developers and are going to create our own web application. The theme that I chose is "project management platform". Please, feel free to use any theme you want and create your application. This is strongly advised since I'm not going to explain all the code here, only the interesting bits, and instead give you a link to access the full project for further reading.

Alright so at this point, a full-stack developer like yourself should know what app he/she wants to develop.

Choosing the right tools

I'll share a secret with you. There are no right tools. You can search the internet all day long and you'll find thousands of people giving their two cents on various technologies and how well they work with other technologies, but the truth is almost anything works with anything. So if you always wanted to use some frontend framework, but didn't know what's the best backend framework to pair it with, stop worrying and use whatever you like.

That being said, I'll now give you a list of tools that I choose for this project and I'll give you a short explanation on why I chose them:

  • Frontend framework: Vue.js
    I went with Vue because it's light on resources and allows me to develop faster than other frameworks I've tried.
  • CSS Preprocessor: Less
    A preprocessor is great because it allows you to define CSS variables and functions. I went with Less because, again, it's light and I had fewer problems with it than other preprocessors like Sass.
  • CSS Framework: UIkit
    I know that Bootstrap is by far the most popular among other developers, but the robustness of UIkit is something to behold. I chose UIkit because it has a ton of features, great documentation and it has the most useful modern stuff like sidebar navigation baked in.
  • Backend Framework: Laravel
    The Laravel documentation is one of the best I've ever seen and it's one damn powerful framework being able to do whatever you want on the server. There is nothing I was unable to do in the past using Laravel.
  • Database: PostgreSQL
    I know that MongoDB is all the rage nowadays but a relational database like PostgreSQL has its advantages of being able to enforce useful schema rules. Also in recent tests, PostgreSQL was shown to be faster than the likes of MongoDB.

Feel free to use whatever tools you like. Now, before we go even further, a full-stack developer should choose the tools he likes best to do his job.

sixth.png

Creating a landing website

A landing website is the first thing a new user is going to see when he's going to find your project so it should make a nice impression, give the new user some info on your project and provide him with a way to access your project.

For this website, I'll be using my frontend tools, namely Vue.js, Less, and UIkit. Let's see how we can get our hands on those tools.

First we'll need to grab Nodejs. On Linux distributions this task is simple, just run:

# On Ubuntu
sudo apt install nodejs

# On Fedora
sudo dnf install nodejs

On Windows, you can just download the installer from the website, make sure it's the LTS version, or if you want to experience some form of package management I'd recommend you take a look at Scoop. With scoop installed you can just open a PowerShell terminal and run:

# Git is a dependency for scoop
scoop install git

scoop install nodejs-lts

To install and use Vue and the rest we'll also need a node package manager. You can use npm if you are familiar with it, but I'll go with Yarn. To install yarn we can use:

# Ubuntu
sudo apt install yarn

# Fedora
sudo dnf install nodejs-yarn

# Windows
scoop install yarn

OK, you are doing wonderful, Mister/Miss Fullstack developer.

One last step is to grab our actual tools so let's do just that using yarn:

# Everybody
yarn global add @vue/cli

# Note: If Linux users have problems here, try running the above command with sudo

This will grab the latest version of Vue.js and will give us access to the command line program called vue which will help us create our project.

Creating the project for the landing site

First, find a place where you want to store your project, for me, that's in my Projects directory in the home folder. Then we need to open a terminal and navigate to that directory using the cd command. For example, since my Projects directory is in home, I would type:

# Everybody
cd Projects

Now we are going to create our project with:

# Everybody
vue create landing-site

# Note: You can name your project however you want

You will see the following dialog appear:
first.png

Please press the down arrow and enter to choose "Manually select features".

second.png

Check the features that I did by navigating to them with the arrows and using the Space key. After you did this, press Enter to continue.

Answer with n to the next question and press enter.

Now you choose your CSS pre-processor. I'll go ahead and choose Less.

third.png

In the next dialog I chose error prevention only:

fourth.png

Then Lint on save and save configs in package.json. Also, I answered with n when asked to save this as a preset for other projects.

It will take a couple of seconds to download everything and create your project so sit tight.

After it's done type cd landing-site or whatever name you used for your project and let's go ahead and install UIkit as this is the last missing piece from our toolbox.

# Everybody
yarn add -D webpack
yarn add -D uikit

Wait a minute... What's this webpack?

Webpack is a tool that will help us put all the different files from uikit, vuejs, etc. together. It will also be able to import images and other assets into our final project. In other words, it will compile our project into Html, CSS, and js files and will import our assets into them. Great, right?

Seeing your project in the browser

This is the last thing on our agenda for today. Let's see the fruits of our hard work.

# Everybody
yarn serve

Something similar will appear on your terminal

fifth.png

Copy whichever link you like and paste it in your browser. Tadaaa!!! There's your landing site made with vuejs. Though it's ugly and it's not yours, we'll get there in the next episode of Fullstack Wizard.


Until then, take care, stay tuned, and share your thoughts with me in the comments section. I'll see you around, dear full-stack developers.



0
0
0.000
4 comments
avatar

I love Vue js and will choose it over React or Angular anyday. Its much more easy to learn and maintain in my opinion.

0
0
0.000
avatar

Thanks for the input, I found Vue to be the fastest option both in terms of actual speed from the user's perspective, as well as how fast I can write the code.

I worked with Angular in the past at one of my jobs and it was pretty great, especially for a project that was relatively big and we were multiple devs working on it at the same time. I feel like it has much more structure than Vue has and typescript really was a breeze to work with.

There are some things that annoy me at Vue, like their documentation. It's really bad in my opinion, it simply doesn't suit my taste I guess. If you want to compare, I find the Laravel docs to be the best in the web development world.

As for React, I can't say much, Rxjs is not for me.

0
0
0.000
avatar

Yes, I dont like React because of Rxjs. VueJs is much more neat on this aspect. Using template, script and scoped css makes it really easy to make bunch of reusable components. Documents could use some work but not worst. It's easy to figure things out.
I've found it really easy to teach Vuejs to new developers or interns at work.

I agree that Angular really shines when lots of devs are working on a single project due to modular structures but personally dont prefer it as much.

0
0
0.000
avatar

Oh yeah, Vuejs is easy to understand with a great teacher, but if I'm alone at home face to face with the official docs, I find myself turning to google much more often than I'd like.

I'm really excited for Vue 3 when it'll land. The support for typescript and tree-shaking features are really welcomed.

0
0
0.000