Abstraction vs Core #13595
Replies: 6 comments
-
Use abstraction when you have abstract classes or interfaces or models used in interfaces/abstract classes that might have implementation span across modules. Use core for default implementations, models, services belong to one module. Core can also be used by more than one modules |
Beta Was this translation helpful? Give feedback.
-
Thanks @ns8482e |
Beta Was this translation helpful? Give feedback.
-
Yes there is no such documentation as guided tour like it was in for Orchard CMS. However here's a starting point on how to create a cms module https://docs.orchardcore.net/en/latest/docs/getting-started/templates/#create-a-new-cms-module |
Beta Was this translation helpful? Give feedback.
-
Ok, thanks, that's not a lot. |
Beta Was this translation helpful? Give feedback.
-
@johndcollins you can have a look to OC source or OCC source there are some abstractions and core APIs that might make it clear for you to distinguish between both FYI ASP.NET Core APIs are using the same principle |
Beta Was this translation helpful? Give feedback.
-
My understanding is Orchard core source is following clean architecture style pattern where code for functional module is defined generally (not always) between Core,Infrastructure, Module. Core Infrastructure UI/Module Abstractions Some libraries require multiple implementations targeting different scenarios hence, some related interfaces are defined in abstractions and have multiple core implementation. You do not require to define abstractions in your module if you are only anticipating single implementation for your abstract/interfaces then you can include them in Core. I hope it clarifies some between core and abstractions and when to define them for your module. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm looking at building my own module.
I'm looking at existing modules for guidance and I'm a little confused about the Abstractions and Core projects. Sometimes they seem to be used differently. Some have models in abstractions and some have them in cores, what's the thought around these two types?
Beta Was this translation helpful? Give feedback.
All reactions