[pLog-svn] Confusing method naming

Jon Daley plogworld at jon.limedaley.com
Mon Apr 7 15:27:58 EDT 2008


 	Oh right, I forgot about the Topic name - that is alright.  So, 
yes, let's have getBlogArticleByTitle redirect to getBlogArticleBySlug, 
and mark it deprecated, that's nice.

On Tue, 8 Apr 2008, Mark Wu wrote:

> I already implement getBlogArticleByTopic()  in articles.class.php
>
> Although I can use a new method name for the new function, but it still
> confusing for new developers...
>
> Actuallt, getBlogArticleByTitle() only used when we enable custom url ...
>
> No plugin use it, I think we can  deprecate it without any problems.
>
> Mark
>
>> -----Original Message-----
>> From: plog-svn-bounces at devel.lifetype.net
>> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
>> Sent: Tuesday, April 08, 2008 3:14 AM
>> To: LifeType Developer List
>> Subject: Re: [pLog-svn] Confusing method naming
>>
>>  	Yeah, I wanted a getArticleByTitle the other day and
>> noticed it was using the slug instead.  It is probably
>> because they were added at different times.  Let's come up
>> with a standard, and rename all of the functions across the board.
>>  	It doesn't seem like we can nicely deprecate
>> getBlogArticleByTitle, since that is a pretty good name, so I
>> think people will have to know that it now means title and
>> not slug, and change their custom code accordingly.  Unless
>> we really want to make sure to not break stuff, and come up
>> with a new function name for getbytitle.
>>
>> On Tue, 8 Apr 2008, Mark Wu wrote:
>>
>>> Actually ...
>>>
>>> getBlogArticleByTitle() in articles.class.php means "get
>> blog article
>>> by post slug"
>>>
>>> getCategoryByName() in articlecategories.class.php means
>> "get article
>>> category by mangled name"
>>>
>>> It is really confusing :(
>>>
>>
>> --
>> Jon Daley
>> http://jon.limedaley.com/
>>
>> Maybe we're too stupid. Maybe there's an algorithm out there
>> and we're just not getting it. It's a possibility.
>> -- Professor Tygar
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://limedaley.com/mailman/listinfo/plog-svn
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

-- 
Jon Daley
http://jon.limedaley.com/

Music: A principal means of glorifying our merciful Creator.
-- Henry Peacham


More information about the pLog-svn mailing list