Dart and MongoDB Tutorial #3: Refactor our RESTful API into Controller classes

In the previous tutorial we wrote a RESTful api to interface with a MongoDB database. In this video we will learn how to refactor our solution into a PersonController class responsible to facilitating communication with our data resource.
Classes are usually the common way of encapsulating related logic in your software. They are useful for modularising the logic you write and Dart amkes this a breeze. I hope to demonstrate this a lot more in future articles.
At the end of this video you will be comfortable writing classes to handle HTTP requests and return the appropriate responses. This is a common pattern used by frameworks like Aqueduct and Angel.
About the author
I'm Jermaine, a Web Developer, Technical Writer and Programming Instructor. Having worked with various languages in the IT industry for over 13+ years now, I am here to share my knowledge on software development with the community.
Comments
Join the discussionNo comments yet. Be the first to comment.





