Nominalization is making another part of speech--verbs, adjectives, phrases, abstract nouns, etc.--noun-like. Nominalization is mainly done with the help of 形式名詞 (nominal/dummy nouns).
The nominalizers の and こと are both used to nominalize phrases to make them noun-like to an extent. At the most basic understanding, the main difference between the two is that the former is more subjective and the latter is more objective. This small yet important difference places a major role in how they are chosen and how they fit with other expressions.
An objective perspective is one that is not influenced by personal emotions whereas a subject perspective is one that does involve emotion. こと literally means "matter/circumstance," and so it is used in grammatical situations where one needs to nominalize verbal/adjectival expressions and concretely talk about them as entities. For instance, if you want to talk about "new developments" or "dancing," こと would appear.
However, a more subjective circumstance will most likely call for の. It is a dummy noun, meaning it doesn't have all the freedoms of a true noun. That's why we see it in grammar patterns like のだ. When there is no need to portray an objective stance, の will also be the appropriate choice.
Orthography Note: こと is frequently spelled as 事.
Examples of こと & の
Seeing is believing.
Grammar Note: Whereas の is a dummy noun, こと is a true noun. Although Ex. 1 is a rather subjective thing to say, there is a sense of certainty that can be felt with the use of こと. However, at a more basic understanding of grammar,the use of こと is also necessary to set up the grammatical parallelism and comparison being made between "seeing" and "believing." These entities need to be expressed with true nouns, which is something that only こと can make possible.
Is this the first time you two have met?
I just noticed that Canada is cold.
I just realized that Canada is cold enough for penguins to even live.
Objectivity/subjectivity, although often a part of the equation, may not be the most important thing at work. In the following sentences, の just acts as a dummy noun for something else, but こと is more concrete, referring specifically to a situation. However, one can say that this is related to subjectivity being related to abstractness and objectivity being related to concreteness.
What sort of thing did you listen to?
What sort of thing did you hear/ask?
In the first sentence の replaces some noun such as 曲. In the second, こと refers to a situation (状態). The response could be something like the following.
I heard/asked that/whether he went to Kyoto.
Noun + のこと
At a basic understanding, there are two different yet intertwined functions of こと. The first is to focus on a certain action or state as the object of attention. The other is to expand the scope of something to encompass the situation surrounding it. In this latter sense, it abstracts. At face value, this seems like the opposite of focusing. However, this isn't really the case.
When こと attaches itself to verbs and adjectives, which in both cases could involve an entire sentence, こと packs up these expressions into a noun phrase, making it refer to the action/state at hand. This is the focusing aspect. When it follows a noun, however, it's following something that is already concrete to some extent. By using こと, which literally means "matter/circumstance," you're no longer literally talking about the physical entity at hand. Rather, you're talking about its essence, which is truly the matter at hand.
I remember that incident well.
There are some people who pronounce "piza" as "pittsā."
This sentence is talking about the present.
Who are you referring to?
We still do not understand this great planet of ours.
How much do you know about yourself?
In this example, the speaker remembers a lot about the incident. If のこと were omitted, the speaker would still remember that the incident happened, but it wouldn't necessarily sound that he/she knows much about the incident.
Do you like me?
In this example, the speaker is asking the listener not just that the listener likes "him" in the mere sense of physical attraction. The speaker is asking if that individual likes him at a personal level as well. In the case of 好きだ and 嫌いだ, the use of のこと also helps solve semantic ambiguity between two possible interpretations. If the sentence were just 僕が好き？, it would normally be interpreted as "do you like me?" but it could also mean "Do I like...?" depending on the context. The use of のこと, thus, helps bring clarity to what is the object at hand.
I didn't know that he is a famous musician.
15. あたし、そんなことはいわんかったわ。(Feminine; dialectical)
I didn't say anything like that!
16. もう一つ君に尋ねたいことがある。 (Male)
There's another thing I'd like to ask you about.
Speech Note: To a teacher say something more respectful like 先生、もう一つ伺いたいことがあるんですけれども（よろしいですか）。
Could you tell me what you saw?
The couple stopped dancing the samba together.
It seems that going for a walk every day is very good for your health.
I've known that she came home late last night.
You took her at her word, didn't you?
Is anything bothering you?
Breathing fresh air is wonderful.
It sure is wise to think about the future?
I saw the suspect come out flustered from the room.
It's not good to come to class without having done our homework.
I was born and raised in New York.
Usage Note: It may be the case that の is used in place of a thing, person, or place. In this case の refers to the city that the speaker was raised in.
It took a lot of time to find her phone number.
Since I had given up singing, being able to debut by chance was very delightful.
Receiving an education is important.
You can't doubt that there are police here now.
No matter what they say, I don't think that Japan was able to become an economic power thanks to America.
It is difficult to earn money by simple labor.
I was born in China, but my nationality is Indonesian.
It's evident that we clearly look over the information once more.
Phrase Note: 目を通す ＝ To look/scan over.
もの nominalizes something to show that something is undoubtedly true.
Oil floats on water.
I want to become a puppy!
I used to swim in the sea on Fridays, you know.
Phrase Note: よく…たものだ ＝ Used to.
Contraction Note: もの may be seen colloquially as もん.
Origin Note: もの comes from the noun 物.
もの can be anything. This もの can be in particle constructions like above. 物 is a tangible and perhaps living thing. It can even be a spiritual force. It's in many set expressions. It can even be used as a prefix. 者 refers to a person humbly or in a condescending manner.
To be possessed by an evil spirit.
People may be offended by the way you speak.
In no more than a few minutes.
Least said, soonest mended.
First come, first served.