Coder Social home page Coder Social logo

Comments (3)

zpqrtbnk avatar zpqrtbnk commented on August 17, 2024

Going back to the Roslyn compiler is not enough. The IPublishedContentModelsFactory is initialized when the app starts, and at that time the "live" types have not been generated, so the factory ignores them. => Live models just don't work.

We need a way to register types, and re-register all types, in the factory after resolution has been frozen. Means we need to modify the factory, which is part of Umbraco. => Live models won't work in 7.1.4 but might work in 7.1.5 if I can manage to fix them.

from modelsbuilder.original.

zpqrtbnk avatar zpqrtbnk commented on August 17, 2024

But but but... the models returned by the Factory are expected to be stateless... and what happens if the factory switches from CLR type "NewsItem" to a different CLR type "NewsItem" right in the middle of a view? This is going to lead to inconsistencies.

/me think that "pure live models" cannot work. Live-rebuilding views without restarting the app is fine, because it's just the view. Live-rebuilding models is... not so nice because models are used in the cache, at the very core of Umbraco, where they are not expected to change.

Need to think about it but might very well kill "pure live" especially now that we have live App_Code or live Dll.

from modelsbuilder.original.

zpqrtbnk avatar zpqrtbnk commented on August 17, 2024

RIP pure LiveModels

from modelsbuilder.original.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.