Good evening. I will continue to learn and update even on Saturdays.
I went to a bookstore today and bought a book. "Ruby on Rails Quick Learning Practice Guide" I want to do it steadily.
・ REST ・ Ruby template engine slim
These are the above two. It's a completely different theme, but if you don't understand it well I'm thinking about it, so I'll write it.
Since I started doing Rails, "This design is RESTful", "REST-like" I have come to often see the word in books. But when I thought about it, I thought I didn't really understand REST. I learned using Saturday.
A web architecture style that combines the following six
The architectural style that combines these six is called REST. By the way, regarding stateless servers, cookies are From a REST point of view, it's like the wrong way to extend HTTP. It saves state and is not stateless.
But that's not necessarily a mistake It's important to be aware of REST and create applications with the minimum necessary extensions.
When I read a Rails book and said about REST, It was a unified interface. Is it possible to process with an appropriate interface? Where to say. Each interface has a role, so I had to understand it and use it.
That's it for REST! !! (It has become quite long) I thought that I would understand more if I was conscious while making an application.
slim slim is a template engine made by Ruby. You can write html more concisely and smartly.
I only knew the file format of erb, so I will summarize it.
・ I don't need <> ・ <% =%> → = ・ <%%> →- ・ Comment → / ・ Id designation → # ・ Class designation →.
All characters after | are recognized as text
p |Text text text Text text text p | Text text text Text text text
Conditional expressions can be omitted
- if cuser.nil? li new registration - else li login
I tried to summarize only the basic part. I found out by looking it up, but it seems that there is surprisingly little to remember When I first saw it, it felt like something was wrong, I felt like it would be okay once I got used to it.
so, that's it for today.
** 97 days to become a full-fledged engineer **