Filtered by Zope

Page 4

Reset

Announcing Smurl - a free URL compressor

September 7, 2005
12 comments Zope

Today I formally launch a new website: http://smurl.name

Smurl lets you generate aliases for looong URLs that you might want to paste into your emails (emails are often width-size limited) or SMS. Imagine sending this SMS to a friend:


Hi mate. Pls check out my new flat on the net: 
http://www.foxtons.co.uk/search?md5=908a5a01192
c89ed37d7a3ed7edbcdb1&currency=UKP&search_form
=map&search_type=SS&inst_ref=ir_myfr000056608&
submit_type=search

which could with a Smurl name be shortened to:


Hi mate. Pls check out my new flat on the net:
http://smurl.name/9c

The bad news is that this hasn't been done before. The most famous "competitor" is probably tinyurl.com and my hope isn't to become the worlds dominant short-url-forwarder. No, the purpose of building this is the underlying technology which is now released as Open Source which is called Smurler. This is a Zope product that anybody can install and then use how they like it with their own domain name or other settings. At work we might soon need something like this and since many of our commercial sites use Zope it will be a breeze to install and benefit from the Smurl functionality for various other applications.

With the default set of sample characters used for the Smurl names there are 1024 different 2-character Smurls, 32,768 different 3-character Smurls and 1,048,576 different 4-character Smurls which will last my quite long on that domain name alone.

There isn't much fluff to it yet. The smurl.name site has only one special user function and that is that it remembers all previous Smurls you have created. The next thing I might add is some basic statistics for the overall use. If you have any other ideas, let me know.

Jealous of Google stemming

August 4, 2005
1 comment Zope

Google's English word stemming is smart. I'm very jealous of it and want one too. If you, for example, search for set up ssh key then it perfectly finds "setting up ssh key" too. You can tell by how Google is bold-highlighting the words. Clever! I want such stemming too. I wonder if there's anything already done in Zope that I can use or if I have to write something myself.

Seeing how powerful this really is, I'm now more inspired to sort it out with my ZCatalog.

Zope in DevelopmentMode

June 26, 2005
0 comments Zope

Imagine if you, in your code, want to find out if Zope is running in debug mode or not, then how do you do that? Here's my take on it that I learned today:


from Globals import DevelopmentMode

class MyProduct(Folder):
   def save(self, file):
       if DevelopmentMode:
           print "Saving the file now"
       self._save(file)

The example doesn't do much justice because your product code should perhaps use its own "debug mode parameter" to get greater control.

Truncated! Read the rest by clicking the link below.

Zope compared to PHP

June 22, 2005
2 comments Zope

I picked this up from the Zope mailing list where the expert python Andreas Jung makes a good mention of comparing PHP to Zope.

"Don't compare PHP with Zope. PHP is a tiny language compared to the fat Zope frameworks. Working with Zope on the scripter level (ZPT, DTMl, ZSQL) requires similar skills as a PHP programmer. If you want to go beyond you have approach open-minded and come a with some solid knowledge in programming and understanding architectural issues in Zope. But when I read some questions here then I have the impression that people except that Zope solves their problems although neither they don't understand the problems themselves nor have the basic skills to reach the goal."

This is very good because it reminds us that one little part of Zope is what the whole of PHP offers more or less. I like PHP and it's open source community momentum but technically it is very basic compared to Zope.

As Andreas points out, it's not until you want to go beyond scripting that you have to take a step back and accept that Zope has a learning curve.

Plone.org calls it Issue Tracker

May 14, 2005
3 comments Zope

The good people of plone.org uses an instance of CMFCollector for keeping taps of all their bugs. The interesting thing is that they call it "Issue Tracker", unlike the Zope.org site where they call it the "Issue Collector". (didn't used to be called just the "Collector"?)

This I find very interesting because I've often thought about the name of my little precious IssueTrackerProduct and how instances of it should be named and titled. At the time of writing, the current default Id is blank but the default Title is "Issue Tracker"; incidentally the same as the plone.org site.

Both the plone.org Issue Tracker and the Real Issue Tracker could be called "bug trackers" because they are heavily used for software development and most things entered are bug reports. I guess, what justifies not calling it a "bug tracker" is the influence all stuff that isn't bugs.

Truncated! Read the rest by clicking the link below.

"Can you help me about ZOPE?"

April 18, 2005
2 comments Zope

Not sure what people think of me but I get a lot of strange emails. Last week I got an email about a guy wanting me to teach him Kung fu via email correspondence. Today this arrived plus can see what my reply was:


Yeah, sure. Don't bother reading any documentation or books. Forget 
about installing it and playing with it because the only way you'll 
ever learn is by me explaining everything via email to you. Now, were 
do we start? Shall I maybe just take the rest of the day off and 
theorise about the kind of questions you might have?

On 4/18/05, [[name hidden]] <[[Email hidden]]@yahoo.com> wrote:<br />
> Could you help me about ZOPE. <br />
>  
> 
>  ________________________________
> Yahoo! Mail Mobile
>  Take Yahoo! Mail with you! Check email on your mobile phone. 
> 
> 

-- 
Peter Bengtsson, 
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com

Do you think I was too harsh on him/her? Or more interesting, do you think he/she understands my sarcasm?

Ugly one-liner to debug an object in Zope

March 31, 2005
2 comments Zope

If you're a Zope developer like myself you will most likely have written code like this many times:


class MyProduct(...):
   def showName(self, nameobject):
       """ doc string """
       print dir(nameobject) # this is the example
       return nameobject.getName()

Namely that you use the dir() builtin function to inspect an object's attributes. It's a wonderful function that from what I've experienced only Python excels. (Apparently Bruce Eckels lists introspection as one of the best features of Python and he's a guru with Java and C++)

Truncated! Read the rest by clicking the link below.

Combining MOBi and EconoAccount

February 7, 2005
1 comment Zope

EconoAccount EconoAccount is an open source tool I wrote to keep track of my expenditures. It started as a Excel spreadsheet where I wrote down how much I spent on what and then grew into something much better.

MOBi MOBi is a mobile web service my company developed for the owners of MOBi (read more here). MOBi is to mobile phones and SMS as domain names are to www. On MOBi, I have registered the keyword peterbe (unsurprisingly) and set up the sub-word "ea *".

Now with a bit of tweaking I can write down all my expenses with my mobile phone when I don't have a computer with Internet available. Read on to find out how.

Truncated! Read the rest by clicking the link below.

__call__ folderish Zope objects

December 19, 2004
0 comments Zope

I ran into trouble with a Zope class that inherits from OFS.Folder.Folder (the classic Folder class). My class is a bit special since it's acting both as a non-folderish document like object but still needs to contain other objects such as images and file attachments. The class had a method called index_html which looked something like this:


def index_html(self, REQUEST, **kw):
    """ return something"""
    return self.something

The problem was that if I create one of these instances with the id index_html it simply could not be viewed.

Truncated! Read the rest by clicking the link below.

CorpCalendar review on ZopeMag.com

December 1, 2004
0 comments Zope

I'm glad to announce the review of my own web application called CorpCalendar on ZopeMag.com.

The review is really quite detailed and accurate. It does acknowledge a few bugs but that's ok. I'll try to fix them soon. What made me the most happy was that the reviewer really manages to explain the benefit of CheckoutableTemplates with screenshots and examples. If you ask me, CheckoutableTemplates deserves more attention because it's idea is really quite useful. It bridges the power of the filesystem with its command line and the online storage with it's quick editing and exceptionalization. It'd be good if more serious Zope developers started using it so that with its Open Source license we can improve it together.

Maybe I shouldn't say this but the first working version of CorpCalendar took an afternoon to build. My company started using it (integrated into our intranet) already that same day. Then it took another afternoon to package and release to Zope.org.