Global functions vs global userobject functions

Working with PB 7, I often ask myself what is the good way.

My applications has one global instance of a userobject u_function and use 
also global functions.

In some case, the choice of where to put a new function is evident. When I 
could need the function in dw expression, there are global, when I need to 
call functions with different parameters, they are userobject functions.

But, the other functions ? Where is the best place for them ? Global or in 
the userobject ? 


0
ALP
11/4/2004 9:55:11 AM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

4 Replies
674 Views

Similar Articles

[PageSpeed] 10

I thnik u can go for Global functions
Since u have in need in DW expression also.
I think Overload with different parametrs.

KISHORE


"ALP" <alp@ciger.be> wrote in message
news:1099562105.535730@avoriaz.ciger.be...
> Working with PB 7, I often ask myself what is the good way.
>
> My applications has one global instance of a userobject u_function and use
> also global functions.
>
> In some case, the choice of where to put a new function is evident. When I
> could need the function in dw expression, there are global, when I need to
> call functions with different parameters, they are userobject functions.
>
> But, the other functions ? Where is the best place for them ? Global or in
> the userobject ?
>
>


0
kishore
11/4/2004 11:47:28 AM
The most important characteristic of user objects is possibility of inherit,
and the function into this can be redefined in decendant. Global functions
can't be used to inherit. Other things are important to like you tell.

Regards
BMartins


"ALP" <alp@ciger.be> escreveu na mensagem
news:1099562105.535730@avoriaz.ciger.be...
> Working with PB 7, I often ask myself what is the good way.
>
> My applications has one global instance of a userobject u_function and use
> also global functions.
>
> In some case, the choice of where to put a new function is evident. When I
> could need the function in dw expression, there are global, when I need to
> call functions with different parameters, they are userobject functions.
>
> But, the other functions ? Where is the best place for them ? Global or in
> the userobject ?
>
>


0
BMartins
11/4/2004 1:04:30 PM
"BMartins" <beatriz@pred.com.br> wrote:

> The most important characteristic of user objects is possibility of
inherit,
> and the function into this can be redefined in decendant. Global functions
> can't be used to inherit.

   IIRC you can't overload a global function, as opposed to the class
method.

Dmitri.

> "ALP" <alp@ciger.be> escreveu na mensagem
> news:1099562105.535730@avoriaz.ciger.be...
> > Working with PB 7, I often ask myself what is the good way.
> >
> > My applications has one global instance of a userobject u_function and
use
> > also global functions.
> >
> > In some case, the choice of where to put a new function is evident. When
I
> > could need the function in dw expression, there are global, when I need
to
> > call functions with different parameters, they are userobject functions.
> >
> > But, the other functions ? Where is the best place for them ? Global or
in
> > the userobject ?
> >
> >
>
>


0
Dmitri
11/4/2004 1:49:06 PM
It's exactly I said in a simple way.
In a user object you can use OO concepts like Inclusion Polymorphism (this
use overloading and overriding), Inheritance, Extending (functions and
events) and you can encapsulate object concepts. Global functions do none.
BMartins

"Dmitri" <NOdimSPAM@mail15.com> escreveu na mensagem
news:418a3352@forums-1-dub...
> "BMartins" <beatriz@pred.com.br> wrote:
>
> > The most important characteristic of user objects is possibility of
> inherit,
> > and the function into this can be redefined in decendant. Global
functions
> > can't be used to inherit.
>
>    IIRC you can't overload a global function, as opposed to the class
> method.
>
> Dmitri.
>
> > "ALP" <alp@ciger.be> escreveu na mensagem
> > news:1099562105.535730@avoriaz.ciger.be...
> > > Working with PB 7, I often ask myself what is the good way.
> > >
> > > My applications has one global instance of a userobject u_function and
> use
> > > also global functions.
> > >
> > > In some case, the choice of where to put a new function is evident.
When
> I
> > > could need the function in dw expression, there are global, when I
need
> to
> > > call functions with different parameters, they are userobject
functions.
> > >
> > > But, the other functions ? Where is the best place for them ? Global
or
> in
> > > the userobject ?
> > >
> > >
> >
> >
>
>


0
BMartins
11/4/2004 7:46:21 PM
Reply:

Similar Artilces:

UserObjects, Functions and variables - access userobject functions from popupmenu
I have a visual userobject in charge of managing info related to different data in the application ( Items , company, purchase order,....) This user object has, in summary, - a datawindow to show the list of related documents, with a retrieval argument ( depending on the the related data ) - a popup menu on the rightbutton click, giving access to classical funstions like Create, modifiy, delete. - several functions, in particular, a function to retrieve the datawindow, according the argument passed by the parent window, and a function to delete a line, function in which a lot o...

Global variables & global functions...
Hi, Is there any problem of using global variables & global functions in PB applications? (Other than maintenance of the app, of course.) I guess what I'm trying to ask here is, Is there any performance improvement at execution time by creating & using an userobject with instance variables & object functions rather than using global variables & global functions? Any of your suggestions are greatly appreciated. Thanks. Jeinutheen. No. There is no "noticable" difference calling a global function vs. calling an object function. Even ver...

How to store a function globally and then call the function?
Hello, I have the following function stored in X.asp.vb and I call it from X.asp (as below). My question is how can I store the function globally so I can call it from multiple .asp pages? I have been reading around this forum and is seems that placing the Function into a .vb class in App_Code is the way to go (which I have tried) The problem is I then don't now how to call it from X.asp Can anybody assist?  X.asp.vbPublic Function GetFormattedAddress(ByVal val1 As Object, ByVal val2 As Object, ByVal val3 As Object, ByVal val4 As Object, ByVal val5 As Object) As StringX.asp&l...

global function/sub function page
Hi I want to know how i can create a page with globol functions that is to be included every page of the site. Does anyone know how to do this or know of any tutorials - hopefully in asp 1x and in vb   thanks in advance Hesh for Global Function ....what you can do is .. develop a class with Static/Shared Methods.. and that would be accessible through out the application pages...here is an example C#  using System;using System.Collections.Generic;using System.Text;using System.Net;using System.Net.Mail;namespace RealEstate.Common{ public class CommonFunct...

Global.asax
Hi Using Visual Studio 2005, C# style, with codebehind on most pages. I have a setting system where all langauge is grabbed from the database during application_start into cache, and it is working nice. I´m using the database because all text shall be translateable by end users through a userfriendly tool. I want a global GetText() function that can be accessed anywhere in my web-project. I do not think you need to understand it to answer my question, but I´ll post it anyway furher down this post. Since GetText(); will be used a lot on all pages, everywhere there is text, I do not w...

PowerBuilder... global function caller
Hi, Is it possible to check within a function what object/even/function called it? -- Thanks & regards Damian Well, the hack method I used to use was to do a PopulateError and then read the values off the error object (without actually signalling the error). On 21 Jun 2006 14:58:09 -0700, "DeeDee" <deedee@unknown.com> wrote: >Hi, > >Is it possible to check within a function what object/even/function called >it? add an argument of type PowerObject and call the function with This of_myFunc(PowerObject apo_caller) <in...

Declaring Global Variables and Global External Function By PowerScript
Does anyone can tell me, can I declare the global external function / global Variables by PowerScript ( such as, within the application's open event ), not in 'declare painter' ??? Thanks Samkola No. They need to be declared within the Global Variables painter. Ron Gallagher, CPDP Atlanta, GA rongallagher@mindspring.com samkola wrote in message <01beee19$8715d2a0$2d01a8c0@testing>... >Does anyone can tell me, can I declare the global external function / >global Variables by PowerScript ( such as, within the application's open >event ), not i...

Merits of NVOs vs Global Functions
[Cross-posted to comp.soft-sys.powerbuilder.] I've been thinking about this, and would appreciate your observations. I've listed these assertions one per paragraph so you can refute them one-at-a-time <g>. The topic is the advantages and disadvantages of NVOs, as opposed to global functions. Suppose I have an NVO where I've written some DW-related functions. I instantiate it as DW so the calls are: dw.f_dw_whatever() OR, I can have an equivalent global function: f_dw_whatever() NVO advantages: The NVO is a place to declare instance data for the fun...

Global function ?
Hi , How I can defined global function ( methode ) in asp.net with c# ??   I want to use same function in many pages with string argument  … how I can do that?   You could create a static method that is publicly accessible to all pages within your site, and place it within a class in your App_Code folder.Thanks, EdMicrosoft MVP - ASP/ASP.NET You can create a helper class which has a static method (your method) in which you can use it in all the project using ClassName.FunctionName();HC Haissam Abdul MalakMCAD.NET| Blog |...

Global Function
I need to Know How obtain which window calls a global function (not a window function) within a function. Hey, I'm not sure if I understand correctly but here it goes anyway... If you just want to find out which window calls the global function without running the application, just do a global search on your application for that global function. If for example you want to know at runtime which window called the global function, you can use "This.ClassName" in your window and pass it as an argument to that global function or something. Hope this helps, Davy ...

global functions
Are there any programming standards for using "global functions" and is there any additional memory requirements? Just wondering / Thanks On Wed, 9 Feb 2000 15:50:52 -0600, in powersoft.public.powerbuilder.general Tom Pitts <TPitts@Hillyard.com> wrote: >Are there any programming standards for using "global functions" and is >there any additional memory requirements? > >Just wondering / Thanks > > IMHO - all methods should be encapsulated in an object. Do you need a global function? You can still place it in an object and creat...

global functions
Hello i'm a noob programmer. Is there a place where I can declare functions and then call them from all of my pages? You could add a public module to your web application and put them in there, or create a class and make the functions all shared. Thx for responding :) Ok I know I can make ascx files to declare headers and stuf. example : <%@ Register TagPrefix="ASPFD" TagName="Header" Src="GlobalHeader.ascx" %> Here i call a header that's declared in GlobalHeader.ascx. But how do I call functions and where do i declare them? So f...

Global function?
I want to create a global function for adding a user to my database (so it must be usable from different pages)...Preferably I want this in a seperate file where I can define all my classes and functions....I've heard something about an app_code folder where I can place .vb files...What is the best way to separate this code from my pages...and how can I call such a function from my aspx.vb file?Thanks!please mark answers as 'Answered' and post back solutions when you figure stuff out that isnt in the post already. Hello: It seems you are using ASP.NET 2.0. Globals functions are n...

Global Functions ?
 Hey there ive been searching the video section in this website and have been unable to find how i can create a global function that i can access in multiple pages to save code duplication. Can anyone help me here? Thanks in advance You could create a Helper class and create the methods there. Then on each page you need to call the function, you can a new instance of the class and call the functionHaissam Abdul MalakMCAD.NET| Blog | Welcome to the OOPS world of .net from VB classic ( i guess !).Multiple ways are there - the most efficient in my view is creating a custom...

Web resources about - Global functions vs global userobject functions - sybase.powerbuilder.general

Acclaimed Author Christos Tsiolkas gallery (1 of 5) - GQ
... Australia's prestige mens mag - (1 of 5) Search Popular searches water feature ideas Toggle navigation Sign In Register Welcome, {{ user.userObject.firstName ...

ClockworkMod/desksms-server · GitHub
Contribute to desksms-server development by creating an account on GitHub.

The Dangerous World of Client Push
Push Notifications are one of the most effective ways for apps to increase user engagement and retention, notify customers of important information ...

Ten Excuses Men Use to Dress Badly gallery (1 of 11) - GQ
... mag - (1 of 11) Search Popular searches cake recipes chicken recipes christmas ideas Toggle navigation Sign In Register Welcome, {{ user.userObject.firstName ...

The GQ Guide to Denim Jeans gallery (1 of 8) - GQ
... mens mag - (1 of 8) Search Popular searches kids craft kitchen ideas modern interiors Toggle navigation Sign In Register Welcome, {{ user.userObject.firstName ...

GQ Field Guide: Online Streaming Services gallery (1 of 5) - GQ
... mens mag - (1 of 5) Search Popular searches fish recipes garden ideas mince recipes Toggle navigation Sign In Register Welcome, {{ user.userObject.firstName ...

Hottest Eye Candy from the 2014 Oscars gallery (1 of 14) - GQ
... mag - (1 of 14) Search Popular searches decorating ideas bathroom ideas bedroom ideas Toggle navigation Sign In Register Welcome, {{ user.userObject.firstName ...

Woody Allen's Most Iconic Characters gallery (1 of 11) - GQ
... mag - (1 of 11) Search Popular searches kids craft kitchen ideas modern interiors Toggle navigation Sign In Register Welcome, {{ user.userObject.firstName ...

Seven Stereotypes You'll Encounter at a Music Festival gallery (1 of 8) - GQ
... mag - (1 of 8) Search Popular searches decorating ideas bathroom ideas bedroom ideas Toggle navigation Sign In Register Welcome, {{ user.userObject.firstName ...

How-To: Care For Your Watch gallery (1 of 6) - GQ
... mag - (1 of 6) Search Popular searches cake recipes chicken recipes christmas ideas Toggle navigation Sign In Register Welcome, {{ user.userObject.firstName ...

Resources last updated: 1/14/2016 9:48:49 AM