Singlebrook Technology Singlebrook Technology Blog Posts http://singlebrook.com/blog Happy Earth Day! <h3>Ithaca Earth Day happenings</h3> <p>If you missed last weekend's Earth Day events, including the <a href="http://www.ithacamarket.com/" title="http://www.ithacamarket.com/" target="_blank">Ithaca Farmers Market</a>&#160;celebration,&#160;<a href="http://sustainabletompkins.org/" title="http://sustainabletompkins.org/" target="_blank">Sustainable Tompkins</a>' The Climate Smart &amp; Climate Ready conference, and the Youth Summit at Ithaca College, there are still opportunities to enjoy this beautiful (Spring!) day while celebrating Earth Day:</p> <ul><li>(from the <a href="http://www.ithaca.com/news/ithaca/article_68474302-a6e4-11e2-bb96-0019bb2963f4.html" title="http://www.ithaca.com/news/ithaca/article_68474302-a6e4-11e2-bb96-0019bb2963f4.html" target="_blank">Ithaca Times</a>) - GreenStar Natural Foods Market is already in the midst of its 12 Days of Earth Day celebration, which will culminate on Earth Day itself, Monday, April 22. Ithaca Mayor Svante Myrick will dedicate the second annual GIAC Urban Art Show on the entrance side of GreenStar’s West End store from 4-5 p.m.&#160;The urban art show this year is a collaboration between GIAC’s after school Urban Art Club at Ithaca High School and GreenStar. Educators Jay Stooks and Rahmel Mack have been running the club for four years and the students have worked on various community art projects. The mural that they are showing for this event is being created on recycled oak pews donated by Significant Elements.</li> <li>(from <a href="http://www.sustainablecampus.cornell.edu/blogs/news/posts/4-26-13-earth-day-5k-at-the-cornell-plantations-arboretum" title="http://www.sustainablecampus.cornell.edu/blogs/news/posts/4-26-13-earth-day-5k-at-the-cornell-plantations-arboretum" target="_blank">Cornell Sustainable Campus</a>) - Friday, April 26 is the 2013 Earth Day 5K at the Cornell Plantations Arboretum.&#160;Animals from the Cayuga Nature Center will be present before the race! Registration info available through the Cornell Sustainable Campus link above.</li> <li>(from Ithaca College's&#160;<a href="http://www.ithaca.edu/sustainability/docs/pasteventpresres/eventflyersposters/12daysapril2013.pdf" title="http://www.ithaca.edu/sustainability/docs/pasteventpresres/eventflyersposters/12daysapril2013.pdf" target="_blank">Resource &amp; Environmental Management Program</a> student organization) - Today wraps up "The 12 Days of Earth Week" events with EARTH FEST from 10-3, a local foods event with free samples at the Food Lab, and a talk about value-added dairy production at the&#160;Sustainability Cafe.</li> <li>(from the <a href="http://www.theithacajournal.com/article/20130417/ENT/304170051/Local-events-set-celebrate-Earth-Day" title="http://www.theithacajournal.com/article/20130417/ENT/304170051/Local-events-set-celebrate-Earth-Day" target="_blank">Ithaca Journal</a>) - Tonight, 5 pm at Cornell's&#160;Call Auditorium in Kennedy Hall,&#160;Peter Kareiva, chief scientist for the Nature Conservancy, will deliver the Iscol Distinguished Environmental Lecture. <a href="http://www.sustainablefuture.cornell.edu/events/iscol/" title="http://www.sustainablefuture.cornell.edu/events/iscol/" target="_blank">The lecture</a> is titled “Overcoming Dogma and Prophecies of Doom to Save Nature.”</li> </ul> <p>What are you doing for Earth Day? Here at Singlebrook, folks are planning to start some seeds for the upcoming growing season, getting bikes tuned up to hit the roads/trails, and getting outside and taking a walk.</p> <p><img src="http://d21eqec1zr862y.cloudfront.net/system/images/W1siZiIsIjIwMTMvMDQvMjIvMTAvMDgvMDQvNTkvSU1HXzE1ODYuanBnIl0sWyJwIiwidGh1bWIiLCI0NTB4NDUwPiJdXQ/IMG_1586.jpg" title="Img 1586" alt="Img 1586" rel="450x450" width="450" height="338" /></p> <p>Cascadilla Falls is just a couple blocks from our offices! </p> Mon, 22 Apr 2013 16:11:00 +0000 http://singlebrook.com/blog/happy-earth-day Sustainatopia Impact Conference: B Revolution! Panel <h3>This list of resources was generated for the B REVOLUTION! (WHY B CORPS ARE CHANGING THE WORLD FOR GOOD) Panel at The Impact Conference at Sustainatopia</h3> <p><a href="/system/resources/W1siZiIsIjIwMTMvMDQvMTgvMDcvNDUvMjEvNzAwL0JDb3JwX2hhbmRvdXRfMTNfMDQuMTgucGRmIl1d/BCorp_handout%2013_04.18.pdf" title="B Corp Handout 13 04.18">Download a PDF of this list here.</a> </p> <h3>Locating Impact Investors</h3> <p><strong>For-profit:</strong> </p> <ul><li><a href="http://www.brevolutioncapital.com" title="http://www.brevolutioncapital.com" target="_blank">B Revolution Capital, Inc.</a> </li> <li><a href="http://socialcapitalmarkets.net" title="http://socialcapitalmarkets.net" target="_blank">Social Capital Markets (SOCAP)</a> </li> <li><a href="http://sriconference.com" title="http://sriconference.com" target="_blank">The SRI Conference (Sustainable, Responsible, Impact Investing)</a> </li> <li><a href="http://investorscircle.net" title="http://investorscircle.net" target="_blank">Investors' Circle</a> </li> <li><a href="http://missionmarkets.com" title="http://missionmarkets.com" target="_blank">Mission Markets</a> </li> <li><a href="http://rsfsocialfinance.org" title="http://rsfsocialfinance.org" target="_blank">RSF Social Finance</a> </li> <li><a href="http://jaliaventures.com" title="http://jaliaventures.com" target="_blank">Serious Change / Jalia Ventures</a> </li> <li><a href="http://maximpact.com" title="http://maximpact.com" target="_blank">MaxImpact</a> </li> <li><a href="http://williamjamesfoundation.org" title="http://williamjamesfoundation.org" target="_blank">William James Foundation (WJF)</a> </li> </ul> <p><strong>Non-profit:</strong> </p> <ul><li><a href="http://tides.org" title="http://tides.org" target="_blank">Tides Foundation</a>&#160;</li> </ul> <h3>Social Venture Communities</h3> <ul><li><a href="http://svn.org" title="http://svn.org" target="_blank">Social Venture Network (SVN)</a>&#160;</li> <li><a href="http://bcorporation.net" title="http://bcorporation.net" target="_blank">B Corp</a>&#160;</li> <li><a href="http://bealocalist.org" title="http://bealocalist.org" target="_blank">Business Alliance for Local Living Economies (BALLE)</a>&#160;</li> <li><a href="http://asbcouncil.org" title="http://asbcouncil.org" target="_blank">American Sustainable Business Council (ASBC)</a>&#160;</li> <li><a href="http://greenamerica.org" title="http://greenamerica.org" target="_blank">Green America</a>&#160;</li> <li><a href="http://sustainablebrands.com" title="http://sustainablebrands.com" target="_blank">Sustainable Brands</a>&#160;</li> <li><a href="http://greenchamberofcommerce.net" title="http://greenchamberofcommerce.net" target="_blank">Green Chamber of Commerce</a>&#160;</li> <li><a href="http://lohas.com" title="http://lohas.com" target="_blank">Lifestyles of Health and Sustainability (LOHAS)</a> </li> <li><a href="http://www.nten.org/" title="http://www.nten.org/" target="_blank">Nonprofit Technology Network (NTEN)</a> </li> <li><a href="http://convergeus.com" title="http://convergeus.com" target="_blank">ConvergeUS</a>&#160;</li> </ul> <h3>Legal Advice</h3> <ul><li><a href="http://perlmanandperlman.com" title="http://perlmanandperlman.com" target="_blank">Allen Bromberger, Perlman and Perlman, LLP</a>&#160;</li> <li><a href="http://www.wendel.com/index.cfm?fuseaction=people.persondetail&amp;id=10577" title="http://www.wendel.com/index.cfm?fuseaction=people.persondetail&amp;id=10577" target="_blank">William Acevedo, Wendel, Rosen, Black &amp; Dean, LLP</a> </li> </ul> <h3>Accelerators</h3> <ul><li><a href="http://unreasonableinstitute.org" title="http://unreasonableinstitute.org" target="_blank">Unreasonable Institute</a>&#160;</li> <li><a href="http://instituteb.com" title="http://instituteb.com" target="_blank">institute B</a>&#160;</li> <li><a href="http://hub-ventures.com" title="http://hub-ventures.com" target="_blank">The Hub</a>&#160;</li> <li><a href="http://criterioninstitute.org" title="http://criterioninstitute.org" target="_blank">Criterion Ventures</a>&#160;</li> <li><a href="http://scu.edu/socialbenefit/entrepreneurship/gsbi" title="http://scu.edu/socialbenefit/entrepreneurship/gsbi" target="_blank">Global Social Benefit Incubator</a>&#160;</li> <li><a href="http://greenspaceshome.com" title="http://greenspaceshome.com" target="_blank">Green Spaces</a>&#160;</li> <li><a href="http://astia.org" title="http://astia.org" target="_blank">Astia</a>&#160;</li> <li><a href="http://womeninnovatemobile.com" title="http://womeninnovatemobile.com" target="_blank">Women Innovate Mobile (WIM)</a> &#160;</li> <li><a href="http://newmeaccelerator.com" title="http://newmeaccelerator.com" target="_blank">NewME</a>&#160;</li> <li><a href="http://springboardenterprises.org" title="http://springboardenterprises.org" target="_blank">Springboard Enterprises</a>&#160;</li> <li><a href="http://brevolutioncapital.com/" title="http://brevolutioncapital.com/" target="_blank">B Revolution Consulting / B Revolution Capital</a> </li> </ul> <h3>Crowdfunding</h3> <ul><li><a href="http://startsomegood.com/" title="http://startsomegood.com/" target="_blank">StartSomeGood</a>&#160;</li> <li><a href="http://www.indiegogo.com/" title="http://www.indiegogo.com/" target="_blank">Indiegogo</a> </li> <li><a href="http://www.launcht.com/" title="http://www.launcht.com/" target="_blank">Launcht</a> </li> </ul> <h3>Other Resources</h3> <div><ul><li><a href="http://www.taprootfoundation.org/" title="http://www.taprootfoundation.org/" target="_blank">Taproot</a>&#160;ProBono Services</li> <li><a href="http://www.goodnik.org/" title="http://www.goodnik.org/" target="_blank">Goodnik</a>&#160;ProBono Services and Other Resources for Social Entrepreneurs</li> <li><a href="https://www.givegab.com/" title="https://www.givegab.com/" target="_blank">GiveGab</a>&#160;Service for Finding Volunteers for Non-Profits</li> <li><a href="http://home.techsoup.org/pages/default.aspx" title="http://home.techsoup.org/pages/default.aspx" target="_blank">TechSoup</a> Free Software for Non-Profits</li> </ul> <h3>B Corp Resources</h3> <ul><li><a href="http://www.bcorporation.net" title="http://www.bcorporation.net" target="_blank">B Corporation</a>&#160;</li> <li>B Lab contacts for B Corp certification:&#160; Nathan Gilbert, NY office <a href="mailto:nathan@bcorporation.net" title="nathan@bcorporation.net">nathan@bcorporation.net</a> | 212-608-4150 or Heather Van Dusen, Philadelphia (HQ) office <a href="mailto:heather@bcorporation.net" title="heather@bcorporation.net">heather@bcorporation.net</a> | 610-296-8283</li> <li><a href="http://www.benefitcorp.net" title="http://www.benefitcorp.net" target="_blank">Benefit Corporation legislation</a>&#160;</li> <li><a href="http://www.brevolutionconsulting.com" title="http://www.brevolutionconsulting.com" target="_blank">B Revolution Consulting, Inc.</a> </li> </ul> </div> <div> <h3>Panelists</h3> <p>Dirk Sampselle, B Revolution <a href="http://brevolution.com" title="http://brevolution.com" target="_blank">brevolution.com</a> <br />B Revolution’s team of expert advisors provides experience-tested advice and guidance on how to implement sustainable social and environmental impact practices to maximize revenues, cut costs, build brand equity, and, when necessary, solicit the right kind of capital.</p> <p>Elisa Miller-Out, Singlebrook Technology <a href="/" title="Home">singlebrook.com</a> <br />Singlebrook builds web and mobile software with a mission of Technology for Change. Singlebrook’s services include custom web application development, mobile apps, integration, databases, content management systems and design. </p> <p>Lily Scott, Veris Wealth Partners <a href="http://veriswp.com" title="http://veriswp.com" target="_blank">veriswp.com</a> <br />Veris Wealth Partners is a wealth management firm committed to helping you align your wealth with your mission. Veris Wealth Partners operates on the principle that sustainable and impact investing are the best ways to achieve strong performance while also benefitting future generations.</p> <p>Lisa Tarver, One World Futbol <a href="http://www.oneworldfutbol.com/" title="http://www.oneworldfutbol.com/" target="_blank">oneworldfutbol.com</a>&#160;<br />The mission of the One World Futbol Project is to make a meaningful impact on the lives of youth around the world through the One World Futbol, a virtually-indestructible ball that never goes flat and never needs a pump. The One World Futbol Project's goal is to bring the joy of soccer and play to youth in disadvantaged communities so that children can be children no matter where they live.</p> <p>Steve Kuzara, Vyykn <a href="http://www.vyykn.com" title="http://www.vyykn.com" target="_blank">vyykn.com</a> <br />Vyykn aims to end America’s addiction to bottled water with a subscription refill service, which allows customers to fill up on oxygenated and filtered water.</p> </div> Wed, 17 Apr 2013 20:38:00 +0000 http://singlebrook.com/blog/sustainatopia-impact-conference-b-revolution-panel Singlebrook Techspring Videos <p>Singlebrook Techspring is a Technology for Change (T4C) initiative started in Summer 2011 that has been in progress through the recent launch of <a href="http://solworksinnovations.com/" title="http://solworksinnovations.com/" target="_blank">SolWorks' new website</a>. We're happy to release Parts 1 &amp; 2 of the Techspring video series, shot in Boulder, CO at the <a href="http://unreasonableinstitute.org/" title="http://unreasonableinstitute.org/" target="_blank">Unreasonable Institute</a>.&#160;</p> <p>In the Singlebrook Techspring videos, meet Teju Ravilochan, featured in Part 1. Teju, a Co-founder of the Unreasonable Institute, explains how the accelerator chooses a class of outstanding social entrepreneurs each year and helps them create financially sustainable, scalable social enterprises.&#160;</p> <br /> <iframe src="http://player.vimeo.com/video/55888796?title=0&amp;byline=0&amp;portrait=0" width="500" height="281" frameborder="0"></iframe> <br /> <div><p>In Part 2, SolWorks founder and Techspring winner, Alissa Johnson describes her innovative approach to making solar water heaters affordable for homes in the developing world. She shares the experiences that led her to pursue her entrepreneurial goals, the importance of having the support network of social entrepreneurs found at the Unreasonable Institute, and how winning Techspring will help her launch SolWorks and scale its impact to help 1 million people worldwide.&#160;</p> <br /> <p><iframe src="http://player.vimeo.com/video/55889621?title=0&amp;byline=0&amp;portrait=0" width="500" height="281" frameborder="0"></iframe> </p> <br /> </div> <div><p>For Techspring, Singlebrook partnered with the Unreasonable Institute&#160;to identify a social entrepreneur aiming to scale their enterprise to impact 1 million people or more worldwide. Alissa Johnson, founder of SolWorks&#160;(formerly CalSolAgua), was chosen to receive the Techspring package of pro bono technology and marketing services worth $20,000 to help scale her brand and impact.&#160;</p> <p>SolWorks&#160;is reducing household energy bills and carbon emissions by bringing affordable solar water heating to the developing world. SolWorks worked with Techspring service partners, including&#160;<a href="http://www.csrwire.com/" title="http://www.csrwire.com/" target="_blank">CSRWire</a>, <a href="http://www.communications4good.com/" title="http://www.communications4good.com/" target="_blank">Communications4Good</a>, <a href="http://www.icontact.com/" title="http://www.icontact.com/" target="_blank">iContact</a>, <a href="http://thinktopography.com/" title="http://thinktopography.com/" target="_blank">Think Topography</a>, <a href="http://provoc.me/" title="http://provoc.me/" target="_blank">Provoc</a>, <a href="http://www.see3.com/" title="http://www.see3.com/" target="_blank">See3 Communications</a>, and <a href="http://colab.coop/" title="http://colab.coop/" target="_blank">CoLab Coop</a>,&#160;to create a brand strategy, website and marketing &amp; PR campaign to help launch their social venture.&#160;</p> <p>For more information about Singlebrook Techspring and its service partners, read the <a href="http://singlebrook.com/blog/singlebrook-techspring-press-release" title="http://singlebrook.com/blog/singlebrook-techspring-press-release" target="_blank">press release</a> from July, 2011.&#160;</p> </div> Tue, 16 Apr 2013 20:41:00 +0000 http://singlebrook.com/blog/singlebrook-techspring-videos Creating Custom Beans in Drupal, Part 2 <p><em>by Aaron Froehlich</em> </p> <p><em>*Feel free to browse the code from this tutorial in my <a href="http://bit.ly/13amN01" target="_blank">sandbox repository</a> at Drupal.org.</em> </p> <p>In <a href="http://singlebrook.com/blog/drupal-custom-bean-tutorial-part-1">Part 1</a> of this tutorial, we created a custom Bean type that provides reusable blocks of tweets from a specified twitter user. In Part 2, we will continue improving our custom bean type by upgrading to the Twitter 1.1 API, which will also give us the opportunity to address some typical decisions that you might face during development of a project, such as:</p> <ul><li>the tradeoffs between custom code and javascript libraries</li> <li>the use of 3rd party php libraries</li> <li>different ways of handling API keys and secrets</li> </ul> <p>The code we wrote in Part 1 was intentionally pretty simple, and Twitter's V1 API supported us in that regard because it allowed non-authenticated access to user timelines. This highlights a situation that is typical with 3rd party integrations: we've created a dependency between our application and Twitter's API. Now that one of our dependencies has changed, it begs the question again: is a custom module the way to go? What are the alternatives?</p> <ol><li>We could reconsider <a href="http://drupal.org/project/twitter_timeline" target="_blank">Twitter Timeline</a>, which also leverages Bean to create reusable twitter timeline blocks. The main advantage to this approach is that it mitigates our application's Twitter dependency, because one could argue that Twitter will likely keep their own widgets up-to-date with their ongoing API changes. However, there are two main disadvantages to this approach. First, there is currently very limited support for theming the Twitter widgets, so we basically choose a light or dark version. Second, relying on Twitter's javascript to handle our timeline block requires that it be loaded from Twitter with every page load. At least <a href="http://bit.ly/YLeaSw" target="_blank">some argue</a> that modern-day reliance on 3rd party javascript libraries has a major impact on user experience.</li> <li>We could ditch our Minimalist Drupal approach and just <code>drush dl twitter &amp;&amp; drush en twitter</code>. With this option, we not only get support for tweets on the site, we also get some other cool features, such as logging in via Twitter, posting to Twitter, setting up <a href="http://drupal.org/project/rules" target="_blank">Rules</a> to auto-post to Twitter. However, if we take a peak at Twitter's info file, we see that it requires Oauth, Views and Entity, the first two which, at this point, we don't actually need on the site except to support our blocks of tweets. This brings into focus one of the key principles of agile development, deferred-decision making. In this case, all we know is that we want to create the ability to add reusable blocks of tweets on the site. Why add additional dependencies that we don't know whether we'll utilize?</li> <li>We could rework our custom bean to handle Twitter's 1.1 API, and also take a look at some coding best-practices we could follow that will generally make our implementation more flexible moving forward. As you already know, this is the route we're going to take, so let's get started.</li> </ol> <p>Immediately, we're faced with yet another decision: how are we going to handle OAuth? In reality, we almost certainly addressed this question when we were choosing from the three options above. There is the <a href="http://drupal.org/projects/oauth/" target="_blank">OAuth module</a>, which seems to be a good candidate, as it "acts as a support module for other modules that wish to use OAuth." This would allow us to add additional services with OAuth in the future. However, deferred-decision making again encourages us to wait until we know we'll need it. The project may require another OAuth integration at some point, but now is not that point. We discover a second option if we look at <a href="http://bit.ly/102zQMg" target="_blank">Twitter's documentation</a> about integrating OAuth with PHP, where they refer to Abraham William's project <a href="https://github.com/abraham/twitteroauth" target="_blank">twitteroauth</a>. Finally, we could roll our own implementation, but then we are binding our external dependency to our internal code. We mitigate (but don't eliminate) that dependency by using twitteroauth, and with an unofficial endorsement by Twitter and only two files totaling 37k, that's the route we'll take here.</p> <p>To begin our refactor, let's return to our custom TweetBlockBean class and begin reworking our view method to support the new API. Since we're adding some complexity, I'll begin by creating a new method that handles getting the tweets:</p> [script src="https://gist.github.com/a-fro/5366237/158ff85bd9c9ceeae84b9bf60bd01664437f90ff.js"][/script] <p>In this refactor, we've added a <code>getTweets()</code> method, which either returns the existing cached data, or initiates the (still incomplete) call to Twitter. We've also added some error handling, so that the user will know if there was an error getting the tweets.</p> <p>With that, let's turn to our OAuth implementation, which will rely on Abraham William's twitteroauth repo. To accomplish this, begin by cloning the repo somewhere on your system <code>git clone git://github.com/abraham/twitteroauth.git</code> and copying the twitteroauth folder to a newly created /libraries folder within the custom module. In a real project, the sites/all/libraries folder would probably be a better location, but since I'd like the sandbox to include a working version, we can add it right to our module. Next, we'll require the library in our class and add the necessary implementation code to connect and authorize our Twitter credentials:</p> [script src="https://gist.github.com/a-fro/5366237/3f634f18efb7d393662a7b2cfe0ba50a94ba12dd.js"][/script] <p>The main items of interest here are the <code>$connection</code> object we're creating that initializes TwitterOAuth, and the <code>$connection-&gt;host</code> that we set to use the new API. As you can see, our connection will require some keys and secrets, which will be the topic of the final section of the tutorial. But before we turn to that, I'd like to take a minute to discuss an additional refactoring that is tempting to consider. Feel free to skip the next paragraph if you'd just like to continue the tutorial.</p> <p>In object oriented programming, design principles such as the single responsibility principle and separation of concerns invite us to consider some additional refactoring here. In particular, our <code>getTweets()</code> method has poor separation of concerns, and is currently checking the cache, establishing the OAuth connection, reaching out to the Twitter API, and caching the results. If this were a public interface, or if we knew that we would be reusing some of these methods in other places, we would definitely want to refactor them out. However, given that this is a private interface and that we don't yet have a use for more modular code in this tutorial, we will leave the class as is. If you're interested in seeing a refactored version that attempts to separate these overlapping concerns, take a look a <a href="http://bit.ly/17i2U3Y" target="_blank">this gist.</a> </p> <p>Our final step in Part 2 is to handle Twitter's authorization, which requires a consumer key and secret, as well as an access token and secret. There are a few things we'll need to cover in order to get this working in our module. First, Twitter needs to know about our application so it can supply us with the keys and secrets. Head over to your <a href="https://dev.twitter.com/apps" target="_blank">Twitter Developer apps page</a> and either access an app you've already created, or create a new one. Once you've done that, you should be able to access the "OAuth" tool tab, which will either give you the pairs of keys and secrets you need, or invite you to create a token for the app, if you haven't done that yet.</p> <p>With those values in hand, we can head back to our module. There are a few basic approaches we can consider at this point to provide access to these values to our module. To start with, let's take the 'leanest' approach and simply add the following variables to our sites/default/settings.php file:</p> [script src="https://gist.github.com/a-fro/5263934.js"][/script] <p>This approach is better than adding the keys and secrets to the class itself, as the settings.php is typically left out of source control, and therefore isolates the sensitive information to this one file. However, it also has limitations, the primary one being that the token and token secret are values that can be reset if need be, which would require updating the settings.php file on the server if and when that happens. This may be an acceptable tradeoff, but for the purpose of digging a little deeper in this tutorial, we're going to choose a different option. As the last step in Part 2 of this tutorial, we're going to add a configuration interface for a site administrator to access and update those values. This is accomplished in four basic steps:</p> <ol> <li>Add a configuration line to our module.info file</li> <li>Use hook_menu to define the configuration details of our interface</li> <li>Implement an admin interface with a form to save the values we need from Twitter</li> <li>Add a module.install file to clear the values from the database if the module is deleted.</li> </ol> <p>Let's run through those in order. First, we'll add our configuration line to bean_tweets.info:</p> <p> [script src="https://gist.github.com/a-fro/5221375/5b5c968203613fcd5312fbe0ce29e5e2405af3bd.js"][/script] </p> <p>This new line tells Drupal that our custom module has a configuration form, which becomes accessible to the user from the module administration page. Next, we'll implement hook_menu() in our bean_tweets.module file to define what happens when a user clicks on the "Configure" button:</p> <p> [script src="https://gist.github.com/a-fro/5354472.js"][/script] </p> <p>As you can see, we're going to be using the form api through a new function called <code>bean_tweets_admin()</code>, which will live in a new file that we need to create now (assuming you're in the module file: <code>mkdir includes</code>, followed by <code>touch includes/bean_tweets.admin.inc</code>). Within this new file we'll implement the form:</p> [script src="https://gist.github.com/a-fro/5274067.js"][/script] <p>Notice the <code>system_settings_form</code> wrapper that we're utilizing. That's a handy Drupal helper that keeps us from needing to define a submit handler or set our variables. Now, when an administrator goes to the module page, they will see a "configure" link next to the Bean Tweets listing, where they can add the necessary keys and secrets.</p> <p>The last bit of housekeeping is to add a module.install file, where we'll add some housekeeping tasks as a Drupal best-practice <code>touch bean_tweets.install</code>, whose current function is simply to remove its own variables in the event that the module is uninstalled:</p> [script src="https://gist.github.com/a-fro/5274083.js"][/script] <p>With that, we've reached the end of Part 2 of our Custom Bean Types tutorial. Again, you can get the code for this tutorial in my <a href="http://bit.ly/13amN01" target="_blank">sandbox repository</a>. Please let me know if you have questions or suggestions. Otherwise, I'll return in a couple of weeks for Part 3, where we'll be adding a theme layer to our view, as well as re-considering our caching strategy. Thanks for joining me!</p> <hr /> <a title="Singlebrook is hiring" onclick="_gaq.push(['_trackEvent', 'Applicants', 'Banner', 'creating-custom-beans-in-drupal-part-2']);" href="http://singlebrook.com/careers/drupal-programmer"><img alt="Are you passionate about programming and making the world a better place with your code? We want to hear from you!" title="Apply now!" src="http://d21eqec1zr862y.cloudfront.net/system/images/W1siZiIsIjIwMTMvMDQvMTgvMDUvMDAvMDYvOTE1L2xlYW5faGlyaW5nX2Jhbm5lci5qcGciXV0/lean_hiring_banner.jpg" /></a> Mon, 15 Apr 2013 07:50:00 +0000 http://singlebrook.com/blog/creating-custom-beans-in-drupal-part-2 Creating Custom Beans in Drupal, Part 1 <p><em>by Aaron Froehlich</em> </p> <p><em>*Feel free to browse the code from this tutorial in my <a href="http://bit.ly/15hRyk0" target="_blank">sandbox repository</a> at Drupal.org.</em> </p> <p>This tutorial is a follow-up to a recent article on <a href="http://singlebrook.com/blog/minimalist-drupal-development" title="Minimalist Drupal Development">Minimalist Drupal Development</a>, where I made the case for judicious module selection as a strategy for keeping Drupal sites more performant and enjoyable to code. In this tutorial, I'll demonstrate how to create a Twitter timeline block using the Bean API. Ironically, a <a href="http://drupal.org/project/twitter_timeline" title="http://drupal.org/project/twitter_timeline" target="_blank">similar module</a> appeared recently, called "Twitter Timeline" and released by Tom Kirkpatrick. The main difference here is that this solution relies on Drupal's cache and our own custom output rather than Twitter's widget system.</p> <p>Start by finding a Drupal installation on your local system that we can use for this tutorial. On my system, I set up a fresh installation of Drupal 7.21. From the command line, head to the root of the project and create the folders we'll need for our custom module with <code>mkdir -p sites/all/modules/custom/bean_tweets/plugins/bean</code>. In the root of of our custom module, let's start by creating a file called bean_tweets.info <code>touch sites/all/modules/custom/bean_tweets/bean_tweets.info</code>, with the following lines:</p> [script src="https://gist.github.com/a-fro/5221375/cbce2cc485679eac2760459999982527145883d6.js"][/script] <p>From there, we'll create the module file <code>touch sites/all/modules/custom/bean_tweets/bean_tweets.module</code>, where we can set up the basics of our custom bean:</p> [script src="https://gist.github.com/a-fro/5221384/212657e8e59fd231c3da640e528e2e81f35a4e74.js"][/script] <p>At this point, our module is doing two things: 1) Declaring the API version our module implements, and 2) declaring our bean type. I had a little trouble in this section with some of the other online tutorials I followed when creating my first custom bean, so notice in particular the handler key and values, which include a class name (TweetBlockBean), and the path to the class we'll create now, with <code>touch sites/all/modules/custom/bean_tweets/plugins/bean/bean_tweets.tweet_block.inc</code>, where we will add the stub code we'll need for that file:</p> [script src="https://gist.github.com/a-fro/5222565/dce01cfd82659d025b16aef824293410ba84ed54.js"][/script] <p>This plugin class will do three things:<br /> 1) It's going to create the form for configuring our Bean.<br /> 2) It's going to allow us to set the default values of the form elements.<br /> 3) It's going to implement the view for the bean and add it to the render array.</p> <p>Let's start with the form:</p> [script src="https://gist.github.com/a-fro/5222565/7a0a398b5849bda9c41886498807e6fc9602df4a.js"][/script] <p>As you can see, we're adding a form element that the will allow the admin to configure a custom block instance. One of the things that makes this great is that we can create multiple tweet blocks for different twitter handles. Next, we need to make sure that some default values get populated:</p> [script src="https://gist.github.com/a-fro/5222565/86c159aae0c7bfd054bb81da39bafc2235ac2748.js"][/script] <p>This should be pretty self-explanatory, but notice that we're setting the handle to a blank string, and the number_of_tweets to 5. With our form elements in place, let's go ahead and set up the view for each block:</p> [script src="https://gist.github.com/a-fro/5222565/95de54305c0570cefc0dd2bdd013fb139ed99489.js"][/script] <p>Notice we're hitting the json feed of the API, which <a href="https://api.twitter.com/1/statuses/user_timeline.json?screen_name=singlebrook&amp;count=5&amp;callback=?" target="_blank">returns a lot more data</a> than we need. For the purposes of this tutorial, we're simply using the 'created_at' and 'text' nodes for our block of tweets. We'll return to the view in another tutorial and work through some refactoring that will integrate our work here with Drupal theming.</p> <p>If we stop and take a look at our custom bean at this point, it looks pretty good. However, there's one clear limitation that we need to consider, which is Twitter's usage limits. With the code as it now stands, a heavily-trafficked site that implements our custom module could hit Twitter's rate limit of 100 API calls / hour. Additionally, our module is going to require that each page load on the site that includes one of our tweet blocks has to complete our API call during the page load, which is going to affect the end user's experience. Let's add some caching strategies:</p> [script src="https://gist.github.com/a-fro/5222565/ac97f0e49d3596aa906cea928b612f1c6fad8b74.js"][/script] <p>As you can see, caching is accomplished in three parts: First, we add the logic to the view that checks to see if a cache value exists, and makes the API call if not and caches those results. Secondly, we want the user to be able to control how long the results get cached for, and so we add that textfield to the form, and establish a default value of 30 minutes. Finally, we added a submit handler to the form, so that the cache for the results gets cleared each time the block is updated. Next, we add that cache clearing mechanism to the module:</p> [script src="https://gist.github.com/a-fro/5221384/4b07e77ca8dc560be7f97cec016e66b67bbd6819.js"][/script] <p>Our final step is to add our bean plugin file to our module info page:</p> [script src="https://gist.github.com/a-fro/5221375/10f282b6a1c849625aa58002032511d580bc0dce.js"][/script] <p>After enabling our module with <code>drush en bean_tweets -y</code>, which, as your drush output reveals, also downloads and/or enables the required modules (bean, entity, ctools), we're ready to clear cache with <code>drush cc all</code>, and check out our new tweet block.</p> <p>We should now see a new menu item on the admin/content page, called "Add block", where we can create our tweet block. After creating a block, it should appear on your block listing page, where you can add it to a region, or follow your chosen block placement strategy.</p> <p>Thanks for following this tutorial. If you'd like to download or play with the code, there is a <a href="http://bit.ly/15hRyk0" target="_blank">sandbox repository</a> at Drupal.org. In <a href="/blog/creating-custom-beans-in-drupal-part-2">part two</a>, we'll dig into OAuth and upgrade to Twitter's 1.1 API.</p> <hr /> <a title="Singlebrook is hiring" onclick="_gaq.push(['_trackEvent', 'Applicants', 'Banner', 'drupal-custom-bean-tutorial-part-1']);" href="http://singlebrook.com/careers/drupal-programmer"><img alt="Are you passionate about programming and making the world a better place with your code? We want to hear from you!" title="Apply now!" src="http://d21eqec1zr862y.cloudfront.net/system/images/W1siZiIsIjIwMTMvMDQvMTgvMDUvMDAvMDYvOTE1L2xlYW5faGlyaW5nX2Jhbm5lci5qcGciXV0/lean_hiring_banner.jpg" /></a> Mon, 25 Mar 2013 07:15:00 +0000 http://singlebrook.com/blog/creating-custom-beans-in-drupal-part-1 Startup Fuel: Elisa Miller-Out <p>via <a href="http://www.alleywatch.com/2013/03/startup-fuel-elisa-miller-out/" title="http://www.alleywatch.com/2013/03/startup-fuel-elisa-miller-out/" target="_blank">AlleyWatch</a> </p><p>BY WOMEN INNOVATE MOBILE · MARCH 1, 2013 · 1</p> <p>INTERVIEWS, TECHS AND THE CITY</p> <p>Startup accelerator/incubator programs are fueled by passionate mentors who share their expertise, insights and experience with the founding teams in the program. Access to these networks of mentor relationships– and the opportunity to learn from their experiences – is frankly, a huge startup advantage. As only a select number of startups are admitted into accelerator programs and enjoy the benefits of this unique access, here’s your opportunity to grab some mentor insights.</p> <p>What’s the worst mistake a founder can make?</p> <p>The worst mistake a founder can make is not talking to customers early and often!</p> <p>What’s the most common Startup error?</p> <p>One of the most common Startup errors is not testing assumptions rigorously, right from the start. It’s helpful if you take the core assumptions on which the success of your product rests and try to prove yourself wrong, instead of assuming you’re correct and trying to prove yourself right.</p> <p>What does “fail fast” mean to you?</p> <p>“Fail Fast” means get your minimum viable product out in front of customers early and observe, run tests and get lots of feedback. That way, if you’re heading in the wrong direction, you’ll learn about it early and won’t have to waste lots of time and money building something that no one wants.</p> <p>If you could fix one thing in the startup eco-system right now, what would it be?</p> <p>If I could fix one thing about the startup eco-system right now, there would be just as many woman founders as men.</p> <p>What should startups be focusing on in 2013?</p> <p>In 2013, startups should get excited about Artificial Intelligence, Machine Learning, 3D Printing, Gestural Interfaces, Near Field Communications, Mobile Payments, the Singularity and more!</p> <p>When’s the right time to seek funding?</p> <p>The right time to seek funding is once you’ve validated your core assumptions, achieved product market fit and have a strong minimum viable product or prototype.</p> <p>Thoughts on crowd-funding?</p> <p>Crowd-funding is great, but it’s a “crowded” marketplace, so you might have to work hard to get noticed and raise the funds you need. A lot of thought and work needs to go into marketing your campaign.</p> <p>Best advice you’ve ever gotten?</p> <p>The best advice I’ve gotten recently is “Focus on revenue.” from Darrell Hammond, founder of KaBoom! This was particularly surprising advice, considering that it came from the founder of a non-profit, but keep in mind that KaBoom! is probably one of the most successful non-profits I’ve ever encountered and relies on innovative business models rather than just traditional fundraising.</p> <p>Guess who’s coming for dinner…who would be your dream dinner guest(s) and why?</p> <p>I’m sure I’m not alone in this, but I wish I had met Steve Jobs and had an opportunity to get to know him.</p> <p>Anything else you’d like to add?</p> <p>Make sure you read “The Lean Startup” by Eric Ries if you haven’t yet. Also feel free to check out this recent blog post for some other reading list ideas for startups.</p> <p>About WIM Mentor Elisa Miller-Out:</p> <p>Elisa is CEO of Singlebrook, a web and mobile app development company based in Ithaca, NY. Singlebrook’s services include custom web application development, mobile apps, integration, databases, content management systems and design. The company also runs a startup product lab, whose first release is a mobile donations platform for non-profits called WhatCanI.Do. Singlebrook is a certified B Corp and NYS Benefit Corp and has a strong emphasis on social and environmental responsibility and a mission of “Technology for Change”. Clients include the Environmental Defense Fund, the American Chiropractic Association, Peeled Snacks, RSF Social Finance, Earthcolor, CSRwire, the Social Venture Network and Cornell University. Elisa is the winner of the 2011 B Corp Supply Chain Award, the 2010 B Corp Policy Champion Award and the 2011 NYSAE New Star Synergy Award. She has been featured in articles in the New York Times, Forbes, Mashable, The Washington Post, USA Today and many other publications. She’s spoken about social entrepreneurship and technology at several events including TechWeek, BALLE, the Finger Lakes Social Entrepreneurship Institute, and the NYSAE Technology Institute and has served as guest lecturer at Cornell. She serves as a mentor to several accelerator programs including StartFast, Women Innovate Mobile, Cornell 3Day Startup, Startup Weekend and the Media Ideation Fellowship. Prior to founding Singlebrook, Elisa founded two other companies and worked in a variety of industries in New York City, including invention &amp; product development, theater, film &amp; commercial production, event planning, pharmaceuticals and finance. She graduated Summa Cum Laude from Barnard College of Columbia University. When she’s not working at Singlebrook, Elisa enjoys cooking with local foods, fitness, swimming in waterfalls, reading and playing Suzuki cello with her two daughters. She also volunteers as a technology sponsor for her BALLE chapter: Local First Ithaca, as President of the Barnard Club of the Finger Lakes, and as a Co-Founder of the Ithaca Venture Community. Elisa serves on the Council of Innovation Advisors for ConvergeUS and is a Strategic Advisor for CSRwire.</p> Wed, 20 Mar 2013 21:19:00 +0000 http://singlebrook.com/blog/startup-fuel-elisa-miller-out Lean Diaries: How to Run a Lean Startup Workshop <p>By Elisa Miller-Out</p> <p>I recently had the opportunity to run a Lean Startup workshop for the Kessler Program at the Cornell School of Engineering. It was my first time running a workshop on Lean methods, so it was a bit of an experiment for me and I thought I'd share my thoughts on what I learned.</p> <p>First, in terms of preparing for the workshop, I revisited some of my favorite books on Lean (documented in an earlier <a href="http://singlebrook.com/blog/startup-reading-list" title="http://singlebrook.com/blog/startup-reading-list" target="_blank">blog post)</a> and reflected on some of the talks I've attended by folks such as <a href="http://www.startuplessonslearned.com/" title="http://www.startuplessonslearned.com/" target="_blank">Eric Ries</a>, <a href="http://www.ashmaurya.com/" title="http://www.ashmaurya.com/" target="_blank">Ash Maurya</a> and <a href="http://steveblank.com/" title="http://steveblank.com/" target="_blank">Steven Blank</a>. I picked out a few examples from the Lean experiments we're running at Singlebrook. Then I reached out to the <a href="http://www.leanstartupcircle.com/" title="http://www.leanstartupcircle.com/" target="_blank">Lean Startup Circle</a>&#160;group and sought advice on planning the workshop. I got some great ideas from members of the group. One member, Anna Curran (entrepreneur and founder of <a href="http://cookbookcreate.com/" title="http://cookbookcreate.com/" target="_blank">Cookbook Create</a>) even agreed to meet with me in NYC and review her past experiences with running similar workshops. It was wonderful to get such support from the Lean community and it was instrumental in making my workshop a success.</p> <p>I only had about two hours for the workshop , but the advice I got from everyone was to make it as hands on as possible using a sample business idea that the students could use for real experiments. One way or another, I knew I had to make sure to introduce the students to the key concept: GOOTB (Get Out of the Building). With that in mind, I devoted only about half an hour at the beginning of the class to reviewing some important concepts such as: Basic Lean methodology and history, Build-Measure-Learn, Business Model Canvas, Minimum Viable Product, Real vs Vanity Metrics, and Assumptions/Hypotheses. This went smoothly, but the main thing I learned from this part of the workshop is that it would have been more engaging if I had brought these concepts to life with a few more compelling visuals and stories. When I did tell a few stories from Singlebrook's experiences with Lean, I saw the students immediately get more engaged.</p> <p>After the lecture, I divided the class into three groups and gave them a sample business idea (a new untested idea from our product lab) with college students as the target market (so that they could do customer development work right during the class), complete with a mobile LaunchRock site for the business that they could use as an MVP, as needed during their experiments. I gave each of the three groups one area to focus on from the business model canvas: Customer, Problem, Solution. While they were in the classroom, I had them document some key assumptions in their area and craft a hypothesis that they could test that evening. The class sprung to action and began furiously discussing ideas in their groups.</p> <p>After about twenty minutes of prepping their experiments, we were ready to GOOTB! We took a field trip to the atrium at the business school and the class descended on groups of students studying at the different tables. Several of them headed to other buildings to try to find as many "customers" to speak with as possible in the limited time they had available. This was uncomfortable at first for many of them, but everyone rose to the occasion.</p> <p>One of the key pieces of advice that Anna gave me when preparing for the workshop was to make sure to allow time for the "Learn" phase of the Build-Measure-Learn loop at the end of the class, so that the students could explore what surprised them and what they learned from their experiments. So, I allowed about thirty minutes at the end of class for each of the groups to present their data and talk about what they discovered from the process.&#160;</p> <p>A couple of the hypotheses were invalidated, as I expected they would be, but we actually got pretty positive feedback overall on the sample business concept. There were even students who tried to sign up for the non-existent mailing list for the sample business! I was surprised by how much data the students were able to gather in such a short period of time. They managed to get a decent sample size for their experiments and were able to get meaningful feedback from each of the "customers" they spoke with, including some compelling insights about the potential market for this product and some great feature ideas.</p> <p>I can't emphasize enough the power and importance of the GOOTB process. These students uncovered more useful insights about this potential business idea in two hours, than we ever could have if we'd worked on the idea for weeks in isolation.</p> <p>So, how did it turn out? The workshop was a great success overall. The students were completely engaged in the activity and clearly had a deep understanding of and appreciation for several Lean Startup concepts by the end of the evening. Some students said that it turned their whole day upside down (in a positive way)! One student was so inspired by the class that he developed an MVP of a mobile idea he had and shared it with me after the class.</p> <p>What would I do differently next time? I would include more stories and images to bring the Lean concepts to life at the beginning of the workshop. I would also allow a little more time for the GOOTB portion of the workshop, since the hands on learning was the most valuable part. The students also felt that it would be helpful to have some more "fail fast" experiences, so next time we might craft a few hypotheses that were more likely to be invalidated. The students also were interested in learning more about when to apply Lean Startup principles and when it might be appropriate to use a different approach.</p> <p>Have any of you participated in or run a Lean Startup workshop recently? Feel free to add comments to the blog about your experiences!</p> Mon, 18 Mar 2013 18:37:00 +0000 http://singlebrook.com/blog/lean-diaries-how-to-run-a-lean-startup-workshop Technology for Change: Debra Sterling, GoldieBlox <h3>Singlebrook talks with Debra Sterling, Founder of toy company, GoldieBlox, about her mission to inspire the next generation of female engineers and the important role of STEM education in filling the need for more engineers in order for the U.S. to compete economically on the global level. </h3> <p><em><img src="http://d21eqec1zr862y.cloudfront.net/system/images/W1siZiIsIjIwMTMvMDMvMDUvMDkvMDIvNTkvNTYvSU1HXzIxMTkuanBnIl0sWyJwIiwidGh1bWIiLCIyMjV4MjU1PiJdXQ/IMG_2119.jpg" title="Img 2119" alt="Img 2119" rel="225x255" width="225" height="150" style="float:left;clear:left;margin-right:15px;" />SB: Could you tell us about what your company does? </em> </p> <p>DS: GoldieBlox, Inc. is a toy company, and our mission is to inspire the next generation of female engineers. We’re creating a character-based brand starring Goldie, the Girl Inventor. She stars in a combo book series-meets-construction toy set, where she goes on adventures and makes simple machines. She also appears in eBooks that complement the toys. Each story of Goldie introduces kids to engineering principles.</p> <p><em>SB: How did you come up with the idea for GoldieBlox?</em> </p> <p>DS: I was talking with a friend and fellow female engineer from Stanford, and we were trying to figure out why there were so few women in engineering. She talked about how she got interested in engineering when she was a little kid because she played with her brothers hand-me-down Legos. She said she probably would have rather played with dolls, but Legos were all they had, so she loved Legos. She got interested in engineering, and (later thought) it was a shame that Legos were considered a ‘boy’s toy’. Maybe if there were more construction toys for girls, it would make a difference? I remember at that moment thinking, “this is what I want to do with my life”. I became pretty obsessed with that idea and I ended up quitting my job so I could work full time on creating a solution. </p> <p><em>SB: How did you handle funding in the early stages?</em> </p> <p style="float:left;clear:left;margin-right:15px;"><img src="http://d21eqec1zr862y.cloudfront.net/system/images/W1siZiIsIjIwMTMvMDMvMDUvMDkvMDgvMDYvODIxLzEzMDIwNl9Hb2xkaWVibG94XzEwMjExNC5qcGciXSxbInAiLCJ0aHVtYiIsIjIyNXgyNTU+Il1d/130206_Goldieblox-102114.jpg" title="130206 Goldieblox 102114" alt="130206 Goldieblox 102114" rel="225x255" width="225" height="169" style="float:left;clear:left;margin-right:15px;" />DS: I made sure that I had enough savings that I could use my own money and live as cheaply as possible for about a year. For the first nine months or so, the company was self-funded. Then I raised a seed round from friends, family and angel investors, and later did a Kickstarter campaign where I launched the product for pre-sale. Since doing the Kickstarter campaign, I’ve gotten close to $1M in pre-order sales from consumers. </p> <p><em>SB: Why is it important for women to take a more prominent role in engineering?</em> </p> <p>DS: It’s simply that there are barely any women in engineering and tech. Less than 11% of engineers are women; so there simply aren’t enough women. There are a lot of reasons it’s important--one being that, in the U.S., we don’t have enough engineers. 9 out of 10 of the fastest-growing jobs in the U.S. are in engineering, science and technology, and we don’t have enough American-born engineers to fill those roles. We’re filling them with people from other countries, which is fine, but in terms of contributing to the American economy and progress, we need more engineers, period.&#160;</p> <p>Women are the largest untapped resource. If we get an equal number of female engineers to enter into the field as male engineers, we’re going to have a larger talent pool in general, which is going to fill the needs of the fastest growing jobs. These jobs also happen to be higher-paying than other jobs. Women with an engineering or technology job earn 33% higher than women in most other fields. So, in terms of giving our girls a really great opportunity for a career that pays well and contributes to society, that’s one reason.&#160;</p> <p>The other reason is that engineers build and create things. Anything from a car, to a mobile application, to a toy--everything that we use every day is built by engineers. To think that 89% of engineers are men means that the majority of stuff we use every day is built through the male perspective only; that’s troubling. Women and men are different. Women offer different perspectives, and frankly, things that are designed for all people, male and female, should be designed by a mix of men and women. It will only be better when we have both perspectives. </p> <p><em>SB: Why is STEM education important? </em> </p> <p>DS: STEM education is important because 9 out of 10 of the fastest growing jobs in the U.S. are in engineering. Engineers are building the future of technology and solving the world’s problems. In order to compete globally, the U.S. needs more engineers, period. It’s been proven that when you have a diverse workforce with men and women engineers, the results are better. Right now, the Obama administration is heavily pushing STEM education because we need more engineers. Having a strong education in science and math prepares people for a career in technology and engineering. They’re trying to get kids interested in hopes that they will pursue careers in these fields, because these fields are incredibly important to our economy. </p> <p><em>SB: What have been a few of the biggest challenges you’ve faced in launching and growing this venture? How did you handle them? </em> </p> <p><img src="http://d21eqec1zr862y.cloudfront.net/system/images/W1siZiIsIjIwMTMvMDMvMDUvMDkvMDYvNDQvNDIxLzEzMDIwNl9Hb2xkaWVibG94XzEwMjIwMy5qcGciXSxbInAiLCJ0aHVtYiIsIjIyNXgyNTU+Il1d/130206_Goldieblox-102203.jpg" title="130206 Goldieblox 102203" alt="130206 Goldieblox 102203" rel="225x255" width="225" height="169" style="float:left;clear:left;margin-right:15px;" />DS: The biggest challenge so far has been working with a factory to get the pieces of the toys to work just right. It’s an incredibly complex engineering problem, preparing a design that I made in my living room out of thread spools and hardware store pegboard and creating it in such a way that it can be mass-manufactured to produce thousands of toys. We’ve gone from iteration to iteration, and it took a really long time to get it to work properly. We had estimated delivery in February on our Kickstarter campaign, and that was padded with several months, but it took so long to get the parts to work that we are just barely hitting our deadline that we thought would be a piece of cake. </p> <p><em>SB: Are the GoldieBlox sets available for purchase now?</em> </p> <p>DS: They’re still available for pre-order. We’re shipping all of our pre-orders from Kickstarter and most of the pre-orders from our website in a couple of weeks. It’s a really big time for us right now. We’re really busy!</p> <p><em><img src="http://d21eqec1zr862y.cloudfront.net/system/images/W1siZiIsIjIwMTMvMDMvMDUvMDkvMDUvNTQvODc2LzEzMDIwNl9Hb2xkaWVibG94XzEwMjIxMi5qcGciXSxbInAiLCJ0aHVtYiIsIjQ1MHg0NTA+Il1d/130206_Goldieblox-102212.jpg" title="130206 Goldieblox 102212" alt="130206 Goldieblox 102212" rel="450x450" width="450" height="338" /></em> </p> <p><em>SB: What advice do you have for aspiring social entrepreneurs and/or women engineers?</em> </p> <p>DS: For social entrepreneurs, my advice would be, if you’re truly passionate about something, it really comes through. If you’re passionate about what you’re working on, people will be inspired and want to help you. Talk about your idea and don’t be afraid that someone will steal it. Go out and build a group of advocates, bring them in and brainstorm and collaborate with them, because everyone has great ideas to contribute and it makes them feel like a part of what you’re doing. That’s how doors will open. </p> <p>For existing female engineers, I would say, “way to go!”, because it’s not easy to work in a male-dominated field. My ask of all of them would be to be proud of what you do and tell people about it. My dad was an engineer and I never knew what he did. He didn’t think I would be interested, and we never talked about it. So, to any female engineer, I would encourage them to share their stories with their kids or nieces or someone who’s applying to college. They should tell people what they do because a lot of people don’t know what engineering is. There really are very few female engineer role models. </p> <p><em>Learn more about GoldieBlox at&#160;<a href="http://www.goldieblox.com/" title="http://www.goldieblox.com/" target="_blank">www.goldieblox.com</a>.</em> </p> <p>***</p> <p><em>Singlebrook’s T4C campaign spotlights entrepreneurs and organizations that are using technology in unique ways to scale their ideas and create a massive impact. We are also creating our own high impact T4C projects. Check them out at: <a href="http://singlebrook.com/t4c " title="http://singlebrook.com/t4c " target="_blank">singlebrook.com/t4c</a>. Share your stories of T4C or other inspirational resources and tips on Twitter (<a href="http://twitter.com/#!/Singlebrook" title="http://twitter.com/#!/Singlebrook" target="_blank">@Singlebrook</a>) using <a href="https://twitter.com/search?q=%23T4C&amp;src=typd" title="https://twitter.com/search?q=%23T4C&amp;src=typd" target="_blank">#T4C</a> and on the <a href="https://www.facebook.com/groups/125667044199982/" title="https://www.facebook.com/groups/125667044199982/" target="_blank">T4C Facebook group</a>, or contact us to be spotlighted in an upcoming feature interview or blog article!</em> </p> Tue, 05 Mar 2013 16:48:00 +0000 http://singlebrook.com/blog/technology-for-change-debra-sterling-goldieblox Minimalist Drupal Development <p><em>by Aaron Froehlich</em> </p> <p>Drupal has emerged in recent years as an extremely flexible and powerful resource for creating web applications. It's done that by creating an infrastructure that simplifies the process of building new functionality and an ecosystem that encourages developers to share this custom functionality. This has been a winning approach because it appeals both to highly-skilled developers who want to contribute to the open source community, as well as relative beginners who want to build rich applications without needing to write or even grasp fundamental programming concepts. The result is an ecosystem that has really thrived, with thousands of modules and a world of possibility.</p> <p>However, Drupal's strength has also created a number of real problems for developers, particularly related to the long-term maintenance of those sites. The ability to piece modules together has created what some are referring to as the "<a href="http://2bits.com/articles/server-indigestion-the-drupal-contributed-modules-open-buffet-binge-syndrome.html" title="http://2bits.com/articles/server-indigestion-the-drupal-contributed-modules-open-buffet-binge-syndrome.html" target="_blank">open buffet syndrome</a>", the alluring tendency for companies to incorporate large numbers of modules to meet the needs of a given project. This approach has a major impact to the total cost of ownership (TCO) of Drupal sites. It not only complicates development tasks like maintenance, updates and upgrades, but it also complicates the administrative interface and site management. Furthermore, the open buffet approach often leads to frustration for developers, who typically prefer writing code to configuring modules, leading to what some refer to as <a href="http://mikecr.it/ramblings/drupals-golden-handcuffs" title="http://mikecr.it/ramblings/drupals-golden-handcuffs" target="_blank">Drupal's Golden Handcuffs</a>.&#160;</p> <p>We believe that there is a better way to develop for Drupal, which we've been referring to as "Minimalist Drupal Development". We first began thinking about MDD after reading the <a href="http://treehouseagency.com/blog/neil-hastings/2011/09/06/building-energygov-without-views" title="http://treehouseagency.com/blog/neil-hastings/2011/09/06/building-energygov-without-views" target="_blank">Treehouse Agency's article</a> about building the energy.gov site without Views, and it just made sense. Our years of Drupal development have proven to us just how essential module selection and implementation is for a project, and how costly poor choices become over time. MDD relies on limiting the use of contributed modules, as well as leveraging Drupal core and its APIs. This creates a more performant system with fewer bugs and fewer patches to maintain, therefore lowering the TCO of your projects. It also requires that you spend more of your time writing code than configuring modules, one of the keys to developing for Drupal and loving it.</p> <p>When Cornell University's College of Agriculture and Life Sciences (CALS) came to us last year, we saw an opportunity to fully embrace MDD. CALS needed a Drupal install profile that they could use to launch up to a hundred different sites, which prioritized a simplified user interface, a robust permissions and workflow system, and a range of reusable content blocks that integrate into their page workflow. So, how did we do it?</p> <p>To start with, like energy.gov, the CALS platform is built without the Views module. To achieve the client's goals, we made extensive use of the <a href="http://drupal.org/project/bean" title="http://drupal.org/project/bean" target="_blank">Bean module</a>,&#160;and combined that with the <a href="http://drupal.org/project/blockreference" title="http://drupal.org/project/blockreference" target="_blank">Block reference module</a>. Each page on the site includes three block reference fields that allow our custom beans to appear in the first or second sidebar, as well as in the main content area. To get them there, we simply leverage hook_page_alter() to pluck them from the render array and add them to the appropriate region on the page. This has the added (and in this case, required) benefit that all of the relevant content on the page, including the blocks placed in the sidebars, gets added to the revisioning workflow and can be reverted.</p> <p>There are additional advantages to using Bean that reduce the overhead on the site. For example, CALS events are managed through a 3rd party API. The traditional approach would likely include using the Feeds module to import the data into an event content type. However, that approach introduces all the associated complexities of managing duplicated data, such as how to handle edited data in one of the systems, setting up cron to keep data current, etc. Using our minimalist approach, Bean made it trivial to grab the json feed of events, cache the results, and display the block (bean) of json nodes to the user without even needing an event content type. There's no duplicate data to unify, and it takes all of 30 seconds to provide the necessary keyword(s) to include in a new block of events and get them onto a page.</p> <p>Bean is just one key strategy we employed in the service of our MDD philosophy on CALS. In the future, we look forward to blogging about other strategies, including the types of choices that allow you to leverage Drupal core, and how to judiciously choose and even borrow from modules without going for a new plate at the buffet. Stay tuned as well for more about the automated test suite we wrote using <a href="http://behat.org/" title="http://behat.org/" target="_blank">Behat</a> and <a href="http://mink.behat.org/" title="http://mink.behat.org/" target="_blank">Mink</a>, which provides a full-coverage test suite for all the key functionality of the platform and provides an insurance policy that will allow them to run security and module updates with confidence. And perhaps the most important argument for MDD, from one code loving developer to another, is that we were able to build the site while spending 95%+ of our time in a text editor rather than a browser.&#160;</p> <p>So what strategies are you using to support Minimalist Drupal Development?&#160;</p> <hr /> <a title="Singlebrook is hiring" onclick="_gaq.push(['_trackEvent', 'Applicants', 'Banner', 'minimalist-drupal-development']);" href="http://singlebrook.com/careers/drupal-programmer"><img alt="Are you passionate about programming and making the world a better place with your code? We want to hear from you!" title="Apply now!" src="http://d21eqec1zr862y.cloudfront.net/system/images/W1siZiIsIjIwMTMvMDQvMTgvMDUvMDAvMDYvOTE1L2xlYW5faGlyaW5nX2Jhbm5lci5qcGciXV0/lean_hiring_banner.jpg" /></a> Tue, 05 Mar 2013 12:00:00 +0000 http://singlebrook.com/blog/minimalist-drupal-development Using the Methods You Love in a Language That Is Lacking <p>Because I switch between ColdFusion and Ruby on a weekly basis, when I work on ColdFusion I sometimes miss some of the features that I have in Ruby. Like having a hash return a nil when a key doesn't exist, rather than getting an error when a key doesn't exist in a struct. Or being able to quickly check if multiple keys exist in a hash.</p> <p>Enter <a target="_blank" title="https://github.com/singlebrook/cf_rubyish" href="https://github.com/singlebrook/cf_rubyish">cf_rubyish</a>, the start of a ColdFusion library of Ruby-esque wrappers. Currently it only has a very basic start to a hash object. As I miss a method from Ruby, I add it to the rhash object, ensuring that the cf_rubyish objects follow the Ruby specifications as closely as possible.</p> <p>During this process of adding functionality to rhash, I've learned things about Ruby that I didn't know. For example, I learned that you could set the default value a hash returns when a key doesn't exist, so it could be 'foobar' instead of nil.</p> <p>cf_rubyish is an open source library, so if you are a ColdFusion developer feel free to use the library in your projects. And we always welcome pull requests with new features!</p> Mon, 04 Mar 2013 16:33:00 +0000 http://singlebrook.com/blog/using-the-methods-you-love-in-a-language-that-is-lacking