Although the grammar for よう and みたい is slightly different their meaning is essentially the same. You can think of よう as the more formal version of みたい.
Let’s look at よう first. The kanji for よう is 様, one of the meanings of which is “appearance”. The structure for connecting nouns is:
【Noun】のような【Noun】
夢のような世界。 |
A dream-like world. |
Used in this way, よう is almost always written in hiragana.
家族のような関係を保つ。 |
Maintain a family-like relationship. |
To connect the structure with a verb we need to use the target particle.
【Noun】のように【Noun】
ロボットのように振る舞う。 |
Act like a robot. |
彼女はいつものように遅れてくるだろう。 |
I reckon she’ll be late as always. |
And よう can also be connected directly to the standard form of the verb.
勉強に夢中になっているようだね。 |
It seems like he’s absorbed in his studies, eh? |
彼女は友達がたくさんいるようです。 |
It seems she has a lot of friends. |
If we prefix よう with かの
彼は初めて見たかのように同じものを買ったりする。 |
He’ll buy the same thing again as if he’s just seen it for the first time. |
みたい appends itself to the standard form of verbs, nouns, and adjectives. Grammatically, it’s usage is the same as よう except that to connect it to a noun we do not need the possessive particle.
【Noun】みたいな【Noun】
女の子みたいな声で言う。 |
Say in a girl’s voice. |
あまり元気がないみたいだけど、何かあったの? |
You don’t look so good. Did something happen? |
それは嘘みたいだよね。 |
That sounds like a lie, right? |
子供みたいだよ。 |
You’re like a child. |