The use of the Factory Paragraph versus Class-Object in Object Oriented (OO) COBOL 
Author Message
 The use of the Factory Paragraph versus Class-Object in Object Oriented (OO) COBOL

When I first started using the MicroFocus Workbench on Windows NT with OO
COBOL support, the paragraph name given to static or class methods was
FACTORY or at least that was my understanding. I upgraded to NetExpress 2.0
sometime this year (1998) and it uses the paragraph name CLASS-OBJECT which
it seems to me was used in place of the FACTORY name.

I recently searched all of the samples for both the workbench and the
NetExpress 2.0 and did not find the FACTORY paragraph in use. I then got
curious and downloaded and reviewed the latest standard from
http://www.*-*-*.com/
research.

I find

11.1.4 Factory definition
A factory definition is a source unit introduced by an identification
division containing the FACTORY paragraph. A factory definition may contain
an environment division, a data division, and a procedure division. The
definitions in the environment division apply to the factory definition and
to every method definition declared in the factory definition. The
environment division shall not contain a configuration section. The data
division may contain only a file section, a working-storage section, and a
report section. The procedure division may contain declaratives and method
definitions, no other statements, section headers, or paragraph headers. A
factory definition shall end with an END FACTORY header.

No where could I find the use of the class-object paragraph name. I find the
use of the paragraph name class-object much more intuitive than factory.
Anyone who is familiar with design patterns will understand the confusion
experienced when I see the term used this way. I know that different
languages call class or factory methods different things. I believe C++
calls these static methods. I understand that a common use of class/factory
method is to create other objects, but this is not the only use for these
methods.

I guess I would like to know if the use of the paragraph factory is
interchangeable with MicroFocus NetExpresss use of the paragraph
class-object, if they are intended to mean or be used in different ways or
if NetExpress will go back to the factory.

My preference is a strong stay with class-object as I think it is a lot
clearer. I guess if I said to you that is a factory method (in my mind) it
is not as clear as if I said that this was a class-method. So do you refer
to data that is global to the factory/class methods as factory data or
class-data I think this illustrates my point.

If any of this is wrong or someone can shed light on why this is this way, I
would really like to know.

BTW: The reason I stumbled across this is converting a NetExpress OO
Tutorial to Fujitsu and the differences between the two implementations. I
understand that Fujitsu is suppose to be closer to the proposed standard and
that NetExpress 3.0 will be closer still with backward compatibility. Just
because something adheres to the standard doesnt mean I have to like it
hey who can I complain to get this changed. If you which to see the
NetExpress version go to http://www.*-*-*.com/ ~oocobol

--
To respond to me via email, please remove the nospam from the reply to
address.

Listen to the experts they will tell you what can't be done, and why.  Then
do it.
Object Oriented COBOL is the wave of the future!
My Object Oriented COBOL Web Site http://www.*-*-*.com/ ~oocobol



Sat, 24 Feb 2001 03:00:00 GMT  
 The use of the Factory Paragraph versus Class-Object in Object Oriented (OO) COBOL

Quote:

>When I first started using the MicroFocus Workbench on Windows NT with OO
>COBOL support, the paragraph name given to static or class methods was
>FACTORY or at least that was my understanding. I upgraded to NetExpress 2.0
>sometime this year (1998) and it uses the paragraph name CLASS-OBJECT which
>it seems to me was used in place of the FACTORY name.

>I recently searched all of the samples for both the workbench and the
>NetExpress 2.0 and did not find the FACTORY paragraph in use. I then got
>curious and downloaded and reviewed the latest standard from
>http://www.microfocus.com/Standards/basedoc.htm and started doing a little
>research.
[Snip]
>If any of this is wrong or someone can shed light on why this is this way, I
>would really like to know.

Gene,
"class-object" is the syntax Micro Focus currently supports for its
implementation of Object COBOL.

Our implementation of OO COBOL has obviously been released before the ANSI
2000 standard has been completed, and this standard does indeed contain
certain differences from our current implementation. This includes the
keyword "factory" in place of "class-object", as well as "working-storage"
in place of "object-storage" and other minor differences.

The release of NetExpress we are currently working on (3.0) will contain
support for both syntaxes.

Steve.
Micro Focus.

--
E-mail replies: please remove all the "z"s from my address.



Sun, 25 Feb 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ANNOUNCEMENT: Object-Oriented Systems - new object-oriented journal

2. One paragraph definition of Object Oriented Design

3. ANNOUNCEMENT: Object-Oriented Systems - new object-oriented journal

4. Object oriented versus Structured (COBOL)

5. WAS: Re: Object-Oriented Reading List (now structured A&D vs OO)

6. The Eiffel OO-Browser V2.13, world's most flexible object-oriented code browser

7. The Python OO-Browser V2.13, world's most flexible object-oriented code browser

8. The Lisp/CLOS OO-Browser V2.13, world's most flexible object-oriented code browser

9. The Smalltalk OO-Browser V2.13, world's most flexible object-oriented code browser

10. WAS: Re: Object-Oriented Reading List (now structured A&D vs OO)

11. Object Structures - Building Object-Oriented Software Components with Eiffel- By Jacob Gore

12. Good design of object-oriented extension classes

 

 
Powered by phpBB® Forum Software