Question Using Shared Frames

Greetings Everyone! Can you please give me simple program that uses a shared frame? I am new in progress programming and I am now on this chapter. Thank you .
 

RealHeavyDude

Well-Known Member
Does anybody use shared things anymore? Don't - shared things are one of the roots of all evil in software development and using them is the road to hell in modern software development!

Heavy Regards, RealHeavyDude.
 

Cringer

ProgressTalk.com Moderator
Staff member
Are you following a particular guide?
Did you know that Progress do a 3 week intensive training course that is incredibly good value (€1000 for the Rotterdam location if I remember correctly) that would be very worthwhile.
 

TomBascom

Curmudgeon
Using shared frames immediately makes a program non-simple.

Using shared frames is inexcusable malpractice. Teaching someone to do so is a criminal act in most civilized countries.
 
I'm Sorry everyone maybe there is a misunderstanding between what I meant and you, because what I meant is, I'm just learning progress and I am now in the chapter of sharing like variables and frames between two different procedure that I create. I learned how to create shared variables , now I'm learning to share my frame to my other procedure. I don't know if its possible that was I really meant Sir. Sorry if there are misunderstanding.
 
Does anybody use shared things anymore? Don't - shared things are one of the roots of all evil in software development and using them is the road to hell in modern software development!

Heavy Regards, RealHeavyDude.

I'm Sorry everyone maybe there is a misunderstanding between what I meant and you, because what I meant is, I'm just learning progress and I am now in the chapter of sharing like variables and frames between two different procedure that I create. I learned how to create shared variables , now I'm learning to share my frame to my other procedure. I don't know if its possible that was I really meant Sir. Sorry if there are misunderstanding.
 
I don't think what I'm doing is illegal because, I just followed the book, and I,m just trying to call a procedure from another procedure that's all Sir. Sorry if I wasn't clear.
 

RealHeavyDude

Well-Known Member
Don't get us wrong: We see so much bad code that uses obsolete stuff and bad practice that it sometimes drives us mad. Even more so when somebody starts to learn Progress and tries to learn from bad practice and/or bad examples. Unfortunately Progress is notorious for providing so many bad practices/examples in their documentation that one shouldn't wonder. What are you using to learn Progress? Do you have an experienced mentor?

Nevertheless, if you want to run a procedure, anwhere in you code just:
Code:
run pathToYourProcedure.p.
Have a look at the help for the run statement to see how you can provide parameters - and please, pleas, don't use shared variables.
OpenEdge 11.6 Documentation


Heavy Regards, RealHeavyDude.
 
Don't get us wrong: We see so much bad code that uses obsolete stuff and bad practice that it sometimes drives us mad. Even more so when somebody starts to learn Progress and tries to learn from bad practice and/or bad examples. Unfortunately Progress is notorious for providing so many bad practices/examples in their documentation that one shouldn't wonder. What are you using to learn Progress? Do you have an experienced mentor?

Nevertheless, if you want to run a procedure, anwhere in you code just:
Code:
run pathToYourProcedure.p.
Have a look at the help for the run statement to see how you can provide parameters - and please, pleas, don't use shared variables.
OpenEdge 11.6 Documentation


Heavy Regards, RealHeavyDude.

Yes Sir, Thank you Sir, I'm sorry if we have a misunderstanding. I'm learning the progress and to use it correctly. I totally understand that you just want a fair use in the field of system development. I'm with you on that Sir, so thank you, maybe my knowledge for now is so limited on that things.
 

Cringer

ProgressTalk.com Moderator
Staff member
As RHD has said, there really is no misunderstanding from this side.
Shared objects were introduced to the language a long time ago at a time when you couldn't use parameters. They were a way of enabling users to pass stuff around. They were great at the time, but that was a long time ago indeed. Since then we have been given the ability to pass parameters, and more recently to use Object Oriented constructs to pass things around and to make things available elsewhere. Both of these options are preferable to sharing objects.
The trouble with shared objects is that you really don't know where they are created or updated once your application grows beyond the trivial. You can have some really unexpected behaviours that are impossible to debug.
Parameters on the other hand are much more transparent and also adhere to better programming practises that have developed over the years.
In other words, what we are saying is that you shouldn't focus on the obsolete. It's difficult because Progress do not remove features from the language so that you can upgrade more easily. It means, though, that sometimes you will come across features that are deprecated or not recommended for use. The only reason for learning them is to maintain legacy code.
As has been alluded to in this thread already you should make sure you are mentored by an experienced teacher, and/or sign up for formal training.
If training isn't available near to you then there are plenty of consultants out there who would be more than willing to provide training, at a cost of course.
 

TomBascom

Curmudgeon
Teaching new programmers to code with the SHARED keyword is like teaching a child to swear.

Using Progress correctly involves knowing which parts of the 4gl should not be used at all.

SHARED
DOS, UNIX
CAN-DO
MATCHES
CALL
DEFINE WORK-TABLE
ACCUMULATE
VALIDATE
RELEASE
OF
USE-INDEX
FIND FIRST (and FIND LAST)
FOR FIRST (and FOR LAST)

Plus Progress' semi-official list of deprecated features:

UPDATE EDITING
GO-PENDING
CHOOSE
SCROLL
PUT SCREEN
IS-ATTR-SPACE
GETWAYS
SQL
 

tamhas

ProgressTalk.com Sponsor
To followup on what James said, good progress implies encapsulation of related behavior in a procedure or object and clear passing of needed parameters between these procedures or objects, so that you can clearly trace the flow of information and know exactly where something came from and went to. Encapsulation is the flip side of this, i.e., minimizing the amount of information which needs to be passed around by putting all of the functions needed to do some thing in a single unit. Use persistent or super procedures or classes to have this functionality hang around for as long as you need it. There is a very limited need to access some information from just about anywhere, e.g., the current fiscal period or effective date or user. For those, a class with static variables is ideal ... just don't overuse it and don't do any disk IO in that class.
 
Top