Developers SDK

    • 75 posts
    January 29, 2018 11:27 AM EST

    Just downloaded the trial version and starting to screw a bit around with it...

    The developers SDK, for instance:

    "Modules are used for full module features (such as Albums or Chat).
    Themes are CSS styles and image-sets for changing the site aesthetics. You would use packages instead of regular theme exports for versioning your theme.
    Widgets are more-abbreviated display items that do not need full Module features or complexity.
    Libraries are sets of classes that will be utilized by other widgets or modules. This is usually reserved for custom libraries that you did not write but want to utilize.
    Externals are things like CSS, Javascript, or Image sets that do not require any server-side processing."

    These above are the explanations on the different type of packages that i may want to build.

    Please some clarifications:

    - Modules:

    I assume that when we look at the market place for plugins what we are actually looking at is "modules", i.e. each plugin is in fact a module - correct?

    - Widget:

    What if my customization is something that will show on all pages, not on its own specific pages, like for instance a messenger sort of thing, but it's complex: is it still a widget? Or is it a module? Do modules always have to come with their own pages? Or a new module can create content for pages that already exist?

    - Libraries:

    Why the stress on "I didn't usually write it myself"? Does that mean that there is a better placement for helper classes (just as an instance) if I'm going to write them from scratch?

    Donna - that marriage offer is still on the table if you come to rescue me... :-P

    • Moderator
    • 6923 posts
    January 29, 2018 12:15 PM EST
    David said:

    Just downloaded the trial version and starting to screw a bit around with it...

    The developers SDK, for instance:

    "Modules are used for full module features (such as Albums or Chat).
    Themes are CSS styles and image-sets for changing the site aesthetics. You would use packages instead of regular theme exports for versioning your theme.
    Widgets are more-abbreviated display items that do not need full Module features or complexity.
    Libraries are sets of classes that will be utilized by other widgets or modules. This is usually reserved for custom libraries that you did not write but want to utilize.
    Externals are things like CSS, Javascript, or Image sets that do not require any server-side processing."

    These above are the explanations on the different type of packages that i may want to build.

    Please some clarifications:

    - Modules:

    I assume that when we look at the market place for plugins what we are actually looking at is "modules", i.e. each plugin is in fact a module - correct?

    https://support.socialengine.com/php/customer/en/portal/articles/1638402-technical-overview?b_id=14386  

    "Most of SocialEngine's functionality resides here. Each module contains within it the MVC structure, where the "Model", "views", and "controllers" directories correspond to the MVC paths. Please see skeleton module "HelloWorld" for more information on this."

    So from the above, we know that a module has various folders within it and is normally a full featured plugin.

     

    - Widget:

    What if my customization is something that will show on all pages, not on its own specific pages, like for instance a messenger sort of thing, but it's complex: is it still a widget? Or is it a module? Do modules always have to come with their own pages? Or a new module can create content for pages that already exist?

    I mainly make little widgets. A widget is basically a block. You drag and drop this block wherever you want it in the Layout Editor. https://support.socialengine.com/php/customer/en/portal/articles/1635216-which-widgets-are-allowed-on-which-pages?b_id=14386 

    You can see my free plugins via my ScriptTechs' profile at the marketplace. Only one of those is a "module" and that would be the Happy Holidays because at the time I was thinking to expand it with various member level settings. Feel free to download the various freebies and see the structure of them.

    - Libraries:

    Why the stress on "I didn't usually write it myself"? Does that mean that there is a better placement for helper classes (just as an instance) if I'm going to write them from scratch?

    Many third party experts utilize external libraries in their "core" plugins. This is the standard thing and probably why that statement is such as it is. This is not my expertise. I am a writer (published my first book last month) and so a library to me is where my book is found(yes I know what libraries are in coding but this was a bit fun)

    Donna - that marriage offer is still on the table if you come to rescue me... :-P

    LOLNot sure if I rescued you or left you on a deserted island with my answers.

    • Moderator
    • 6923 posts
    January 29, 2018 12:17 PM EST

    Widgets generally have just the tpl, controller, manifest and a language file. Perhaps images as well. Much smaller than a full module. 

    Best thing to do, and the most fun, is experiment.

    • 75 posts
    January 29, 2018 2:18 PM EST

    I will start organizing the engagement ceremony, Donna :-)

    Only thing that remains unclear to me is the relationship between a module and the pages.

    When you add functionalities and those new functionalities live on new pages that are dedicated to them (ex: I add the forums plugin and now there are /forums pages on my site) the MVC pattern is pretty obvious.

    But If I want to add something pretty complex like a messenger (and from what you say that is definitely not just a widget) to all existing pages (or at least some existing pages) the MVC pattern becomes less clear to me

    Mostly because from the little examples of code that I found around, it looks like the MVC structure is inside the module, not the module inside the MVC structure (I'm thinking of the Hello World example that has a view folder inside)

    Maybe modules that add functionalities to existing pages - as opposed to adding new pages - do not have a view?

    • Moderator
    • 6923 posts
    January 29, 2018 4:58 PM EST

    Your module will have a widget to put on all of those pages via the Layout Editor. Check my freebies such as google translate. That's just an example of a widget.

    If you make a chat, it'll be a module to have member level settings, privacy, etc etc. It will have a widget that you'll put where you want it or check the SE IM chat and see how it's done as I've not done a chat in this script.  laughing 

    • 75 posts
    January 29, 2018 8:07 PM EST

    it's gonna be a 300 guests wedding, I fear.... :-P

    • 75 posts
    January 30, 2018 6:04 AM EST

    So in a case like that one, where you need a full module for more robust logic etc and a widget for being able to display stuff on any page, development wise is it a two packages plugin (module package + widget package) or is there a way to actually put the widget within the module?

    That may be obvious from your example code, but I cannot download your free widgets until I buy Social Engine

    • Moderator
    • 6923 posts
    January 30, 2018 6:37 AM EST

    It should be in that Hello World example but I don't see it there. 

    Ok maybe this will help

    So here's netbeans and a screen of modules with a widget (my happy holidays "sttree" one is open to show)

    Here are the instructions at my site for installing it which show to drag the widget into the page it's wanted to be in after installing the module.

    Here's a screen of netbeans showing widgets (stand alone widgets for lack of a better description):

    and instructions for the google translate that most would put on all pages which for that one is done via the "Site Header" section in the Layout Editor. 

    I think the main hang up here, and it has taken me a while to get used to it, are the various terms being used: "Module," "Plugin," "Widget," "App" as these things are perhaps confusing.

    In other scripts, Plugins are plugins. Blocks are blocks. In this script, Plugins are modules or widgets and thanks to the new marketplace, Apps too (which themes and languages are plunked in there). Widgets are blocks or blocks are widgets. I think we did that to be special sealed very special. Regardless of the word used - they are modules and blocks (but our blocks are special as they can be stand alone without a full module to attach to).

    Pages - in most scripts those are "controlled" by controller files and shown via the template files so it's the same here. You can put widgets (blocks) on your pages via the handy tool Layout Editor. 


    This post was edited by socialenginestaff at January 30, 2018 6:38 AM EST
    • 75 posts
    February 1, 2018 6:53 AM EST

    THank you so much, Donna - now I see what you meant when you where talking about the confusion around the word "widget"

    (and sorry for the late reply; I've been busy with something else but today I will resume playing around with my free trial SE)

    • Moderator
    • 6923 posts
    February 1, 2018 9:46 AM EST

    You're welcome and no problem with reply times. I also get quite busy.

    Have fun playing with the trial. Once you have the full version, it'll be easier for you to see things as it's not encrypted.