Personal tools
You are here: Home Archive 2007 July

Entries For: July 2007

July 19, 2007

Jon Stahl: Live Lightning Talks and Report-Outs from the Plone Multimedia Sprint

Filed Under:

If you want to get your Plone lightning talk fix, and/or hear report-outs from the Plone4Artists/ Multimedia Sprint in Boston, point your Quicktime Player at rtsp://air137.startdedicated.com:554/plone4artists.sdp at 5pm EDT/2pm PDT today.

The sprinters are working on some really cool topics, including audio & video podcasting in Plone, calendaring, image management, large file support and bulk file uploading.  I'm really excited to hear and see what they're up to.

July 17, 2007

Andrew Burkhalter: Plone & Salesforce.com: Using Salesforce.com as a Content Catalog

For those craving a bit more of a hands on update than my earlier background post on making Plone play well with Salesforce.com provided, hopefully this takes a step in the right direction. I'm going to be demoing the display of Salesforce.com content within the portlet of a Plone site. Credit to Jesse for helping me realize how dirt simple this is. Writing the code to do this took less than 10 minutes and that included asking a colleague a few questions about how exactly Salesforce.com works :)

The Use Case

Recently, the Executive Director of ONE/Northwest, Gideon, sent an email to staff emphasizing the use of quotes as a way to increase our credibility by allowing partners to tell our story in new potential partner circles. Being a nonprofit, think of a trusted grants manager quoted in a proposal to a new foundation or a donor quoted in our annual report. This also includes a quote about a completed web project appearing in our technology solutions section or a scope of work.

Even though we've had a Quote content type in our oft-internally-used, but not widely publicized Pigeonhole product, I thought I'd try an alternate implementation, which I see as very much complimentary, rather than competitive. For us, it makes sense to have our quotes coupled with Salesforce.com contacts. In other cases the ease and speed of doing Plone catalog lookups for related Quotes based on keywords is superior, especially as implemented in Pigeonhole as a lightweight content relation engine.

So, my colleague Steve had done some behind the scenes Salesforce.com fiddling allowing for the addition of a quote that's tied to a contact. I just added a new quote to my own contact record. See image below:

SF New Quote

But, how would we display this and other quotes in a portlet on a local copy of onenw.org...

Beatbox Setup

If you're reading this post, I'm assuming you've got a working Plone 2.5.x instance lying around, which means you've got Python 2.4 as well. You may even have EasyInstall. If not, start here. Once you've met the basic requirements, you can install beatbox from the CheeseShop with:

easy_install-2.4 beatbox
Just to prove this is working, fire up the interactive Python used by your Plone instance and type:

>>> import beatbox

Salesforce Base Connector Setup

Next you need to get salesforcebaseconnector from the Plone Collective (hopefully we'll have a 1.0 alpha 1 release in the Plone Software Center soon). Execute the following from your Zope instance's Products folder:

svn co https://svn.plone.org/svn/collective/salesforcebaseconnector/trunk/ ./salesforcebaseconnector

Upon restarting Zope, head to the ZMI and the Plone site where you'd like to talk to the Salesforce.com API.


Add a Salesforce Base Connector:

Add Salesforce Base Connector

Select the radio button and hit "Add"

Add Salesforce Base Connector, Step 2

Click on your newly added portal_salesforcebaseconnector

Configure Salesforce Base Connector

Enter information for a valid Salesforce.com account. This could be a free developer account.

Configure Salesforce Base Connector, Step 2

The Code

I chose to do this in a Zope 3 view within the DIYPloneStyle-generated product, ONENWSkin, we use at onenw.org, but as mentioned in the previous post, an explicit goal for salesforcebaseconnector was to enable integrators to easily do the same in ZPT or a Python skin script that's not necessarily filesystem-based.

After the obligatory ZCML wiring, I created a file, browser.py, at the root of my product. The following import statements and the "RandomQuotePortletView" class were all that was necessary:


from Products import Five
from Products.CMFCore import utils as cmf_utils
import random

class RandomQuotePortletView(Five.BrowserView):
"""Find recent job listings for portlet display
"""
def __init__(self, context, request):
Five.BrowserView.__init__(self, context, request)
self.sfbase = cmf_utils.getToolByName(self.context, 'portal_salesforcebaseconnector')

def getRandomQuote(self):
"""Returns a random quote from Salesforce.com in a dictionary
"""
res = self.sfbase.query(['Name','Quote_Text__c'],'Quote__c',"Usage_Guidelines__c!='Need to get permission'")

# res looks like a dictionary with a 'records' key
return random.choice(res['records'])

Of note, is the "query" method on our "portal_salesforcebaseconnector" object created at the site root in the setup above. We pass the query method a list of which fields ('Name' and 'Quote_Text__c' -- The '__c' convention signifies a custom field/object) we'd like to retrieve. The second parameter is our desired SObject, the custom Quote object, and finally we have an additional where clause which is based on our internal business rules of never showing any quotes where we don't yet have permission.

That's it! It's basically 2 lines of code (that could be collapsed into 1) within the contents of the "getRandomQuote" method and we're able to retrieve any and everything we might ever want from our Salesforce.com account.

Finally, we setup the following portlet, which defines the view, calls "getRandomQuote" on the view, and then displays the quote text for our randomly collected quote:

<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
i18n:domain="plone">
<body>
<div metal:define-macro="portlet"
tal:define="view context/@@random_quote_portlet;
qDict view/getRandomQuote">

<dl class="portlet" id="portlet-quote">

<dt class="portletHeader">
<span class="portletTopLeft"></span>
Random Quote
<span class="portletTopRight"></span>
</dt>

<dd class="portletItem odd">
<span tal:replace="qDict/Quote_Text__c" />
</dd>

<dd class="portletFooter">
<a href=""
tal:attributes="href string:$portal_url/all-quotes"
>
More quotes&hellip;
</a>
<span class="portletBottomLeft"></span>
<span class="portletBottomRight"></span>
</dd>
</dl>

</div>
</body>
</html>

And after a few page reloads, to bypass the other quotes in our Salesforce.com instance, we see the following:


ONE/Northwest with Random Quote


Conclusion

While I only demoed the use of the "query" call to the Salesforce.com API, you can skim the methods of the SalesforceBaseConnector class or read up on the API via Salesforce.com's APEX developer wiki for a better picture of what's possible. Note: Beatbox currently talks to the 7.0 version of the Salesforce.com API (several major version behind), so everything described in the docs may not be supported.

For my money, this piece of the Plone and Salesforce.com integration landscape is probably the most ready for prime-time right now, due to the relative feature-completeness of Salesforce Base Connector. That is, if you ignore the lack of an official release :)

In the next few days, I plan to show off some work done to make PloneFormGen post directly to a Salesforce.com instance.



Christopher Johnson: Plone, Zope, Python Track at South American Regional Free Software conference

The 7th Regional Free Software Conference will take place in Cordoba, Argentina in just twenty days. The program reveals a strong interest in the region in Plone and family, with an entire track, a sprint, and trainings happening! Congrats on the strength of the Plone Conosur group.

The Regional Free Software Conference takes place August 7-11 in Cordoba, Argentina.http://jornadas.grulic.org.ar/7/ The conference themes are Business, Society, and Technology. Plone had a strong showing, and has 12 sessions! Everything from Plone 3, PloneGov, to Plone performance and product development.  Check out the full pJRSL bannerrogram of Plone, Zope, and Python sessions.

Other interesting activities include Plone training (a site admin/content management one AND an intermediary developer training!). Also, a Plone sprint will happen on i18n of GetPaid for Plone.

Other interesting-sounding talks include the "Django vs Zope 3 deathmatch", an appearance from Grok, and programming for One Laptop Per Child.

Congrats to the Plone Conosur (or Plonosur, as I like to call them :) community for showing such a strong presence of Plone and Zope in the region! I know several of the people involved in organizing the event (and used to live in Cordoba) and really look forward to participating at the event!


Jon Stahl: Varnish Supports Vary

Filed Under:

If I understand this and this correctly, it means that Varnish now supports the Vary: header, which means that the last barrier to using this fast, easy-to-configure webserver proxy to front multi-lingual Plone sites should now be gone.

I also found a sample Plone/Zope config file for Varnish, contributed by Stig Sandbeck Mathisen. Cool!

According to Wichert, Plone.org is now using Varnish as its proxy.

Reading the tea leaves, it looks like a new generation of simpler, faster, easier-to-configure caching for Plone has arrived.  Hooray!

If you've had experience implementing Varnish for your Plone site, please share your stories.  I'm sure there are lots of folks who'd love to hear more.

Jon Stahl: NPower Seattle Likes Plone

Filed Under:

Patrick Shaw, who leads NPower Seattle's Plone consulting practice, shares a few things they like about Plone:

  • You can edit your content from a modern web browser. It’s almost as simple as that - visit your site, login, click the edit button, and change your text!
  • You can quickly and easily create a news or event or “spotlight” posting that populates the home page (or any other page, matter of fact!) of your website, and then stops publishing when the event is over.
  • You can create as many pages as you want.
  • Your sitemap is always up to date
  • The search tool searches both your site and the innards of your Word and PDF documents
  • You can have “member only” sections of the website for board members or staff or for other stakeholders
  • We can implement a Plone website (where you get more of a website, a LOT more) for the same effort level as websites that were challenging for you to edit.
  • Yes, you can integrate your Plone website with Salesforce!

July 16, 2007

Jon Stahl: Plone Conference Registration & Session Proposals In Full Swing

Filed Under:

The Plone Conference 2007 crew at Abstract Open Solutions have been flying a bit below the radar the past few weeks, but there's been a ton of action in the past few days...



Plone Conference 2007 registration is now open
.  October feels like a long time from now, but we sold out last year, and Plone is huge in Europe.  So get yourself signed up now.

The call for session proposals is open! Session proposals are due July 23rd.  You absolutely do not have to be a Plone expert to present or lead a session -- last year's most popular sessions were case studies from "just plain folks" who had led a Plone project in their organization.  If you're a Plone integrator or consultant, come teach us about a trick or technique something that you've found useful in your work.  Stuck for ideas?  The organizers have got a few ideas for you.

Finally, and perhaps most excitingly, registration for the pre-conference training classes is open!  Four of my most favorite Plonistas, Joel Burton, Darci Hanning, Rocky Burt and my ONE/Northwest colleague Veda Williams are each teaching a low-cost two-day class right before the conference.  These classes made the conference for a lot of folks, and they were a great way for Plone newbies (and experts!) to get up to speed and hit the conference running.  Plus, they were a heck of a lot of fun. 

See you in Napoli in the fall!

July 14, 2007

Jon Stahl: Multimedia in Plone, 2007

Filed Under:

Plone multimedia guru Nate Aune recently gave a talk on Multimedia with Plone at the DZUG conference in Potsdam, Germany.  His slides are online, and cover podcasting, video streaming, Zope 3 development techniques and the handling of large media files with Plone and Zope.  Nate's been involved with (at least!) three generations of multimedia products for Plone.  It's well worth a read to catch up on the state-of-the-art in Plone multimedia. (Hint: some screencasts would be really cool, Nate! :-)

July 13, 2007

Andrew Burkhalter: Making Plone play well with Salesforce.com

The first in a series of blog posts covering efforts in tightly integrating Plone with Salesforce.com

BACKGROUND

Every so often myself or Jon will get a batch of emails asking for the latest status on the Salesforce Connector, since our grant from the Salesforce.com foundation was originally announced in 2006. They always come in groups.

Externally, the product has shown little sign of movement for those that don't scour (and perhaps do...) the Collective Checkins list, which can be a great way to gauge what's active in the Plone community.

As a way to respond to those that have asked or are curious, I plan to post a series of several blog posts on The Plone Blog updating everyone on the latest.

Overall, the progress has been slow and arduous, but there have been a ton of rewarding and committed conversations and discussion with the crew of us up in Seattle (includes the talented Brian Gershon of The Web Collective and RagingWeb.com and Jesse Snyder of NPower Seattle) that get together to hack on Plone and Salesforce.com integration every Friday afternoons for "Open Source Friday's". Throughout this all, a small, but interested community has formed, which is a key to ultimate success in my opinion. Things are looking up.


THE FOUNDATION

Part of the original grant money went towards paying Enfold Systems to assess the status of and cleanup the beatbox codebase. It's a Python wrapper that talks to the Salesforce.com SOAP API written by Simon Fell, who was the original architect of the Salesforce.com API. Beatbox originally lived here, but has seen several homes throughout its life cycle and the active development is now happening at Google Code. (Drop any of us a line if you want to be involved in this project.)

I don't have a ton of insight into beatbox in and of itself, as I've not dug in too deeply, but it's now got a good suite of tests, thanks again to the Salesforce.com foundation and Enfold Systems and in our testing, development, and use of it we've added better support for various core Python data types and Salesforce.com SObject field types and exception handling that can be used within your applications.

It's hard to say how exactly this will evolve, but supporting the latest and greatest Salesforce.com SOAP API (we're 2 major releases behind now) and putting this code up as an Egg on the Cheese Shop are up there. The latter will hopefully be done later this week. We'd be particularly open to help at this level of the stack ;)


BRINGING IT TO ZOPE

Thanks to NPower Seattle and one of its clients, we were able to dust off and extend a simple Zope product, salesforcebaseconnector, that merely manages credentials for a Salesforce.com instance, adds security, handles a volatile connection to Salesforce.com, and extends the Salesforce.com API to those that don't want to write filesystem code in unprotected Python space (i.e. browser views, tools, utilities, etc.) in order to import the need methods for talking to Salesforce.com.

Our primary ambition here is to make this easier for someone that's worked with the other toolkits provided by Salesforce.com that implement the exact same API methods. So even though things like "upsert" and "describeSObjects" might look foreign to a Python/Zope/Plone programmer, it should be comforting for anyone that's written code that talks to the Salesforce.com API.

This product will likely evolve fairly slowly (it's basically feature complete) going forward (there's always better test coverage, using Zope 3 appoaches, and keeping in line with the portions of the Salesforce.com API that beatbox supports) with the chance that we'll do a fairly disruptive name change before officially releasing this. We hope to bite the bullet and decide on this soon.


WHAT'S NEXT

Okay, so we've got these infrastructure pieces that work with our stack, what can we do with them? Stay tuned. Over the next couple days, I'll cover using this stuff to display desired data on your Plone site and a custom adapter we've got working with PloneFormGen.


Update:

<sarcasm>Jesse, Brian, and I sat down with the Open Source Friday marketing and branding team</sarcasm> and decided upon "salesforcebaseconnector" as the product name for the Zope wrapper to beatbox as mentioned in the section titled "Bringing It To Zope" above.

Naming is hard, but the "salesforce" portion should be obvious, the use of "base" suggests a developer/integrator focus, and "connector", as its primary focus is managing connections via the Salesforce.com SOAP API.

Finally, we intentionally chose to avoid mentions of various technical approaches (i.e. "tool" or the more modern "utility"), which were included in the original naming. Our intention is at any time to support the 2 latest major Plone releases under a consistent name, rather than allow proliferation of newly named products that implement various approaches for various Plone version. For historical releases, we'll have releases and tags in the subversion tree. This is obviously easier said than done, but that's the goal.

Christopher Johnson: GetPaid Release coming - testing needed!

After several sprint, some refactoring, and lots of cheering on from the community, GetPaid is within a stones throw of the Red Ochre Release! The main use case target for this release is donations - and we need your help in testing the product! Please download and test to help us clean it up (read on for more info).

Get the latest version here.

For more on what you should be able to do, see the PloneGetPaid updates blog post here. (nightly updates available here)

Please join our getpaid-dev mailing list and report any issues you find there. We are also hanging out in the IRC channel #getpaid :)

This new commerce system for Plone is built on an elegant architecture crafted by Kapil Thangavelu in collaboration with many sprinters and contributors. Find more about the system on our public site, www.plonegetpaid.com . Thanks to the sprint sponsors and Alpha Release sponsors!

July 12, 2007

Jon Stahl: Martin Decloaks

Martin Aspeli announced that he is writing a book about Plone 3, tentatively titled Professional Plone Development.  It will be released this summer, shortly on the heels of Plone 3.

I've been privileged to be one of Martin's reviewers. Professional Plone Development is going to rock.  Hard.  Martin knows Plone 3 as well as anyone alive, and he's got a incredible gift for explaining complex topics in an accessible way.

Plone 3 is going to be a huge leap forward for Plone users, developers and integrators.  Professional Plone Development is going to be an indispensable guide to getting the most out of this amazing new release.  You can pre-order it now for delivery in August.

Congratulations, Martin!  I'm looking forward to celebrating its completion with you in person in a couple of weeks!

July 05, 2007

Jon Stahl: Plone Conference 2007 Call for Proposals Open

Filed Under:

The Plone Conference 2007 team has opened the call for proposals for Plone Conference 2007. You've got until July 23rd (soon!) to submit a proposal for a session you'd like to lead.

Vincenzo and crew have a great list of criteria by which sessions will be evaluated, and some excellent suggestions for sessions they'd like to see proposed if you're looking for ideas. 



Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: