Highlighted

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

Participant ,
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

302

Likes

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

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

Participant ,
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

303

Likes

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
May 06, 2018 0

Have something to add?

Join the conversation