I came across a similar problem/question when coding the lastFM API wrapper:

http://lastfmapi.riaforge.org/

I created a separate cfc for each logical part of the api and then
created a single component that took care of instantiating and giving
access to the various parts.

I'm not sure I'm 100% happy with that choice but it did keep code
organised and avoided a 10,000 line code monster cfc!

My 2c.

Dominic

On 17 April 2011 04:55, Jeff Gladnick <[email protected]> wrote:
>
> hmm.  This sounds too complicated for the average user, but I am curious to 
> know more about this.
>
> For the same reason I am hesitant to have multiple files extending a base 
> class.  For that I like mark's suggestion about the single cfc.  I want this 
> to be as plug and play as possible for people.
>
>>What I did in some of my projects was to have a base method "person" that
>>the other methods used. Enforce type or variable checking in
>>getPersonByType, but have the bulk of the work done in the getPerson method.
>>
>>
>>andy
>>
>>Hi there Jeff
>>
>>I think this depends. Who are you writing the API for? I.e is this
>>something you are going to use then let other people use it via RiaForge?
>>Or Are you just developing it to be open source from the get go?
>>
>>I am inclined to have one big file as then it's simple to use as you
>>instantiate it and check out the methods. On the other hand, you might
>>want to return sub objects from your methods (such as arrays of people
>>etc)
>>
>>
>>With regards to Question 2, I simpler methods that are more descriptive
>>would help, such as:
>>
>>getPerson(id)
>>getPeople(Since [optional])
>>getPeopleByTitle(title)
>>getPeopleByTag(tag)
>>getPeopleByCompany(companyid)
>>getPeopleBySearch(searchterm)
>>getPeopleByCriteria(criteriaStruct)
>>createPerson()
>>savePerson()
>>deletePerson()
>>
>>
>>
>>I hope that helps.
>>
>>Regards
>>
>>Mark Drew
>>
>>
>>
>>
>>On 16/04/2011 08:08, "Jeff Gladnick" <[email protected]> wrote:
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343803
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to