Which came first the Didache or the Gospels?

didache coptic manuscript

The Didache definitely has common material with the gospel of Matthew. The Didache presents this as the teaching of the apostles; Matthew presents this as the teaching of Jesus. Is this a significant difference? Surely the followers of Jesus would follow Jesus, and his teaching, if they are faithful. The Didache does say the teaching of the Lord through the apostles. It also talks about the Lord giving commands such as “Do not give what is holy to the dogs (9:5).”

One point – he does mention Bishops and Deacons (15:1). That surely is not earliest Christianity, as these positions come later.

What about Christology – Matthew presents Jesus as Emmanuel, God with us. The Didache also says “For where his lordship is discussed, there the Lord himself is (4:1).” Similar to “where two or three are gathered in my name… “. It is also interesting that commands from the Torah and from Jesus are put all together and called the commandments of the Lord. Sometimes it is clear that the teaching of the Lord refers to Jesus, but sometimes it seems to be from the Old Testament, e.g. the quotation of Malachi in 14:3.