when should I use apex
There are many server side programming languages ; they have their advatages and disadvatages(limits).
When Apex comes to our mind and Apex gives a nice features overview of its side.
when should I use apex?
The nice question when i shoud use APex ; the answer is simple when you want to develop a web application where most control is handled by you and all is done
easily and nicely then there comes a name in our mind that ‘s called Apex. Although there are many server side programming languages that ‘ s importantce we cannot
Really Apex comes into action when we saw salesforce.com into action and many other crm also use Apex for their web applications.
some features are listed down of Apex:
- To create email services
- To create complex business processes
- To perform complex validation over multiple objects.
- When you want compile your code, apex provides built-in support for unit test creation and execution: nice feature for compiling your code as expected by executing all unit tests stored in metadata prior to any platform upgrades.
- To create Web services.
- To create custom transactional logic
Naming Variables, Methods and Classes in Apex:
Some restrictions when naming variables , methods and classes:
- We cannot use any of the Apex reserved keywords when naming variables, methods or classes.
- These include words that are part of Apex such as list, test, or account, as well as reserved keywords.
- Apex data types include basic types such as Integer, Date, and Boolean, lists, maps, objects and sObjects.
- Apex is a strongly-typed language, we should declare the data type of a variable when we refer to it first.
- We must all statements with semicolon as we do in all programming languages mostly the example is as follows:
datatype var_name [ = value];
In Apex, all primitive data type arguments, such as Integer or String, are passed into methods by value. This means that any
changes to the arguments exist only within the scope of the method. When the method returns, the changes to the arguments
Non-primitive data type arguments, such as sObjects, are also passed into methods by value. This means that when the method returns, the passed-in argument still references the same object as before the method call and can’t be changed to point to another object. However, the values of the object’s fields can be changed in the method.