• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Looking for an Example of a Repository Pattern in CFML without using ORM

Contributor ,
May 06, 2018 May 06, 2018

Copy link to clipboard

Copied

Based on my reading, the Repository pattern is frequently used to create an abstraction layer between an application's business logic/entities and the data/persistence layers (i.e. the database).  However, most of the examples I've seen online on how to implement these patterns are in C#, Java, or other languages.  Additionally, they always seem to be using some type of ORM like Entity Framework.

[caption width="543" align="alignnone"]Repository pattern diagram How a repository works. Credit: Microsoft[/caption]


 I'd like to learn more about the Repository pattern and evaluate how I can utilize them in my OOP CFML app development.  I'd also like to see examples of how a repository might be used in CFML without an ORM.  I wonder if I would need to create my own "data mapping object" which would help translate my entities into the individual data points before sending them off to my DAO's for persistence.  

Does anyone have any experience with this subject and/or have links or examples of how to implement these patterns in CFML?  I feel like I'm a bit stuck on how to proceed here.

Views

432

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation