+ Start a Discussion
Priyadarshi NayakPriyadarshi Nayak 

Package in Apex


How to bundle all APEX code? Is there package kind of concept similar to Java? How to resolve APEX class with same name, if found by some different sources?

Amit Chaudhary 8Amit Chaudhary 8
You can create package in salesforce but that is not same as java. Please check below post I hope that will help you.
https://help.salesforce.com/HTViewHelpDoc?id=sharing_apps.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=sharing_apps.htm&language=en_US)

A package is a container for something as small as an individual component or as large as a set of related apps. After creating a package, you can distribute it to other Salesforce users and organizations, including those outside your company.Packages come in two forms—unmanaged and managed:
Unmanaged packages
Unmanaged packages are typically used to distribute open-source projects or application templates to provide developers with the basic building blocks for an application. Once the components are installed from an unmanaged package, the components can be edited in the organization they are installed in. The developer who created and uploaded the unmanaged package has no control over the installed components, and can't change or upgrade them. Unmanaged packages should not be used to migrate components from a sandbox to production organization. Instead, use Change Sets.
Managed packages
Managed packages are typically used by Salesforce partners to distribute and sell applications to customers. These packages must be created from a Developer Edition organization. Using the AppExchange and the License Management Application (LMA), developers can sell and manage user-based licenses to the app. Managed packages are also fully upgradeable. To ensure seamless upgrades, certain destructive changes, like removing objects or fields, can not be performed.
Managed packages also offer the following benefits:

Intellectual property protection for Apex
Built-in versioning support for API accessible components
The ability to branch and patch a previous version
The ability to seamlessly push patch updates to subscribers
Unique naming of all components to ensure conflict-free installsThe following definitions illustrate these concepts:

Please let us know if this wll help you