Articles Part 2


Recap: Visualizing the Layers

So let's recap what we've done this far. If you remember this diagram from the past.

In the ORM Layer we've added:

  • Editorials
  • Commentaries
  • Favorites
  • Tags

Along with that we matched each ORM Representation with their respective Response Object:

  • Editorials -> Articles
  • Commentaries -> Comments
  • Tags (we haven't used Tags, yet!)

Then we implemented the Articles Controller and filled the responsibility of each method.

In this section we'll together to implement the code in the Articles Repository Class.


I took a different approach with this section for a couple of reasons:

  • Repetitiveness - practice makes perfect. Each time you created a method you had the opportunity to examine that particular unit of work. Keep in mind that each method is stand alone and should be able to produce results.

  • Heavy Lifting - all the heavy lifting is performed in the Repository Class. I wanted to take some time explain every line of code as it pertains to Articles. Remember, Articles has the most methods. I wouldn't say it's complicated, but it does give me the opportunity to really bring home the meaning of how each method is written.

We have a full plate in this next section… Let's get started!


I finished! On to the next chapter