function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
wsmithwsmith 

Topics for talk about Apex

I am planning to give a talk about Apex.  Most people outside the Salesforce.com world have even heard of Apex.  The talk will be about 60 minutes.

This will be introduction to Apex in terms of what it looks like, what it can do and its strengths and weaknesses.  I plan to point out what is great, what needs improvement and what is uncertain (don't know what is really happening or is it efficient).  Most of the audience are developers who do not need to be bothered with a 'Hello World" example.

Does anyone have a  suggestion as to what likes, dislikes they have about Apex that they think is important?

For example, I am currently thinking about:

1) The lack of transparency of the runtime.

2) No debugging besides System.debug(...).

3) No idea how efficient or inefficient list to array conversions is:

i.e. sObjs[0] = ...;
      sObjs[4] = ...;
      List<sObject> lObjs = sObjs;
      sObject tmp = lObjs[0];

    Internally (runtime), did the above convert an array into a list and a list to an array and if so how many times?  By doing the above, did I allocate a few internal data structures and did a lot of copying?  Does the runtime only have a list and the array syntax just syntax sugar?

4) Having to upload to Salesforce.com to compile Apex and see syntax errors.

5) “testmethod” keyword is great

6) “webservice” keyword is great

7) Governor Limits force developers to structure code in a way has to meet SOQL limits, array size limits, etc. compared to using standard practices of structuring code.

8) Reflection by describing and object has a Governor limit problem.  For example, if there are too many items in a picklist you have to make a copy of the picklist in your code.  It would be nice if a picklist can be linked to an Apex object containg an array of values and thus the picklist is defined only once.  The same for constant strings and other data types.

etc.

Any suggestions or disagreements would be welcome.  This is not to start a flame war but to point out what is great, what needs improvement and what is uncertain (don't know what is really happening or is it efficient).

Thanks