basic function name question

9 messages Options
Embed this post
Permalink
Bill Doerrfeld-2

basic function name question

Reply Threaded More More options
Print post
Permalink
Greetings All:

Is the convention of having each plugin function name prefixed with an  
identifier representing the plugin name a requirement of the API or by  
FMI? Or, is it simply a convention plugin developers follow?

I fully realize the need to isolate function names to prevent  
potential conflicts. However, there's also the issue of readability  
and usability.


_______________________________________________
The Troi plug-list mailing list
[hidden email]
http://mail.troi.com/mailman/listinfo/plug-list_troi.com
Morgan Jones-5

Re: basic function name question

Reply Threaded More More options
Print post
Permalink
Bill,

I believe each plug-in developers registers a four-character identifier with
FileMaker, Inc., and then uses this as the prefix for all function names for
all the plug-ins they develop.

This approach provides a simple way to prevent name conflicts (between
developers), and each developer can add whatever they like after the four
characters to improve readability/usability.

Peace, love & brown rice,
Morgan Jones

FileMaker + Web:  Design, Develop & Deploy
Certifications: FileMaker 9 & 10
One Part Harmony  
Austin, Texas . USA
512-422-0611

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bill Doerrfeld
Sent: Friday, October 23, 2009 7:20 PM
To: [hidden email]
Subject: [Plug-list] basic function name question

Greetings All:

Is the convention of having each plugin function name prefixed with an  
identifier representing the plugin name a requirement of the API or by  
FMI? Or, is it simply a convention plugin developers follow?

I fully realize the need to isolate function names to prevent  
potential conflicts. However, there's also the issue of readability  
and usability.


_______________________________________________
The Troi plug-list mailing list
[hidden email]
http://mail.troi.com/mailman/listinfo/plug-list_troi.com




_______________________________________________
The Troi plug-list mailing list
[hidden email]
http://mail.troi.com/mailman/listinfo/plug-list_troi.com
Bill Doerrfeld-2

Re: basic function name question

Reply Threaded More More options
Print post
Permalink
So, to answer my question, it's a technology requirement or FMI rules  
requirement?

On Oct 23, 2009, at 5:37 PM, Morgan Jones wrote:

> I believe each plug-in developers registers a four-character  
> identifier with
> FileMaker, Inc., and then uses this as the prefix for all function  
> names for
> all the plug-ins they develop.

_______________________________________________
The Troi plug-list mailing list
[hidden email]
http://mail.troi.com/mailman/listinfo/plug-list_troi.com
Morgan Jones-5

Re: basic function name question

Reply Threaded More More options
Print post
Permalink
Bill,

I found this language in the FileMaker Pro 10 Advanced Developments Guide:

Naming conventions for external functions
The function name prefix for all of the plug-in's external functions must be
a unique value containing four or five characters and must not begin with
the characters "FM" or "Web." Four-character prefixes are reserved by
FileMaker. For example, the FMPluginExample plug-in's function name prefix
is "XMpl."

I don't know if there is a formal mechanism for a plug-in developer to
"register" a prefix, or if the developers just know what is available and
pick something unique when they develop new plug-ins.

Can one of you talented and good-looking plug-in developers answer this last
question?

HTH ...

Peace, love & brown rice,
Morgan Jones

FileMaker + Web:  Design, Develop & Deploy
Certifications: FileMaker 9 & 10
One Part Harmony  
Austin, Texas . USA
512-422-0611


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Bill Doerrfeld
Sent: Saturday, October 24, 2009 12:24 PM
To: FileMaker Plug-in list
Subject: Re: [Plug-list] basic function name question

So, to answer my question, it's a technology requirement or FMI rules  
requirement?

On Oct 23, 2009, at 5:37 PM, Morgan Jones wrote:

> I believe each plug-in developers registers a four-character  
> identifier with
> FileMaker, Inc., and then uses this as the prefix for all function  
> names for
> all the plug-ins they develop.

_______________________________________________
The Troi plug-list mailing list
[hidden email]
http://mail.troi.com/mailman/listinfo/plug-list_troi.com




_______________________________________________
The Troi plug-list mailing list
[hidden email]
http://mail.troi.com/mailman/listinfo/plug-list_troi.com
Rod MASTAR

Re: basic function name question

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bill Doerrfeld-2
if...FM.. didn't set rules for development , then you have no control with
your plugins,  if you or I purchased at API product as a developer trying to
develop so all apps work together in this world .. We be back to what
Windows problem was compared to Apples    and when this or that software
installed is not working. This installed vs/ another person install was dued
to some conflicting app...  those were the  days... when no rules exist and
this software conflicted with this or that.

2cent






On Sat, Oct 24, 2009 at 10:23 AM, Bill Doerrfeld <[hidden email]> wrote:

> So, to answer my question, it's a technology requirement or FMI rules
> requirement?
>
>
> On Oct 23, 2009, at 5:37 PM, Morgan Jones wrote:
>
>  I believe each plug-in developers registers a four-character identifier
>> with
>> FileMaker, Inc., and then uses this as the prefix for all function names
>> for
>> all the plug-ins they develop.
>>
>
> _______________________________________________
> The Troi plug-list mailing list
> [hidden email]
> http://mail.troi.com/mailman/listinfo/plug-list_troi.com
>



--
While the author has done his earnest best to make sure you enjoy this
report, certain grammatical and typographical errors may still exist. Any
such error, or any perceived slight of a specific person or organization, is
purely unintentional. Wherever the neuter is not used, any one gender was
chosen for simplicity’s sake. This was created with the hope that the person
finds its content useful and not analyzed for the purposes of gender
equality, language correctness or writing style. All rights reserved. No
part of this publication may be reproduced or transmitted in any form or by
any means, electronic or mechanical. Any unauthorized use, sharing,
reproduction, or distribution of parts herein is strictly prohibited.
_______________________________________________
The Troi plug-list mailing list
[hidden email]
http://mail.troi.com/mailman/listinfo/plug-list_troi.com
Kent Lendrum

Re: basic function name question

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bill Doerrfeld-2
Hi Bill,

> So, to answer my question, it's a technology requirement or FMI  
> rules requirement?

It's not a 'technology' requirement, as it is entirely possible to  
create external plugin functions without it - however it is good  
practice if you intend to on-sell your plugin.


> I don't know if there is a formal mechanism for a plug-in developer to
> "register" a prefix, or if the developers just know what is  
> available and
> pick something unique when they develop new plug-ins.

In the FM 5 days,  the instructions said you were to register your 4  
character code on the Apple Developer web site,  even if your plugin  
was going to be windows only, but this would confirm your 4 character  
code was unique with any application

I don't know if this is still the case however.


> Naming conventions for external functions
> The function name prefix for all of the plug-in's external functions  
> must be
> a unique value containing four or five characters and must not begin  
> with
> the characters "FM" or "Web." Four-character prefixes are reserved by
> FileMaker. For example, the FMPluginExample plug-in's function name  
> prefix
> is "XMpl."


Remember there are two places where this 4 character code is used.

The most important is the pluginID  which is passed with registering  
your functions.  If you change this, then things break :

        fmx::QuadCharAutoPtr pluginID('A', 'B', 'C', 'D');


Last time I duplicated my plugin as a template, but forgot to change  
the pluginID, neither loaded - which caused me great confusion for a  
while.

The next is your plugin function names themselves - these obviously  
need to be unique, and most plugin developers used the above character  
code for their plugin function names.

eg.
   ABCD_Version
   ABCD_VersionAutoUpdate
   ABCD_MyFunction



This however doesn't mean you can't create a function name without the  
leading 'ABCD_',  it just isn't ideal.  And hence why FM themselves  
have stipulated all plugins must use a unique 4 character code.

For example, in my own plugin I have a function 'sp'.  I don't sell my  
plugin and it's only used by my solution, so I kinda feel it's okay -  
but I know it's not following FM's guidelines.
In reality, I could have created it as a custom function - as that's  
all it really is - and there aren't any rules for custom function  
names - but it was easier to create a plugin call, than add the Custom  
Function to 40+ files.


Kent.


 
_______________________________________________
The Troi plug-list mailing list
[hidden email]
http://mail.troi.com/mailman/listinfo/plug-list_troi.com
Bill Doerrfeld-2

Re: basic function name question

Reply Threaded More More options
Print post
Permalink
Thanks Kent for the fine explanation. So functions from plugins can  
take any name (as do custom functions), but, the community and FMI  
frown on not inserting the 4 char prefix out of concern for naming  
conflicts. What about going with a suffix as opposed to prefix? The  
advantage there is that the function is then more easily selected via  
type-ahead (based on the concept that the actual function name is more  
informative of the resulting action than the 4 char unique  
identifier). Is there a specific guideline stating the identified  
should be a prefix as opposed to suffix?

On a related basis, is it possible for a function from an external  
plugin to appear in the "all functions by name" view for functions in  
Specify Calculation dialog? Oddly, they appear when selecting "all  
functions by type" but not by "name". So, "all" means different things  
depending upon which "all" you select (I also have a big problem with  
the fact that the built-in Get functions don't appear in "all  
functions by name", but, that's another story.) I suspect it's not  
possible to have one's plugin function listed in "all functions by  
name", just seems like a UI inconsistency to me.

On Oct 24, 2009, at 1:44 PM, Kent Lendrum wrote:

> Hi Bill,
>
>> So, to answer my question, it's a technology requirement or FMI  
>> rules requirement?
>
> It's not a 'technology' requirement, as it is entirely possible to  
> create external plugin functions without it - however it is good  
> practice if you intend to on-sell your plugin.
>
>
>> I don't know if there is a formal mechanism for a plug-in developer  
>> to
>> "register" a prefix, or if the developers just know what is  
>> available and
>> pick something unique when they develop new plug-ins.
>
> In the FM 5 days,  the instructions said you were to register your 4  
> character code on the Apple Developer web site,  even if your plugin  
> was going to be windows only, but this would confirm your 4  
> character code was unique with any application
>
> I don't know if this is still the case however.
>
>
>> Naming conventions for external functions
>> The function name prefix for all of the plug-in's external  
>> functions must be
>> a unique value containing four or five characters and must not  
>> begin with
>> the characters "FM" or "Web." Four-character prefixes are reserved by
>> FileMaker. For example, the FMPluginExample plug-in's function name  
>> prefix
>> is "XMpl."
>
>
> Remember there are two places where this 4 character code is used.
>
> The most important is the pluginID  which is passed with registering  
> your functions.  If you change this, then things break :
>
> fmx::QuadCharAutoPtr pluginID('A', 'B', 'C', 'D');
>
>
> Last time I duplicated my plugin as a template, but forgot to change  
> the pluginID, neither loaded - which caused me great confusion for a  
> while.
>
> The next is your plugin function names themselves - these obviously  
> need to be unique, and most plugin developers used the above  
> character code for their plugin function names.
>
> eg.
>  ABCD_Version
>  ABCD_VersionAutoUpdate
>  ABCD_MyFunction
>
>
>
> This however doesn't mean you can't create a function name without  
> the leading 'ABCD_',  it just isn't ideal.  And hence why FM  
> themselves have stipulated all plugins must use a unique 4 character  
> code.
>
> For example, in my own plugin I have a function 'sp'.  I don't sell  
> my plugin and it's only used by my solution, so I kinda feel it's  
> okay - but I know it's not following FM's guidelines.
> In reality, I could have created it as a custom function - as that's  
> all it really is - and there aren't any rules for custom function  
> names - but it was easier to create a plugin call, than add the  
> Custom Function to 40+ files.
>
>
> Kent.
>
>
> _______________________________________________
> The Troi plug-list mailing list
> [hidden email]
> http://mail.troi.com/mailman/listinfo/plug-list_troi.com

Bill Doerrfeld
[hidden email]
www.BillDoerrfeld.com





_______________________________________________
The Troi plug-list mailing list
[hidden email]
http://mail.troi.com/mailman/listinfo/plug-list_troi.com
Rob Russell

Re: basic function name question

Reply Threaded More More options
Print post
Permalink
On 27/10/2009, at 8:19 AM, Bill Doerrfeld wrote:

> What about going with a suffix as opposed to prefix? The advantage  
> there is that the function is then more easily selected via type-
> ahead (based on the concept that the actual function name is more  
> informative of the resulting action than the 4 char unique  
> identifier). Is there a specific guideline stating the identified  
> should be a prefix as opposed to suffix?

This might sound a bit anal, Bill, but if you released a commercial  
plug-in that used different conventions to other plug-ins, then as a  
purchaser, I would consider that a negative, despite the fact I like  
to navigate lists using the keyboard.

The practice of prefixes is pretty widespread amongst many development  
environments.

Rob

_______________________________________________
The Troi plug-list mailing list
[hidden email]
http://mail.troi.com/mailman/listinfo/plug-list_troi.com
Kent Lendrum

Re: basic function name question

Reply Threaded More More options
Print post
Permalink
In reply to this post by Bill Doerrfeld-2
Hi Bill,

Just because one can do something, doesn't mean one should.   If you  
only intend to use your plugin internally,  and you choose to flaunt  
the 'standard' then that is your choice.   Just as long as you  
understand that it's more likely to break in a future update.
And as Rob has said, plugins which don't follow a FM standard, are  
more likely to find themselves in the users trash.


I don't believe there is any way to have your functions appear when  
viewing by name.

The 'Get( flag )' function is listed when viewing all by name,  but  
not with all the different flag options.

I don't recall ever using the 'All functions by type' before :)   If I  
can't recall a function, I always select the category as the resulting  
list is easier to search on.

Kent.

------------------------------------------------------------------
A helpful tip: In most communities, it is a violation of law to put  
your PC out to the curb. It contains lead, Windows Vista, mercury and  
other toxic substances.



On 27/10/2009, at 8:19 AM, Bill Doerrfeld wrote:

> Thanks Kent for the fine explanation. So functions from plugins can  
> take any name (as do custom functions), but, the community and FMI  
> frown on not inserting the 4 char prefix out of concern for naming  
> conflicts. What about going with a suffix as opposed to prefix? The  
> advantage there is that the function is then more easily selected  
> via type-ahead (based on the concept that the actual function name  
> is more informative of the resulting action than the 4 char unique  
> identifier). Is there a specific guideline stating the identified  
> should be a prefix as opposed to suffix?
>
> On a related basis, is it possible for a function from an external  
> plugin to appear in the "all functions by name" view for functions  
> in Specify Calculation dialog? Oddly, they appear when selecting  
> "all functions by type" but not by "name". So, "all" means different  
> things depending upon which "all" you select (I also have a big  
> problem with the fact that the built-in Get functions don't appear  
> in "all functions by name", but, that's another story.) I suspect  
> it's not possible to have one's plugin function listed in "all  
> functions by name", just seems like a UI inconsistency to me.
>
> On Oct 24, 2009, at 1:44 PM, Kent Lendrum wrote:
>
>> Hi Bill,
>>
>>> So, to answer my question, it's a technology requirement or FMI  
>>> rules requirement?
>>
>> It's not a 'technology' requirement, as it is entirely possible to  
>> create external plugin functions without it - however it is good  
>> practice if you intend to on-sell your plugin.
>>
>>
>>> I don't know if there is a formal mechanism for a plug-in  
>>> developer to
>>> "register" a prefix, or if the developers just know what is  
>>> available and
>>> pick something unique when they develop new plug-ins.
>>
>> In the FM 5 days,  the instructions said you were to register your  
>> 4 character code on the Apple Developer web site,  even if your  
>> plugin was going to be windows only, but this would confirm your 4  
>> character code was unique with any application
>>
>> I don't know if this is still the case however.
>>
>>
>>> Naming conventions for external functions
>>> The function name prefix for all of the plug-in's external  
>>> functions must be
>>> a unique value containing four or five characters and must not  
>>> begin with
>>> the characters "FM" or "Web." Four-character prefixes are reserved  
>>> by
>>> FileMaker. For example, the FMPluginExample plug-in's function  
>>> name prefix
>>> is "XMpl."
>>
>>
>> Remember there are two places where this 4 character code is used.
>>
>> The most important is the pluginID  which is passed with  
>> registering your functions.  If you change this, then things break :
>>
>> fmx::QuadCharAutoPtr pluginID('A', 'B', 'C', 'D');
>>
>>
>> Last time I duplicated my plugin as a template, but forgot to  
>> change the pluginID, neither loaded - which caused me great  
>> confusion for a while.
>>
>> The next is your plugin function names themselves - these obviously  
>> need to be unique, and most plugin developers used the above  
>> character code for their plugin function names.
>>
>> eg.
>> ABCD_Version
>> ABCD_VersionAutoUpdate
>> ABCD_MyFunction
>>
>>
>>
>> This however doesn't mean you can't create a function name without  
>> the leading 'ABCD_',  it just isn't ideal.  And hence why FM  
>> themselves have stipulated all plugins must use a unique 4  
>> character code.
>>
>> For example, in my own plugin I have a function 'sp'.  I don't sell  
>> my plugin and it's only used by my solution, so I kinda feel it's  
>> okay - but I know it's not following FM's guidelines.
>> In reality, I could have created it as a custom function - as  
>> that's all it really is - and there aren't any rules for custom  
>> function names - but it was easier to create a plugin call, than  
>> add the Custom Function to 40+ files.
>>
>>
>> Kent.
>>
>>
>> _______________________________________________
>> The Troi plug-list mailing list
>> [hidden email]
>> http://mail.troi.com/mailman/listinfo/plug-list_troi.com
>
> Bill Doerrfeld
> [hidden email]
> www.BillDoerrfeld.com
>
>
>
>
>
> _______________________________________________
> The Troi plug-list mailing list
> [hidden email]
> http://mail.troi.com/mailman/listinfo/plug-list_troi.com


_______________________________________________
The Troi plug-list mailing list
[hidden email]
http://mail.troi.com/mailman/listinfo/plug-list_troi.com