Hi Dan,
Is there a gentle introduction to DiasporaJS that can answer the following questions or maybe you can git it a try ;)
- which libraries do you use ?
The other questions might be answered by the first but then if you use custom code it's not clear so the remaining questions might get their own answers:
- Which pattern do you use MVC or something more custom ? From the description it looks like it's widget centered. But do evey widget have to pull their data from the server ? or data retrieval is managed by a custom class maybe with a single API for ressource description.
- Do you plan to do a signle page mode for Diaspora ? If yes, how is it reflected in the client side code architecture.
More questions (where I try to build a conversation...)
Page classes handle what widgets need to be instantiated on that page.
Could you enumerate the page Classes ?
Widgets are javascript classes (functions that you construct) that are
tightly coupled to a small piece of markup.
Is it template based, classic DOM construction, or something in between like what can be achieve with an API like HTMLBuilder [1] or lxml E factory [3]. I heard of JS based language that does the same, can't find it right now.
e.g. I can instantiate
a StreamElement widget and give it a jQuery object. It can do whatever
it needs to do to the jQuery object
This is inheritance or I'm missing something ?
Widgets can instantiate other widgets. e.g. a Stream widget can
instantiate many StreamElement widgets
You are spawning widget in cascade, is that it ? Won't be that too hard
to read in code perspective ? I'm not used to all the callback stuff,
but maybe this is regular UI construction in JS.
Same question as above about resources. If we take the Stream widget, does it take the a list of StreamElementData or does it have a way to pull at the right time the data it needs.
Widgets have both local events (these are only triggered and bound to
by a widget instance) and global events (these are bound on an
instance of a page class and can be used in any widget with the
globalSubscribe/globalPublish methods).
How do you manage publish/subscribe|events, with Jquery mechanics ? Or something else ?
Our code needs to be able to be understood by newcomers to the
project. I feel like what I'm working towards won't be too magical
that people won't understand it.
[1] Flask-htmlbuilder pypi page
http://goo.gl/3Rh0o[2] E-factory documentation on lxml website
http://goo.gl/VzD9b (buggy right now try google cache:
http://goo.gl/zkqH3