IRC Logs for #cmvt Wednesday, 2013-04-24

prologicI've just spoken with Michael (our SysAdmin)00:00
prologicIt will definitely be CentOS on the real server00:00
prologicI'm actually thinking of spooling one up myself00:00
prologicjust a small one00:00
prologicand provision it with ansible00:00
DanielBairdthen at some point we should work out centos00:00
DanielBairdwill ansible make it easy to install python 27?00:01
DanielBairdwait, ansible needs python on teh remote node already00:04
DanielBairdno actually there's an ansible "raw" thing that does shell commands00:05
prologicI've had honestly great success with Ansible00:05
prologicin terms of provisioning servers from a blank slate00:06
prologicI think we should do this tbh00:06
prologicVagrant is good00:06
prologicbut it's not the end goal for us00:06
prologicI think we should go back to CentOS00:06
prologicand I'll create Ansible play books that create our environment that we need00:06
prologicand spool up a test/small nectar vm00:06
prologicI think I'm allowed to spool up two with my griffith id00:07
prologicand yes whilst Ansible's only requirement is Python on the remote server00:07
prologicCentOS already has Python  installed00:07
prologicgranted 2.6.600:07
DanielBairdyeah that's cool, it looks like ansible is okay with old python which centos can yum install.00:07
prologicbut it's enough to bootstrap Ansible00:07
prologicand get it going00:07
prologicwell no00:07
prologicI think at this stage00:07
prologicI'm just going to build from source00:07
prologicI dbf mucking around with CentOS's packaging00:08
prologicexcept for "easy" stuff00:08
DanielBairdbut you need remote python on centos, right?00:08
prologicit already has python though00:08
DanielBairdthen you can use ansible to compile and install py2 700:08
prologicand mapserver00:08
prologicand nodejs00:08
prologicwhat do you think?00:08
prologicshall I do this?00:08
prologicit'll get us 90% the way there with a real deployment I think00:08
prologicI wanna speak to our SysAdmin first00:09
prologicsee if he's ok with this00:09
DanielBairdthe main cost of going this way is that it's a hour of compiling whenver we want to check deps from teh start00:09
prologiceven Ansible will play nice with Vagrant too00:09
prologici.e: you could just create bank CentOS Vagrant VMs00:10
prologicansible-play /path/to/playbook00:10
DanielBairdvagrant's not particularly important, having a low-friction way to declare and test dependencies is00:10
prologicyes I agree with the whole compile time thing00:10
DanielBairdvagrant is mainly good for having terse command line powers to start over, drop in and test something quickly, etc00:10
prologicI could package up the resulting compiled binaries00:11
prologicinto a tarball00:11
prologichow about this for an idea00:11
prologic1) spin up a nectar vm00:12
prologic2) create ansible play books to provision what we need00:12
prologic2a) as the first thing, build the crux pkgutils00:12
prologic2b) write Pkgfile (CRUX) for Python 2.7 (done) and MapServer (TBD)00:12
prologic2c) ensure we keep copies of the resulting tar.gz packages (binaries)00:12
prologicsubsequent re-provions are just pkgadd <binary_tarball>00:13
prologicI can make this happen :)00:13
DanielBairdwhen centos was only a vague maybe, it was justifiable to go to ubuntu, but now we can be sure of it, we at some point have to get our stuff working on centos.  so we need to know how to compile / install watever we need onto centos.  if you're okay with compiled tarballs, that's okay but won't that make it harder to get bug fix versions?00:13
prologicwhat I'm proposing in reality00:14
prologicis to re-use CRUX's awesome package management tools00:14
prologicfor our project00:15
prologicwhat this will mean I think00:15
prologicis 2 separate repositories00:15
prologicwhere ash contains CRUX Pkgfiles (port) for specific dependencies we need that are compiled form source00:15
prologicand packages just a cache (so to speak) of builds we can just pkgadd00:16
prologicOur Ansible play books will point to these repos00:16
prologicand it will be all automated00:16
DanielBairdideally we wouldn't add "crux package management" to the list of things someone has to know about to re-deploy this system though00:17
DanielBairdis there a way to do the same thing but using centos-native yum packages, or something?00:18
DanielBairdthen it's just "centos familiarity" on the sysadmin job ad.00:18
DanielBairdi suppose, "centos and ansible"00:19
DanielBairdacutally if ansible is doing all the package fiddling, it can be whatever it wants under the hood.  it still would require crux package knowledge to update the mapserver version or whatever, though00:20
DanielBairdanyway it sounds like you have a plan for getting a depdency install script together.. i'll go back to getting d3 to hook into my data00:22
prologicspoke to our sysadmin00:23
prologiche has no problem with what I proposed00:23
prologicok so the thing with CRUX's pkgutils00:23
prologicthe sysadmin doesn't have to know about this per say00:23
prologicit's just a bash script (really)00:23
prologicand 2 tools: pkgmk and pkgadd00:23
prologic3 if you count pkgrm00:23
prologicand as for using yum/centos packages, etc00:24
prologiccreating centos/redhad packages is a giant PITA00:24
prologicnone of our sysadmins know how to do this afaik00:24
prologicI on the other hand have been doing package management for years00:24
prologicI've done Debian, CentOS/RHEL and now CRUX00:24
prologictbh CRUX's package management is the simplest and easiest00:25
DanielBairdthat is, once you get a proper compiler onto your aix box, urgh the native one isn't good enough00:28
DanielBairdi suppose the actual alternative to packaging stuff is to compile from scratch00:29
prologicso I'll go ahead with this then?00:30
DanielBairdsorry got called away.. yes in conclusion, go ahead00:31
DanielBairdrecord your compilation steps too so if necessary we can doc them as part of the dependency steps00:33
DanielBairdi'll wait for your setup to be working then add it all to a vagrantfile so i can have a working test box too00:34
prologicno need00:36
prologicthat's what the CRUX-style ports are for :)00:36
prologicfully documented, repeatable ports00:36
DanielBaird* cool00:39
ircnotifier4deec9270a69 by prologic: Initial Commit01:42
ircnotifier3689e32a599a by prologic: Fixed syntax (we're not using sphinx here)01:47
prologicgoing to lunch - bbs02:00
DanielBairdsee you02:00
DanielBairdi made some additional repositories02:36
DanielBairdbut fab doesn't work in them (ImportError: No module named pkg_resources).02:36
DanielBairdso i tried python develop but that fails with ImportError: No module named setuptools02:37
DanielBairdis there some global config somewhere that means i can't have more than one checkout of ccav and use fab on it?02:41
DanielBairdperhaps it's a virtualenv thing02:42
ircnotifier4cbc2e6e3980 by Daniel Baird: renaming incomplete coffeescript file so it doesn't get compiled02:46
prologicwhat are you trying to do?03:05
prologicdo you have a local clone of ccav?03:05
DanielBairdi hg cloned some additional copies of the repo03:06
DanielBairdso i could work on things in separate hg repos03:07
DanielBairdi should be able to run python in each one, right>03:08
prologicumm no not quite03:09
prologicyou'll keep overwriting the install of the other03:09
prologicyou need to use virtualenv03:09
prologicpip install virtualenvwrapper03:09
DanielBairdi have that installed..03:09
prologicmkvirtualenv test03:09
prologiccd /path/to/ccav/clone03:09
prologicpython develop03:10
DanielBairdwhen do i mkvirtualenv ?03:10
prologicbut really bumpy doesn't like installing like this03:10
prologicso just do "fab build"03:10
prologicfab develop rather03:10
prologicinstall fabric globally though03:10
prologicoutside of any virtualenv03:10
DanielBairdfab is running from ~/bin/fab03:11
prologicthat's fine03:11
DanielBairdso virtualenv sets up environments per shell?03:11
DanielBairdnot per directory?03:11
prologicno, per directory03:12
DanielBairdhmm okay03:12
prologicit sets up an entire python virtual environment03:12
prologiccompletely separate from any other03:12
prologicsystem python or otherwise03:12
DanielBairdwhat i want to end up with is several installs of ccav that i can cd into and run, independently03:12
DanielBairdso i just need to mkvirtualenv in each of the dirs03:12
prologicno no03:12
prologicjust mkvirtualenv <envname>03:12
prologicworkon <envname>03:13
prologicccav /path/to/htdocs03:13
DanielBairdi have viertualenv but not mkvirtualenv03:13
prologicpip install virtualenvwrapper03:13
prologicand source /path/to/virtualenvwrapper.sh03:14
prologicI put it in my ~/.profile03:14
DanielBairdhmm can't even run pip03:14
DanielBairdC02JKVMWDR53:old-ccav pvrdwb$ pip install virtualenvwrapper03:14
DanielBairdTraceback (most recent call last):03:14
DanielBaird  File "/Users/pvrdwb/bin/pip", line 5, in <module>03:14
DanielBaird    from pkg_resources import load_entry_point03:14
DanielBairdImportError: No module named pkg_resources03:14
prologicpvrdwb  <-- is this your user account?03:15
prologicgood lord03:15
prologicyour python is badly broken :)03:15
prologicat least in your home directory03:15
DanielBairdit happened here03:16
DanielBairdC02JKVMWDR53:old-ccav pvrdwb$ fab build03:16
DanielBaird[localhost] local: python install03:16
DanielBairdWarning: local() encountered an error (return code 1) while executing 'python install'03:16
prologiccurl -o - | python -03:16
prologicthis should fix your first problem03:16
DanielBairdsince then, fab build and anything else give me that error from before03:16
DanielBairdthat dropped a distribute gz into my dir.. can i delete that?03:18
DanielBairdanyway i'm installing virtualenvwrapper03:21
ircnotifiere1cb463ee948 by prologic: Added task to install all development tools03:21
prologicyeah you can delete it afterwards I guess03:21
prologicbut it should have fixed your missing pkg_resources proble03:21
prologicgod only knows how you managed to nuke that :)03:21
DanielBairdokay so.. now, i guess i can mkvirtualenv some-name in each of my dirs03:21
DanielBairdin each of my repos, i mean03:21
DanielBairdstill no mkv-env03:22
prologicyou don't need to do it in any dir03:23
DanielBairdwhere's your mkvirtualenv binary?03:23
prologicit just creates the environment03:23
prologicand activates it03:23
DanielBairdso it's per shell?03:23
prologicyou need to source ~/bin/virtualenvwrapper.sh03:23
DanielBairdoh that's right03:23
prologicput it in your ~/.profile03:23
prologicno it's not per anything03:23
prologica virtual environment is either activated or not03:23
prologicthe structure of which is stored somewhere03:24
prologicusually ~/.env I think by default03:24
prologicyou just treat it like a separate ptyhon03:24
prologicwith separate packages03:24
prologicwhen activated it modified your shell environment03:24
prologicpython library path03:24
prologicetc etc03:24
DanielBairdyeah i mean once you switch to it, it's current in that shell03:24
prologicso when you do python develop03:24
prologicon some package03:24
prologicit only gets installed in "that" environment03:24
prologicuntil you do:03:24
DanielBairdso if i cd to a different installation of ccav, i have to also run a command to switch to a different virtualenv03:25
DanielBairdbefore i run it03:25
prologicthe source/repo has nothing to do with the environment03:25
prologiconly if it's installed somehow03:26
DanielBairdi've used similar environment switching tools but they check the dir you're in, and magically use the right environment03:26
DanielBairdi guess i will make and env for each repo i have03:26
DanielBairdand then do their setups.03:27
prologicvirtualenv/virtualenvwrapper just creates environments03:27
prologicand manages them03:27
prologicnothing more03:27
prologicnothing magical03:27
DanielBairdso i think i get what i want as long as i remember to workon appropriate-env each time i cchange between repos03:28
ircnotifier9e27e4734df5 by prologic: Added installation of mercurial and git to devtools task03:29
DanielBairdis there a virtualenv "list environments" command?03:29
DanielBairdah yes that's working03:36
DanielBairdhmm alright.. new weird thing03:37
DanielBairdin my new env, i ran python develop03:37
DanielBairdand that worked and installed lots of stuff and filled my repo dir with egg dirs03:37
DanielBairdbut then when i fab develop i get an error when fab tries to run python develop03:38
DanielBairdnow, when i run python setup etc, i get "no module names setuptools"03:38
DanielBairdshould be able to run python develop mulitple times, right?03:39
DanielBairdoh wait, i wonder if fab's shell isn't running in my virtualenvb03:40
prologicprobably not03:40
prologicyou will want to pip install fabric inside the virtualenv03:40
prologicbest to run ./bootstrap.sh03:41
prologicfab develop03:41
prologicthat's why I created bootstrap.sh03:41
DanielBairdah right forgot that bit, i bet you're right03:41
DanielBairdyerah guessed it :)03:41
prologicsweet :)03:42
prologicthere are several virtualenvwrapper aliases03:42
prologiccheck the docs I posted above03:42
DanielBairdalright now my recipe for new repo use is:03:43
DanielBairdclone new repo03:43
DanielBairdcd into new repo03:43
DanielBairdcreate new env and workon it03:43
DanielBairdfab develop03:43
prologicI normally just use mkvirtualenv rmvirtualenv lsvirtualenv workon and deactivate03:43
prologicyeah :003:43
DanielBairdyeah i was just checking that running global fab didn't kill my current env03:43
prologicglobally installed fabric would get utterly confused03:43
prologicif you didd not have fabric in your virtualenv03:43
prologicit would and should fail with03:43
prologicImportError: no such module fabric03:43
DanielBairdseems like there's too much global state in some of these tools03:44
prologicno no :)03:44
prologicit works as intended :)03:44
prologicI'm just overcomplicating things for you03:44
prologicby introducing virtualenv :)03:44
prologicworking on multiple independent python environments is fun :)03:44
prologicseparate bin dir03:45
prologicseparate site-packages03:45
prologicseparate python binary (normally copied)03:45
prologicetc etc03:45
prologicfun times :)03:45
DanielBairdbut imagine if virtualenv just checked the dir for a config file, like hg looks for .hg03:45
prologichmm no03:46
prologicthat would break many other use-cases03:46
prologicvirtualenv is actually used to run applications as well03:47
prologicand not just for different environments with the same python version03:47
prologicbut different python versions03:47
prologicfox for example employs virtualenv to perform testing across many python versions03:47
DanielBairdi still get (old-ccav)C02JKVMWDR53:old-ccav pvrdwb$ fab develop03:48
DanielBaird[localhost] local: python develop03:48
DanielBairdWarning: local() encountered an error (return code 1) while executing 'python develop'03:48
prologicthis is how circuit is tested against Python 2.6, 2.7, 3.2, 3.3, pypy on Windows, Linux, BSD and OS X03:48
DanielBairdstill getting this from fab develop03:48
prologicrun that step manually?03:48
prologiclet's see what it says03:48
DanielBairdactually, it's fine if i run it manually03:49
DanielBairdi'll try fab again03:49
DanielBairdyeah fab is still reporting non-zero exit code.03:50
prologictype: which fab03:50
DanielBairdImportError: No module named numpy.distutils03:51
DanielBairdhad error03:51
DanielBaird(old-ccav)C02JKVMWDR53:old-ccav pvrdwb$ which fab03:51
DanielBaird(old-ccav)C02JKVMWDR53:old-ccav pvrdwb$03:51
prologicone sec03:52
DanielBairdi asked it to echo "had error" if it returned non-zero, just in case it returned 1 but actually worked fine. but looks like fab runs in differently from me03:52
DanielBaird* fab runs in different env from me03:59
prologicworked perfectly here04:09
prologicI did:04:09
prologiccd ~/ccaih/ccav04:09
prologicmkvirtualenv test04:09
prologic.. wait a few mins ...04:10
prologicfab develop04:10
prologic.. wait a few mins ...04:10
prologiceverything installed successfully for me04:10
DanielBairdmy fab develop runs, but early in it's output it tells me something like "[local] error running setup, return code 1"04:10
DanielBairdthe subsequent stuff runs okay04:11
DanielBairdif you run python setup not from your env, does it work?04:13
DanielBairdif it does, then fab might be doing that (running the system python) but that doesn't generate an error04:13
DanielBairdaaanayway it turns out that i can fab fine with the system python, and that works in each of the project dirs i have04:14
DanielBairdso my goal of having two versions of the ui available for screen sharing at today's meeting can be met04:14
DanielBairdand once you have a working deployment script, i'll do up a centos vagrant box, and then i can have as many environments as i like and not have to worry about multiple pythons sharing my macbook04:16
DanielBairdi can't run ccav from any of my dirs but i only need to serve the direcrtory, so the asdf server can do that04:17
ircnotifier2df3c939b080 by prologic: Default the development version number to the result of hg id -i04:20
prologicI'm so confused so to why you're seeing errors sometimes04:21
DanielBairdi'm happy to blow away all of my python and repos and go one at a time, using virtualenv for everything.  but that's unnecessary i think, i actually dont' care about separate environments, i just want to be able to fab and ccav-serve from two different repos.04:24
prologicsure ok04:28
prologicjust surprising you're running into small issues04:29
prologicthat's all04:29
prologicI can't reproduce your issue here04:29
*** gw has joined #cmvt05:34
gwhaving a hard time to read this05:36
gwmaybe you have nome clues for me....05:36
gwalso wondering why it is $scope in one place and without in another place05:39
DanielBairdit's angular dependency injection.  angular looks at the name you provide in your function, and make sure to pass in the right thing05:41
DanielBaird$ is just angular's convention for their system provided things05:42
DanielBairdso $scope is the data object that you can bind to from the html05:42
DanielBairdand $html is a xhr tool for fetching stuff from urls05:43
gwwhy do they always have to complicate things, when trying to make stuff easier?05:45
DanielBairdyeah i almost went with ember which has much more familiar patterns05:45
gwso scope.$watch does some sort of function binding on change?05:45
DanielBairdhang on, i'll get into that code05:46
gwthat's one of the places where it's not $scope :)05:46
DanielBairdoh yeah.. that's a directive05:46
gwscope.$watch 'center', (center)->05:46
gwthis line....05:46
DanielBairdangular uses it's own special names for things that make the whole thing annoyingly cryptic05:46
gwit's watching ?05:47
DanielBairdso that's in the link function in the leaflet directive05:47
DanielBairda directive is like a new type of tag, the leaflet directive gives you a <leaflet> tag to use05:47
gwso it's awesome to bind things, but it's use is annoyingly cryptic? :)05:48
DanielBairdit could also have been a directive that came as an attr, e.g. <div data-ng-leaflet></div> but the author chose not to enable that. dunno why05:48
gwno valid html :)05:48
gwbut I have to jump back and forth between files to see what's going on05:49
DanielBairdyes that leaflet tag is the last unvalidatable bit :)05:49
DanielBairddirectives are the most complicated part.05:49
DanielBairdanyway that link function is what gets run when your leaflet thingy is inserted into tehpage05:49
gwesp. this mix of markup and code too :)05:50
DanielBairdoh you mean that there's a leaflet tag?05:51
gwthings like the select tags with the data-mg-options attribute05:51
gwwhere there is a fair bit of code in the attributes05:51
DanielBairdyeah the looping stuff.  hard to imagine a way to do that otherwise though.. would you normally do a jquery loop inserting options into the dom05:52
DanielBairdobviously you could assemble the page on the server if you have a static list of options05:53
gwso he can still work on it without knowing anything about the tempting thingy...05:53
gwand I can use his stuff and let my templates do with it whatever they want05:53
gweither query loop, or server side yes....05:53
DanielBairdthe thing js adds is that the options can change on the page (e.g. a selection is refined by the user choosing something from another dropdown) and the next dropdown updates automatically05:54
DanielBairdyeah, so you'd write an event handler to handle selection on dropdown1, and when a selection is made, re-calculate what should be in dd2, remove the content of dd2, insert the new list...05:55
gwhow does this hg-options work?05:55
gwx a (some expression) for x in some source list05:56
gwI assume05:56
DanielBairdthat's how you'd do it with jquery etc.  but then imagine you have to do refining-selection dropdowns in a few places, and you write a library type js routine to do the work05:56
gwand hg-options just takes the x?05:56
gwand does something withit?05:56
DanielBairdangular (or ember, or knockout) is that library05:56
DanielBairdsorry i'll catch back up05:56
DanielBairdyeah the syntax is too opaque to immediately get, but yes there's a list of objects (e.g. mapprops.scenarios)05:57
DanielBairdthe scenarios each have a name and maybe some other properties05:57
DanielBairdscenario as means the list should show the scenario's name in teh list05:58
gwyes .. .that's obvious05:59
gwso at the end this generates a list of names?05:59
DanielBairdng-model = selectedscenario means once they choose one, set the scope's selectedscenario to that one05:59
gwwihc is then turned into option elements by angular?05:59
DanielBairdit's not just making the list, it's doing the data binding05:59
DanielBairdbut yes angular adds the options to the dom for you05:59
gwor more specific06:00
DanielBairdso the $scope has a mapprops and a selectedscenario06:00
DanielBairdif you have to you can, but you dont' need to06:00
gwok .. how would this work?06:00
gwthis simple attribute list is probably not expressive enough06:01
DanielBairdyou end up with access to selectedscenario which is the object the user weanted.  not just a string, but the item from teh original list06:01
DanielBairdhow do you mean?06:05
gwor having control about the id / class attribute of the options06:05
gwsetting value independent of option content ....06:06
gwthings like this06:06
DanielBairdyeah i guess i'd write in teh option tags and repeat them for each data element, if i wanted to fiddle each option, template style.  not sur eif that's the idiomatic way to do that in angular though06:06
DanielBairdyes the ng-options is something of a convenience thing, you can do repeating template things etc06:08
DanielBairddata binding.06:08
gwweird conventions, awkward syntax, instead of building elements it's building dicts ....06:08
gwall to save 2 lines for data binding?06:08
gw.being bound to widget integration into angular (or have to do i your own ) otherwise these widgets might not work06:09
gwcode and binding of elements to code separated out into various files06:09
DanielBairdi completely agree with the weird conventions and awkward syntax.  feel free to browse through meteor, marionette, knockout, ember and pick an alternative, in my opinion angular has the largest community and most support, and is the least amount of work, but those others are good too.06:10
gwalterantive: plain jquery06:10
gwand clean coding06:10
gwit's not that javascript or query is bad or cumbersome ....06:11
gwbut it needs some discipline to create good code06:11
DanielBaird"clean coding" inevitably means building a framework yourself.. that's what i'm gtrying to avoid06:11
gwhis query code in this dome was just awful06:12
gwquery is not a framework for frameworks ....06:12
DanielBairdwas that a todo demo?06:12
gwjquery is convenience library for javascript and dom manipulations and event handling06:13
DanielBairdyes.. jquery is awesome at those things06:13
gwdid you ever use dojo?06:14
DanielBairdno, prototype and scriptaculous, some backbone, lots of jquery06:15
DanielBairdunderscore i guess, comes with backbone06:15
DanielBairdnever used dojo, mootools, or anythingn from YUI06:16
DanielBairdi did lots of work with tiddlywiki back in the day, i think they were thinking about incorporating dojo into the wiki06:16
ircnotifier0fdbf4dccb7f by prologic: Created playbook for building and installing Python 2.7.406:17
gwI weigh usually 3 things in when I have to learn something new06:18
gwis it easy to learn06:18
gwhow much do I gain06:18
gwwill I ever use it again06:18
gwif I gain much, the learning curve can be steeper06:18
gwfor the first 2 reasons...06:19
DanielBairdi don't think it will be as bad as you imagine06:21
gwI already had to grep all the files to see where the curet 6 bindings go :)06:21
DanielBairdbut it's true that angular has a whole bunch of new, inscrutable terminology06:21
DanielBairdi've no idea why they decided on, say, "directive" instead of something like "custom tag", or "scope" instead of "data model" or something06:22
DanielBairdsoemthing like ember has a much more familiar architecture.  you describe models, views, controllers, etc, so that might be easier to guess where things are06:23
gwbut how thing's are done is important ....06:24
DanielBairdyes agree.  and the idea of modelling ANOTHER frickin mvc layer in the browser seemed crazy06:24
DanielBairdso declarative data binding and plain html seemed like a good way to go06:24
gwand   this doesn't change.. by renaming your scope to context...06:24
gwthings are still the same06:25
gwdojo had some data binding too :)06:25
gwand I guess others too06:26
DanielBairdyeah and there's a dozen js app frameworks, who knows which will survive06:27
DanielBairdthat's another reason to go with angular..06:27
DanielBairdit's aligned with the future proposals for ES06:27
gwjust because it's from google does not mean it will survive ;)06:27
DanielBairdso the angular concepts are moving into es5.. it might still not be angular, but the app architecture will definitely exist06:28
DanielBairdperhaps dojo will have a resurgen e06:28
DanielBairdsorry i mean the next js standard06:28
DanielBairdsome kind soul has done this
DanielBairdanyway, i guess the upshot is that in my opinion a web app like this needs a framework.  it's not impossible to write a custom framework yourself for each app, but that's slower, buggier and less powerful.  I dont' really care which framework we use, if you super-hate angular I can switch to something else.  I think any future web app you work on will benefit from a framework too.06:33
gwsomething  is wrong if we don't use one...06:35
gw80% of the web apps I write need to be indexable ....06:36
gwso angular is not a big help here06:36
gwI assume that's not what you suggest06:37
gwif you agree to maintain it for the next 3 years you are welcome ;)06:38
gwdon't tell me in a years time you don't remember why you did this binding here ;)06:38
DanielBairdi'm not arguing that we couldn't produce the app without a 3rd party fw, but i am arguing that we can't do it without a clear strucuture06:38
gwI am not saying write some spaghetti spread all over the place..06:38
gwI am only saying don't use some overly complex tool that does not really bring much value, except for tearing things that belong together apart06:39
gw a framework is not a replacement for good structure06:39
DanielBairdi think the place we disagree is how complex this app will be written with angular.06:40
gwstarting from developing, testing, debugging, maintaining  etc....06:40
gwand we disagree that the way angular is doing data and event binding is a  bad idea06:41
DanielBairdyes i guess, but isn't it that you think it makes it too complex to maintain?06:41
gwsorry  but google engineers are also just people not engineering gods06:41
gwyes it is too complex to maintain .....06:41
DanielBairdrequirejs and jquery are a bit awkward06:43
DanielBairdawkward together, i mean06:43
DanielBairdbut i'm a supporter of require.js06:44
DanielBairdhere's addy's famous js framework piece06:47
DanielBairdthere's a "when to use what" heading down the page a bit06:48
gwusually a sign that there is something wrong with the whole approach06:50
DanielBairdaddy osmani is pretty good at this type of analysis.  i came back to this article several times while i was testing out backbone and ember06:53
DanielBairdhe has a tool "yeoman" for making bootstrap apps in several of these frameworks, but i found i didn't always like having a dozen dirs craeted for me06:54
gwhis examples do all the same thing?07:01
*** prologic has quit IRC07:03
DanielBairdsorry was away.. are you looking at the todo app?07:04
*** prologic has joined #cmvt07:05
DanielBairdyeah it's annoying to browse through the angular version07:07
DanielBairdwhat's the "optimised" one?07:09
DanielBairdnvm it's called angular-perf, must be some performance thing07:09
DanielBairdfricking github, every second page grinds forever07:10
DanielBairdoh yeah that is elaborate.. he's done blur and focus directives07:11
gwso did the jquery07:12
DanielBairdwhere does the jquery bind to the events?07:13
DanielBairdlol i see it..07:14
gwone function ;)07:14
DanielBairdin the bindEvents function07:14
DanielBairdanyway that's interesting.. they've a nice jquery implementation07:16
gwor if you want to add things07:16
gwit's all in one file....07:16
DanielBairdyes in that example angular suffers terribly from the multiple file splitting07:16
gwif code get's bigger you'll have to start components stuff07:16
gwcomponentise stuff07:17
gwthis way you can separate out by functionality and thing will be easy to find again07:17
DanielBairdso you *do* like the handlebars templating in the html file?07:17
gwbut it's more straightforward and replaceable than the angular integration...07:18
gwone of the components you can just replace without affecting all the other code07:18
DanielBairdyeah ember uses handlebars too.  i agree that string templates are easier to maintain than having to do everything in html tag attrs07:18
gwand if you don't like handlebar string templates you can just rip out this part and put something else there07:19
DanielBairdi'm not convinced that having script tags with templates in them is better from a testability point of view07:19
DanielBairdi guess it boils down to how much code there will be in our maps app.07:21
gwbut there is also no mix of concerns :)07:21
DanielBairdactually no that's not quite it07:21
DanielBairdi believe that most frameworks will make complex apps simpler and easier to maintain.. i think you disagree07:21
DanielBairdfor a small amount of code, i wouldn't want a fw07:22
gwbut it makes it 10 fold harder to customise it to customer requirements07:23
gwor client requirements07:23
DanielBairdAMD style modules are about source organisation, and namespace isolation.. there's still behavioural architecture07:23
DanielBairdah i see07:23
DanielBairdi definitely disagree, once you have more than a hundred lines of code it's _easier_ to add features etc if you have a decent framework07:24
DanielBairdwhoa, it's late.07:24
DanielBairdgotta go.. lets resolve this on monday07:24
gwnot if you have to integrate things into a big complex framework07:24
DanielBairdcan;t spend our hours on the same stuff going around and around07:24
gwif the framework does not offer you a specific hook you need then you are doomed to fight against the framework07:24
DanielBairdagree, so don't use a cfrappy unfinished framework07:25
gwbut when is a framework finished?07:25
DanielBairdsorry really gotta go and pick up kid from hockey07:25
DanielBairdsee you monday07:25
DanielBairdit cmight still be crappy :)07:25
DanielBairddojo i mean07:25
*** DanielBaird has quit IRC07:25
gwhave a good weekend07:26
gwYou can also separate event binding logic from the control logic itself.07:36
*** gw has quit IRC07:55
*** gw has joined #cmvt08:26
*** gw has quit IRC09:03

Generated by 2.11.0 by Marius Gedminas - find it at!