Tutorial: Creating a Blog in Laravel from scratch – part 2 – Produce Vision.

Welcome to part 2 of Tutorial on how to create a simple blog using Laravel PHP Framework!

If you haven’t seen part 1, here it is : Creating a blog Tutorial part 1

Also, sign up for my Laravel Development course on Udemy!

Ok, now onto the tutorial:

I don’t like majority of tutorials on the web. Often they just show you what path the author made to get somewhere. They rarely teach the thinking process behind the actual steps. It is easy to just say: “do this, do that, and BOOM! You’re done!”, but the person seeing just the results does not know why the choices were made and might be left confused. That’s why here I will be doing things differently when I explain how to create an application with Laravel. I will try to explain as much thinking behind the choices I made so that you could become critical and efficient when you design your applications.

First, when creating even such a simple application as a three page blog, it is important to have an idea and a plan before even starting to write any code. There are a lot of questions that need to be tackled before coding, such as : how the application will look, which actions can it take and which data it will operate with, what are good practices out there for this kind of application, etc.

Before I sat down to write any code for the blog application, I first sketched things on paper – this is called wireframing. Wireframing is very helpful when you are designing an application. It gives a visual idea of how to position things on each page, and what elements will be used on each page – forms, labels, buttons, etc. I provide you with an example sketch I did on a Sticky and the one I would refer to while I was building the blog application.

I drew three views of the blog – the index page with all posts, the login page and the page where the user would create new posts. I drew the views having in mind CSS/HTML framework that I use for quick applications – Twitter Bootstrap (http://twitter.github.com/bootstrap/), it makes great use of the grid-based layout and speeds up development.

This was an extremely helpful first step because when I build a layout and views for my application I already know where things should go and how they will be placed. I encourage you to sketch your web apps before you get to coding them. Sometimes going through many iterations on paper can bring clarity to your project.

When the sketches were done, I needed to think what data will my application use and how that data is related to other data in the application, which brings us to the next part of the tutorial where we will learn how to derive a data model and plan our database as a part of building a blog.

Stay tuned for the next part!

Follow me on Twitter to be up to date on what I publish!

Liked it? Take a second to support Maks Surguy on Patreon!
Become a patron at Patreon!

You may also like

4 comments

Leave a comment