Thursday, December 29, 2011

ATG Components Examples


/atg/dynamo/service/CurrentDate

Ever need access to the current date from your application? Well then this is the component for you. Properties of this component include year, month, monthName, shortMonthName, dayOfWeek, dayOfWeekName, hour, minute, second and of course date.

/atg/dynamo/service/random/SecureRandom

The SecureRandom component is a pseudo-random number service. The component extends the java.security.SecureRandom class. Calling the nextDouble() method returns a uniform random number between 0.0 and 1.0. Other methods provide random integers, floats or bytes.

/atg/dynamo/service/Scheduler

If you need to schedule a component in nucleus to run periodically then the scheduler component can be used. Just register a nucleus component with the scheduler by calling the addScheduledJob() method. Your nucleus component will need to implement the atg.service.schedule.Schedulable interface which contains a single method call performScheduledTask() which is invoked by the scheduler when its time to run.

/atg/dynamo/service/SMTPEmail

This component can be used to send an email from nucleus. The component implements the atg.service.email.EmailSender interface. Variants of the sendEmailMessage() method allow one to send email to a recipient or group of recipients.

/atg/dynamo/service/jdbc/JTDataSource

High performance applications require connection pooling. The JTDataSource component provides access to a pool of JDBC connections. This component implements the standard javax.sql.DataSource interface. To checkout a connection from the pool of connections call the getConnection() method. Closing the connection returns the connection to the pool.

This just gives you a taste of some of the components available as part the the nucleus component framework. ATG applications such as its flagship eCommerce application provide additional application specific componets such as order management and pricing components. And of course you could always write your own components and integrate them into the framework.

In our next addition we’ll talk about one of the characteristics that make nucleus truely unique: layered configuration.

No comments:

Popular Posts