Jan. 1st, 2011

fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
[personal profile] fu
I'm looking for feedback on Bug 3170: Constant Namespaces in DW::Template.

Basically, right now our constants in .tt files can be found under email.*, site.*, roots.*, etc, and the more constants we have, the more likely it is that we'll accidentally have a namespace collision. So I would like to have all constants be under just the site namespace.

That is, instead of using:
email.webmaster
roots.site
site.name

We can use:
site.email.webmaster
site.root
site.name

In some cases, it's longer, but the additional clarity should be worth the extra characters. (Plus it would also make it easier to avoid mistakes -- I found several instances of dw.* in the files, which are blank, but luckily cause no issues)

List of proposed new namespace )



I'd like to point out, in particular,
site.name = $LJ::SITENAME
site.names.short = $LJ::SITENAMESHORT
site.names.abbrev = $LJ::SITENAMEABBREV

which suffers from inconsistency/needing to be aware of the technical limitations.

An alternative:
site.name.site = $LJ::SITENAME
site.name.short = $LJ::SITENAMESHORT
site.name.abbrev = $LJ::SITENAMEABBREV

But that suffers from the problem that the most commonly used variable, site.name, becomes long/ridiculous/redundant.
fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
[personal profile] fu
Working on some long-overdue updates to the checkfriends protocol mode.

Changes not yet live on the site but should be for future code push, but here's the run down:


  • checkfriends no longer works. Instead, use checkforupdates.

  • required arguments to checkforupdates is only authentication information

  • optional argument lastupdate (in "0000-00-00 00:00:00" format). This is the last update time you have, from previous calls to checkforupdates

  • optional argument filter. This is the name of a content filter whose members you want to filter to.

  • return value: new: 1 or 0. 1 only if you pass in a lastupdate and there are new items since then. 0 in all other cases.

  • return value: interval: number of seconds before you can next check for updates. If you check before time expires, you'll get a cached value

  • return value: lastupdate: time someone last updated, in "0000-00-00 00:00:00" format



It's almost exactly the same as checkfriends; the only differences from the frontend are the name change, and replacing the mask argument with a filter argument because the trustmask is no longer relevant since we split up access and subscription.

ETA: Added preliminary documentation on the wiki.
foxfirefey: A guy looking ridiculous by doing a fashionable posing with a mouse, slinging the cord over his shoulders. (geek)
[personal profile] foxfirefey
So, I'm going to try and post the current status of that project every month. I certainly don't think I can finish that project (at least not on my own!) but I am going to make a good dent in it.

Does anybody have any dev resolutions? Or is anyone looking to start doing dev this year and wants some mentoring?

List of the files and their linecounts )

Profile

dw_dev: The word "develop" using the Swirly D logo.  (Default)
Dreamwidth Open Source Development

May 2026

S M T W T F S
      12
3456789
10111213141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 8th, 2026 01:13 am
Powered by Dreamwidth Studios