SlideShare ist ein Scribd-Unternehmen logo
1 von 36
PRESENTED BY,
     P.S.S.SWAMY.
   What is an application package.
   What is an application class.
   Object oriented concepts.
   Understanding application packages &classes.
   Process for creating packages and classes in Application designer.
   Application class structure.
   How to use this packages and classes in people code.(import declaration).
   Access controls.
   Definition of methods.
   Abstract methods and properties.
   Interfaces.
   Constructors.
   Get/set methods &read only read write.
   Exception Handling.
   Application package is a container for application subpackages and
    application classes, which will provide a hierarchical structure to your
    People Code programs and help you extend the common functionality of
    existing People Code classes (Rowset, Array, and so on) from one
    application to another.
   App Class is a People Code Program at base level
   Application classes are mainly used for reusability.
   Application classes people code supports object oriented programming.
     i .e it supports:


               Classes and Objects.
               Encapsulation.
               Abstraction.
               Polymorphism.
               Inheritance.
Class :
  Class is a blueprint of the object .It consists of variable and methods.
   class doesn’t occupy any memory.
                   ex: Class is a map for building the house.

Object :
  Object is a real entity any thing physically exists in the world is called an object.
   But in programming languages object is instance of a class .It occupies some
          memory.
               ex: Object is house.

Encapsulation :
         It’s came from the word capsule . It is a property to bind the variable and
          methods and also it hides the internal structure. It prevents clients from
          seeing the inside view. We can achieve abstraction through encapsulation.
          ex : car driver doesn’t know what is the functionality when gear is changed
          one level to another level . But he change the gear against to the speed.
Abstraction :
   Abstraction is process it allows to show the essential object information to the user i.e
   hide the non essential object information. We can achieve this through encapsulation.
Inheritance:
    It is one of the most important feature of Object Oriented Programming. It is the
   concept that is used for reusability purpose. Inheritance is the mechanism through which
   we can derived classes from other classes. The derived class is called as child class or
   subclass. The class from which the subclass is derived is called a superclass (also
   a base class or a parent class).
 Polymorphism :
   A method having different forms is called polymorphism i.e method having the same
   name but we can perform different tasks by using this polymorphism.
   We have to concepts here
       1.method overloading.
       2.method overriding.
Application classes have a fully qualified name that is formed
hierarchically by the name of the top-level package. It means we can give
the same name of different classes but the fully qualified name of the class
must be unique.

      ex :1.pack1A.class
          2.pack1pack2A.class

          Here ex1 fully qualified name ‘ A. class’ is different from ex2
Import MY_TEST : MyFormulaCruncher;

Local MY_TEST : MyFormulaCruncher & My_Nbr = create MY_TEST :
  MyFormulaCruncher();
Local number &Result;
&Result = &My _ Nbr.AddNumbers(2, 1);



   Before calling any method in a class you must import the package.
   You can create Application Packages in Application Designer.
    These packages contain application classes (and may contain other
    packages also). An application class, at its base level, is just a People Code
    program. However, using the Application Packages, you can create your
    own classes, and extend the functionality of the existing People Code
    classes.
   Easier to debug because all the pieces are separate
   Easier to maintain because functionality is gathered into a single place
   Extensible by subclass.
   Import class
   Class name
   Class extensions
   Declaration of public external interface
   Declaration variables and methods
   Definition of methods
class MyFormulaCruncher
  method MyFormulaCruncher();
  method AddNumbers(&a As number, &b As number) Returns number;
  method AddNumbers2();
  property number FirstNumber;
  property number SecondNumber;
   property number MySum readonly;
 protected
  property number MySumProtected;
end-class;

method MyFormulaCruncher
end-method;

method AddNumbers
Local number &c;
  &c = &a + &b;
  MessageBox(0, "", 0, 0, "My AddNumbers result is: " | &c);
  Return &c;
end-method;

method AddNumbers2
  &MySum = &FirstNumber + &SecondNumber;
  &MySumProtected = &FirstNumber + &SecondNumber;
   MessageBox(0, "", 0, 0, "My AddNumbers2 result is: " | &MySumProtected);
end-method;

t
   Conventional data types include number, date, string. Use them for basic
    computing. Object data types instantiate objects from PeopleTools class.

        Conventional  data types.
        Object data types.
It is nothing but inheritance. We can extend the properties        and
    methods of one class into another class using ‘extends’ key word
      Example:
     class Fruit
     method DoFruit();
     property number FruitNum instance;
     end-class;
     ​class Banana extends Fruit
       ​method DoBanana();
        property number BananaNum instance;
        end-class;
   A subclass inherits all of the public methods and properties of the class it
    extends. These members can be overridden by declarations of methods and
    properties in the subclass.
           Note. Application classes have no multiple inheritance
We can control the access by public , private, protected access specifiers.
         Public
         Protected
         Private
ex: class A
       property number a1;
       method number a1;
     protected:
       property number a2;
       method number a2;
      private:
       property number a3;
       method number a3;
 The system never skips to the next top-level statement.
 Pass parameters by value.

 Parameter passing with object data types is by reference.

 Application programs use the out specifier to pass a parameter by
  reference.
Note : Application class properties are always passed by value .
Passing Parameters with Object Data Types value and reference:
   Parameters with object data types are always passed by reference
   Example:
   method myMethod(&arg as MyObjectClass);
   /*method myMethod(&arg as MyObjectClass out);

   Local MyObjectClass &o1 = create MyObjectClass("A");
   Local MyOtherObjectClass &o2 = create MyOtherObjectClass();
   &o2.myMethod(&o1);
    Method myMethod
    &arg = create MyObjectClass("B");
   end-method;

   note : Since the method argument is reassigned within the body of
  myMethod, &o1 does not point at the new instance of MyObjectClass
Passing variable by value and reference
  /* argument passed by reference */
             method increment(&value as number out);
   /* argument passed by value */:
               method increment(&value as number);
   class AddStuff
   ​method DoAdd(&P1 as number, &P2 as number out);
​ end-class;
  method DoAdd
    &X = &P1 + &P2;
    &P1 = 1;
    &P2 = 2;
 end-method;

local AddStuff &Aref = Create AddStuff();
local number &I = 10;
local number &J = 20;
 &Aref.DoAdd(&I, &J); /* changes &J but not &I */
&Aref.DoAdd(10, 20); /* error - second argument not variable */
Sample code:
class MyInterface
  method MyMethod1() abstract;
  method MyMethod2() Returns string abstract;
  method MyMethod3();
  property string myproperty1 abstract readonly;
  property number myproperty2 abstract;
   property number myproperty3 abstract;
end-class;
method MyMethod3
 /*body
end-method;
Considerations using abstract methods:
   You cannot have private abstract methods.
   You will receive an error if you try to provide a method body for an
  abstract method.
   The method signatures must be identical between the abstract method
  definition and the method implementation in the derived.
Defining an application class which is totally composed of abstract
 methods and properties is called interface it avoids the problem in multiple
 inheritance.
 Interface MyInterface
 method MyMethod1();
   method MyMethod2() Returns string;
  property string myproperty1 readonly;
 property number myproperty2;
 property number myproperty3;
end-class;
       When you provide an implementation for an Interface you can also
 use the keyword Implements instead of Extends
    The constructor for a class is the public method with the same name as the
    (short name of the) class. The statements contained in this method (if any)
    provide the initialization of the class.
   This constructor is always executed when an object of the class is
    instantiated

class a
    method a();
   end-class;
This section describes the naming standards for:
     Packages.

     Classes.

     Methods.

     Properties.

       Packages :cc_xxx_[yyy]
       classes:do not name classes to be Getxxx
   Import Fruit:*;
   Import Fruit:Banana;
   Import Fruit:Drinks:*;



       Here any import classes having same short name we must use full
    name of the class for creating or initiating object to that class.
 A method can refer to the current object using the %This system variable.
 %This is an object of either the method's class or a subclass of the method's
  class.
%THIS :
Ex:1
     class FactorialClass
     method factorial(&I as number) returns number;
     end-class;
         method factorial
            if &I <= 1 then
            return 1;
            end-if;
return &I * factorial(&I - 1); /* error - factorial undefined */
 ​return &I * %This.factorial(&I - 1); /* okay */
end-method;
A method can refer to a member of its superclass by using the
  %Super system variable. This construction is needed only to access
  superclass members that are hidden by overriding members in the current
  class.
class ​BuildingAsset
    ​ method DisasterPrep();
end-class;
  ​method DisasterPrep
     /* some body*/
end-method;
class VancouverBuilding extends BuildingAsset
   ​method DisasterPrep();
​end-class;
   method DisasterPrep
       ​%Super.DisasterPrep(); /* call superclass method */
 end-method;
 local BuildingAsset &Building = Create VancouverBuilding();
 &Building. DisasterPrep();
class xxx
  property string StringProp get set;
end-class;

get StringProp
  return "string"; /* Get the value from somewhere. */
end-get;

set StringProp
  /* Do something with &NewValue. */
end-set;
A property of a superclass can be overridden by a subclass
class A
property number Anum;
 property string Astring ​get;
 property string Astring2 ​get;
 end-class;
​Get Astring
    ​return String(%This.Anum);
     ​end-get;
 ​Get Astring2
      ​return String(&Anum);
  ​end-get;
          class B extends A
       property number Anum;
       end-class;
   local B &B = Create B();
       &B.Anum = 2;
       &MyValue = &B.Astring;   /* &MyValue is "2" */
       &MyValue = &B.Astring2;               /* &MyValue is now "0" */
PeopleCode read-only properties are functionally similar to static
variables, as long as the class that defines the properties initializes them
and does not change them. The difference is that you need an instance of
the class to access them.
  syntax:
   property number a1 read only;

      &a=10;
Application classes can contain collections. Collections of objects
   generally have at least the following methods and properties.
First()
Item(Index)
Next()
Count (as a property)
   Instance variables.
   Global variables.
   Overriding variables and properties.
   Use the Exception class to do exception handling in your PeopleCode .
    This class provides a try, catch, and throw mechanism so you don't need to
    check after each operation for errors.
      1.Exception class.
      2.try.
      3.catch block.
    Exception class: This class contained
try /* Code to manipulate &MyArray here */
 &MyArray = GetArrayData(&Param1, &Param2, &Param3);
 catch ExceptionNull &Ex1
If &Ex1.MessageSetNumber = 2 and &Ex1.MessageNumber = 236 Then
  End-if;
End-try;
Example 2:
Local Exception
&ex; Function t1(&i As integer) Returns number
 Local number &res = &i / 0;
 End-Function; Function t2 throw
 CreateException (2, 160, "'%1' doesn't support property or method '%2'", "SomeClass", "SomeMethod");
 End-Function;
 try t2 ();
 Local number &res = t1 (2);
 Catch Exception &caugh
t MessageBox (0, "", 0, 0, "Caught exception: " | &caught.ToString());
 end-try;
   Application classes can be instantiated only from PeopleCode.
    These classes can be used anywhere you have PeopleCode, that is, in
    message notification PeopleCode , Component Interface PeopleCode,
    record field PeopleCode, and so on.
This section discusses some ways you can design application classes.
   Base data classes
   Abstract base classes
   Generic base classes
   Utility classes
 Internal comments, which start with /* and end with */.
 Comments for methods.

 Comments for classes.

 Method comments:
   @param N.
   @exception name.
   @return Type.
 Class Comments:
   @version number.
   @ author name.
Application package

Weitere ähnliche Inhalte

Was ist angesagt?

People soft base benefits
People soft base benefitsPeople soft base benefits
People soft base benefitsmeghamystic
 
Peoplesoft Basic App designer
Peoplesoft Basic App designerPeoplesoft Basic App designer
Peoplesoft Basic App designermbtechnosolutions
 
Oracle HRMS Accrual plan Setup
Oracle HRMS Accrual plan SetupOracle HRMS Accrual plan Setup
Oracle HRMS Accrual plan SetupFeras Ahmad
 
Oracle HRMS Fast Formula
Oracle HRMS Fast FormulaOracle HRMS Fast Formula
Oracle HRMS Fast Formularunjithrocking
 
Procedures functions structures in VB.Net
Procedures  functions  structures in VB.NetProcedures  functions  structures in VB.Net
Procedures functions structures in VB.Nettjunicornfx
 
Payroll process oracle hrms
Payroll process oracle hrmsPayroll process oracle hrms
Payroll process oracle hrmsShaju Shana
 
Oracle Fusion Cloud HCM Payroll Query
Oracle Fusion Cloud HCM Payroll QueryOracle Fusion Cloud HCM Payroll Query
Oracle Fusion Cloud HCM Payroll QueryFeras Ahmad
 
Oracle Form material
Oracle Form materialOracle Form material
Oracle Form materialRajesh Ch
 
Oracle HRMS Payroll Table Overview
Oracle HRMS Payroll Table OverviewOracle HRMS Payroll Table Overview
Oracle HRMS Payroll Table OverviewChris Martin
 
Hrms for beginners
Hrms for beginnersHrms for beginners
Hrms for beginnerssravan46
 
Payroll process in oracle hrms
Payroll process in oracle hrmsPayroll process in oracle hrms
Payroll process in oracle hrmsFaisal Anwar
 
Oracle hrms basic features and functionalities(for R11i and R12)
Oracle hrms basic features and functionalities(for R11i and R12)Oracle hrms basic features and functionalities(for R11i and R12)
Oracle hrms basic features and functionalities(for R11i and R12)Manish Goel, PMP
 
Absence management in oracle HRMS
Absence management in oracle HRMSAbsence management in oracle HRMS
Absence management in oracle HRMSRajiv reddy
 
Otl Oracle Time and Labor
Otl Oracle Time and LaborOtl Oracle Time and Labor
Otl Oracle Time and LaborFeras Ahmad
 

Was ist angesagt? (20)

People soft base benefits
People soft base benefitsPeople soft base benefits
People soft base benefits
 
People soft basics
People soft basicsPeople soft basics
People soft basics
 
Peoplesoft Basic App designer
Peoplesoft Basic App designerPeoplesoft Basic App designer
Peoplesoft Basic App designer
 
Oaf personalization examples
Oaf personalization examplesOaf personalization examples
Oaf personalization examples
 
Oracle HRMS Accrual plan Setup
Oracle HRMS Accrual plan SetupOracle HRMS Accrual plan Setup
Oracle HRMS Accrual plan Setup
 
Oracle HRMS Fast Formula
Oracle HRMS Fast FormulaOracle HRMS Fast Formula
Oracle HRMS Fast Formula
 
Procedures functions structures in VB.Net
Procedures  functions  structures in VB.NetProcedures  functions  structures in VB.Net
Procedures functions structures in VB.Net
 
Introduction to c#
Introduction to c#Introduction to c#
Introduction to c#
 
Payroll process oracle hrms
Payroll process oracle hrmsPayroll process oracle hrms
Payroll process oracle hrms
 
Base tables for order to cash
Base tables for order to cashBase tables for order to cash
Base tables for order to cash
 
Oracle Fusion Cloud HCM Payroll Query
Oracle Fusion Cloud HCM Payroll QueryOracle Fusion Cloud HCM Payroll Query
Oracle Fusion Cloud HCM Payroll Query
 
Oracle Form material
Oracle Form materialOracle Form material
Oracle Form material
 
Ado.net
Ado.netAdo.net
Ado.net
 
Oracle HRMS Payroll Table Overview
Oracle HRMS Payroll Table OverviewOracle HRMS Payroll Table Overview
Oracle HRMS Payroll Table Overview
 
Hrms for beginners
Hrms for beginnersHrms for beginners
Hrms for beginners
 
Payroll process in oracle hrms
Payroll process in oracle hrmsPayroll process in oracle hrms
Payroll process in oracle hrms
 
Oracle hrms basic features and functionalities(for R11i and R12)
Oracle hrms basic features and functionalities(for R11i and R12)Oracle hrms basic features and functionalities(for R11i and R12)
Oracle hrms basic features and functionalities(for R11i and R12)
 
Absence management in oracle HRMS
Absence management in oracle HRMSAbsence management in oracle HRMS
Absence management in oracle HRMS
 
Otl Oracle Time and Labor
Otl Oracle Time and LaborOtl Oracle Time and Labor
Otl Oracle Time and Labor
 
Understanding Physical Inventory
Understanding Physical InventoryUnderstanding Physical Inventory
Understanding Physical Inventory
 

Andere mochten auch

People code events 1
People code events 1People code events 1
People code events 1Samarth Arora
 
People code events flowchart
People code events flowchartPeople code events flowchart
People code events flowchartSatish Ap
 
Peoplesoft Query Overview
Peoplesoft Query OverviewPeoplesoft Query Overview
Peoplesoft Query OverviewRockon0017i5
 
PeopleSoft Integration broker Performance Tunning
PeopleSoft Integration broker Performance TunningPeopleSoft Integration broker Performance Tunning
PeopleSoft Integration broker Performance TunningInSync Conference
 
What's New in the PeopleSoft 9.2 Accounts Payable Module?
What's New in the PeopleSoft 9.2 Accounts Payable Module?What's New in the PeopleSoft 9.2 Accounts Payable Module?
What's New in the PeopleSoft 9.2 Accounts Payable Module?NERUG
 
Using the PeopleSoft HCM 9.2 PUM (PeopleSoft Update Manager) for Upgrades and...
Using the PeopleSoft HCM 9.2 PUM (PeopleSoft Update Manager) for Upgrades and...Using the PeopleSoft HCM 9.2 PUM (PeopleSoft Update Manager) for Upgrades and...
Using the PeopleSoft HCM 9.2 PUM (PeopleSoft Update Manager) for Upgrades and...NERUG
 
Three tier Architecture of ASP_Net
Three tier Architecture of ASP_NetThree tier Architecture of ASP_Net
Three tier Architecture of ASP_NetBiswadip Goswami
 
PeopleSoft Interview Questions - Part 1
PeopleSoft Interview Questions - Part 1PeopleSoft Interview Questions - Part 1
PeopleSoft Interview Questions - Part 1ReKruiTIn.com
 
Presentation2
Presentation2Presentation2
Presentation2JAYAARC
 
Peoplesoft PIA architecture
Peoplesoft PIA architecturePeoplesoft PIA architecture
Peoplesoft PIA architectureAmit rai Raaz
 
App designer2 in peoplesoft
App designer2 in peoplesoftApp designer2 in peoplesoft
App designer2 in peoplesoftVenkat Jyesta
 
XMLPublisher
XMLPublisherXMLPublisher
XMLPublisherJAYAARC
 
Bi publisher starter guide to develop first report
Bi publisher starter guide to develop first reportBi publisher starter guide to develop first report
Bi publisher starter guide to develop first reportketulp
 
The Secret Sauce For Writing Reusable Code
The Secret Sauce For Writing Reusable CodeThe Secret Sauce For Writing Reusable Code
The Secret Sauce For Writing Reusable CodeAlain Schlesser
 

Andere mochten auch (19)

People code events 1
People code events 1People code events 1
People code events 1
 
People code events flowchart
People code events flowchartPeople code events flowchart
People code events flowchart
 
Peoplesoft Query Overview
Peoplesoft Query OverviewPeoplesoft Query Overview
Peoplesoft Query Overview
 
PeopleSoft Integration broker Performance Tunning
PeopleSoft Integration broker Performance TunningPeopleSoft Integration broker Performance Tunning
PeopleSoft Integration broker Performance Tunning
 
What's New in the PeopleSoft 9.2 Accounts Payable Module?
What's New in the PeopleSoft 9.2 Accounts Payable Module?What's New in the PeopleSoft 9.2 Accounts Payable Module?
What's New in the PeopleSoft 9.2 Accounts Payable Module?
 
Using the PeopleSoft HCM 9.2 PUM (PeopleSoft Update Manager) for Upgrades and...
Using the PeopleSoft HCM 9.2 PUM (PeopleSoft Update Manager) for Upgrades and...Using the PeopleSoft HCM 9.2 PUM (PeopleSoft Update Manager) for Upgrades and...
Using the PeopleSoft HCM 9.2 PUM (PeopleSoft Update Manager) for Upgrades and...
 
Setids
SetidsSetids
Setids
 
PPT1
PPT1PPT1
PPT1
 
Three tier Architecture of ASP_Net
Three tier Architecture of ASP_NetThree tier Architecture of ASP_Net
Three tier Architecture of ASP_Net
 
SDLC
SDLC SDLC
SDLC
 
Devi
DeviDevi
Devi
 
PeopleSoft Interview Questions - Part 1
PeopleSoft Interview Questions - Part 1PeopleSoft Interview Questions - Part 1
PeopleSoft Interview Questions - Part 1
 
Presentation2
Presentation2Presentation2
Presentation2
 
Peoplesoft PIA architecture
Peoplesoft PIA architecturePeoplesoft PIA architecture
Peoplesoft PIA architecture
 
Unicode (and Python)
Unicode (and Python)Unicode (and Python)
Unicode (and Python)
 
App designer2 in peoplesoft
App designer2 in peoplesoftApp designer2 in peoplesoft
App designer2 in peoplesoft
 
XMLPublisher
XMLPublisherXMLPublisher
XMLPublisher
 
Bi publisher starter guide to develop first report
Bi publisher starter guide to develop first reportBi publisher starter guide to develop first report
Bi publisher starter guide to develop first report
 
The Secret Sauce For Writing Reusable Code
The Secret Sauce For Writing Reusable CodeThe Secret Sauce For Writing Reusable Code
The Secret Sauce For Writing Reusable Code
 

Ähnlich wie Application package

Ähnlich wie Application package (20)

Introduction to OOP with PHP
Introduction to OOP with PHPIntroduction to OOP with PHP
Introduction to OOP with PHP
 
Question and answer Programming
Question and answer ProgrammingQuestion and answer Programming
Question and answer Programming
 
OOPS IN PHP.pptx
OOPS IN PHP.pptxOOPS IN PHP.pptx
OOPS IN PHP.pptx
 
Only oop
Only oopOnly oop
Only oop
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)
 
C# interview
C# interviewC# interview
C# interview
 
Object Oriended Programming with Java
Object Oriended Programming with JavaObject Oriended Programming with Java
Object Oriended Programming with Java
 
Object oriented basics
Object oriented basicsObject oriented basics
Object oriented basics
 
Opp concept in c++
Opp concept in c++Opp concept in c++
Opp concept in c++
 
Delphi qa
Delphi qaDelphi qa
Delphi qa
 
Classes2
Classes2Classes2
Classes2
 
Object oreinted php | OOPs
Object oreinted php | OOPsObject oreinted php | OOPs
Object oreinted php | OOPs
 
Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1
 
Oops
OopsOops
Oops
 
My c++
My c++My c++
My c++
 
Java notes
Java notesJava notes
Java notes
 
Java căn bản - Chapter7
Java căn bản - Chapter7Java căn bản - Chapter7
Java căn bản - Chapter7
 
Chapter 7 - Defining Your Own Classes - Part II
Chapter 7 - Defining Your Own Classes - Part IIChapter 7 - Defining Your Own Classes - Part II
Chapter 7 - Defining Your Own Classes - Part II
 
JAVA-PPT'S.pdf
JAVA-PPT'S.pdfJAVA-PPT'S.pdf
JAVA-PPT'S.pdf
 
Oops concepts in php
Oops concepts in phpOops concepts in php
Oops concepts in php
 

Kürzlich hochgeladen

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Kürzlich hochgeladen (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

Application package

  • 1. PRESENTED BY, P.S.S.SWAMY.
  • 2. What is an application package.  What is an application class.  Object oriented concepts.  Understanding application packages &classes.  Process for creating packages and classes in Application designer.  Application class structure.  How to use this packages and classes in people code.(import declaration).  Access controls.  Definition of methods.  Abstract methods and properties.  Interfaces.  Constructors.  Get/set methods &read only read write.  Exception Handling.
  • 3. Application package is a container for application subpackages and application classes, which will provide a hierarchical structure to your People Code programs and help you extend the common functionality of existing People Code classes (Rowset, Array, and so on) from one application to another.
  • 4. App Class is a People Code Program at base level  Application classes are mainly used for reusability.  Application classes people code supports object oriented programming. i .e it supports: Classes and Objects. Encapsulation. Abstraction. Polymorphism. Inheritance.
  • 5. Class : Class is a blueprint of the object .It consists of variable and methods. class doesn’t occupy any memory. ex: Class is a map for building the house. Object : Object is a real entity any thing physically exists in the world is called an object. But in programming languages object is instance of a class .It occupies some memory. ex: Object is house. Encapsulation : It’s came from the word capsule . It is a property to bind the variable and methods and also it hides the internal structure. It prevents clients from seeing the inside view. We can achieve abstraction through encapsulation. ex : car driver doesn’t know what is the functionality when gear is changed one level to another level . But he change the gear against to the speed.
  • 6. Abstraction : Abstraction is process it allows to show the essential object information to the user i.e hide the non essential object information. We can achieve this through encapsulation. Inheritance: It is one of the most important feature of Object Oriented Programming. It is the concept that is used for reusability purpose. Inheritance is the mechanism through which we can derived classes from other classes. The derived class is called as child class or subclass. The class from which the subclass is derived is called a superclass (also a base class or a parent class). Polymorphism : A method having different forms is called polymorphism i.e method having the same name but we can perform different tasks by using this polymorphism. We have to concepts here 1.method overloading. 2.method overriding.
  • 7. Application classes have a fully qualified name that is formed hierarchically by the name of the top-level package. It means we can give the same name of different classes but the fully qualified name of the class must be unique. ex :1.pack1A.class 2.pack1pack2A.class Here ex1 fully qualified name ‘ A. class’ is different from ex2
  • 8. Import MY_TEST : MyFormulaCruncher; Local MY_TEST : MyFormulaCruncher & My_Nbr = create MY_TEST : MyFormulaCruncher(); Local number &Result; &Result = &My _ Nbr.AddNumbers(2, 1);  Before calling any method in a class you must import the package.
  • 9. You can create Application Packages in Application Designer. These packages contain application classes (and may contain other packages also). An application class, at its base level, is just a People Code program. However, using the Application Packages, you can create your own classes, and extend the functionality of the existing People Code classes.  Easier to debug because all the pieces are separate  Easier to maintain because functionality is gathered into a single place  Extensible by subclass.
  • 10.
  • 11. Import class  Class name  Class extensions  Declaration of public external interface  Declaration variables and methods  Definition of methods
  • 12. class MyFormulaCruncher method MyFormulaCruncher(); method AddNumbers(&a As number, &b As number) Returns number; method AddNumbers2(); property number FirstNumber; property number SecondNumber; property number MySum readonly; protected property number MySumProtected; end-class; method MyFormulaCruncher end-method; method AddNumbers Local number &c; &c = &a + &b; MessageBox(0, "", 0, 0, "My AddNumbers result is: " | &c); Return &c; end-method; method AddNumbers2 &MySum = &FirstNumber + &SecondNumber; &MySumProtected = &FirstNumber + &SecondNumber; MessageBox(0, "", 0, 0, "My AddNumbers2 result is: " | &MySumProtected); end-method; t
  • 13. Conventional data types include number, date, string. Use them for basic computing. Object data types instantiate objects from PeopleTools class.  Conventional data types.  Object data types.
  • 14. It is nothing but inheritance. We can extend the properties and methods of one class into another class using ‘extends’ key word Example: class Fruit method DoFruit(); property number FruitNum instance; end-class; ​class Banana extends Fruit ​method DoBanana(); property number BananaNum instance; end-class;  A subclass inherits all of the public methods and properties of the class it extends. These members can be overridden by declarations of methods and properties in the subclass. Note. Application classes have no multiple inheritance
  • 15. We can control the access by public , private, protected access specifiers.  Public  Protected  Private ex: class A property number a1; method number a1; protected: property number a2; method number a2; private: property number a3; method number a3;
  • 16.  The system never skips to the next top-level statement.  Pass parameters by value.  Parameter passing with object data types is by reference.  Application programs use the out specifier to pass a parameter by reference. Note : Application class properties are always passed by value .
  • 17. Passing Parameters with Object Data Types value and reference: Parameters with object data types are always passed by reference Example: method myMethod(&arg as MyObjectClass); /*method myMethod(&arg as MyObjectClass out); Local MyObjectClass &o1 = create MyObjectClass("A"); Local MyOtherObjectClass &o2 = create MyOtherObjectClass(); &o2.myMethod(&o1); Method myMethod &arg = create MyObjectClass("B"); end-method; note : Since the method argument is reassigned within the body of myMethod, &o1 does not point at the new instance of MyObjectClass
  • 18. Passing variable by value and reference /* argument passed by reference */ method increment(&value as number out); /* argument passed by value */: method increment(&value as number); class AddStuff ​method DoAdd(&P1 as number, &P2 as number out); ​ end-class; method DoAdd &X = &P1 + &P2; &P1 = 1; &P2 = 2; end-method; local AddStuff &Aref = Create AddStuff(); local number &I = 10; local number &J = 20; &Aref.DoAdd(&I, &J); /* changes &J but not &I */ &Aref.DoAdd(10, 20); /* error - second argument not variable */
  • 19. Sample code: class MyInterface method MyMethod1() abstract; method MyMethod2() Returns string abstract; method MyMethod3(); property string myproperty1 abstract readonly; property number myproperty2 abstract; property number myproperty3 abstract; end-class; method MyMethod3 /*body end-method; Considerations using abstract methods:  You cannot have private abstract methods.  You will receive an error if you try to provide a method body for an abstract method.  The method signatures must be identical between the abstract method definition and the method implementation in the derived.
  • 20. Defining an application class which is totally composed of abstract methods and properties is called interface it avoids the problem in multiple inheritance. Interface MyInterface method MyMethod1(); method MyMethod2() Returns string; property string myproperty1 readonly; property number myproperty2; property number myproperty3; end-class; When you provide an implementation for an Interface you can also use the keyword Implements instead of Extends
  • 21. The constructor for a class is the public method with the same name as the (short name of the) class. The statements contained in this method (if any) provide the initialization of the class.  This constructor is always executed when an object of the class is instantiated class a method a(); end-class;
  • 22. This section describes the naming standards for:  Packages.  Classes.  Methods.  Properties. Packages :cc_xxx_[yyy] classes:do not name classes to be Getxxx
  • 23. Import Fruit:*;  Import Fruit:Banana;  Import Fruit:Drinks:*; Here any import classes having same short name we must use full name of the class for creating or initiating object to that class.
  • 24.  A method can refer to the current object using the %This system variable.  %This is an object of either the method's class or a subclass of the method's class. %THIS : Ex:1 class FactorialClass method factorial(&I as number) returns number; end-class; method factorial if &I <= 1 then return 1; end-if; return &I * factorial(&I - 1); /* error - factorial undefined */ ​return &I * %This.factorial(&I - 1); /* okay */ end-method;
  • 25. A method can refer to a member of its superclass by using the %Super system variable. This construction is needed only to access superclass members that are hidden by overriding members in the current class. class ​BuildingAsset ​ method DisasterPrep(); end-class; ​method DisasterPrep /* some body*/ end-method; class VancouverBuilding extends BuildingAsset ​method DisasterPrep(); ​end-class; method DisasterPrep ​%Super.DisasterPrep(); /* call superclass method */ end-method; local BuildingAsset &Building = Create VancouverBuilding(); &Building. DisasterPrep();
  • 26. class xxx property string StringProp get set; end-class; get StringProp return "string"; /* Get the value from somewhere. */ end-get; set StringProp /* Do something with &NewValue. */ end-set;
  • 27. A property of a superclass can be overridden by a subclass class A property number Anum; property string Astring ​get; property string Astring2 ​get; end-class; ​Get Astring ​return String(%This.Anum); ​end-get; ​Get Astring2 ​return String(&Anum); ​end-get; class B extends A property number Anum; end-class; local B &B = Create B(); &B.Anum = 2; &MyValue = &B.Astring; /* &MyValue is "2" */ &MyValue = &B.Astring2; /* &MyValue is now "0" */
  • 28. PeopleCode read-only properties are functionally similar to static variables, as long as the class that defines the properties initializes them and does not change them. The difference is that you need an instance of the class to access them. syntax: property number a1 read only; &a=10;
  • 29. Application classes can contain collections. Collections of objects generally have at least the following methods and properties. First() Item(Index) Next() Count (as a property)
  • 30. Instance variables.  Global variables.  Overriding variables and properties.
  • 31. Use the Exception class to do exception handling in your PeopleCode . This class provides a try, catch, and throw mechanism so you don't need to check after each operation for errors. 1.Exception class. 2.try. 3.catch block. Exception class: This class contained
  • 32. try /* Code to manipulate &MyArray here */ &MyArray = GetArrayData(&Param1, &Param2, &Param3); catch ExceptionNull &Ex1 If &Ex1.MessageSetNumber = 2 and &Ex1.MessageNumber = 236 Then End-if; End-try; Example 2: Local Exception &ex; Function t1(&i As integer) Returns number Local number &res = &i / 0; End-Function; Function t2 throw CreateException (2, 160, "'%1' doesn't support property or method '%2'", "SomeClass", "SomeMethod"); End-Function; try t2 (); Local number &res = t1 (2); Catch Exception &caugh t MessageBox (0, "", 0, 0, "Caught exception: " | &caught.ToString()); end-try;
  • 33. Application classes can be instantiated only from PeopleCode.  These classes can be used anywhere you have PeopleCode, that is, in message notification PeopleCode , Component Interface PeopleCode, record field PeopleCode, and so on.
  • 34. This section discusses some ways you can design application classes.  Base data classes  Abstract base classes  Generic base classes  Utility classes
  • 35.  Internal comments, which start with /* and end with */.  Comments for methods.  Comments for classes. Method comments: @param N. @exception name. @return Type. Class Comments: @version number. @ author name.