tag:blogger.com,1999:blog-171851642024-03-13T01:07:44.533-03:00El curioso y gracioso caso del hombre sin nombreUnknownnoreply@blogger.comBlogger14125tag:blogger.com,1999:blog-17185164.post-78541712839315525712008-08-18T05:55:00.002-03:002008-08-18T06:11:29.187-03:00plone.app.batch 0.1 releaseThat's right, I tagged the work done so far in what we can name the first release of this nice product.<br /><br />In case you are interested on it, here it is: <a href="http://plone.org/products/plone-app-batch/releases/0.1">plone.app.batch-0.1</a>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-17185164.post-13436865904420942042008-08-18T05:46:00.004-03:002008-08-18T06:11:29.188-03:00End of SummerDon't scare, your summer is not ending yet. Don't scare, my winter here neither. The thing is that the Google Summer of Code period is finishing in about 10 hs, and last 2 weeks I worked hard adding and cleaning things.<br /><br />A summary of the work done in the last 2 weeks can be summarized with the change log comments, which are:<br /><br /><ul><li>Added, fixed and improved tests and documentation.</li><li>Minor imports fixes (and dependences changes) for working with plone.app.z3cform 0.5</li><li>BeautifulSoup dependence added, for making functional tests easier.</li><li>Fixed bug in editor: if unmarking object checkbox, now is excluded from the process (wasn't happening this).</li><li>utilities (datetimes functions and makeBatchEditableField) added to utils.py</li><li>Fixed ATValidation error class for displaying the message of the archetype validation error.</li><li>BatchDataManager added, which adapts content and IBatchField fields. This cleans the code of the BatchEditor adapter.</li><li>Dummy Lines field created, for handling different situations with archetypes Lines fields. So far, is only a Text field.</li><li>Reference field added, which uses first version of AccessibleWidget.</li><li>Accessible widget added: multiselect widget with javascript improvements, but also functional for non javascript browsers.</li><li>Images and Files now can be uploaded with batch editor.</li><li>In AT2Z3Field, removing plone.app.batch dependences, preparating the ground for making it a separated package.</li><li>AT2Z3Field tries to grab a vocabulary for the z3field from the objects that is trying to adapt.</li><li>Added TitledVocabulary (taken from PloneGetPaid), for easy creation of titled vocabularies.</li></ul>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-17185164.post-90704100806735152892008-08-18T05:10:00.008-03:002008-08-18T07:21:02.363-03:00refresh.txt now is plone.reloadNote: they are not the same thing, It's just the title of my post.<br /><br />About 3 years ago, when I started to develope with plone/zope there was a nasty trick for speeding up development that consisted on putting an empty file named exactly "refresh.txt" in the root of your product. That way, each time you modified the code of your product, you were not pushed to restart your zope instance: you had to navigate thru an intricated path until you reach your product, and from there clicking on a magic refresh button saved us, reloading our code.<br /><br />Sometimes, the code in your product was importing another modules, and then refresh were not able to reload things entirely, and there were some other oddities that I don't remember right now.<br /><br />Anyway, that process worked fine for a while. But later things started to be more and more complex, until at some point the refresh thing ended been completely obsolete and non useful at all.<br /><br />With the advent of Five and zcml configuration files, and probably many other new pieces on zope, refresh was wounded death.<br /><div id="result_box" dir="ltr"><br />Mourning and grief... I wored black clothes for a couple of weeks, but, slowly, I started back my normal life.<br /><br />There I was when last week Anthony, who abandoned Plone development for a couple of years, asked me about our old friend refresh.txt... I started to carefully choose the words, trying to not hurt him with the terrible news, when I though "Hey, there must be some replacement out there".<br /><br />I was doing a fruitless search when Matthew Wilkes introduced me the newest kid on the block: <a href="http://pypi.python.org/pypi/plone.reload">plone.reload</a>. It simply works, and there is no need to explicitly tell it what to reload, and it is also able to reload zcml configurations!. What a joy.<br /><br />Unfortunately, there are some issues on the product yet, but it's actively developed, and regardless those things, it's very useful.<br /><br />- What issues did you find?<br /><br />- Only this one: Does not work if you touch code in a class method that calls super. The thing is simple: the module is reloaded, so, when calling super, an internal isinstance call fail.<br /><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-17185164.post-45991314860333414812008-08-18T04:32:00.008-03:002008-08-18T06:11:29.189-03:00Accessible Multi Select WidgetWhile using <a href="http://pypi.python.org/pypi/plone.z3cform">plone.z3cform</a> (a plone wrapper for <a href="http://pypi.python.org/pypi/z3c.form">z3c.form</a> lib) I felt a bit frustrated when I could not find a multi select widget that were functional for a non javascript browser.<br /><br />Yes, I know what you may want to say, that in the current century we web developers should not worry any more for non javascript browsers, but I think we do have to.<br /><br />According to this stats (<a href="http://www.w3schools.com/browsers/browsers_stats.asp">w3schools</a>, and <a href="http://www.thecounter.com/stats/2008/July/javas.php">the counter</a>) is about 5% of the users, and although this number is decreasing, I think that is still a considerably portion.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fMlCSWCko1k/SKknRteDXkI/AAAAAAAAAEE/TGptcTX5j_8/s1600-h/disabled.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://1.bp.blogspot.com/_fMlCSWCko1k/SKknRteDXkI/AAAAAAAAAEE/TGptcTX5j_8/s320/disabled.png" alt="" id="BLOGGER_PHOTO_ID_5235759227011817026" border="0" /></a>So, what I did is a widget that consist of a set of 3 html select fields. The actual<br />one (the one with the name that the form action will use) is the one that is viewed by default in a non javascript browser, and is something like in the first screen shoot.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fMlCSWCko1k/SKkoPA7YJQI/AAAAAAAAAEU/Hm8EmvwUmV8/s1600-h/enabled.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 451px; height: 54px;" src="http://4.bp.blogspot.com/_fMlCSWCko1k/SKkoPA7YJQI/AAAAAAAAAEU/Hm8EmvwUmV8/s400/enabled.png" alt="" id="BLOGGER_PHOTO_ID_5235760280207107330" border="0" /></a>If you have javascript enabled, the widget append a function to the onload event of the window, and then the default basic view is hidden, and shown a nicer one instead, like the one in the second shot. And each time the user do things on the nicer widget, that selection/de-selection action is reflected in the actual hidden select input.<br /><br />Where is the code of the widget? So far, is inside my plone.app.batch product, but if anyone thinks may be useful we can incorporate it on a more generic package.<br /><br />On this same aspect, I would like to do similar kind of things with other widgets, and I open to hear suggestions.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-17185164.post-51280984802393323462008-07-31T00:04:00.006-03:002008-08-18T06:11:51.066-03:00PolishingLast week I had unexpected complications trying to polish translations. Some things like content type names were almost a battle. I finished having to write my own widgets for displaying translated content type names using<span style="font-style: italic;"> portal_types.getTypeInfo</span>.<br /><br />I preferred my own widgets for multi-selects also cause I did not find any of the default ones not needing javascript to function properly. Did I miss something?<br /><br />Later I realized that the set up form I made about a month ago was not based on plone.z3cform but in formlib, so my new widget wasn't able to work there. I could create another widget (a formlib one) but instead I preferred to unify the code, and use plone.z3cform only, so I re wrote that form.<br />In that re-writting I seriously improved the way that data is managed, using an IDataManager provider instead of silly formlib handlers. I'm happy with that. Things looks much more clear now :)<br />Surprises not ended there. The template I had for the setup page wasn't working with a plone.z3cform.<br /><br />For the selector page I also had to create a textwidget for Content types names translated.<br /><br />With all those changes, I created a complete spanish translation that is now in the code.<br /><br />I'm a little ashamed, but the work mentioned above consumed most of the last days work time. Anyways, I feel that the quality of the things re-done is higher. I'm feeling more comfortable every day with how development is going.<br /><br />The other tiny thing I did was a more serious testing of the plone.app.batch functionalities with 3rd party content types.<br /><br /><span style="font-weight: bold;">Warning: </span>I made some tiny changes in the installation profile. Re install plone.app.batch or you will find some broken links.<br /><br />Take a look how is working plone.app.batch with Martin Aspeli Optilux Cinema content types:<br /><br /><div align="center"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fMlCSWCko1k/SJE0I0r5NkI/AAAAAAAAADM/UJkRM4bds2M/s1600-h/cinema.jpg"><img style="cursor: pointer;" src="http://4.bp.blogspot.com/_fMlCSWCko1k/SJE0I0r5NkI/AAAAAAAAADM/UJkRM4bds2M/s320/cinema.jpg" alt="" id="BLOGGER_PHOTO_ID_5229017968540202562" border="0" /></a></div><br />The last thing I have to tell you is that I'm preparing a talk for showing plone.app.batch development inside the Google Summer of Code program for 8th <a href="http://jornadas.cafelug.org.ar/8/en/home.php">Jornadas Regionales de Software Libre</a>. Is one of the biggest (if not <span style="font-weight: bold;">the</span> biggest) south American free software event, and this year will be in Buenos Aires, Argentina. I hope to be giving the talk with the GSoC t-shirt :). Wish me luck.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-17185164.post-78709856308039952492008-07-22T18:31:00.005-03:002008-08-18T06:11:51.066-03:00Spanish TranslationLast week wasn't the most productive on the SoC, but I produced some new stuff.<br />Anyway, I'm doing 2-3 night hrs sessions this week days for recovering lost time.<br /><br />What new things I have to report:<br /><ul><li>Started Spanish translation. Not finished because the code and templates are still changing, but most of the work was in the setup things for allowing translations, than in the translation it self. I can use any other language translation help: Portuguese, French, Italian, Dutch, etc, etc, etc. <a href="mailto:javimansilla@gmail.com">Contact me</a> in case you can.</li><li>batch search form simplification again, taking off the ugly template based previous one, creating a plone.z3cform one.</li><li>Tested the product to see how it behaves with non default Content Types. I played with Martin Aspeli optilude.cinemacontent contents. Working fine so far.</li></ul>In case you are checking out new stuff, you will have to wait until next post, because I did not check in last work yet.<br /><br />Here, how it looks like in spanish, and as you can see there are several details that need to be translated yet (like Content type' names)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fMlCSWCko1k/SIZ1zHXtnGI/AAAAAAAAADE/LVGoSxiuPpk/s1600-h/spanish.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_fMlCSWCko1k/SIZ1zHXtnGI/AAAAAAAAADE/LVGoSxiuPpk/s320/spanish.jpg" alt="" id="BLOGGER_PHOTO_ID_5225993938622323810" border="0" /></a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-17185164.post-21454952029911904062008-07-14T21:39:00.007-03:002008-08-18T06:11:51.067-03:00Batch error handlingI enjoyed last weekend in my father's cottage in <a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=Los+Reartes,+Cordoba,+Argentina&ie=UTF8&t=h&layer=x&ll=-31.914722,-64.571199&spn=0.044224,0.082569&z=14&lci=lmc:panoramio,lmc:wikipedia_en">Los Reartes</a>, coding, and coding. I didn't have internet connection in the town, but I enjoyed the productivity.<br /><br />I submitted my survey Wednesday, had a short <a href="http://except.com.ar/">except</a> morning work from home, and took the bus to the hills.<br /><br />I worked basically on improving the validation and error handling of batch editions.<br />The work was put on:<ul><li>at2z3field adapter: now behaves more close to the ATField it's adapting: Datetime, Int, Float, Decimal, Bool, Object, Text zope schema field used when appropiate, Textline otherwise.</li><li>Archetype fields validation run when validating the field for batch-editing.</li><li>When some error on validation occured, a form only displaying errors is presented to user, letting him know that the other objects will be also edited when fixing the errors.<br /></li></ul><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fMlCSWCko1k/SHv3iVtousI/AAAAAAAAACc/zNpyQ2OY3uI/s1600-h/dateerrors.jpg"><img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_fMlCSWCko1k/SHv3iVtousI/AAAAAAAAACc/zNpyQ2OY3uI/s320/dateerrors.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5223040362182392514" /></a>Sounds like a short thing, but took me lot of hours, mainly the first one, given and I could not find which interface Archetype fields are providing.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-17185164.post-37411700143858649672008-07-07T01:31:00.005-03:002008-08-18T06:11:51.068-03:00Reaching the first halfSo, we arrived to the end of the first code period, and I think that more or less we have a good job done. During this week my mentor and I have to complete some forms and surveys... bureaucratic stuff that is part of the summer of code program. I do not enjoy doing that kind of things, but I understand why are those needed, so I'll do that without complaining :).<br /><br />About what happened last week, I couldn't put the amount of hours I was wanting to, but anyways I could solve a couple of things.<br /><br />First, I created some installation instructions for making easier to have people with time and energy testing plone.app.batch. <a href="http://plone.org/products/plone-app-batch">Here</a> the instructions are!<br /><br />Second, we had the first issue created :). Thanks Matthew Wilkes for issuing it. I think I already fixed it, so I committed the patch and added it as resolved.<br /><br />Third, I finally added a good more real set of tests to the product.<br /><br />Fourth, I started to work on the error handling as we talked last week with Alex.<br />I have now the back-end behaving as we decided (i.e: if any error, no change is made). Now I have to work on the user interface Alex suggested. Shouldn't be hard, I just have to sit down and do some functional tests and templates work.<br /><br />Fifth, Alex and I started the talk last Friday about what things expect to have implemented for the first version of plone.app.batch, and what things postpone. We could not finish that talk, but we are on that. I own him an email yet.<br /><br />I feel that I can't make a weekly post without including some screen shot, so, here it is:<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fMlCSWCko1k/SHGiZ7HF-kI/AAAAAAAAABc/wOjgbHNyCB4/s1600-h/not_commited.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_fMlCSWCko1k/SHGiZ7HF-kI/AAAAAAAAABc/wOjgbHNyCB4/s320/not_commited.jpg" alt="" id="BLOGGER_PHOTO_ID_5220132009346988610" border="0" /></a>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-17185164.post-22086592034189674342008-07-01T01:15:00.007-03:002008-08-18T06:11:51.068-03:00It works!Ok, yes, there are many things to do, fix, implement and improve yet, but after a long weekend we have a very basic working version of plone.app.batch<br /><br />Last Friday after talking with Alex we (he) decided to:<br /><ul><li>do allow heterogeneous edition</li><li>do not commit batch editions until no errors found</li></ul>I still need to figure out what to do if someone want to edit a field for objects A and B, and the field has different types on those objects. What should we do? I think that we are going to handle this situation as an error.<br /><br />During this weekend I found a tricky bug on the code I previously developed. I was modifying an interface on the fly, adding it the fields that the user was wanting to edit. Doing such a thing, was crashing if two users (or the same user, but in different windows or tabs) were doing a batch edit. Each was modifying the interface, so the last one was overwriting the previous one interface customization.<br /><br />Yes, I know. You may be wondering "why this guy decided to modify the interface, instead of adding the fields to the form directly". The long answer is because looked the easy way using crud under the scenes. The short answer is the thing that you thought :).<br /><br />I fixed that issue, adding the field to the z3cform directly , and in the same bunch of work I decided to store user configurations (like objects to edit, or field to edit) on user session instead of context annotations. Looks cleaner now.<br />With the code I have now, a user can't be doing 2 or more batch editions from the same context at the same time (the context of a batch edition is the folderish object where the user started the batch process: search, select and edit). Be careful tab-openers fans! What will actually happen if a user do so, is that the last batch-edition will overwrite previous ones for that user on that context.<br /><br />The other thing I did this past weekend was the creation of the AT2Z3Field adapter: ArcheTypes-to-Zope-3-Field. So far is a very, very dummy adapter creating always a zope.schema.TextLine field, but of course here we are going to be creating zope3 schema fields with some closer correspondence with the original archetype field.<br />The code of this adapter I think can eventually be a separated product, but I wont do that until it's more mature.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fMlCSWCko1k/SGm2hV3MObI/AAAAAAAAABM/YXxDjtPVat4/s1600-h/editor.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://1.bp.blogspot.com/_fMlCSWCko1k/SGm2hV3MObI/AAAAAAAAABM/YXxDjtPVat4/s320/editor.jpg" alt="" id="BLOGGER_PHOTO_ID_5217902327206001074" border="0" /></a>Finally, the edit form now is alerting the user if some of the items she selected to edit does not have the selected field to edit. Here, as usual, a couple of screen shots:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fMlCSWCko1k/SGm2hqfxoqI/AAAAAAAAABU/Aa4Qa1fXmLk/s1600-h/missing.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_fMlCSWCko1k/SGm2hqfxoqI/AAAAAAAAABU/Aa4Qa1fXmLk/s320/missing.jpg" alt="" id="BLOGGER_PHOTO_ID_5217902332744934050" border="0" /></a><br /><br />Next weekend is the last long development period before the mid term evaluation, which I hope to pass :).<br />I think that I'll be working mostly on improving the AT2Z3Field adapter, input validation and handling errors, and some cleaning.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-17185164.post-49153704554533186412008-06-23T23:19:00.011-03:002008-08-18T06:12:15.922-03:00Officially Started my Winter of CodeThe past Saturday the winter started here, so my <span style="font-style: italic;">summer</span> of code changed to a cold <span style="font-style: italic;">winter</span> of code in the south hemisphere.<br /><br />A summary of my progress can be read on the docs/HISTORY.txt file on the product itself, but here I'll paste last changes.<ul><li>Outlined BatchEditorForm, so far only showing a list of contents to edit, but not editable yet.</li><li>Added Empty Interface and Adapter for BatchEditable contents.</li><li>Created uninstall profile that removes all created actions.</li><li>Created first tests: tests_setup.py and base.py inside tests module.</li><li>User search parameters and items selection stored on content annotations.</li><li>Re done BatchSelectorForm for displaying search results and select items to edit using plone.z3cform.crud.</li><li>Added Interface and Adapter for BatchSelectable contents.</li></ul>Although what we have is still not even an alpha release, I invite you people to checkout the code and try it (on a sandbox instance please). I also encourage you to file anything you find odd <a href="http://plone.org/products/plone-app-batch/issues">here</a>.<br /><br />Also, I want to thank Daniel Nouri for his great work on plone.z3cform.crud.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fMlCSWCko1k/SGBi_miOo9I/AAAAAAAAAA8/i5zxrA-8IRU/s1600-h/selector.png"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_fMlCSWCko1k/SGBi_miOo9I/AAAAAAAAAA8/i5zxrA-8IRU/s320/selector.png" alt="" id="BLOGGER_PHOTO_ID_5215277213310428114" border="0" /></a>Here, an screen shot of the selector user interface. As you can see, needs some ui love yet.<br /><br />About things for next week, I must say that is the same list than for the previous one:<br /><ul><li>display Archetypes schema fields on plone.z3cforms.crud<br /></li><li>create the batch edit action for saving changes (shouldn't be hard using crud).<br /></li><li>add more tests.</li></ul>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-17185164.post-72477534480748647612008-06-17T02:22:00.001-03:002008-08-18T06:12:15.922-03:00Handle errorsHere I have a question for which I don't have a clear answer yet, and is what to do when trying to submit a batch-edition and the values provided for some of the fields is not valid. Can be an empty required field, or any other kind of validation error.<br /><br />What I think we should be doing is:<br /><ul><li>not save changes for any object on the form</li><li>display the form with the given values on each input field, and the errors displayed</li><li>allow the user to <span style="font-style: italic;">disable</span> the re-submit of problematic objects with a check box next to each.</li><li>A global <span style="font-style: italic;">disable all problematic objects</span> check box for JavaScript enabled browsers.<br /></li></ul>This way, if the user have dozens of objects with correct data, and only a couple are failing, he can save the correct ones, and later care about the problematic ones.<br /><br />Previously, Martin suggested to put the disable check box at the beggining, which I also think it's good idea.<br /><br />Again, your comments will be very appreciated.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-17185164.post-51600309067916991522008-06-17T01:55:00.001-03:002008-08-18T06:12:15.923-03:00Edit heterogeneous contentMartin Aspeli asked how us will be handling the batch-edition (yes, I invented that verb) of several objects of different content types. Moreover, what fields let the user select to edit, and what to do if the user selected to edit a field that does not exist for any of the objects to edit.<br /><br />My first though was <span style="font-style: italic;">report that request as an error</span>. Wasn't very powerful, nor useful, but was the first though. After a week of thinking, I prefer another more user friendly option: when displaying the batch-edit-form, for each content object that does not have the field to edit, just inform the user that fact, but not report any error, and also display in the form all input fields for objects that do have the field to edit.<br /><br />With this in mind, I think that shouldn't be hard to let the user actually select more than one field to edit for the set of content objects.<br /><br />I'll be glad to read your thoughts.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-17185164.post-66623406649195457902008-06-17T00:49:00.000-03:002008-08-18T06:12:15.923-03:00plone.app.batchNew name, new code, new ideas, new functionality.<br /><br />We still not have the real batch-edit functionality in place, but we are building the pieces to finally have it.<br /><br />In this past weekend, I progressed in three different paths.<br /><br />In <span style="color: rgb(0, 51, 0); font-weight: bold;">first</span> place, after a couple of recommendations, I decided to take a deep look to the z3cform package and it was a nice and enlightened reading. Although I didn't put z3cform forms in my package yet, it's for sure that I'm gonna do it.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fMlCSWCko1k/SFc6DcCNLgI/AAAAAAAAAAk/Dia961_hjOA/s1600-h/setuppage.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_fMlCSWCko1k/SFc6DcCNLgI/AAAAAAAAAAk/Dia961_hjOA/s320/setuppage.jpg" alt="" id="BLOGGER_PHOTO_ID_5212698924444102146" border="0" /></a>In the <span style="color: rgb(0, 51, 0); font-weight: bold;">second</span> path, I cleaned and re-though a couple of ideas. Following Martin Aspeli advices (or should I write <span style="font-style: italic; color: rgb(102, 102, 102);">MartÃn</span>?) I separated in interfaces and adapters <span style="font-style: italic;">what</span> things will be able to be batch-editable, <span style="font-style: italic;">how</span> will that be done, etc. In this way, I added a setup configuration page to the plone setup area to select which content types can be batch-editable. This work took me more than what I expected, but I think that real timer-consumer thing was the gain-experience-in-the-process thing. Anyways, my past in PloneGetPaid helped :-D. Here above in the right is a scree-shoot of that page.<br />Another thing I did in the cleanup was: simplify batch search form, and prettify the batch results page, which I was thinking on name batch-selector (Is the form where you have the content objects you want to modify, and you select what to do with them).<br /><br /><span style="color: rgb(0, 51, 0); font-weight: bold;">Finally</span> I created an <a href="http://plone.org/products/plone-app-batch/">entry</a> on plone.org/products and I'm waiting the approval. If you got a <span style="font-style: italic;">Log In</span> page instead, means that was not approved yet. After approval, I want to add an issue tracker there and invite you my dear reader to test what I have, and file issues, or request. Probably I wont be able to add much functionality things to the project during the summer of code period, but I plan to continue later, so do be shy.<br />I also added my code to the plone collective, so if you want to take a look:<br /><div style="padding: 10px; background-color: rgb(147, 184, 87); color: white;">svn co https://svn.plone.org/svn/collective/plone.app.batch<br /></div><br />I was going to add Alex Limi and Martin Aspeli as owners of the product too, when I realized that they already have that role inherited because it seems that they are plone.org administrators. My assigned and not assigned tutors rocks :). I added Jon Sthal (the owner of the idea) and Matthew Wilkes (the guy that's coordinating this summer of code from plone) as owners in case they want to do things there.<br /><br />The plan for next week:<br /><ul><li>study <a href="http://alloy.mit.edu/">Alloy Analyzer</a>: I have an exam next Friday.</li><li>buy gifts (or better, make them): my girlfriend birthday is this Thursday.</li><li>code and code for SoC:<ul><li>start work to display Archetypes schema fields on z3c forms.<br /></li><li>create the batch_edit form using the previous work.<br /></li><li>add some tests (shame on me)</li></ul></li></ul>A little request: if you have things to say, I'll appreciate if you can add comments here in my blog. It's much easier for organize information than searching emails.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-17185164.post-21589186315937893332008-06-08T23:35:00.000-03:002008-08-18T06:12:15.924-03:00Plone Batch PlanAfter the first two weeks of lot of plone3 studying, and first lines of code, here I'm trying to have a first plan for this exciting summer of code project.<br /><br />I'm very excited after writing the first pieces of this project cause things are looking fine, and I'm enjoying the pretty plone3 style :-D.<br /><br /><span style="font-weight: bold;font-size:130%;" >The plan</span><br /><br />I think that the entire project can be contained on a single plone theme product, which I was thinking to call <span style="font-style: italic; font-weight: bold;">plone.batch</span>. I'm very original, don't you think :-)? Yes, like in all other things in this post (and in this project) I'm open to accept better ideas.<br /><br />The separated pieces that glued together will eventually make the plone.batch that I think are:<br /><br /><ol><li>Generic setup profiles for install/uninstall the product</li><li>zope3 browser form, very similar to the current <span style="font-style: italic;">"advanced search form"</span>, accessible as an object action for any folderish content.</li><li>zope3 browser view/form that displays search results, but in a new form that allows the user to select which objects to edit, and what operation to do. So far, the operations that I have in mind will be:<ul><li>edit a field (with a drop-down of available fields)</li><li>enable / disable comments</li><li>transform (with a drop-down of transformations)</li></ul></li><li>zope3 browser form for real batch editing content fields (finally!). Should be a listing with a widget for editing the selected field and a save button for each selected object . For non-javascript users a global save button will be available.</li><li>Server side logic for kss</li><li>Set of basic, default transformations. I think that this will be done with a set of adapters.</li><li>Tests, tests and tests. I was thinking on making unit tests for the back-end, functional tests for the basic user interface, and selenium tests for the ajax interface.</li><li>I would also like to have time to include some i18n work, and a Spanish translation.</li></ol><br /><span style="font-weight: bold;font-size:130%;" >Bureaucracy</span><br /><br />I have a couple of bureaucratic things that I need to get done for making communication easy:<br /><ul><li>Include my code in the svn.plone.org/collective. So far I worked on a local svn repo, which let me have versions, but not allow people to see my work nor prevent me for accidents if anything happens to my laptop.</li><li>Create bug-issue tracker (in plone.org?)</li></ul><span style="font-size:130%;"><br /><span style="font-weight: bold;">What did I do so far?</span></span><br /><br /><ul><li>I created a very basic install profile that adds the "batch" action to folderish contents</li><li>I created the zope3 search form based on the default plone advanced form, putting all the python calculations on the view code instead of the template, and trying to eliminate as much as possible the old plone things that template was carring (like doing here.portal_something, or use of isAnon, etc)</li></ul><br />Here are a couple of screen shots of this initial work:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fMlCSWCko1k/SEynZ7q7J5I/AAAAAAAAAAM/Ws8Buv8czoY/s1600-h/actions.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 277px; height: 152px;" src="http://1.bp.blogspot.com/_fMlCSWCko1k/SEynZ7q7J5I/AAAAAAAAAAM/Ws8Buv8czoY/s320/actions.jpg" alt="" id="BLOGGER_PHOTO_ID_5209722932917118866" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fMlCSWCko1k/SEyoybq7J6I/AAAAAAAAAAU/i-z2DQBm4e0/s1600-h/batch_search_form.jpg"><img style="margin: 0pt 0pt 10px 10px; cursor: pointer;" src="http://3.bp.blogspot.com/_fMlCSWCko1k/SEyoybq7J6I/AAAAAAAAAAU/i-z2DQBm4e0/s320/batch_search_form.jpg" alt="" id="BLOGGER_PHOTO_ID_5209724453335541666" border="0" /></a>Unknownnoreply@blogger.com1