pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
Res facta quae tamen fingi potuit ([personal profile] pauamma) wrote in [site community profile] dw_dev2015-06-28 11:30 pm
Entry tags:

Question thread #32

It's time for another question thread!

The rules:

- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer and in this comment thread.
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)

[personal profile] momijizukamori 2015-06-28 10:38 pm (UTC)(link)
Any tips for jumping into Foundation/BML-to-TT conversion? I know we have a few wiki pages on bits and pieces but I haven't done anything in that field yet so I'm kind of hesitant
fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)

[personal profile] fu 2015-06-29 01:42 am (UTC)(link)

Hmm I know you said you were aware we had stuff on the wiki, but had you seen http://wiki.dreamwidth.net/wiki/index.php/Foundation in particular? It contains a skeleton for the tt page and links to a skeleton of the controller.

momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)

[personal profile] momijizukamori 2015-06-29 01:49 am (UTC)(link)

I think some of the problem is that like, I only have a very loose idea of what the controller is or does :|a

fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)

[personal profile] fu 2015-06-30 02:09 am (UTC)(link)

Aha okay.

If you look at BML pages, you'll see that they mostly just throw everything together which makes it hard to modify them later on. We constantly worry about breaking things on those pages, and we can't reuse components or share them between pages.

MVC (model-view-controller) is a pattern used to organize code. The "view" is the bit we're most familiar with; it handles generating output, e.g., HTML. The "model" stores data and encapsulates state. LJ::User is an example of this. The controller basically ties the two together; it sets up the model and the view, and it is also where we process input and pass it onto the model / view.

momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)

[personal profile] momijizukamori 2015-06-30 07:53 pm (UTC)(link)

Okay! I will do some research, because for someone who has been making webpages since like... 2000, there is a lot of internal stuff I actually know very little about, haha.

fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)

[personal profile] fu 2015-06-30 08:54 pm (UTC)(link)

Have fun!?Feel free to holler at any future time too.

fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)

[personal profile] fu 2015-06-30 08:56 pm (UTC)(link)

Oops shouldn't have been a question mark there! Silly mobile phones and reply by email ;)

momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)

[personal profile] momijizukamori 2015-07-01 06:39 am (UTC)(link)

well, it does convey the mix of excitement and trepidation I feel XD

Do we have any pages converted to TT that feature a lot of user-interaction elements? I'm kind of brainstorming how best to change /customize and it's hideous widget mess. If I'm understanding it right, the TT page = the view = what the user sees and interacts with, and that calls various bits of perl, which = the controller, and then the model is data stored in db or temp memory (the trickiest part of the new style search is 'we need to save the search results somewhere, until the user closes the page' and I'm not sure where)

fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)

[personal profile] fu 2015-07-01 06:51 am (UTC)(link)

Hmm, the best example is probably the new user entry page.

momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)

[personal profile] momijizukamori 2015-07-01 06:52 am (UTC)(link)

Okay! I'll go code-hunting for that, then.

pseudomonas: (calligraphy)

[personal profile] pseudomonas 2015-06-28 10:49 pm (UTC)(link)
I've been doing some analysis of profile-interests using FOAF files (which I'm happy to share when I've written it up a bit) - at the moment I'm just using my friends-of-friends, but is there a route by which I could slurp down all publicly available FOAF files without spidering the whole lot one-by-one?
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2015-06-29 01:55 am (UTC)(link)
Hm. I don't think there's any better way to do it, alas.
pseudomonas: per bend sinister azure and or a chameleon counterchanged (Default)

[personal profile] pseudomonas 2015-06-29 07:11 am (UTC)(link)
Hmm. Is there a comprehensive list of users which I could sample randomly? Alternatively, would a 'download all foaf, gzipped-and-cached' be a useful script for me to write for DW to host?
Edited 2015-06-29 07:11 (UTC)
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2015-06-29 07:18 am (UTC)(link)

I think [personal profile] exor674 did something like that once. Let me ping her to this thread!