* gitweb: how to name main "action" subroutines?
@ 2006-07-31 14:03 Jakub Narebski
2006-07-31 17:26 ` Luben Tuikov
2006-07-31 18:38 ` Josef Weidendorfer
0 siblings, 2 replies; 6+ messages in thread
From: Jakub Narebski @ 2006-07-31 14:03 UTC (permalink / raw)
To: git
I'm going to rename some gitweb subroutines to better correspond to what
given subroutine does. I have problem: how to name main "action"
subroutines? Currently they use git_ prefix, e.g. git_logo.
git_project_list, git_rss, git_summary, git_heads,...
I have thought about do_logo, or gitweb_logo, or out_logo etc., but somehow
none is best.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gitweb: how to name main "action" subroutines?
2006-07-31 14:03 gitweb: how to name main "action" subroutines? Jakub Narebski
@ 2006-07-31 17:26 ` Luben Tuikov
2006-07-31 17:50 ` Jakub Narebski
2006-07-31 18:38 ` Josef Weidendorfer
1 sibling, 1 reply; 6+ messages in thread
From: Luben Tuikov @ 2006-07-31 17:26 UTC (permalink / raw)
To: Jakub Narebski, git
--- Jakub Narebski <jnareb@gmail.com> wrote:
> I'm going to rename some gitweb subroutines to better correspond to what
> given subroutine does. I have problem: how to name main "action"
> subroutines? Currently they use git_ prefix, e.g. git_logo.
> git_project_list, git_rss, git_summary, git_heads,...
>
> I have thought about do_logo, or gitweb_logo, or out_logo etc., but somehow
> none is best.
"git_<noun>_<verb>" ? So then you'd have, for example "git_logo_show".
Luben
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gitweb: how to name main "action" subroutines?
2006-07-31 17:26 ` Luben Tuikov
@ 2006-07-31 17:50 ` Jakub Narebski
0 siblings, 0 replies; 6+ messages in thread
From: Jakub Narebski @ 2006-07-31 17:50 UTC (permalink / raw)
To: git
<opublikowany i wysłany>
Luben Tuikov wrote:
> --- Jakub Narebski <jnareb@gmail.com> wrote:
>> I'm going to rename some gitweb subroutines to better correspond to what
>> given subroutine does. I have problem: how to name main "action"
>> subroutines? Currently they use git_ prefix, e.g. git_logo.
>> git_project_list, git_rss, git_summary, git_heads,...
>>
>> I have thought about do_logo, or gitweb_logo, or out_logo etc., but somehow
>> none is best.
>
> "git_<noun>_<verb>" ? So then you'd have, for example "git_logo_show".
I'd rather reserve git_ prefix for subroutines which deal with git repository,
either by calling git commands (e.g. git_get_type), or accessing git repository
directly (e.g. git_read_hash, git_read_description).
I'm partial to either out_foo or gitweb_foo...
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gitweb: how to name main "action" subroutines?
2006-07-31 14:03 gitweb: how to name main "action" subroutines? Jakub Narebski
2006-07-31 17:26 ` Luben Tuikov
@ 2006-07-31 18:38 ` Josef Weidendorfer
2006-07-31 18:45 ` Jakub Narebski
1 sibling, 1 reply; 6+ messages in thread
From: Josef Weidendorfer @ 2006-07-31 18:38 UTC (permalink / raw)
To: Jakub Narebski, git
On Monday 31 July 2006 16:03, you wrote:
> I'm going to rename some gitweb subroutines to better correspond to what
> given subroutine does. I have problem: how to name main "action"
> subroutines? Currently they use git_ prefix, e.g. git_logo.
> git_project_list, git_rss, git_summary, git_heads,...
print_* or write_* ?
At least, the functions print/write the HTML code to stdout of the script.
Josef
>
> I have thought about do_logo, or gitweb_logo, or out_logo etc., but somehow
> none is best.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gitweb: how to name main "action" subroutines?
2006-07-31 18:38 ` Josef Weidendorfer
@ 2006-07-31 18:45 ` Jakub Narebski
2006-07-31 20:41 ` Josef Weidendorfer
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Narebski @ 2006-07-31 18:45 UTC (permalink / raw)
To: git
Josef Weidendorfer wrote:
> On Monday 31 July 2006 16:03, you wrote:
>> I'm going to rename some gitweb subroutines to better correspond to what
>> given subroutine does. I have problem: how to name main "action"
>> subroutines? Currently they use git_ prefix, e.g. git_logo.
>> git_project_list, git_rss, git_summary, git_heads,...
>
> print_* or write_* ?
> At least, the functions print/write the HTML code to stdout of the script.
The problem is that there are subroutines which print _fragments_ of HTML
code (like git_header_html or git_print_page_path) which would use probably
print_ prefix. Action subroutines output always whole page.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gitweb: how to name main "action" subroutines?
2006-07-31 18:45 ` Jakub Narebski
@ 2006-07-31 20:41 ` Josef Weidendorfer
0 siblings, 0 replies; 6+ messages in thread
From: Josef Weidendorfer @ 2006-07-31 20:41 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
On Monday 31 July 2006 20:45, Jakub Narebski wrote:
> Josef Weidendorfer wrote:
>
> > On Monday 31 July 2006 16:03, you wrote:
> >> I'm going to rename some gitweb subroutines to better correspond to what
> >> given subroutine does. I have problem: how to name main "action"
> >> subroutines? Currently they use git_ prefix, e.g. git_logo.
> >> git_project_list, git_rss, git_summary, git_heads,...
> >
> > print_* or write_* ?
> > At least, the functions print/write the HTML code to stdout of the script.
>
> The problem is that there are subroutines which print _fragments_ of HTML
> code (like git_header_html or git_print_page_path) which would use probably
> print_ prefix. Action subroutines output always whole page.
Why not "print_*_page", if they print out a whole page?
I would "git_header_html" rename to "print_header"; it's clear that
it prints out HTML ;-)
And "git_print_page_path" only needs stripping of "git_" prefix.
Josef
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-07-31 20:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-31 14:03 gitweb: how to name main "action" subroutines? Jakub Narebski
2006-07-31 17:26 ` Luben Tuikov
2006-07-31 17:50 ` Jakub Narebski
2006-07-31 18:38 ` Josef Weidendorfer
2006-07-31 18:45 ` Jakub Narebski
2006-07-31 20:41 ` Josef Weidendorfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).