https://bugzilla.wikimedia.org/show_bug.cgi?id=15129





--- Comment #16 from Roan Kattouw <[email protected]>  2009-01-14 22:33:20 
UTC ---
(In reply to comment #15)
> > (In reply to comment #13)
> > > A few general comments on this:
> > > * You are basically duplicating the CheckUser interface. This is bad 
> > > because
> > > changes in one part of the CheckUser code will not affect other parts. 
> > > Code
> > > duplication should be avoided when possible.
> > Bryan's right. You should call existing functions in CheckUser, not copy 
> > them.
> > If CheckUser doesn't have nice functions for your purposes, create them 
> > and/or
> > adapt existing ones to be nice to you.
> All the functions in the CheckUser class are protected functions, and I can't
> have the code output them. In addition, they output pure HTML (which is bad in
> its own right). 
> 
> The entire CheckUser code could use a rewrite.
> 

No doubt it could. But unless it's extremely API-unfriendly, it shouldn't be
too hard to split off the HTML-outputting functions into a backend part (that
does the database stuff) and a frontend part (that does the HTML generation),
and then just call the backend part from the API module (of course that means
you should make the backend functions public). That's the tactic I used when
writing most of the write API.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to