How do models perform their magic in Opti?

Vote:
 

I admitedly don't spend a lot of time in our CMS code making changes, so when I do get in there sometimes it all seems like magic!

I was hoping someone could explain in simple terms how Opti is pulling off this trick that I can add a new property into this class and then see it pop up right away as a choice on the property editors in the CMS?

More-over, when I make a change like this into production, should I be careful about making sure I go to a maintainence page or antyhign? Seems like this would be a lot of database updates?

#329827
Sep 13, 2024 17:34
Vote:
 

In layman terms, during start up the cms content system will scan content types (using reflection to find classes decorated with ContentType attribute), then build the property definitions from the class property. If a property is new then it will get saved to database.

When a content gets displayed the properties will be displayed using their attributes. If none attribute is specified then default widget will be used, otherwise that widget will be used

#330024
Sep 15, 2024 7:59
Vote:
 

Thanks Quan, I think that gets me there. As I mentioned, I spend little time in this part of our backend so I all seems magical!

#330119
Sep 17, 2024 18:02
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.