In ace attorney in what order are the games?

By this I mean what order did the games take place etc. story wise (for example if I recall trials and tribulations took place before the main games even though the main games were released before trials and tribulations was).
1 answer 1