Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Salesforce by (11.9k points)

Is there any way in Salesforce to group apex classes under a package or namespace? Can we use managed package for internal organization purpose?

closed

1 Answer

+1 vote
by (32.1k points)
edited by
 
Best answer

So, according to me, this is a big condition in the force.com stack that makes medium sized projects difficult, if not impractical. If you use managed packages in order to get a package prefix, it won't solve any problems, so it's not really worth the trouble.

Want to learn Salesforce from the scratch? Here's is the right video for you on Salesforce provided by Intellipaat:

I try to organize a project into one level of namespaces. Instead of actual namespaces, you could give each would-be-namespace a 3-5 character name, to be used as a prefix. Any class which belongs in the 'namespace' gets prefixed. 

Functional advantage of this type of convention is that it helps prevent name classes and clashes which are grouped by their 'namespace' when viewed in a sorted list, such as in an IDE, or Setup > Develop > Apex Classes

Sadly, several basic OO principles are still fundamentally broken. Apparently, the most important one is that every class forms an implicit dependency on each and every other class it has visibilty to, which is actually all of them.

Related questions

0 votes
0 answers
0 votes
1 answer
0 votes
1 answer
asked Dec 22, 2020 in Salesforce by dante07 (13.1k points)

31k questions

32.9k answers

500 comments

693 users

Browse Categories

...