惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
I
InfoQ
Engineering at Meta
Engineering at Meta
Jina AI
Jina AI
Recent Announcements
Recent Announcements
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
D
Docker
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
博客园 - Franky
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog RSS Feed
WordPress大学
WordPress大学
MyScale Blog
MyScale Blog
月光博客
月光博客
罗磊的独立博客

Secret Weblog

Becoming More Xee: A Modern XPath and XSLT Engine in Rust Looking for new challenges! Repeat Yourself, A Bit The Curious Case of Quentell The Humble For Loop in Rust The Humble For Loop in JavaScript Don Question Best Practices I Was a 1980s Teenage Programmer Part 5: Achieving Assembly I Was a 1980s Teenage Programmer Part 4: The Call of Assembly The Tooling Shift I Was a 1980s Teenage Programmer Part 3: MSX-2 JavaScript: when you need two ways to do it! Empowering Programming Languages Bloat and Retrofuturism Refreshing my Blog Again Random Rust Impressions Apilar: An Alife System I Was a 1980s Teenage Programmer Part 2: Olivetti M24 I Was a 1980s Teenage Programmer: the Alphatronic SolidJS fits my brain Is premature optimization the root of all evil? Framework Patterns: JavaScript edition Roll Your Own Frameworks Framework Patterns Secret Weblog Highlights Refactoring to Multiple Exit Points mstform: a form library for mobx-state-tree Seven Years: A Very Personal History of the Web
Snowsprint report
Martijn Faassen · 2008-01-28 · via Secret Weblog

This year, like last year, will be a year of Grok for me. Grok has given me real hope that Zope technologies can compete, and compete well, with other Python-based web frameworks. In the Zope community, as well as outside it, we are well aware of Zope's flaws, both technology and community-wise. We sometimes think too little about Zope's assets, which are huge. Zope 3 is great technology, years ahead of the competition in the pluggability department, and Zope's community is well established. One of those things in the Zope community is the yearly Snow Sprint. This year was the first time I attended.

The Snow Sprint is organized by Lovely systems. Lovely systems is an interesting company with very strong experience in building scalable Zope 3 applications. The Snow Sprint is not just about Zope 3 though: like every year, there were a lot of assorted Zope and Plone developers present. Much programming, learning, discussing, discovering and partying took place. We were 2000 meters high up in Austria, in the middle of nowhere surrounded by gorgeous snow-covered mountains. This was a bit problematic when I developed an acute toothache in the weekend after I arrived. Ouch! Ouch! Luckily I was able to descend the mountain on monday and an Austrian dentist fixed me up.

My personal mission at the Snow Sprint was to work on Grok, and hopefully get some other people to get involved as well. Luckily it turned out quite a few people were interested - my talk on Grok was well-attended and many people explored Grok. A bunch of sprinters started the development of a new CMS system with some conceptual rethinks called vudo. It's based on, among other things, Grok. What will happen with vudo remains to be seen, but at the very least it was an interesting topic to discuss and a good learning experience.

I saw many familiar people again at the sprint, and also met many new people. In particular I met a few nice people from the Open Plans project. Whit Morris I had in fact already met at a previous sprint in Austria (in a castle). New Open Plans people I met were Robert Marianski, Ethan Jucovy and Jeff Hammel. We had quite a bit of fun hanging out, and we also worked on Grok-related tasks. Jeff focused on trying to build a KSS driven commenting application in Grok. Meanwhile myself, Robert and Ethan started work on z3c.autoinclude.

z3c.autoinclude is a package that should make it easier to reuse packages with Grok. I had noticed that reusing a Zope 3 or Grok-based package takes mentioning this package three or four times:

  • you start importing from it in your Python code
  • you list it in your setup.py's install_requires
  • you need to include its ZCML using a ZCML include directive
  • you probably need to pin down its version in buildout.cfg

This a clear DRY violation; we're repeating ourselves in four places! Reducing this amount is not easy, but we could at least tackle the ZCML issue. If a package is listed in setup.py has a configure.zcml or a meta.zcml, we should be able to figure out to include this automatically from the information in setup.py.

Making this work was a challenge in test-driven development. We used setuptools APIs and zc.buildout's easy_install module to set up packages in a doctest. Robert and Ethan hadn't done very much test-first programming yet, and several times I had to apologize for it not being that complicated normally. Luckily we stimulated each other in not giving up on writing the tests, and in the end we benefited from them. We were able to refactor working bug ugly code towards a much cleaner API in a very short time; something we wouldn't have dared without tests.

So now, if z3c.autoinclude is installed and you use the autoinclude directive in your package, you don't have to remember including ZCML manually anymore if you already list those packages as setup.py dependencies. I hope we will roll this functionality into Grok soon.

Monday, Tim Terlegård arrived on the scene. I know Tim from grok-dev but hadn't seen him at the sprint yet. He was immediately eager to go ahead and work on things. Tim had the great idea to finish up Grok viewlet support, something that Kevin Smith had worked on in the past but never got reviewed and finished. Unfortunately on monday I was recovering from my dentistry and toothache induced lack of sleep, so it took me to tuesday to really get involved.

Viewlets are a system in Zope 3 that allows the very flexible inclusion of page elements into pages based on:

  • what the page is viewing (its context)
  • the view itself
  • the skin that view may be in
  • the particular collection of viewlets we want to display (viewlet manager)

I always had trouble getting the concept of viewlets to stick in my mind, not helped by the copious amounts of ZCML configuration that they required, but I think it finally did at the last sprint.

Tim, Robert and myself started freshening up the viewlet branch and adding tests. We also thought of ways to make configuring viewlets as easy as possible. No more ZCML, just Python, to configure viewlets!

It took the rest of the sprint to clean things up and bring the implementation on a solid footing. I believe the viewlet work is now close to ready for merging and I can already see many uses for it in my own code bases.

Along the way we refactored Grok's configuration code a bit, and I got a few more ideas on how to make progress in this area and make Grok's configuration system more declarative, helped by a discussion that started on grok-dev to make sure that Grok contains as little magic as possible.

Another notable Grok-related event happened last week, though independently of the sprint. We opened up the new grok.zope.org! The new grok website is based on Plone 3. The goal was to refresh the layout, which as you can see has succeeded, and to make it easier for people to contribute documentation on Grok. Even before the site officially opened this flow of contribution started to happen; Grok's documentation section is already filled with many useful documents. I hope many more documents will be added in the future!

A lot of people worked hard to make the new grok.zope.org a reality. Thank you all! In particular I'd like to thank Kevin Teague who pushed and pushed again to get the website to this point.