1. What is the biggest difference between Apex and most programming languages?
· Apex
provides built-in Data Manipulation Calls(Like Insert,Update,Delete
etc.,)without establishing any connections to database and closing the
connections.
· It
provides default exception handling which throws an exception message
automatically onto the screen unlike in other programming languages
which throws error on to error console and shows abnormality.
But, Apex handles the exception and shows us on the page.
· Embedded
SOQL (Salesforce Object Query Language)and SOSL(Salesforce Object
Search language) queries which returns the SObject results.
· Apex is interpreted(compiled), executed and Controller by Force.com platform.
2. Where can Apex be authored? Where can it be executed?
Apex can be authored on Force.com editor which is provided in Salesforce SETUP pane on left side.
Apex classes are executed on Force.com platform. It cannot be executed on Local machines using tomcat or any other servers.
3. Why are governor limits important? What are they based on?
A. Governor limits are important because it controls the user to use the database interactions with limited control. Since, Force.com is a cloud platform , it offers multi-tenancy which provides unit platform for various Force.com tenants. If the governor limits are not set, and if most users start interacting with cloud database with no limit, then obvious burden will be imposed on Cloud.So, governor limits are important which determine the total pages visited by a client and total number of page navigations, a client can do in a day, total data base interactions that can be made in a single go.
A. Governor limits are important because it controls the user to use the database interactions with limited control. Since, Force.com is a cloud platform , it offers multi-tenancy which provides unit platform for various Force.com tenants. If the governor limits are not set, and if most users start interacting with cloud database with no limit, then obvious burden will be imposed on Cloud.So, governor limits are important which determine the total pages visited by a client and total number of page navigations, a client can do in a day, total data base interactions that can be made in a single go.
Governor
limits are based on the type of the Org we use.Generally, testing org
contains different governer limits(more), and production org contains
different governor limits(less).
4. List a few characteristics of Apex that is different than other programming languages.
A. Apex is strongly typed language with direct references TO Sobject and fields names.
Apex is interpreted, Executed, Controlled by Force.com platform.
Apex scripts can be saved against different versions of the Force.com API.
A. Apex is strongly typed language with direct references TO Sobject and fields names.
Apex is interpreted, Executed, Controlled by Force.com platform.
Apex scripts can be saved against different versions of the Force.com API.
5. How would an external program access functionality on Force.com platform?
We have a concept called Web Services. Using this extended
functionality, we can make external program access the functionality on
Force.com platform.
We
will generate WSDL document(Web Services Description Language) which
will be exposed to host environment which results in extending the
capability of accessing Force.com platform from external program.
6. What are governor limits? Why are these important in a multi-tenant environment?
A. Governor limits are the database limits that are applied to the users who use Force.com platform. Governor limits simply means the limited database calls that a developer/user do.
These governor limits are important because unlimited and free access to database many number of times from each time will slow down the database effectiveness.So,to preserve the database effectiveness, governor limits are important in multi-tenant environment.
A. Governor limits are the database limits that are applied to the users who use Force.com platform. Governor limits simply means the limited database calls that a developer/user do.
These governor limits are important because unlimited and free access to database many number of times from each time will slow down the database effectiveness.So,to preserve the database effectiveness, governor limits are important in multi-tenant environment.
7. What is Run time type information? How do obtain it in Apex?
A. Run
time type information refers to a system that keeps the information
about an object’s data type in memory at run time. This run time
information deals to integers, strings and generic objects.
8. How do you override a method in Apex?
A. With the help of the OVERRIDE key word in method signature, we can override a method in Apex.
For example, we have a method public void abc(){
A. With the help of the OVERRIDE key word in method signature, we can override a method in Apex.
For example, we have a method public void abc(){
},
If we want to override the method, we can do like below:
Public override void abc(){
}
9. What are the ways in which Apex can be invoked?
A. We can invoke apex in 4 ways:
A. We can invoke apex in 4 ways:
a. Triggers: By
writing the apex triggers,and calling them on the 7 pre defined events
of creating/modifying a record, we can invoke apex.
b. Apex
Schedule: We can schedule Apex code to be run at a particular point/for
a particular period of time. We need to write some Apex code and
schedule them using Apex Scheduler.By this way, we can invoke apex.
c. Anonymous
Blocks: Anonymous Block refers to a block, from where we can invoke
apex by writing the logic we need. Example is as below:
d. Apex
in Ajax: For Apex, we have ajax took kit, from where we can do Apex
calls. This Ajax toolkit can be used on the visualforce page using
javascript notations. Using this Apex in Ajax, we can invoke Apex.
10. What are some of the limitations of code that you can call via the anonymous block?
A. Anonymous Block’s code execute with current user’s permission. So, if the user does not have field-level permissions or does not have profile permissions, then the code in anonymous block fails.
A. Anonymous Block’s code execute with current user’s permission. So, if the user does not have field-level permissions or does not have profile permissions, then the code in anonymous block fails.
11. How do you expose functionality on Force.com to be consumed by external clients?
A. We have a concept called Web Services. Using this extended functionality, we can make external program access the functionality on Force.com platform.
A. We have a concept called Web Services. Using this extended functionality, we can make external program access the functionality on Force.com platform.
We will generate WSDL document(Web Services Description Language)
which will be exposed to host environment which results in
extending the capability of accessing Force.com platform from external
program.
12. What would the syntax be to create a new class named MyNewClass which should be public?
A. Syntax is:
Public class MyNewClass{
A. Syntax is:
Public class MyNewClass{
}
Here
public is the access modifier for the class. And CLASS is the keyword
to designate a class and MyNewClass is the name of the class.
13. What is the difference between the global and public access modifier keywords?
A. We have different access modifiers like global, private, public.
If we use the access modifier as Global, it can be used anywhere in the org. Generally, Global is used for web-services since one class needs to handle some other parts of apex in the org. Whenever we use Public keyword, then the access is limited to the particular class and cannot be used outside the related class.
A. We have different access modifiers like global, private, public.
If we use the access modifier as Global, it can be used anywhere in the org. Generally, Global is used for web-services since one class needs to handle some other parts of apex in the org. Whenever we use Public keyword, then the access is limited to the particular class and cannot be used outside the related class.
14. Is casting between a String and Integer allowed?
Allowed
Allowed
15 .What are different data types for Apex variables?
Premitive and non premitive data types
16.What keywords are used to declare a constant?
Final and static
17.What special characters are used to surround SOQL or SOSL queries?
[ and ]
Ø What is the maximum number of rows that can be brought back by a SOQL query?
o 50000
Ø What advantage does using a variable list in a for loop have over a single variable?
o Using list ,we save retrived data in a single list variable
Ø What is different about a static method?
o Static methods are not used in web services
Ø What are the two types of iterations that can be performed in a for loop with a SOQL query?
o Variable and variable_list
Ø Does Apex use explicit transactional calls such as commit and rollback?
o NO
Ø The assert family of methods belong to which class?
o System
Ø What do the Limit class methods help you to manage?
Ø How do you access the records that cause the trigger to execute?
Ø What are the seven different types of trigger events?
o Before insert,before update,before delete
o After insert,after update,after delete,after undelete
Ø How do you specify that a trigger is a “bulk trigger?”
o By default all triggers are bulk triggers
Ø Under what identity do triggers execute? What ramifications does that have?
Ø Is it necessary to import a WSDL to perform a callout?
o NO
Ø What does the @future annotation do? What are the other annotations available with Apex?
o @future is used to execute methods asynchronously.
o @istest,@readonly,@remoteAction,@depricited
:11� :#t b 0# �O id
black 1.0pt; border-top:none;mso-border-top-alt:solid black
.5pt;mso-border-alt:solid black .5pt; padding:0in 5.4pt 0in 5.4pt'>
Total Heap Size
300000 Bytes
3MB
1.5MB
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.