Giter VIP home page Giter VIP logo

Comments (11)

leekelleher avatar leekelleher commented on July 28, 2024

We only compiled against v7.1.4 since that's when the IPublishedContentModelFactory was introduced. To be honest, I'm less convinced that it's a good fit for Ditto - I've considered dropping support for it, (or maybe move to a separate assembly?)

I have no problem with v6 support - it is totally possible. Just that I didn't want the responsibility of testing it (lazy me 😧). My current projects are v7.1+, so was easier for me to test against.

re: Ancestors<T> - this isn't used in Ditto, is it?

from umbraco-ditto.

JimBobSquarePants avatar JimBobSquarePants commented on July 28, 2024

I'm happy to test it. I use it all the time. 😄

We can keep it in a separate project and include a lot of the files as references from the main project. I'll open a branch of develop to do so.

Dropping the IPublishedContentModelFactory support? I like it the automation it brings to the process. If you use Ancestors<T> etc with the factory enabled I'm sure it automatically maps to your type. I'd have to double check some of my code to be sure.

from umbraco-ditto.

leekelleher avatar leekelleher commented on July 28, 2024

IPublishedContentModelFactory could be moved to a separate assembly? (a la Ditto.PublishedContentModelFactory - gawd that's a mouthful!)

Ditto doesn't use Ancestors<T> verbatim - the model-factory is called whenever the Umbraco core requests an IPublishedContent node (internally it checks if a factory is set, then calls CreateModel()).

from umbraco-ditto.

leekelleher avatar leekelleher commented on July 28, 2024

With v6 support... I'm wondering how far back can we support? (I think IPublishedContent was introduced in v4.10.) or is that too far?

from umbraco-ditto.

leekelleher avatar leekelleher commented on July 28, 2024

So Ditto could have 2 assemblies:

  • Our.Umbraco.Ditto.dll - supports v4/v6+
  • Our.Umbraco.Ditto.PublishedContentModelFactory.dll or Our.Umbraco.Ditto.v7.dll

from umbraco-ditto.

JimBobSquarePants avatar JimBobSquarePants commented on July 28, 2024

Yeah sorry. I didn't mean within Ditto. I meant once you had converted your type.

I've never really understood the purpose of Ancestors<T> etc without a model factory since any casting it does internally isn't going to map property values anyway without it.

I guess we could start with v6 and then see how far back it works. I wouldn't want to make too much effort trying to make it work in v4. It should just be a couple of tweaks to the converters I've already written for the most part.

I think the following assemblies would be best named.

  • Our.Umbraco.Ditto.dll
  • Our.Umbraco.Ditto.ModelFactory.dll

As we don't really want version numbers in the names plus that is a mouthful!

from umbraco-ditto.

leekelleher avatar leekelleher commented on July 28, 2024

As we don't really want version numbers in the names plus that is a mouthful!

I agree. Our.Umbraco.Ditto.ModelFactory.dll is good with me! 💯

from umbraco-ditto.

JimBobSquarePants avatar JimBobSquarePants commented on July 28, 2024

Win! I'll make a start asap. 🤘

from umbraco-ditto.

leekelleher avatar leekelleher commented on July 28, 2024

@JimBobSquarePants Just checking if you've made a start with moving the model-factory to a separate project? If not, I can look at that this afternoon.

(I'll leave the rest of the v6 compat stuff for you 😈)

from umbraco-ditto.

JimBobSquarePants avatar JimBobSquarePants commented on July 28, 2024

Hehehe... Not yet, so fire ahead. Most of it is already written so it should be a doddle.

from umbraco-ditto.

leekelleher avatar leekelleher commented on July 28, 2024

Closing issue, resolved in PR #32

from umbraco-ditto.

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.