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
    Hi,

    I’ve been thinking about think real hard and I can’t get any sleep and I’m still under the flu (yeah I know shouldn’t but you know...).

    I don’t think we should merge Widgets (was Snippets) and Plugins. IMO plugins are little programs that can be inserted inside the core architecture to provide additional functionality to the system. Widgets are nit plugins IMO.

    How I see it is that Widgets (Components or Controls) will be exposed to a few events but not system events. These will replace snippets and add newer functionality to the page. (e.g. Buttons, Tabs, DataGrids, DataSource, etc)

    Plugins on the other hand will be exposed to custom and system events but cannot directly be added to a web page. They are like DLLs/TLB or system libraries. They can how render an interface onto a page via the use of placeholders.


    Just me 2 cents
      xWisdom
      www.xwisdomhtml.com
      The fear of the Lord is the beginning of wisdom:
      MODx Co-Founder - Create and do more with less.
      • 4018
      • 1,131 Posts
      I agree with you on that. When the idea was brought up on merging plugins and snippets into ’widgets’, I just didn’t see how it could work from a development standpoint. It just seemed like a nightmare to merge it altogether. At any rate, I think plugins can remain as plugins...pretty simple concept. Though one thing I think we need to revisit is to look at a few flowcharts of what all the different parts are in MODx currently (Components, Snippets, Plugins, etc.), how they all fit together, and what the terminology is. Then, we need to redo the flowchart to reflect all the changes we want to make all the while keeping in mind on how it will work within the code itself. I think if we get the flowcharts going then it’ll all make alot more sense and we can decide once and for all if its realistic or not from a coding point of view. I really think this is a pretty important step and one that will really help alot with the roadmap. What the enduser sees and how they interact with the API, manager, and such will be impacted greatly on how the code itself is implemented. Casepoint, if it doesn’t make sense to merge plugins and widgets (snippets) together in the code then it makes perfect sense not to merge them within the manager.

      I’ll take your 2 cents and raise ya 4! wink
        Jeff Whitfield

        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
        • 1764
        • 680 Posts
        Oh oh, I see another long thread coming smiley

        I can see your point and honestly I’ve always thougt it would be better to merge modules and plugins together and chunks and TVs together. Possible even TVs, chunks and snippets.

        Modules and plugins are both used to extend the manager and it seems that they often go hand-in-hand.

        Chunks are really nothing more than very watered down, global TVs. I think it would be great to be able have all of the power of TVs in a chunk and I think it would be a very simple change too.
          • 25663 MODX Staff
          • 12,272 Posts
          Believe it or not, I can go for this. Just as long as we loose a few things! :p

          Actually, chunks + templates (templates) make sense to me.

          Plugins + modules (pick a name) also makes lots of sense.

          TVs/content could be variables or content fields; in that light I see how Snippets could be merged into them (different variable types or functions). Snippets have always seemed as chunks with logic in them to me, though.

          And finally, to me Widgets are things that transform things, and can be attached to ANY of the above items.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 22303 MODX Staff
            • 10,725 Posts
            Yeah, I’m not going to say too much here, to keep the thread reasonable, other than in Tattoo, there will be only two major classes of objects, so if we want to keep MODx and what I’m doing in tune, we need to consider what is happening to the data structures in this way; there is no reason this same structure would not work for MODx in a PHP4/5-MySQL only setting:

            Resources -- these are equivalent to the idea of a web resource, identified with a uniform resource locator (URL). To start off, there are only two types of Resources that can be created, a PageResource and a LinkResource (equivalent to the site_content records)

            Elements -- these are any class of object that make up the definition of a Resource and are broken down as follows in the object model...

            • Element: a simple element type, equivalent to a template or a chunk, and consisting of simple HTML content and/or ElementTags (see below)
            • ScriptElement extends Element: a simple element type that consists of script content (equivalent to Snippet)
            • PluginElement extends ScriptElement: these are elements based on ScriptElements, that offer the additional behaviors associated with Plugins (e.g. triggering based on system or custom events); this is in no way limited to the manager context, since moving forward, the manager and front-end interfaces will be defined and constructed in the same manner
            • ModuleElement extends ScriptElement: this may or may not be needed; I’m trying to justify simply making ModuleElements equivalent to ScriptElements; any thoughts on why we would need any distinction between these, especially if we have a separate package installation mechanism that allowed any combination of resources and/or elements to be grouped and packaged as a set of related site components
            • ContentElement extends Element: similarly, trying to justify the distinction between chunks/templates/TV’s where ContentElement would represent the same thing as TV’s do currently, but I think I may be able to treat any Element in the manner of a TV

            In this model, all Elements can be related by GUID as the various Module elements would be to allow the concept of installation packages, and all Elements can define custom input and output (aka transform) classes in the way that Display Widgets are applied to TV’s now. Finally, each Element type can define how it processes it’s content, including handling processing of ElementTags within the content or even nested in the tags.

            New Elements and Resources could easily be defined in this sturcture, extending the capabilities of the system greatly. For instance, consider an AjaxResource setup for the purpose of handling Ajax requests that require data from our API’s, or advanced DocumentResources that might allow the storage of images or other complex document formats in the databases.

            I do not see any relationship between Plugins and Modules, and do not agree they are ONLY manager context related. Modules and Snippets are the same in the current system for their respective contexts in most aspects, especially if you remove the dependent relationships capabilities in Modules and externalize those as a package installation system that can be applied to any set of related Resources and/or Elements.

            Now, if these structures are going to be rejected, I really need to know now. In that case I will make alternative plans for developing and building my OO version of MODx as a project independent of MODx and Tattoo. I see no reason to even keep these related if we can not come up with a common and consistent vision for the development paths.
              • 1764
              • 680 Posts
              Quote from: OpenGeek at Jan 21, 2006, 03:01 PM

              Yeah, I’m not going to say too much here.

              You sure about that smiley

              Jason, if I’m understanding you correctly then everything you’ve mentioned sounds pretty good.

              We spend a lot of time going through a lot of details as to what exactly MODx is going to look like in the future. Maybe what we need to do is decide on a core development philosophy that we can all agree on that will govern how we do things. That way we should all have a pretty good idea of how we should be doing things without having to discuss every new feature.

              Something similar to the Unix Philosophy (http://www.faqs.org/docs/artu/ch01s06.html).

              I definitely tend to lean much more toward the Unix Philosophy myself. Keep it small, simple, modular and reuseable. I tend to think that improving something has a lot more to do with taking away than it does with adding on. One of my favorite quotes is


              Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
              Antoine de Saint-Exupery
              French writer (1900 - 1944)

              So boiling everything down to Elements that would all be handled in a standard way with as much reuseable code as possible sounds like a great idea to me.
                • 32963
                • 1,732 Posts
                Quote from: OpenGeek at Jan 21, 2006, 03:01 PM

                Now, if these structures are going to be rejected, I really need to know now.  In that case I will make alternative plans for developing and building my OO version of MODx as a project independent of MODx and Tattoo.  I see no reason to even keep these related if we can not come up with a common and consistent vision for the development paths.

                IMO I think the team should stick with your OO plans for MODx as I think most on the developers here are OO based. It would be best for the core to be able to use OO design to enhance Tattoo.

                I’m not from a OO strict background and therefore might not be taking such a path. I will be creating a separate path and a website for work that I’ll be doing on my version of MODx so as to not create problems and confusion for the core team.

                I will however continue to add features, fixes and comments as plans are unfolded. A mature project requires a mature plan and design.

                  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
                  In one corner we have Jason threatening to run away with his code if we dont’ acquiesce. In the other, Raymond who just did. What a great day. Guys, this sucks.

                  more to come soon...
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 22303 MODX Staff
                    • 10,725 Posts
                    For whatever it’s worth guys, I was threatening nothing, it was simply an offer if my ideas were being rejected, which to me, it appeared they were, since I had already posted this stuff previously and it was apparently ignored in favor of other ideas, plain and simple; I’m certainly not going to get my feelings hurt over the issue one way or the other...so huh
                      • 32963
                      • 1,732 Posts
                      I would like for everyone’s ideas to be realized and given a try.

                      While that’s going on I’ll just simply work on the features that I need in my own project without interfering with the mainstream design and ideas.

                        xWisdom
                        www.xwisdomhtml.com
                        The fear of the Lord is the beginning of wisdom:
                        MODx Co-Founder - Create and do more with less.