Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anders Burla 2560 posts 8256 karma points
    Nov 08, 2010 @ 13:45
    Anders Burla
    0

    best practice for files placement from package

    Hi all umbraco,

    When making packages for umbraco both front end and backend what is the best practice for the package and its files?

    What do put in the /umbraco/plugins/PACKAGE_NAME/ folder? If i have a config file that is used configured in the backend but is used for some xslt extension, should that config file be placed in /config/PACKAGE_NAME or in the plugins/PACKAGE_NAME folder?

  • Fredrik Sewén 39 posts 106 karma points
    Nov 15, 2010 @ 09:26
    Fredrik Sewén
    0

    Hi Anders, 

    Great question. I have the same thoughts right now. I have an package that contains one javascript-file, one webservice and dll-files. Should I gather them all in one plugin-folder or is it better to put javascript-file in scripts-folder and webservice in webservice-folder? 

    Thoughts anyone? What is best practice when creating packages?

     

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Nov 15, 2010 @ 09:48
    Matt Brailsford
    1

    Hey Anders.

    Personally, if the files are for the internal workings of your package (ie, you don't want people modifying them) I'd stick them in the /umbraco/plugins folder. If the files are for use on the front end, and are customisable then I'd drop them in the relevant Umbraco folders.

    Regarding the config question, again, if this is something that is meant to be modified by the developer, then yes, drop it in the /config folder.

    Many thanks

    Matt

  • Fredrik Sewén 39 posts 106 karma points
    Nov 15, 2010 @ 09:48
    Fredrik Sewén
    1

    Below is from the Umbraco Wiki http://our.umbraco.org/wiki/how-tos/packages-and-projects/thoughts,-tips-for-creating-packages

    According to this, it sounds like best practice should be to put your files in respective folder with a new folder with the package name. 

    For example a js-file in /scripts/PACKAGE_NAME - folder and so forth.

    -------------------------------------

    Naming

     To avoid conflicts and overwriting other existing items when installing a package, make sure you have unique and meaningful names

    • Assemblies

    Starting these with your name or company name followed by a project name should be enough to make them unique
    FE: Nibble.Umb.Poll

    • Stylesheets, Scripts, Document types, Templates, XSLT files, Macros

    A unique and meaningful name that links them back to the package, so it easy to see that they are part of a package
    FE: not style.css but starrating.css
    not list.xslt but bloglistposts.xslt       

    • Usercontrols

    placing these in a new unique folder inside the /usercontrols folder makes it easy to see that they are part of a package
    FE: /usercontrols/Nibble.Umb.Poll/poll.ascx

    • Configuration files

    place these in the /config folder (again, with a unique and meaningful name)

  • Anders Burla 2560 posts 8256 karma points
    Nov 15, 2010 @ 10:37
    Anders Burla
    0

    Thanks for the great responses! #h5yr

Please Sign in or register to post replies

Write your reply to:

Draft