Comparing Apex Triggers & .NET Triggers

As in any other programming language, a trigger in Force.com Apex listens for a specific condition, such as a new record being inserted in a field, and invokes one or more associated Actions (e.g. send email) in response.

In a most common design pattern – you will create a trigger to listen for an event (e.g. record update) – and then call an Apex class from the trigger; the Apex class contains the logic for the action which needs to be taken.

In many ways – apart from the syntactical and other differences between Apex and C# – the concept of triggers is very similar in both.

What are the common events in Force.com? Inserts or updates or deletes of a record in a field are typical “events” – since on Force.com you primarily create database driven applications.

Apex Triggers vs. JavaScript

Apex triggers act on server side actions. To respond to event in the client UI (e.g. browsers or mobile apps) – you would use the ubiquitous JavaScript in its many different avatars – bootstrap, Force.com components, AngularJS and more.