GithubHelp home page GithubHelp logo

pbattisson / sfdc-namespace-prefix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jordanbaucke/sfdc-namespace-prefix

1.0 2.0 0.0 79 KB

Ruby script to help translate non-packaged SFDC meta-data into a managed-package instance.

Home Page: http://www.bracketlabs.com

sfdc-namespace-prefix's Introduction

Quickly Add Namespace Prefixes to SFDC Meta-data Source-code

Namespace Prefixes are required for ALL managed packages (THAT ARE UPLOADED TO THE APPEXCHANGE!).

**Namespace prefixes are automatically inserted in managed packages that are not distributed to the AppExchange, except in Javascript calls to @RemoteAction methods, and in actionFunction All webservice package references must reference a namespace prefix for deployed code to correctly reference installed packages.

References to custom objects must reference a namespace prefix in API calls:

NSP1__MyCustomObject__c

Managed packages on the SFDC Platform cannot rename/remove member classes, custom objects, visualforce pages, etc. Therefore, a namingConventions.txt file will also be run on each individaul file to help users develop a generic copy of the code in non-managed package developer orgs, to have classnames and org methods updated.

Example:

OriginalNameString.cls --> PackagedNameString.cls

-and-

public OriginalNameString(){ //... } --> public PackageNameString(){ //... }


Updates

  • 11/30/2011 - Created Github repo, started construction of methods.

  • 12/8/2011 - Added a 2nd script that was more targeted at JUST replacing namespaces (the first one became too focused on) doing one-off replacements to keep legacy class definitions from changing in packaged code.

  • 12/14/2011 - Modified the script to be more dynamic, adding two naming-consideration .txt files (with simple examples): naming_considerations.txt: text name changes that are made in code (for namespacing, labels, find and replace etc.) file_naming_considerstions.txt: renames files as needed Format of both *naming_considerations.txt: ORIGINAL-LABEL:NEW-LABEL

  • 3/12/2012 - Added 'ignored' files list, as running this operation on compressed zip files containing static resources seems to be corrupting them

ignore_considerations.txt: file_to_be_ingored.resource

**the example operation may not run if you have profiles associated with the tabs/apps that cannot be modified

NEW USAGE (ARGS):

$ruby naming_considerations SRC_DIR_TARGET_PATH PATH_TO_NAMING_CONSIDERATIONS.TXT PATH_TO_FILE_NAMING_CONSIDERATIONS.TXT PATH_TO_IGNORE_CONSIDERATIONS.TXT

Resources: http://wiki.developerforce.com/page/Bestpractices:Continuous_Integration_Techniques

Background: http://bracketlabs.com/blog/2011/7/25/salesforces-apex-namespace-requirement-creates-barrier-to-co.html

About:
@jordanbaucke
Agile Project Management for Salesforce.com

sfdc-namespace-prefix's People

Contributors

jordanbaucke avatar

Stargazers

Paul Battisson avatar

Watchers

Paul Battisson avatar James Cloos avatar

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.