We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32963
    • 1,732 Posts

    Hello Everyone,

    I was recently thinking about adding some new functionality to the NewListing Snippet. To do this I would have to either make duplicate the snippet or modify the NewsListing snippet itself. If I choose to modify it directly then whenever new updates are posted I my existing changes will be overwritten! If I duplicate it then I will not get those new update!

    I thought how best to handle this situation in x9.5 and came up with a simple bottom-up extension (inheritance) design. By this I mean it will be possible to create a new Widget that can be made to extend an existing Widget as shown below:

    Widget3 <- {extends} Widget2 <- {extends} Widget1

    In the above Widget3 will have all the functions of Widget2 which has all the functions of Widget1. Widget3 can be made to overwrite functions and/or events from Widget2, while Widget2 can be made to overwrite functions and/or events from Widget1.

    All this is done graphically and dynamically no need to create a class object or to copy up any files to the system. The developer just selects the name of the widget that he or she wants to extend and then add new functions and events if needed.


    What do you think?
      xWisdom
      www.xwisdomhtml.com
      The fear of the Lord is the beginning of wisdom:
      MODx Co-Founder - Create and do more with less.
      • 25663 MODX Staff
      • 12,272 Posts
      Again, sounds like a winner to me!
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 1764
        • 680 Posts
        Sounds very cool. I’m a bit curous to see how it will actually work though. I’d love to see even some very rough code when you have it.
          • 32963
          • 1,732 Posts
          Quote from: aNoble at Jan 03, 2006, 08:29 AM

          Sounds very cool. I’m a bit curous to see how it will actually work though. I’d love to see even some very rough code when you have it.

          It will be very straight forward to the point where you only have to select the widget you need to extend and the system will take care of everything else.

          Btw, how’s the snippet+plugin merge coming along?
            xWisdom
            www.xwisdomhtml.com
            The fear of the Lord is the beginning of wisdom:
            MODx Co-Founder - Create and do more with less.
            • 25663 MODX Staff
            • 12,272 Posts
            Does it make sense for Adam or anyone to work on the snippet+plugin merge with all the other core changes you and Jason both are working on?
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 32963
              • 1,732 Posts
              Quote from: rthrash at Jan 03, 2006, 11:19 AM

              Does it make sense for Adam or anyone to work on the snippet+plugin merge with all the other core changes you and Jason both are working on?

              I think the idea was to have the merge work with the  exiting 0.9.1 layout, correct?

              Once it’s working in 0.9.1 the format can be convert to work with the newer template engine.

              The same should go for the Manager User + Web user merge or am I missing something?

                xWisdom
                www.xwisdomhtml.com
                The fear of the Lord is the beginning of wisdom:
                MODx Co-Founder - Create and do more with less.
                • 1764
                • 680 Posts
                Quote from: xwisdom at Jan 03, 2006, 10:59 AM

                Btw, how’s the snippet+plugin merge coming along?

                From what Jason had said I think he’s already working with the merge a bit with the Propel stuff, so I’ve been holding off on it for a while.

                I guess it all depends on what our roadmap is looking like. Do we want to shoot for using Propel in the next release or later on? And do we want to develop the current version of MODx and a PHP5 Propel version side-by-side. If we want to merge the widgets pre-propel then I can get started on that again, otherwise it’s probably best to wait.

                  • 25663 MODX Staff
                  • 12,272 Posts
                  Adam,

                  I think there will be more than a few months to get a Propel version up to full speed including convertors, documentation, etc... probably 6-12 in reallity. With that in mind, I think we should continue with the existing code base and have parallel development efforts. The current code base probably has quite a lot of life left in it while Jason focuses on "next gen stuff".

                  I would think/hope it’d be straightforward (well maybe a bit of effort, but entirely doable) to port any stuff on the current codebase to the Propelerhead methods. wink
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 1764
                    • 680 Posts
                    I’ll get started working on the merge again then. It’s already partially done and I’ve had plenty of time to think though how exactly I think it should be done. So I hope that it won’t take me too long.

                    Initially I’ll be focusing on just getting everything working. Then some improvements to the interface can come later. For example: syntax highlighting, AJAX saving (I hate having to scroll back to where I was after each save), improvements to the parameter editor, possible a preview for output widgets (snippets) and improvements to the events page (I’d like to see some descriptions and such)

                    Also, It’d be cool to have a way for widgets to register their own events.

                    BTW, what are the plans for the next release? Will it be 0.9.2 or 0.9.5? Personally I’d like to see it be 0.9.5 with a good bit of cleanup to the manager interfaces and a good bit or renaming of various things and then focus on bugfixes and such for a 1.0 release not to long after and then call Jason and Raymond’s version MODx 2.0 or Tattoo 1.0.
                      • 25663 MODX Staff
                      • 12,272 Posts
                      I think we can get a basic "get interntational installs working" and a few other addtions out as 0.9.2.

                      Then 0.9.5 could contain the mergers, which will also hopefully include users... that’s sorely needed probably more than snippets/plugins.
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me