A miraculous experience that can be completed in just 30 minutes, creating your own blog service
— Creating a website can start so beautifully and quickly like this
People who are learning programming
always have vague dreams.
"Someday, I want to create my own website."
"If others could access the content I created..."
"Can I also create a blog?"
However, most people stop thinking like this.
Where should I start from?
Should I start with HTML?
How do I connect to the database?
How do I run the server?
What is backend and frontend?
The web looks like a huge mountain,
and it feels like it will take years to climb to the top.
But Rails
replaces all these obstacles with just one message.
"Let's just create it.
I'll handle the difficult parts for you."
Step 1: rails new — The heart of the service is born
You type this in the terminal.
rails new blog
The moment you press Enter,
the computer, as if it had been waiting for a long time,
spits out numerous files.
model, view, controller, config, routes...
Words you've only seen in books
are generated all at once.
Just 2 seconds ago, it was an empty folder,
but now the framework of the web service is right in front of you.
Rails says,
"This is how the web starts.
Now fill it with your own world."
Step 2: rails server — The screen comes alive
The next command is just one line.
rails server
And in the browser,
try entering http://localhost:3000.
The screen is very simple, but
it's thrilling because of its simplicity.
The service you created is alive.
A URL is created,
the browser renders it,
and for the first time, the web space becomes "yours."
This experience
is something that even those who have been coding for a long time
will never forget.
The moment the server starts running,
it truly feels like you've obtained the skill to change the world.
Step 3: scaffold — Blog feature completed in just 30 seconds
The most basic feature that every web service has.
It's CRUD —
Create, Read, Update, Delete.
Let's create this as a
blog post feature.
In Rails, it's just one line like this.
rails generate scaffold Post title:string body:text
rails db:migrate
Then enter this in the address bar.
http://localhost:3000/posts
At that moment, you will be amazed.
List of posts
Post creation page
Post reading page
Post editing page
Post delete button
Form automatically connected to the database
URL routing all set up
All of this
is created without touching a single line of code.
You will say in disbelief,
"Wait...
Did I just
create a blog service?"
Yes.
That's right.
And Rails quietly says,
"Now,
customize it as you wish
like coloring."
Step 4: Write a post — The heart of the web beats
Now, click on "New Post" on the Posts page.
Enter a title,
write the body,
and click "Create Post."
Then,
a post that didn't exist anywhere in the world
enters your web service.
The post is saved in the database,
displayed on the screen,
has a URL,
and becomes a part of the service you created.
At that moment,
you take a deep breath.
"Ah...
The post I wrote
is actually being saved and rendered in the service I created."
This is not just about a page being created.
It's an act of creation.
Step 5: All this structure is now connected with Ruby you've learned so far
This is not a miracle.
It's not something that only happens because Rails is special.
Everything you've learned so far,
Loops
Conditions
Methods
Classes
Modules
Sequencing
Symmetrical structure
Data patterns
all of this
is simply transformed into the structure of the web within Rails.
URL → Controller method (action)
Action → Model method call
Model → DB data (class instance)
View → Output (HTML instead of puts)
Routing → Sequenced data flow
Scaffold → Symmetrical CRUD structure
In other words,
The Ruby you've learned so far
is not just a skill for console examples,
but a language to create the vast structure of the web.
Realizing this fact
will make the reader's heart tremble.
**Step 6: Now you have become someone who "creates the web"
In just a short 30 minutes,
you have actually
Created a web service
Run that service
Created a database
Implemented full CRUD functionality
Rendered the screen
Accessed the service via URL
You have just become
someone who has probably, for the first time in your life,
created the web.
This is not just a simple achievement,
but an emotion that you will never forget in your life.
Many people who start programming
live as developers for ten, twenty years
because of this first excitement.
And now,
that excitement has come to you as well.
Finally: You are already someone who can create web services
Rails tells you
that you will feel like this.
"Now, let's create what you want.
Whether it's a blog, a shopping mall, an SNS,
the principles are all the same.
The person who created the first page
can create any page."
And that is the truth.
In just 30 minutes today,
you have directly created a structure called the web.
Now you can create anything.
The next step is simply
how far your imagination can go.