Full version  •  Quick installation  •  No spam
Download now

Tech Talk


Application Engine: Advantages

Today I'll start tackling the question that comes up for every installation—when to choose Application Engine instead of, for example, COBOL or SQR, for custom batch processes. To simplify the discussion, let's assume that SQR is the most common alternative to App Engine.

Between App Engine and SQR, which is better? We can give a couple of easy answers to this right now. First, if you are developing a report, use SQR. App Engine doesn't do reports, unless you want to write the output to an intermediate file or table and then process it further using, for example, SQR or Crystal Reports.

The second easy answer to the question: If you are applying for a job at Oracle, or trying to pass a certification test, or working in an all-AE shop, then remember that "App Engine is always the best choice." If, on the other hand, you are more concerned with actual real-world considerations, the question is more difficult to answer.

Today let's look at the advantages of App Engine. (Next week we'll have a look at the Dark Side.) PeopleBooks is eager to have us use AE, so we can get a good list of the "pros" there. (The following were taken from the 8.1x version of PeopleBooks, which probably represents a good average of the current release levels.) My comments, some admittedly tongue-in-cheek, follow in italics.

Performance: "Our in-house testing reveals that a well-constructed and properly tuned Application Engine program achieves performance metrics comparable to COBOL and SQR. In some cases, the Application Engine program can out-perform both COBOL and SQR. However,...there are many other reasons to choose Application Engine to develop your batch programs besides performance." I've often heard that AE programs are faster but have never seen any published evidence. I believe that this is an "urban legend" arising from the fact that SQL set processing is generally much faster than row-by-row processing, and AE does set processing. Actually, AE encourages set processing because it makes row-by-row processing so difficult. SQR and other tools do set processing too, but they don't force it. If we read the first sentence above, it says that a well-constructed and properly tuned AE program is "comparable" to (poorly constructed and untuned?) SQR. In other words, a good AE program is approximately as good as an SQR program. I don't doubt that. But I have no reason to believe that AE is faster than SQR. For a programmer who won't write efficient SQL unless forced to do so, AE might be a good choice.

Encapsulation: "Unlike...SQR, Application Engine programs reside completely within your database. can run and debug your applications without leaving the PeopleTools environment." PeopleBooks also points out that there are no compiles or "stored statements," which apply to COBOL only. This is a weird use of the word "encapsulation," but it's true. Whether it's much of an advantage is debatable. I've never had much trouble handling file folders. But this point leads into the next one...

Upgrade support: "[AE programs] join the growing ranks of PeopleTools components that you can easily upgrade using Application Designer. ...if you change [a] record definition, you can put the modified record into a project, and you can then also include in the project any Application Engine programs affected by the change... Then you upgrade the entire project all at once. With COBOL and SQR, you have to do the record change, then modify your batch programs using some other mechanism all while [making] sure to keep track of what was changed and how and where it affects the batch program. With Application Engine and PeopleTools, it's all taken care of automatically." OK, it's a little over the top, but this passage is trying to say that compare reports and upgrade|copy operations are supported only for PeopleTools objects, not files. But it also says that once you write an AE program, you no longer need to be concerned with any record definition changes, nor do you need to keep track of what was changed and how it affects your AE programs. There is a grain of truth in this, but it applies only to limited cases, especially where you are using meta-SQL. In the real world, no, it's not that easy.

Reuse business logic: "Application Engine programs can now invoke PeopleCode. ... Conversely, PeopleCode can now invoke an Application Engine program." Finally, a real advantage! PeopleCode has a large amount of functionality that can't be called directly from SQR. I recently developed some real-time online update functionality and needed a batch version of the same thing. AE was the only logical choice for this, since I could simply call the online code instead of rewriting it again in another language.

Built-in restart logic: "[In an AE program], each COMMIT becomes a checkpoint that Application Engine uses to locate where within a program to restart after an abend. ... This type of built-in logic does not exist in COBOL or SQR. You need to code any restart logic for your programs yourself." AE does handle restarting "natively." When is this an advantage? Well, if you have a process that tends to crash, it can come in handy. Of course, while developing the process, you need to be sure that restartability is appropriate. It is not always true that you can pick up where a program left off and get the correct results. I'll go out on a limb and recommend better testing as an alternative to planning for crashes. But this is, in fact, an advantage. Just be sure that your users know when to restart and when to delete and rerun!

Graphical user interface: "[With AE, you use] Application Designer, an intuitive, graphical interface...[offering] the following benefits: Ability to open multiple Application Engine programs concurrently; Easy access to the PeopleCode and SQL editors; Two views of your program [the Definition and Program Flow views]." Any text editor can open multiple SQR programs and gives easy access to the editing window. AE does have an advantage in that the code can be syntax-checked at some level. And the Program Flow view is good. On the other hand, you'll have much better luck managing your screen real estate using a text editor than with App Designer's views. Overall, a small advantage for AE.

Enhanced SQL/meta-SQL support and Platform flexibility: These two entries work together. "Meta-SQL" is a PeopleSoft extension that will expand to the correct SQL. (This is outside the scope of today's discussion.) It can save work, adjust to some table changes automatically, and allow you to write code that will run under different RDBMSs. The time-saving aspects can be helpful, as long as you don't want to test out your SQL first, since your SQL client won't understand the meta-SQL and the "resolve meta-SQL" function doesn't seem to do anything in AE programs. The platform flexibility aspect would seem to be more helpful for PeopleSoft development and consulting organizations than for end users. (How often do you uproot your RDBMS and install a different one?) The meta-SQL that lists fields from a record definition can be very useful, and this is not available in SQR. The trouble is, it's needed in many cases because of the way AE encourages the program to shift data around in ways that would normally not be necessary. Overall, these points add up to another relatively minor advantage for AE.

Data dictionary integration: This entry describes how AE overcomes difficulties such as the need to adjust field sizes when a field definition changes. "If you've ever had to perform such a manual update of COBOL code, there's no need to imagine the degree of irritation a programmer can experience." This problem, such as it is (and I can tell you it's nowhere near the horror described in this passage), occurs with COBOL and we can ignore it here.

Effective dating: This one is not mentioned among the advantages in PeopleBooks, but people sometimes point to it. AE program elements are effective dated. This seems to fall into the "so what" category, which I'm guessing is the reason it's not highlighted by PeopleBooks.

So where did we end up? With a couple of good advantages and some so-so ones. Next Monday: The not-so-good side of AE.

PSSQRWhen 1 > 1 (or even 9999) 10-31-2014
SQRSQR colors 08-11-2014
SQRSQR lines, boxes and images 08-10-2014
SQRSQR one-point coordinate grid 08-09-2014
SQRSQR proportional fonts 08-08-2014
SQRSQR print positioning 08-07-2014
SQRSQR reports: The basics 08-06-2014
PS Fear of customization 07-18-2014
SQRSQR variable names 07-02-2014
PS Concatenating strings in PCode05-12-2014
PS HTML and server communication 05-05-2014
PS JavaScript in HTML areas 04-21-2014
PS Using HTML areas 04-18-2014
PS The HTML object 04-11-2014
PS Types of HTML areas 03-14-2014
SQREmbedded SELECTs in SQR 01-31-2014
PS Exporting all PeopleCode 11-30-2013
PS Disabling autocomplete 09-29-2013
SQRSP Debugger for SQR update 09-12-2013
General Stopping... and restarting 09-02-2013
SQRSQR debugger version 2 09-29-2010
SQRA few SQR items 05-20-2009
PS Ignoring "component changed" 05-07-2008
PS App Engine 04-30-2008
PS Commenting code 04-02-2008
PS The "Powered By" page 03-05-2008
PS Formats in PeopleCode vars 01-30-2008
PS Page layout with group boxes 01-09-2008
PS Meta-SQL wrappers 12-19-2007
PS Derived record PeopleCode 12-05-2007
PS A Cancel button 11-28-2007
General "Leading" the test effort 11-07-2007
SQRTemporary tables in SQR 10-31-2007
SQRUpdating long character data 10-24-2007
PS Record.Field specification 10-17-2007
PS Migrating project definitions 09-26-2007
PS Derived records 09-19-2007
PS Positioning elements on pages 08-29-2007
General Thanks 08-22-2007
SQRSQR "code alerts" 08-08-2007
PS Styles in HTML Areas 08-01-2007
SQRDynamic SQL for performance? 07-25-2007
PS Page Field Name 07-18-2007
PS PeopleCode event order 06-27-2007
SQRFormatting Excel using HTML 06-06-2007
Component-changed state 05-23-2007
PS Selecting styles for page fields05-16-2007
SQRSending email from SQR 05-02-2007
General Contractor networking 04-25-2007
PS Project X--and another project04-18-2007
PS Effective and data entry dates04-11-2007
PS A PeopleSoft home page 04-04-2007
PSSQRHyperion and the future of SQR03-21-2007
General The data doesn't lie 03-14-2007
PSSQRHyperion acquisition 03-07-2007
General Taking ownership 02-28-2007
PS Source control 02-21-2007
PS Sandboxes 02-14-2007
PS Migration instructions 02-07-2007
PS PeopleSoft environment usage 01-31-2007
PS Multiple environment strings 01-24-2007
PS Multiple testing environments 01-17-2007
PS PeopleSoft support environments 01-10-2007
General A single source of truth 01-03-2007
Nothing Smile 12-27-2006
PS Navigating the component buffer 12-20-2006
PS JavaScript and styles 12-13-2006
PS SQL for common HR queries 12-06-2006
SQRSQR program complexity 11-29-2006
SQRFrequent SQR questions 11-22-2006
PS Followup 11-15-2006
PS Expanding subrecords 11-08-2006
PS Bind variables 10-25-2006
PS Attaching objects to projects 10-18-2006
PS Partial transaction completion10-11-2006
PS The multi-process component 10-04-2006
PS Employee rows lost to security09-27-2006
SQRSQR document sections 09-20-2006
PS Empty-string compares in SQL 09-13-2006
SQRNulls, blanks, empty strings 09-06-2006
General Company policy 08-30-2006
PS Auto-lookup exclusion 08-23-2006
PS Effective status 08-16-2006
PS A couple of HRMS/HCM utilities08-02-2006
PS Translate value changes 07-26-2006
General Updating views 07-19-2006
General Set-based updates 07-12-2006
PS SQL set-based processing 07-05-2006
Being happy about bugs 06-28-2006
Busy in the PS marketplace 06-21-2006
General 2-way documentation 06-14-2006
PS Interfaces as views 06-07-2006
PS Hijacked fields 05-31-2006
General Agile software development 05-24-2006
General Working within Waterfall 05-17-2006
General Over the Waterfall 05-10-2006
PS Experimentation in PeopleSoft 05-03-2006
PS Unlimited enhancements? 04-26-2006
PS Testing direct DB updates 04-19-2006
SQRDelayed evaluation of SQL 04-12-2006
PS Database compares 04-05-2006
General Support problem? Call FBI! 03-29-2006
SQRFinding SQR errors 03-22-2006
PS Finding PeopleSoft Queries 03-15-2006
PS PeopleSoft Query support 03-08-2006
PS JOB table and SetIDs 03-01-2006
PS Migrating the project 02-22-2006
PS Compare and Report options 02-15-2006
PS Comparing and migrating projects 02-08-2006
PS Object security in App Designer 02-01-2006
PS Automation of App Designer 01-25-2006
General Contractors on PS projects 01-18-2006
General "Smart coding" 01-11-2006
SQRDebugger tricks 01-04-2006
PS EFFDT and component processing12-28-2005
PS Referential integrity 12-21-2005
PS Menu navigation using SQL 12-14-2005
SQRA coding standards wish list 12-07-2005
PS More App Designer options 11-30-2005
PS Pages in App Designer 11-23-2005
PS Finding objects on the menu 11-14-2005
PS Magic search record fields 10-31-2005
PS Documenting object attributes 10-24-2005
PS Monitoring server performance 10-17-2005
PS Searching PeopleCode 10-10-2005
PS Speeding up App Designer 10-03-2005
PS Using the message catalog 09-26-2005
PS Good ideas that sometimes aren't09-19-2005
PS And now Siebel 09-12-2005
SQRDate comparisons 09-05-2005
PSSQRFTP options 08-29-2005
PSSQRMoving code across environments08-22-2005
PS Spring cleaning 08-15-2005
SQRBuild your own SQR "IDE" 08-08-2005
PS Change control in App Designer08-01-2005
PS App Engine: disadvantages 07-25-2005
PS App Engine: advantages 07-18-2005
SQRCoding Excel file output 07-11-2005
General Creating Excel files 07-05-2005
PS Dave's next move 06-27-2005
SQRSQR variable oddities 06-20-2005
SQRSQR arrays 06-13-2005
SQRCompiling SQRs 06-06-2005
PS 5-character SETIDs 05-30-2005
PS Use all of the keys 05-23-2005
SQRDynamic SQL in SQR 05-16-2005
PS Running the in-place conv 05-09-2005
PS Searching for fields in DB 05-02-2005
PS Converting setup data 04-25-2005
PS Associating effective-dated tables 04-18-2005
PS Upgrading without an upgrade 04-04-2005
PS Scheduling patches 03-28-2005
PS To patch or not? 03-21-2005
PS Basic tools 03-14-2005
SQRWay back with 03-07-2005
PS Meta-SQL 02-28-2005
PS Dropping the user index 02-21-2005
PS User indexes 02-14-2005
PS Page changes in App Designer 02-07-2005
General Generate SQL from SQL 01-31-2005
SQRSQR report viewer 01-24-2005
General Bug or enhancement? 01-17-2005
PSSQRTagging objects and code 01-10-2005
General Issue tracking 01-03-2005
PS PeopleSoft 10? 12-27-2004
PS Purging tables 12-20-2004
PS Acquisition 12-13-2004
PS Exporting PCode as text 12-06-2004
PS Simplify SQR code 11-29-2004
PS New site for SQR info 11-22-2004
PS Comparing objects 11-08-2004
PS Applying SQL-from-SQL 11-01-2004
General Generating SQL with SQL 10-25-2004
General Generating SQL 10-18-2004
PS Scrambling data 10-11-2004
PS What's going on with PS? 10-04-2004
SQRPrint positioning in SQR 09-27-2004
PS Oracle vs. PeopleSoft 09-13-2004
General Word, email, and lava lamps 09-06-2004
PS Custom run control: tips 08-30-2004
PS Custom run control: building 08-23-2004
PS PeopleCode, behind the scenes 08-16-2004
PS Language-specific pages 08-09-2004
SQRUsing substitution variables 08-02-2004
SQRSQR substitution variables 08-02-2004
PS HTML areas 07-19-2004
SQRRecursion in SQR 07-12-2004
SQRSQR code formatting 07-06-2004
SQRDebugger beta release 06-28-2004
PS Application Designer tidbits 06-27-2004
PS Configuration for custom SQR 06-14-2004
PSSQRModify or clone? 06-07-2004
PS Identifying custom objects 06-01-2004
PS EFFDT again 05-24-2004
General Change-only interface: impl 05-17-2004
General Change-only interface: concept05-10-2004
PS Cache troubles 05-03-2004
PS Component PeopleCode 04-25-2004
PS EFFDT and EFF_STATUS 04-18-2004
PS SETID in subselects 04-11-2004
PS Denormalized tables 04-04-2004
PS Documenting retired custom 03-28-2004
PS Sharing login IDs 03-21-2004
SQRGlobal and local SQR variables03-14-2004
SQRDISPLAY and MOVE 03-07-2004
PSSQRRun control in SQR 02-29-2004
SQRCommon sources of SQR bugs 02-22-2004
PS Implementation setup data 02-15-2004
PS Managing setup data 02-08-2004
PS Managing objects 02-01-2004
PS Make a home page 01-01-2004