Tuesday, 2010-06-01

*** tpb has joined #melange00:00
*** lresende has joined #melange02:24
*** mithro has joined #melange04:43
*** ChanServ sets mode: +v mithro04:43
*** sttwister has quit IRC05:44
*** lresende has quit IRC05:46
*** sttwister has joined #melange05:47
*** sttwister has quit IRC05:52
*** sttwister has joined #melange05:52
*** dr__house has joined #melange06:11
*** sttwister has quit IRC06:22
*** sttwister has joined #melange06:23
*** sttwister has quit IRC06:31
*** sttwister has joined #melange06:31
*** sttwister has quit IRC06:46
*** sttwister has joined #melange06:47
*** neo7 has joined #melange06:52
*** sttwister has quit IRC06:53
*** sttwister has joined #melange06:53
*** sttwister has quit IRC07:15
*** dr__house has quit IRC07:16
*** sttwister has joined #melange07:18
*** dr__house has joined #melange07:25
*** sttwister has quit IRC07:35
*** sttwister has joined #melange07:35
*** dr__house` has joined #melange07:57
*** dr__house has quit IRC07:57
*** MatthewWilkes has joined #melange08:03
*** sttwister has quit IRC08:21
*** sttwister has joined #melange08:25
*** dr__house` has quit IRC08:26
*** sttwister has quit IRC08:34
*** sttwister has joined #melange08:39
*** Merio has joined #melange08:58
*** ChanServ sets mode: +v Merio08:59
Meriosttwister: ping09:17
sttwisterMerio: pong09:17
Meriosttwister: so, I'm reading your latest changes to the wiki09:18
sttwisterok cool09:19
Merioabout the web interface and the ajax api09:20
Meriojust to know, is there a technical reason to do this amount of roundtrips to the server?09:21
sttwisterwell actually I was thinking about that and wanted to discuss it with you09:22
sttwisterall that data could be cached locally anyway as it won't change in a session09:23
sttwisterso I don't think that's a problem09:23
sttwisterwhat do you think ?09:23
MerioCaching can be a PITA with browsers :) We can just make a single request at the beginning to gather all data needed by the interface09:24
sttwisterok, I guess I could update that09:26
sttwisterI also would like to add a function to validate the parameters of a data provider, before sending the whole configuration to the server09:27
sttwisterit would be better for the user to report errors as soon as possible09:27
Merioyes, it depends on your architecture whether to do this in Javascript or in Python09:27
MerioI mean, you can send the whole configuration to the server, check for it and send an error message to the user09:28
MerioThis isn't too time consuming09:28
sttwisterwell, I'll do that in Python09:28
MerioYou can also do that in Javascript, but then you're decoupling the architecture of the data providers... I guess the data provider itself knows what it wants09:28
sttwisteryes indeed that's my reasoning09:29
MerioFurthermore if you do that in Javascript, just a guess, you would find issues with types09:29
sttwisterbut I could also validate each data provider as it's configured (like a user registration from might instantly suggest that another email with that account is already registered)09:29
Merioyes that's better09:30
MerioIt was actually what I was meaning, but I guess you need to send the whole configuration every time09:31
MerioSince you're allowing loading of local jsons09:31
MerioAnd then you need to check the whole configuration at once and raise the proper "red flags" :)09:32
sttwisterI guess it would be possible to send data only for a single data provider and save some traffic and complexity09:33
Merioyes but then you need to do an exception on your interface if you're loading a whole json at once09:35
MerioOne thing is providing a "space" in the UI to display one error, another is saving another space for another method to display more than one error at once (possibly with links to the places to fix each error)09:35
sttwisterhmm09:36
sttwisterwell, each error would be referenced by model and property name, right ?09:37
Merioyes I guess so09:39
sttwisterarghh, I'm not sure of the exact details to implement this in JavaScript, but it seems more or less the same thing to me09:39
MerioMaybe also by model only, but it's just a guessing, can't find a proper example in this very moment09:39
Merioit's just a UI matte09:39
Meriomatter09:39
Merionot really Javascript, you can do everything you want with the DOM09:39
MerioJust you have to think about what to do in case of errors, what's the workflow you expect the user to do09:40
Merios/do/follow09:40
sttwisterwell, I would expect the user to notice the big red text saying something is wrong right away :)09:41
sttwisterand fix it09:41
Meriobut what if there are errors in 30 properties of 10 models?09:42
sttwisterthe user already knew about all errors when he wrote them09:43
MerioYou might want to have only a sort of red dot nearby each model to show there are errors inside, and then other red dots for each property with an error... and then when you click a suggestion on how to fix things09:43
sttwisterit's his fault if he didn't fix them on time on guess09:43
MerioMaybe I'm just using a outdated json configuration in the repository, which has not been used in three months09:43
MerioI would like some guidance on how to fix errors or to update the configuration09:44
MerioIt's not so complex to handle, it's just that it needs some thoughts before actually coding the UI09:44
sttwisterok, well in that case, signaling each model, and then each property that are having errors sounds good enough to me09:45
Merioyes, but for usability purposes you need to guide the user to fix things, because you know better what could go wrong and how to fix it. So you should either have a sort of shortcut to the model/property that needs fixing or the progressive red dots thingy I was telling you before09:47
MerioOr something similar that you might want to do in place of those solutions09:47
MerioBut please keep in mind usability09:47
MerioHowever you're now going to code the data providers so you might want to dig into the UI matter on some spare time09:48
sttwisterok, will do09:48
MerioI would suggest to draw some mockup just to have some ideas on it09:48
MerioEven though you're going to do it in 14 days anyway09:49
sttwisteryep, I guess I'll do the mockups directly in HTML when the time comes09:49
sttwisterso, one thing I'm not sure about09:50
MerioYes but in that week we need to find time to sync more often or just post your progress somewhere during the week so I can check over it and give you some quick suggestions also by mail in the dev list if I can't find some time to do a proper meeting :)09:51
MerioYep tell me09:51
sttwisteryou suggested making a single request at the beginning to gather data09:51
sttwisterwould that really include all the information (i.e. all models with all properties AND all data providers) ?09:51
MerioI think yes, I can't see any drawback. You can even avoid making any request at all, if you print the JSON with all these informations right into the django template that contains the data seeder UI09:53
sttwisterok09:54
sttwisterand how would I go about the data providers?09:54
sttwister1. provide possible data providers for each property09:54
sttwisterfor each model09:55
sttwister2. provide possible data providers for each property type, and then let JavaScript figure out what data providers are suitable for each property of each model09:55
MerioIt depends on what informations the Python end has and how you need your json configuration formatted to display UI properly09:56
MerioI mean is there any loss of information on doing 2 over 1?09:57
MerioPython knows better how to associate data providers with properties?09:57
sttwisterno, there isn't any loss of information, and would keep the json smaller09:58
sttwisteryes, that information is only known by Python and needs to be transmitted to the web UI somehow09:59
MerioI mean10:00
MerioPython knows that property "country" is a stringproperty10:01
Merioso you can choose between 4 data providers: fixedstring, randomword, randomname, randomphrase10:01
Meriofor property "country" the correct data provider should be randomword from a list10:02
Meriobut this is not something that nor Python nor Javascript can guess10:03
Merioboth of them can only guess that if that property is a stringproperty than you have 4 data providers10:03
Meriothat means it's the same thing, so it's just a matter of the structure of the initial json to the WEB UI10:03
sttwisterhmm, I don't think there is such thing as a "correct" data provider10:03
sttwisterit really depends on the context and the purpose of seeding10:04
Merioyes this is very truw10:04
Meriotrue10:04
sttwistermaybe you want to generate test fixtures with faulty data10:04
Meriofor country it's just the most sensible, you may want to write some random string of characters to test something10:04
MerioYes perfectly10:04
MerioBut well it was just an example to say, it only affects the structure of the JSON10:05
sttwisterok10:05
MerioThat means that you don't need to associate data providers for each property10:05
sttwisterso then I'll go with transmitting the data providers for each property type10:05
sttwisterand let the UI figure out the rest10:05
MerioIf you know that stringproperty has 4 data providers10:05
Meriothan you have a place in your json like "stringproperty": {"fixedstringprovider", etc}10:06
Meriothen it encounter a "stringproperty" and look for it in the "dataproviders" section of the json (for instance)10:06
Merioand then you know the dataproviders, you avoid much duplication here10:06
sttwisteryep, that sounds good :)10:06
MerioI think jlinq would help you a lot on this10:07
MerioWe already have it in our code base10:07
Merioit helps querying over jsons10:07
Meriohttp://www.hugoware.net/Projects/jLinq10:07
tpbTitle: jLinq - LINQ for JSON (at www.hugoware.net)10:07
Merioyou might find it useful to shrink some code while working on jsons10:08
sttwisterok, I'll take a look at it10:08
sttwisterI have some catching up to do on the JavaScript part :P10:09
Meriono problems about it :)10:09
sttwisterso, is there anything else we'd need to talk about ?10:13
MerioI think not for the moment10:15
MerioIf you don't have anything else to ask/say10:15
MerioIt's fine with me, I'll take a look at your commits :)10:15
sttwisternope, not really10:15
Meriofine then, see you on gtalk and keep up the good work :)10:16
sttwistersee you :)10:20
sttwisterhave fun at the conference ;)10:20
Meriothank you very much ^__^10:21
Meriosee you (don't forget meeting notes ;))10:21
*** Merio has quit IRC10:24
*** Leo___ has joined #melange11:21
*** mithro has quit IRC12:00
*** dr__house has joined #melange12:01
*** Lennie has joined #melange12:31
*** ChanServ sets mode: +o Lennie12:31
*** sttwister has quit IRC13:08
*** sttwister has joined #melange13:32
*** Lennie has quit IRC13:35
*** tansell-laptop has quit IRC14:34
*** tansell-laptop has joined #melange14:35
*** dreimark has quit IRC14:51
*** dreimark has joined #melange14:51
*** Leo___ has quit IRC15:05
*** sttwister has quit IRC15:07
*** MatthewWilkes has quit IRC16:39
*** sttwister has joined #melange16:41
*** SRabbelier has quit IRC17:18
*** SRabbelier has joined #melange17:24
*** ChanServ sets mode: +o SRabbelier17:24
*** dhaun has joined #melange18:13
*** sttwister has quit IRC18:40
*** sttwister has joined #melange18:40
*** thrain42 is now known as durin4218:44
*** dr__house has quit IRC19:08
*** Merio has joined #melange20:29
*** ChanServ sets mode: +v Merio20:29
*** robbyoconnor has quit IRC20:52
*** Merio has quit IRC20:55
*** Merio has joined #melange20:57
*** ChanServ sets mode: +v Merio20:57
*** dhaun has quit IRC21:20
*** EllenKo has joined #melange22:38
*** EllenKo has quit IRC23:17

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!