tag:blogger.com,1999:blog-90125232432858625852024-03-18T21:12:43.022-07:00Lean is TastyOn this blog I provide you with tasty information about lean and agile practices. Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-9012523243285862585.post-30413329723925161712015-10-02T07:42:00.001-07:002015-10-04T08:45:24.673-07:00Technical Debt in Scrum - How to Pay Them Back<div class="p1">
<br /></div>
<div class="p1">
A lot of Scrum teams face the challenge of balancing the implementation of new product features and keeping the code base clean and maintainable. Very often the product owner pushes the development team to ship an increment with new features at the end of every sprint. The development team might not find the time to keep the code base clean and maintainable. With every refactoring that the developers feel a need for but that is not done, the team increases its <a href="http://martinfowler.com/bliki/TechnicalDebt.html">technical debt</a>. If the technical debt is not payed off, it will slow down the team's productivity in the long run. In this post I propose a way of balancing the implementation of new product features and the reduction of technical debt.</div>
<div class="p1">
<br /></div>
<div class="p1">
A Scrum team pulls work off the product backlog (PB). The PB is maintained by the product owner. To enable the development team to work on new product features <b><i>and</i></b> the reduction of technical debt</div>
<div class="p1">
I propose the use of another backlog: the <i><b>technical debt backlog (TDB)</b></i>. The TBD is maintained by the development team. Every time a developer feels the need for a refactoring and is not able to do it, she adds an item to the TDB. The development team gets together at least once per sprint to groom the TDB. They present the items to each other, estimate and prioritise them. The estimation can be done with the <a href="https://en.wikipedia.org/wiki/Planning_poker">planning poker</a> technique. During sprint planning 1 the team pulls items from the product backlog and the technical debt backlog.</div>
<div class="p1">
<br /></div>
<div class="p1">
The use of a separate backlog for technical debt has the following advantages:</div>
<div class="p1">
</div>
<ul>
<li>technical debt is visible to the development team and the product owner</li>
<li>the reduction of technical debt is seen as part of product development</li>
<li>the development team is engaged to increase the value of its code base</li>
</ul>
<div>
What is your approach to reduce technical debt? Or even better: how do you avoid technical debt?</div>
Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-32738920448830339862015-02-19T09:20:00.001-08:002015-05-27T02:43:45.016-07:00How to write a unit test for your iOS app<div>
<span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;">Here are some general guidelines that I am sticking to when I write a unit test for an iOS app.</span></div>
<div>
<span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;"><br /></span></div>
<span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;">Unit tests for your</span><span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;"> </span><strong style="-webkit-print-color-adjust: exact; background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;">System Under Test (SUT)</strong><span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;"> </span><span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;">go into a file called</span><span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;"> </span><code style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(234, 234, 234); font-size: 14px; line-height: 22px; margin: 0px 2px; padding: 0px 5px; white-space: nowrap;">SUT_Tests.m</code><span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;">. This file contains a class called</span><span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;"> </span><code style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(234, 234, 234); font-size: 14px; line-height: 22px; margin: 0px 2px; padding: 0px 5px; white-space: nowrap;">SUT_Tests</code><span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;">. Replace</span><span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;"> </span><code style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(234, 234, 234); font-size: 14px; line-height: 22px; margin: 0px 2px; padding: 0px 5px; white-space: nowrap;">SUT</code><span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;"> </span><span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;">with the class you are testing; e.g.</span><span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;"> </span><code style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(234, 234, 234); font-size: 14px; line-height: 22px; margin: 0px 2px; padding: 0px 5px; white-space: nowrap;">WebService_Tests</code><span style="background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px;">.</span><br />
<div style="-webkit-print-color-adjust: exact; background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 15px; margin-top: 15px;">
This class has the following features:</div>
<ul style="-webkit-print-color-adjust: exact; background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px; margin: 15px 0px; padding-left: 30px;">
<li style="-webkit-print-color-adjust: exact; margin: 0px;"><strong style="-webkit-print-color-adjust: exact; margin-top: 0px;">Inherits from <code style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; white-space: nowrap;">XCTestCase</code></strong></li>
<li style="-webkit-print-color-adjust: exact; margin: 0px;"><strong style="-webkit-print-color-adjust: exact; margin-top: 0px;">Has no header file.</strong> The class declaration goes into <code style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; white-space: nowrap;">SUT_Tests.m</code>.</li>
<li style="-webkit-print-color-adjust: exact; margin: 0px;"><strong style="-webkit-print-color-adjust: exact; margin-top: 0px;">Declares the SUT's private properties and methods</strong> in a category called <code style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; white-space: nowrap;">Testing</code></li>
<li style="-webkit-print-color-adjust: exact; margin: 0px;"><strong style="-webkit-print-color-adjust: exact; margin-top: 0px;">Has no private methods.</strong> Unit tests should share as less code as possible - they need to run in isolation. Having private methods tends to sharing state among unit tests which breaks isolation.</li>
<li style="-webkit-print-color-adjust: exact; margin: 0px;"><strong style="-webkit-print-color-adjust: exact; margin-top: 0px;">Has short methods.</strong> Try to stick to a maximum of 15 lines per <code style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; white-space: nowrap;">test*</code> method. If you need more lines, try to break up the method that you are testing or handle cases like testing a method with <code style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; white-space: nowrap;">nil</code> and <code style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; white-space: nowrap;">@""</code> in separate methods. </li>
<li style="-webkit-print-color-adjust: exact; margin: 0px;"><strong style="-webkit-print-color-adjust: exact; margin-top: 0px;">Methods have self explanatory names.</strong> E.g. <code style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; white-space: nowrap;">testMethodXYWithNil</code>, or <code style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; white-space: nowrap;">testMethodXYWithEmptyString</code></li>
</ul>
<div style="-webkit-print-color-adjust: exact; background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 15px; margin-top: 15px;">
When writing your tests, keep the <a href="http://agileinaflash.blogspot.de/2009/02/first.html" style="-webkit-print-color-adjust: exact; color: #4183c4;"><strong style="-webkit-print-color-adjust: exact;">FIRST</strong> principle</a> in mind.</div>
<div style="-webkit-print-color-adjust: exact; background-color: white; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 15px; margin-top: 15px;">
You can use this as a template:</div>
<pre style="-webkit-print-color-adjust: exact; background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); font-size: 13px; line-height: 19px; margin-top: 15px; overflow: auto; padding: 6px 10px;"><code class="language-objectivec" style="-webkit-print-color-adjust: exact; background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: none; margin: 0px; padding: 0px;">
#import <span style="background-color: transparent;"><xctest est.h=""></xctest></span>
#import <ocmock ock.h="">
#import "SUT.h"
#pragma mark - private declarations
/*
* Declare your SUT's private properties and
* methods in this category.
*/
@interface SUT (Testing)
@property (nonatomic, strong) id aPrivateProperty;
- (BOOL) aPrivateMethod;
@end
#pragma mark -
/*
* The class declaration goes into the .m file.
*/
@interface SUT_Tests : XCTestCase
@property (nonatomic, strong) SUT *sut;
@property (nonatomic, strong) id sutMock;
@end
#pragma mark -
@implementation SUT_Tests
- (void)setUp
{
[super setUp];
self.sut = [[SUT alloc] initWithDesignatedInitializer]];
self.sutMock = OCMPartialMock(self.sut);
}
- (void)tearDown
{
[self.sutMock stopMocking];
self.sutMock = nil;
self.sut = nil;
[super tearDown];
}
#pragma mark - tests
/*
* Your unit tests go here.
*/
- (void)testYourSUT
{
}</ocmock></code></pre>
Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-71619843266285677302012-12-14T06:43:00.000-08:002015-05-27T02:17:28.330-07:00Recommended Start-Up Books<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">Hi folks</span><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">,</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<div>
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">if you ever wanted to found a start-up and are still looking for some advice, I recommend the following three books that helped me to sharpen my understanding of a start-up's basic building blocks and it's inner workings.</span></div>
<h1 class="parseasinTitle" style="color: black; font-size: 1.7em; font-weight: normal; margin-bottom: 0px; margin-top: 0px;">
<span id="btAsinTitle" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></h1>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPMSHE8Oc1X5-WFdjdFQwoC2pwnkODDOE9rQgftbcshshSCgYXpwI2n0N35egCvzYWMZjyvnEYJYzz7lM-hU5zchK0UDsFdtKCD4STFdsM8RDdarHcnMWRar2lkdFranfwIAREabcS-o2X/s1600/bmg_cover.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><img border="0" height="155" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPMSHE8Oc1X5-WFdjdFQwoC2pwnkODDOE9rQgftbcshshSCgYXpwI2n0N35egCvzYWMZjyvnEYJYzz7lM-hU5zchK0UDsFdtKCD4STFdsM8RDdarHcnMWRar2lkdFranfwIAREabcS-o2X/s200/bmg_cover.png" width="200" /></span></a><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span id="btAsinTitle">The first one is </span><a href="http://rcm-de.amazon.de/e/cm?t=sodecon-21&o=3&p=8&l=as1&asins=0470876417&ref=tf_til&fc1=000000&IS2=1&lt1=_top&m=amazon&lc1=0000FF&bc1=FFFFFF&bg1=FFFFFF&npa=1&f=ifr">Business Model Generation: A Handbook for Visionaries, Game Changers, and Challengers</a>. This book will help you to define your initial product vision in terms of a business model. This books introduces you to a tool called the <i>Business Model Canvas</i> (BMC). The BMC will guide you step-by-step through the creation of a business model. Once you have defined your business model with the help of the BMC, you will find it much easier to communicate your business model to others and have a good starting point for your start-up.</span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcCRxHlu4sRFGmvSZqYCWinIdo7HOYbDc1RBSbsKKsFBf9R1z62VRqVMck0DRF61Djbf3grCxNjVcU0g6_rHI4pPdUS4ix9oLIgLkJ0144PeAu2FZE3C59dOHwGG_wbK9RAK9cZpnzoPbO/s1600/lean_startup_cover.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcCRxHlu4sRFGmvSZqYCWinIdo7HOYbDc1RBSbsKKsFBf9R1z62VRqVMck0DRF61Djbf3grCxNjVcU0g6_rHI4pPdUS4ix9oLIgLkJ0144PeAu2FZE3C59dOHwGG_wbK9RAK9cZpnzoPbO/s200/lean_startup_cover.png" width="164" /></span></a></div>
<div>
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">The second recommended reading is <a href="http://rcm-de.amazon.de/e/cm?t=sodecon-21&o=3&p=8&l=as1&asins=0670921602&ref=tf_til&fc1=000000&IS2=1&lt1=_top&m=amazon&lc1=0000FF&bc1=FFFFFF&bg1=FFFFFF&npa=1&f=ifr">The Lean Startup</a> by Eric Ries. Eric introduces you to a methodology - the <i>Lean Startup Methodology</i> - which describes how you should run your start-up. While the <i>Business Model Canvas</i> is used to define your start-up's business model, the <i>Lean Startup Methodology</i> describes how you should implement this </span><span style="font-family: Arial, Helvetica, sans-serif;">business model: incrementally in short iterations.</span><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> It will help you in managing your precious time and money before running out of them. If you have never run a start-up before, you will find a perfect coach in Eric.</span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_jZaKwwf-ZdfLBXf7_OUVKkBtSHqaHsekFDWRncKdVV1hVS-2tzGQGpGFKcyxSiI6NeeY5DrVmaTaU-fQuWyNFq3vXdeP1inrqlxKNNhaglyvN7A9nW6H44H2kQrsuLfG401evUidc_7g/s1600/runninglean_cover.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_jZaKwwf-ZdfLBXf7_OUVKkBtSHqaHsekFDWRncKdVV1hVS-2tzGQGpGFKcyxSiI6NeeY5DrVmaTaU-fQuWyNFq3vXdeP1inrqlxKNNhaglyvN7A9nW6H44H2kQrsuLfG401evUidc_7g/s200/runninglean_cover.png" width="112" /></span></a></div>
<div>
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="color: #222222; line-height: 16px;">Ash Maurya</span> combines the <i>Business Model Canvas</i> and the <i>Lean Startup Methodology</i> in his book <a href="http://rcm-de.amazon.de/e/cm?lt1=_top&bc1=FFFFFF&IS2=1&npa=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=sodecon-21&o=3&p=8&l=as1&m=amazon&f=ifr&ref=tf_til&asins=1449305172">Running Lean</a>. He presents an adopted version of the <i>Business Model Canvas</i> called the <i>Lean Canvas. </i>He shows you how to apply the <i>Lean Startup Methodology</i> in conjunction with the <i>Lean Canvas</i>. The two previous books teach you the tools. This book shows you how to use these tools. Ash takes you through the development of one of his start-ups step-by-step. He defines a <i>Lean Canvas</i> and walks you through the complete implementation of an initial product vision. If you have read "The Lean Startup" and cannot wait to apply the <i>Lean Startup Methodology</i>, read this book before you get your hands dirty.</span></div>
Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-48490903403227000362012-08-14T06:52:00.001-07:002015-05-27T02:45:10.654-07:00iOS Multithreading: Thread Safety in iOS ApplicationsIn this post I will exemplify what it means if the objective c code of your iOS application is not thread safe. First, I will cover some basics that will be helpful to understand thread safety. With these basics at hand we will do some experiments to explore the nature of not thread safe code. Finally, I will outline a tool which we use at <a href="http://www.orderbird.com/">orderbird</a> to analyze our code for potential thread safety issues.<br />
<br />
This post does not cover tools or strategies for multi-threaded programming but will point you to sources that cover this topic.<br />
<br />
<h3>
1) Threading Basics </h3>
<br />
When your app is started iOS creates a new process and memory is allocated for this app-process. In simplified terms, the memory of an app-process consists of three blocks (A more detailed explanation of the memory layout of C programs can be found <a href="http://www.geeksforgeeks.org/archives/14268">here</a>):<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe3fuWip0I2LkGGFvF7VN1KyOcylIrkZKhyphenhyphentYINPCl5_lAIZrGZi7KLqKodCY2auTh69b0JniiZoee7dnmNPd8pLSe1UdCz1j2_j8NQOGFib_rBlETSlnDp4cYZcpaxMKOGA5pzCRBZD_T/s1600/memorylayout.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="56" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe3fuWip0I2LkGGFvF7VN1KyOcylIrkZKhyphenhyphentYINPCl5_lAIZrGZi7KLqKodCY2auTh69b0JniiZoee7dnmNPd8pLSe1UdCz1j2_j8NQOGFib_rBlETSlnDp4cYZcpaxMKOGA5pzCRBZD_T/s200/memorylayout.png" width="200" /></a></div>
The <i>program memory</i> stores the machine instructions your objective c code has been compiled to. Which instruction is executed next is indicated by the Instruction Pointer (IP).<br />
<br />
The <i>heap</i> stores objects which are created with <span style="font-family: "Courier New",Courier,monospace;">[… alloc] init]</span>.<br />
<br />
The <i>stack</i> is the memory area that is used for method invocations. Methods store things like their parameters and local variables on the stack.<br />
<br />
By default an app-process consists of one thread - the main thread. If your iOS app uses multiple threads, all threads <i>share</i> the <i>program memory</i> and the <i>heap</i> but each thread has its <i>own instruction pointer </i>and<i> stack</i>. This means that each thread has its own program flow and if a method is called on one thread, the parameters and local variables cannot be seen be any other thread. But the objects that are created on the <i>heap</i> can be seen, accessed, and <i>manipulated by all threads</i>.<br />
<br />
<h3>
2) Experiment</h3>
<br />
Now, let us start our little experiment. Open Xcode and create a new project (choose the template "Empty Application"). Create a class named "FooClass" as depicted in the following:<br />
<br />
<pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> @interface FooClass {}
@property (nonatomic, assign) NSUInteger value;
- (void)doIt;
@end
@implementation FooClass
@synthesize value;
- (void)doIt {
self.value = 0;
for (int i = 0; i < 100000; ++i) {
self.value = i;
}
NSLog(@"after execution: %d (%@)", self.value, [NSThread currentThread]);
}
@end </code></pre>
<br />
This class has an integer property named <span style="font-family: "Courier New",Courier,monospace;">value</span> that is incremented 100000 times in the <span style="font-family: "Courier New",Courier,monospace;">doIt</span> method. At the end of <span style="font-family: "Courier New",Courier,monospace;">doIt</span> <span style="font-family: "Courier New",Courier,monospace;">self.value</span> is logged to the console with the information on which thread <span style="font-family: "Courier New",Courier,monospace;">doIt</span> is executed. In order to execute the <span style="font-family: "Courier New",Courier,monospace;">doIt</span> method, create a method called <span style="font-family: "Courier New",Courier,monospace;">_startExperiment</span> in your project's AppDelegate and call this method in its <span style="font-family: "Courier New",Courier,monospace;">application:didFinishLaunchingWithOptions:</span> method:<br />
<br />
<pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> - (void)_startExperiment {
FooClass *foo = [[FooClass alloc] init];
[foo doIt];
[foo release];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// …
[self _startExperiment];
return YES;
}
</code></pre>
<br />
If we run our experiment by starting the iOS simulator (cmd + R), the <span style="font-family: "Courier New",Courier,monospace;">_startExperiment</span> method is called, an instance of <span style="font-family: "Courier New",Courier,monospace;">FooClass</span> is created on the heap and <span style="font-family: "Courier New",Courier,monospace;">doIt</span> is called on this instance. As expected, the console log (shift + cmd + c) shows 99999 for <span style="font-family: "Courier New",Courier,monospace;">self.value</span>. Nothing special so far: <span style="font-family: "Courier New",Courier,monospace;">doIt</span> is invoked on the main thread and it behaves as expected.<br />
<br />
<h3>
3) Thread Safety</h3>
<br />
Let us execute <span style="font-family: "Courier New",Courier,monospace;">doIt</span> in parallel on multiple threads:<br />
<br />
<pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> - (void)_startExperiment {
FooClass *foo = [[FooClass alloc] init];
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
for (int i = 0; i < 4; ++i) {
dispatch_async(queue, ^{
[foo doIt];
});
}
[foo release];
}
</code></pre>
<br />
If you execute this multi-threaded version of <span style="font-family: "Courier New",Courier,monospace;">_startExperiment</span>, you will get an output like this (the concrete values will differ from the output that I am posting):<br />
<br />
<pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> after execution: 19851 (NSThread: 0x6b29bd0>{name = (null), num = 3})
after execution: 91396 (NSThread: 0x6b298f0>{name = (null), num = 4})
after execution: 99999 (NSThread: 0x6a288a0>{name = (null), num = 5})
after execution: 99999 (NSThread: 0x6b2a6f0>{name = (null), num = 6})
</code></pre>
<br />
Ouch … not on all threads <span style="font-family: "Courier New",Courier,monospace;">self.value</span> is 99999 as we expected (If your execution produces a correct result - on all threads <span style="font-family: "Courier New",Courier,monospace;">self.value</span> is 99999 - re-execute it until an incorrect result is produced. It definitely will.). <br />
<br />
Why do not all threads produce a correct result? Well, because our code is not thread safe.<br />
<br />
<i>Your code is thread safe if it behaves in the same way in a multi-threaded environment as it does in a single-threaded environment.</i><br />
<br />
As we observed above, the method <span style="font-family: "Courier New",Courier,monospace;">doIt</span> is not thread safe because it does not produce the same result in a multi-threaded environment as it does in a single-threaded environment.<br />
<br />
But what is the reason for this behavior? As stated in the beginning, <i>each thread has its own instruction pointer (IP) and stack but all threads share the complete heap</i>. Since the instance of <span style="font-family: "Courier New",Courier,monospace;">FooClass</span> is allocated on the heap and thus shared among all threads, the threads interfere while executing <span style="font-family: "Courier New",Courier,monospace;">doIt</span>. Let's take a closer look at this interference. We consider the execution of the <span style="font-family: "Courier New",Courier,monospace;">doIt</span> method on two threads <i>Thread1</i> and <i>Thread2</i>:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhff6lpduDpV-WbvpMsSHL7mh46AHWTk28y4mLqevh1dUvUZPWznlSQQM8FyCHYua3u1a9HUCerSPG6XUjea33wj1s7nXCtlCrxgwvvfNy7GoKKj2CdVaiHqoXwYTEBvazGMjJ2UvVMJTEA/s1600/threadInterference.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhff6lpduDpV-WbvpMsSHL7mh46AHWTk28y4mLqevh1dUvUZPWznlSQQM8FyCHYua3u1a9HUCerSPG6XUjea33wj1s7nXCtlCrxgwvvfNy7GoKKj2CdVaiHqoXwYTEBvazGMjJ2UvVMJTEA/s640/threadInterference.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The <i>instruction pointer (IP)</i> of <i>Thread1</i> points to the logging of <span style="font-family: "Courier New",Courier,monospace;">self.value</span> but did not execute the logging yet. At this point <span style="font-family: "Courier New",Courier,monospace;">self.value</span> is set to 99999. Now, <i>Thread2</i> continues executing <span style="font-family: "Courier New",Courier,monospace;">doIt</span>. Its <i>IP</i> points to the assignment inside the for loop. We assume that <span style="font-family: "Courier New",Courier,monospace;">self.value</span> is set to 91396 in the for-loop on <i>Thread2</i>. Uups. If <i>Thread1</i> continues execution, <span style="font-family: "Courier New",Courier,monospace;">self.value</span> is not set to 99999 anymore but to 91396. <i>Thread1</i> logs <span style="font-family: "Courier New",Courier,monospace;">self.value</span> and 91396 is printed. Since <span style="font-family: "Courier New",Courier,monospace;">doIt</span> does not prevent threads from interfering with each other while executing it, its implementation is not thread safe.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
One possible way to make <span style="font-family: "Courier New",Courier,monospace;">doIt</span> thread safe is to synchronize its body using the <a href="https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Multithreading/ThreadSafety/ThreadSafety.html#//apple_ref/doc/uid/10000057i-CH8-SW3"><span style="font-family: "Courier New",Courier,monospace;">@synchronized <span style="font-family: Times,"Times New Roman",serif;">compiler directive</span></span></a><span style="font-family: Times,"Times New Roman",serif;">:</span></div>
<br />
<pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> - (void)doIt {
@synchronized(self) {
self.value = 0;
for (int i = 0; i < 100000; ++i) {
self.value = i;
}
NSLog(@"after execution: %d (%@)", self.value, [NSThread currentThread]);
}
}
</code></pre>
<br />
Using the <span style="font-family: "Courier New",Courier,monospace;">@synchronized</span> directive, each thread gets exclusive access to self in <span style="font-family: "Courier New",Courier,monospace;">doIt</span>. Note that the threads cannot run in parallel anymore while executing <span style="font-family: "Courier New",Courier,monospace;">doIt</span> because the <span style="font-family: "Courier New",Courier,monospace;">@synchronized</span> directive covers the complete method body.<br />
<br />
Another way of syncing access to shared state is to <a href="http://www.fieryrobot.com/blog/2010/09/01/synchronization-using-grand-central-dispatch/">use Grand Central Dispatch (GCD)</a>.<br />
<br />
<h3>
4) How to identify not thread safe code</h3>
<br />
The experiment that I used to explain thread safety is an oversimplification of reality. In reality, you have already written your code, made some pieces run on background threads and from time to time your app is not behaving as expected. It freezes. It crashes. And you are not able to reproduce these issues.<br />
<br />
The main cause for threading issues is shared or global state. Multiple objects access a global variable, share the same object on the heap, or write to the same persistent store. In our little experiment the state that is shared among multiple threads is <span style="font-family: "Courier New",Courier,monospace;">self</span> respectively <span style="font-family: "Courier New",Courier,monospace;">self.value</span>. The identification of shared state is quite simple in our experiment but in a real world scenario it is quite hard to go through all your classes and identify methods that manipulate shared or global state.<br />
<br />
In order to make things easier I have written a convenient tool that identifies methods that are called from multiple threads. If I have the information which methods are called from multiple threads, I take a closer look at these methods. If such a method manipulates shared or global state, I make up a synchronization strategy for the state that is manipulated by this and other methods. In the following I will outline the core idea of this tool.<br />
<br />
The tool consists of four classes: the instances of <span style="font-family: "Courier New",Courier,monospace;">MultiThreadingAnalysis</span> record calls to methods on a specific thread, the classes <span style="font-family: "Courier New",Courier,monospace;">ThreadingTrace</span> and <span style="font-family: "Courier New",Courier,monospace;">MethodExecution</span> represent the result of conducting an analysis with <span style="font-family: "Courier New",Courier,monospace;">MultiThreadingAnalysis</span>, and the class <span style="font-family: "Courier New",Courier,monospace;">MultiThreadingAnalysisHook</span> is used to hook into an object and trace all method calls to this object.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8GkwWWTT9t5KPviZjIhBlvBZLcG23pGdh_bBIdCsaURI9sCQ39sKGu_SRnmyf7icsghWgFxIHUwX1y18KzjmvAy1ERKsFHIm40d0vn47MXH5hUfACWNQWxjl0u1x2d-z0xWK_vHzmn3ad/s1600/tool.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8GkwWWTT9t5KPviZjIhBlvBZLcG23pGdh_bBIdCsaURI9sCQ39sKGu_SRnmyf7icsghWgFxIHUwX1y18KzjmvAy1ERKsFHIm40d0vn47MXH5hUfACWNQWxjl0u1x2d-z0xWK_vHzmn3ad/s640/tool.png" width="600" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
The class <span style="font-family: "Courier New",Courier,monospace;">MultiThreadingAnalysis</span> offers two methods:<br />
<ul>
<li><span style="font-family: "Courier New",Courier,monospace;">recordCallToMethod:ofClass:onThread:</span> which records on which thread a method has been called. </li>
<li><span style="font-family: "Courier New",Courier,monospace;">threadingTraceOfLastApplicationRun</span> which should be called after the analysis has finished.</li>
</ul>
<br />
<pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> @interface MultiThreadingAnalysis : NSObject
- (void)recordCallToMethod:(NSString*)methodName
ofClass:(NSString*)className
onThread:(NSString*)threadID;
- (ThreadingTrace*) threadingTraceOfLastApplicationRun;
@end
</code></pre>
<br />
The result of a multi-threading analysis is an instance of <span style="font-family: "Courier New",Courier,monospace;">ThreadingTrace</span>. It consists of a set of <span style="font-family: "Courier New",Courier,monospace;">MethodExecution</span> instances each of which represents the execution of a method on a specific thread:<br />
<br />
<pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> /*
* An instance of this class captures
* which methods of which classes have been
* called on which threads.
*/
@interface ThreadingTrace : NSObject
/*
* Set of MethodExecution
*/
@property (nonatomic, readonly) NSSet *methodExecutions;
- (void)addMethodExecution:(MethodExecution*)methodExec;
@end
/*
* An instance of this class represents a call
* to a method of a specific class on a thread
* with a specific threadID.
*/
@interface MethodExecution : NSObject
@property (nonatomic, copy) NSString *methodName;
@property (nonatomic, copy) NSString *className;
@property (nonatomic, copy) NSString *threadID;
@end
</code></pre>
<br />
In order to make the recording of method calls as convenient as possible I am using <span style="font-family: "Courier New",Courier,monospace;">NSProxy</span> to hook into method calls of an object. The class <span style="font-family: "Courier New",Courier,monospace;">MultiThreadingAnalysisHook</span> inherits from <span style="font-family: "Courier New",Courier,monospace;">NSProxy</span> and intercepts all calls to a <span style="font-family: "Courier New",Courier,monospace;">target</span> object in its <span style="font-family: "Courier New",Courier,monospace;">forwardInvocation:</span> method. Before forwarding a method call to the <span style="font-family: "Courier New",Courier,monospace;">target</span> object it records the call by using an instance of <span style="font-family: "Courier New",Courier,monospace;">MultiThreadingAnalysis</span>.<br />
<br />
<pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> @interface MultiThreadingAnalysisHook : NSProxy
@property (nonatomic, strong) id target;
@property (nonatomic, strong) MultiThreadingAnalysis *analysis;
@end
@implementation MultiThreadingAnalysisHook
-(void)forwardInvocation:(NSInvocation*)anInvocation {
[self.analysis recordCallToMethod:NSStringFromSelector([anInvocation selector])
ofClass:NSStringFromClass([self.target class])
onThread:[NSString stringWithFormat:@"%d", [NSThread currentThread]]];
[anInvocation invokeWithTarget:self.target];
}
@end
</code></pre>
<br />
With the <span style="font-family: "Courier New",Courier,monospace;">MultiThreadingAnalysisHook</span> at your hands you can hook the multi-threading analysis into your code as proposed in the following. Create a private method <span style="font-family: "Courier New",Courier,monospace;">_withThreadingAnalysis</span> in the class that you want to analyze. This method creates an instance of <span style="font-family: "Courier New",Courier,monospace;">MultiThreadingAnalysisHook</span> and sets its <span style="font-family: "Courier New",Courier,monospace;">target</span> to <span style="font-family: "Courier New",Courier,monospace;">self</span>. In your <a href="http://developer.apple.com/library/ios/documentation/general/conceptual/CocoaEncyclopedia/Initialization/Initialization.html#//apple_ref/doc/uid/TP40010810-CH6-SW3">designated initializer</a> return the result of invoking <span style="font-family: "Courier New",Courier,monospace;">_withThreadingAnalysis</span>. The instance of<span style="font-family: "Courier New",Courier,monospace;"> MultiThreadingAnalysisHook</span> will transparently wrap around <span style="font-family: "Courier New",Courier,monospace;">self</span> and record all calls to <span style="font-family: "Courier New",Courier,monospace;">self</span> without the need to change any other code outside of the class which you are analyzing.<br />
<br />
<pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> @implementation YourClass
- (id)init {
//... do init stuff here
return [self _withThreadingAnalysis];
}
- (id)_withThreadingAnalysis {
MultiThreadingAnalysisHook *hook =
[[MultiThreadingAnalysisHook alloc] init];
hook.target = self;
return hook;
}
@end
</code></pre>
<br />
After you have installed the <span style="font-family: "Courier New",Courier,monospace;">MultiThreadingAnalysis</span> via the <span style="font-family: "Courier New",Courier,monospace;">MultiThreadingAnalysisHook</span> you can call <span style="font-family: "Courier New",Courier,monospace;">threadingTraceOfLastApplicationRun</span> on <span style="font-family: "Courier New",Courier,monospace;">MultiThreadingAnalysis</span> to get the trace and analyze respectively visualize it. A simple way of visualizing a trace is to produce a text file from it that looks like this:<br />
<br />
<pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">begin threading analysis for class FooClass
method doIt (_</code><code style="color: black; word-wrap: normal;">MultiThreadAccess</code><code style="color: black; word-wrap: normal;">_)
method init (_SingleThreadAccess_)
</code></pre>
<br />
If a method is accessed from multiple threads (has the <multithreadaccess> tag _MultiThreadAccess_), you can take a closer look at this method to check if it manipulates shared or global state and implement a suitable thread synchronization strategy for the manipulated state.</multithreadaccess><br />
<br />
<h3>
5) Wrap up</h3>
<br />
Your code is thread safe if it has the same behavior in a multi-threaded environment as it has in a single-threaded one. The reason for code not to be thread safe is the manipulation of shared or global state by multiple threads. Shared or global state can be a globally available persistent store, a singleton that is accessed from multiple objects, or a global variable. The identification of methods that are accessed from multiple threads can be helpful to discover unsynchronized access to global or shared state and to devise a suitable synchronization strategy. The identification of such methods can be automated by leveraging the interception facilities of <span style="font-family: "Courier New",Courier,monospace;">NSProxy</span>, the recording of method calls, and the visualization of the recorded method calls. Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com1tag:blogger.com,1999:blog-9012523243285862585.post-44799997391693168362012-04-20T03:15:00.000-07:002015-05-27T02:46:00.160-07:00Wie ich im ersten Jahr mit meinem Startup nicht auf die Fresse fliege<div style="text-align: justify;">
<div style="text-align: left;">
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Am
Anfang jeder Gründung steht der Business Plan. Sollte er zumindest.
Selten wird dieser jedoch aus eigener Motivation heraus geschrieben.
Formale Vorgaben wie Mindestseitenanzahl machen das Schreiben eines
Business Plans zu einem ähnlichen Vergnügen wie das Schreiben einer
Abschlussarbeit.</span></span></span><span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"> Zumal das Verfassen eines Dokumentes den Eindruck
vermittelt, es handelt sich hierbei um einen bürokratischen Prozess,
der zwar durch Aufteilung in einzelne Abschnitte kollaborativ und
damit etwas lebendig gestaltet werden kann, aber schlussendlich nur
das stumpfe Befüllen von Seiten ist.</span></span></span><span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"> Doch das Gegenteil ist der
Fall. Ein Businessplan ist der lebendige Fokus eines Unternehmens.
Die einzelnen Bestandteile müssen von allen Beteiligten in enger
Zusammenarbeit erdacht, verstanden und letztendlich auch zu Papier
gebracht werden. Was in dieser engen Zusammenarbeit entsteht, ist
kein Plan, sondern das Modell eines Unternehmens.</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Ohne
ein solches Modell ist ein Start-Up allem Enthusiasmus zum Trotz zum
Scheitern verurteilt, denn ohne ein Business-Modell gibt es kein
Gesamtziel für das Unternehmen. Ihr werdet eine Produktidee und
vielleicht schon einen ersten Kunden haben, aber noch lange keine
klar formulierte Strategie für die ersten Monate eures Unternehmens.
Mit einem gut durchdachten Business-Modell seid ihr davor gewappnet
in der Anfangsphase ins Leere zu laufen, oder anders ausgedrückt,
auf die Fresse zu fliegen.</span></span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></span></div>
</div>
</div>
<h3>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Business Plan vs. Business Modell</span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></h3>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Was
beim Verfassen eines Business-Plans am meisten ausbremst, ist die
Benennung selbst. Ein Plan. Was für ein Plan? Ein Ein-, Zwei- oder
vielleicht Dreijahresplan? Ein Unternehmen kann man nicht planen. Ein
Unternehmen muss man leben. Nicht in den Tag hinein, aber mit klar
definierten Zielen. Und Ziele sind letztendlich eine von vielen
möglichen Realitäten - sie sind ein Modell der Zukunft. Und das ist
es, was eigentlich bei der Erstellung eines Business Plans passiert:
die Modellierung eines Unternehmens. Solch ein Unternehmensmodell
(Business Model) hält fest, welche Ziele ein Unternehmen in welchem
Kontext erreichen will.</span></span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></span></div>
</div>
</div>
<h3>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Business Model Canvas</span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></h3>
<br />
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Ein Werkzeug, das uns bei </span></span><a href="http://www.orderbird.com/"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">orderbird</span></span></a><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"> besonders in der Startphase geholfen hat, Unternehmensziele und auch ihren Kontext
zu formulieren, ist die Business Model Canvas (BMC).</span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Die
BMC ist ein Werkzeug, um Business-Modelle zu erdenken und zu
analysieren. Vor allem liefert sie uns aber eine gemeinsame Sprache,
um Business-Modelle klar darzustellen. Diese Sprache besteht aus 9
Konzepten, die ich euch in 10 Minuten nahe bringen werde. Ich werde
jedes Konzept mit praktischen Beispielen aus orderbirds
Gründungsphase untermalen.</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"></span></span></div>
</div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
<h4 style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Kundensegmente (Customer segments)</span></span></i></h4>
<div>
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></div>
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBJk-vADkluJVCZ0OesTCjDsQG5x7eOwVhXpBuCLOLYynrt-B_LNKlKdjiRBhHbZ7s89LE7PO0ndCS6vUFKar4wpwYN6jHMdls9wdfGkpxeOmI5xNWIjOB_4ILKIBGjlA4cqdfdTqBkCH0/s1600/customer_segments.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: left;"><img border="0" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBJk-vADkluJVCZ0OesTCjDsQG5x7eOwVhXpBuCLOLYynrt-B_LNKlKdjiRBhHbZ7s89LE7PO0ndCS6vUFKar4wpwYN6jHMdls9wdfGkpxeOmI5xNWIjOB_4ILKIBGjlA4cqdfdTqBkCH0/s320/customer_segments.png" width="320" /></a><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Stellt
euch die Frage, an wen genau ihr euer Produkt/Lösung verkaufen wollt
- segmentiert den Markt. </span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Gerade
zu Beginn ist eure Zielgruppe nicht genau definiert. Je genauer ihr
aber in der Lage seid, euren Kunden zu beschreiben, desto passendere
Lösungen könnt ihr ihm verkaufen.</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"></span></span>
<br />
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="background-color: #6fa8dc;"><br /></span></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="background-color: #6fa8dc;"><span style="color: #3d85c6;"><span style="background-color: white;">Für orderbird haben wir u.a. die Segmentierung nach folgenden Kriterien vorgenommen:</span></span></span></span></span></div>
</div>
<ul><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="background-color: #6fa8dc;"><span style="color: #3d85c6;"><span style="background-color: white;">
</span></span></span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="background-color: #6fa8dc;"><span style="color: #3d85c6;"><span style="background-color: white;">Rolle im Unternehmen: Wird ein Inhaber, Oberkellner, oder Kellner unser Produkt kaufen?</span></span></span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="background-color: #6fa8dc;"><span style="color: #3d85c6;"><span style="background-color: white;">
</span></span></span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="background-color: #6fa8dc;"><span style="color: #3d85c6;"><span style="background-color: white;">Art des Unternehmens: Verkaufen wir an Restaurants, Bars oder Cafes</span></span></span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="background-color: #6fa8dc;"><span style="color: #3d85c6;"><span style="background-color: white;">
</span></span></span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="background-color: #6fa8dc;"><span style="color: #3d85c6;"><span style="background-color: white;">Größe des Unternehmens: Wieviele Angestellte, wieviele Tische haben die?</span></span></span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></ul>
<h4 style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></h4>
<h4 style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
Wertversprechen (Value Proposition)</span></span></i></h4>
<div>
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></div>
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqmHAKEdche251NVJBxXlDQEtKGAfCDAGCiMSWZ3ldzcckSgPwuzQOESigAekCDnfNPGqq3ynY7K4YcD5u7FWZx7ZIqmE5NDN2UjYLJVMVh1mPXVthwDFp7zW5w834ImZIveL-fhVncfbV/s1600/value_propositions.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: left;"><img border="0" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqmHAKEdche251NVJBxXlDQEtKGAfCDAGCiMSWZ3ldzcckSgPwuzQOESigAekCDnfNPGqq3ynY7K4YcD5u7FWZx7ZIqmE5NDN2UjYLJVMVh1mPXVthwDFp7zW5w834ImZIveL-fhVncfbV/s320/value_propositions.png" width="320" /></a><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Was
wollt ihr euren Kunden verkaufen, welches Problem löst ihr?</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Wenn
das oder die Kundensegmente klarer umrissen sind, ist es viel
leichter zu entscheiden, ob euer Unternehmen mit seiner Lösung
wirklich ein Problem der Kunden lösen kann.</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"></span></span>
<br />
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Für orderbird sieht das so aus:
</span></span></span></div>
<ul><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Inhaber: Will die volle Kontrolle über seine Mitarbeiter, von überall aus - </span></span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">"Wie viel Umsatz wurde bis jetzt in Filiale 2 gemacht?"</span></span></span></i></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Oberkellner: Will Konflikte im laufenden Betrieb schnell aufklären - </span></span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">"Wer hat 100 Schnitzel mit Nutella bestellt?"</span></span></span></i></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Kellner: Will genau wissen, wieviel Geld er am Ende des Tages verdient hat - </span></span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">"Ich muss mir sicher sein können, dass meine Kasse stimmt."</span></span></span></i></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></ul>
<h4 style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></h4>
<h4 style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
Kanäle (Channels)</span></span></i></h4>
<div>
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihTNZt_mFXvX1RcA3vkXMjTe00cETOMLBEB1xm7iN0nT8fCKUSCRTd11JJd_1aXaqHGmTiGhpTm00l51-vp3XCB_i9JIp3iznlnt0gizY5GUqeBVMOoRmXdT29qlb4NafTw7IlJVn8QXp9/s1600/channels.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: left;"><img border="0" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihTNZt_mFXvX1RcA3vkXMjTe00cETOMLBEB1xm7iN0nT8fCKUSCRTd11JJd_1aXaqHGmTiGhpTm00l51-vp3XCB_i9JIp3iznlnt0gizY5GUqeBVMOoRmXdT29qlb4NafTw7IlJVn8QXp9/s320/channels.png" width="320" /></a></div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Wie
kann euer Unternehmen seine potentiellen Kunden erreichen? Viel
wichtiger: Wie wollen sie erreicht werden? </span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Wenn
ihr euch über die Erreichbarkeit eurer Kunden Gedanken macht, geht
in fünf Schritten vor:</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"></span></span></div>
</div>
<ol><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Wie erregt ihr Aufmerksamkeit?
</span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Wie erlaubt ihr euren Kunden eure Lösung zu beurteilen?
</span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Wie können Kunden euer Produkt kaufen?</span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Wie wird es geliefert?
</span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Wie betreut ihr eure Kunden nach dem Kauf?</span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></ol>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">orderbird:</span></span></span></div>
<ol><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Gastronomie Magazine, v.a. aber Mund-zu-Mund
</span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Kostenlose Variante im App Store
</span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Online Shop (Hardware und Lizenz)
</span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Software als CD vertrieben, Hardware mit der Kutsche ;)
</span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Telefon-Support</span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></ol>
<h4 style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></h4>
<h4 style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
Kundenbeziehung (Customer Relationships)</span></span></i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></h4>
<div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpWbhhXFOs1ZwOuUSeCujpn5BqPx-N09-wI1GrE1qYRYQOjUXDxTPWL8syWOh_V_LoLRGhn89zwuEF4_woccF-IWg1M9lgBPbD_JkTWHanFH_yWck7eIu-ULytDAnv52ATgpgh-HwfxDhy/s1600/customer_relationships.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: left;"><img border="0" height="175" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpWbhhXFOs1ZwOuUSeCujpn5BqPx-N09-wI1GrE1qYRYQOjUXDxTPWL8syWOh_V_LoLRGhn89zwuEF4_woccF-IWg1M9lgBPbD_JkTWHanFH_yWck7eIu-ULytDAnv52ATgpgh-HwfxDhy/s320/customer_relationships.png" width="320" /></a></div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Wie behaltet ihr einen guten draht zu euren Kunden? ... sie sollen ja wieder kommen und mehr kaufen! </span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Bei den Kanälen steht v.a. die Frage im Vordergrund wie die Kunden erreicht werden wollen. Das gilt verstärkt bei der Kundenbeziehung. </span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Je nach Kundensegment müsst ihr eine andere Strategie umsetzen. </span></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Wie wir bei orderbird gemerkt haben, erwarten fast alle Inhaber einen telefonischen Support, wenn nicht sogar Vor-Ort-Service.
Kellner sind meist jünger und haben kein Problem damit, im Online-Handbuch nachzuschlagen. </span></span></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Die falsche Strategie bei der Kundenbeziehung kann euer Wertversprechen unter Umständen stark abschwächen, da sich die Kunden
allein gelassen fühlen.</span></span></div>
</div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
<h4 style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
Einkommensströme (Revenue Streams)
</span></span></i></h4>
<div>
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqojjFo8HyxS25JUAEfg_4PkQRmZ29X16eFkhsgweYVzXJW6kpHf2csaYeftItm4ce2wE8aVhuvI8rwe_iGFLXnWlCT8XeA7GyOQVta1kEwr39vOEZULzqusYUlNZo4I37BBcjHwja2_hyphenhyphen/s1600/revenue_streams.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: left;"><img border="0" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqojjFo8HyxS25JUAEfg_4PkQRmZ29X16eFkhsgweYVzXJW6kpHf2csaYeftItm4ce2wE8aVhuvI8rwe_iGFLXnWlCT8XeA7GyOQVta1kEwr39vOEZULzqusYUlNZo4I37BBcjHwja2_hyphenhyphen/s320/revenue_streams.png" width="320" /></a></div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Klar.
Wie wollt ihr Geld machen? Nehmt aber auch hier wieder die
Perspektive eurer Kunden (Segmente) ein! Für was sind sie bereit zu
bezahlen?</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Hier
ist eine gut durchdachte Kundensegmentierung sehr hilfreich. Wenn ihr
wisst, wem ihr was verkaufen wollt, könnt ihr auf jeden Fall in
Erfahrung bringen, was eure potentiellen Kunden zur Zeit ausgeben.
Wenn ihr wisst, was sie für ihre jetzige "Lösung"
bezahlen, habt ihr einen Anhaltspunkt um herauszufinden, für was sie
bereit sind zu bezahlen und wie sie bezahlen.</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"></span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Es gibt verschiedene Arten von Einkommensströmen:
</span></span></div>
</div>
<ul><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Einmaliger Verkauf
</span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Verbrauchsgebunden - je mehr ein Kunde verbraucht, desto mehr bezahlt er (z.B. Datenflatrates eines Mobilfunkanbieters)
</span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Abonnement - für eine z.B. monatliche Gebühr kann ein Kunde einen Dienst so oft benutzen, wie er will (z.B. Musik-Streaming-Dienste)
</span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Vermietung</span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Lizenzierung - ein Kunde darf eure Technologie in seinen Produkten verwenden</span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></ul>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Wichtig
ist, dass ihr euch hier noch keine Gedanken über ein konkretes
Preismodell macht. Dies ist generell eine der herausforderndsten
Aufgaben und in der Anfangsphase eures Unternehmens noch schwieriger
zu lösen als später.</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">orderbird:
</span></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;"><br /></span></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Wir möchten Inhabern ein Abomodell anbieten - sie können unsere Dienste wie z.B. das Online-Reporting für x Euro so oft benutzen, wie sie möchten.
Dieses Modell kommt allerdings nicht besonders gut an - obwohl es für unsere Kunden flexibler wäre, möchte sie lieber einmalig den 100fachen Betrag
bezahlen, um ein Gefühl der "Sicherheit" zu haben - der Markt hat seine eigene Logik.</span></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Bis hierhin habt ihr die wichtigsten Punkte, um einen guten Pitch auf die Bühne zu bringen. Ihr wisst genau, wem ihr was verkaufen wollt, wie ihr
eure Lösung in den Markt bringt und wie ihr Geld einnehmen wollt. Die noch folgenden Konzepte der BMC setzen sich mehr mit der Umsetzung eures
Business Models auseinander.</span></span></i></div>
</div>
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></div>
<h4 style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
Schlüsselresourcen (Key Resources)
</span></span></i></h4>
<div>
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlPkZEe99UGGKS4o0JbKtDpFefb-_YqwBTgyEhGX0KNOKbLUPFTiuGlT-MTF72AYFNVnsPCjjgjSR2ARJouRtNbk4p7tf7m_igZIyqOs_WvwM8Co2tjhHrgjbzj1pAUcVqHu-IRidxmrZU/s1600/Key_Resources.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: left;"><img border="0" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlPkZEe99UGGKS4o0JbKtDpFefb-_YqwBTgyEhGX0KNOKbLUPFTiuGlT-MTF72AYFNVnsPCjjgjSR2ARJouRtNbk4p7tf7m_igZIyqOs_WvwM8Co2tjhHrgjbzj1pAUcVqHu-IRidxmrZU/s320/Key_Resources.png" width="320" /></a></div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Was braucht ihr, um eure Lösung anzubieten, sie zu entwickeln, Kanäle zu bedienen, die Kundenbeziehung aufrecht zu erhalten?
</span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Bei orderbird sind Schlüsselresourcen:
</span></span></span></div>
</div>
<div>
<ul><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Softwareentwickler
</span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">PR und Sales Team
</span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li style="text-align: left;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Hardware Supply Chain</span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></ul>
<div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
</div>
<h4 style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
Schlüsselaktivitäten (Key Activities)
</span></span></i></h4>
<div>
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></div>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgoIDDNRmGmsDoOGTxm8MHpV_KnMr2-KjVdv68YkN6C_CGs7newSY0iCqIgxXEe0Q6V7lnbcC4LsouAOvx2BuUE0cH5HpgFbFdpBJPPxfXispOfTEi5Al9dwTAaRy5burLCTaRsoXOMi9i/s1600/Key_Activitites.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: left;"><img border="0" height="168" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgoIDDNRmGmsDoOGTxm8MHpV_KnMr2-KjVdv68YkN6C_CGs7newSY0iCqIgxXEe0Q6V7lnbcC4LsouAOvx2BuUE0cH5HpgFbFdpBJPPxfXispOfTEi5Al9dwTAaRy5burLCTaRsoXOMi9i/s320/Key_Activitites.png" width="320" /></a></div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">So
banal es klingen mag, aber was sind die wichtigsten Schritte, um
eurer Business Modell umzusetzen? Eure Schlüsselressourcen kosten
euch viel Geld. Setzt sie gewissenhaft ein.</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">In
der täglichen Arbeit verliert man sich schnell in Kleinigkeiten.
Hier hilft ein täglicher Blick auf die Liste der
Schlüsselaktivitäten, um den Fokus nicht zu verlieren. Diese Liste
sollte nicht mehr als 5 Einträge enthalten und sollte wöchentlich
aktualisiert werden, um sich immer wieder zu fragen, was eigentlich
wichtig ist.</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"></span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Hier mal eine unserer Listen mit den Fragen, die wir uns stellten, ob unsere gerade ausgeführten Aktivitäten wichtig sind:
</span></span></span></div>
</div>
<ul><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li><div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Reports für das Controlling entwickeln </span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span><div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">(</span></span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Muss das User Interface der App verbessert werden, wenn noch nicht alle wichtigen Reports eingebaut sind?</span></span></span></i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">)</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li><div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Hardwarelieferanten in unser Router-Konfigurationswerkzeug einweisen </span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span><div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">(</span></span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Müssen wir jetzt Angebote für die Schutzhüllen einholen? Ohne unsere Einweisung kann die Hardware nicht konfiguriert und ausgeliefert werden.</span></span></span></i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">) </span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li><div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Messeauftritt vorbereiten </span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span><div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">(</span></span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Müssen wir jetzt die Webseiteninternationalisierung mit der Agentur besprechen? Wir brauchen doch noch Flyer und Aufsteller.</span></span></span></i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">) </span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li><div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Serveradministrator rekrutieren </span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span><div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">(</span></span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Müssen wir uns jetzt Serverangebote einholen und auswerten? Das kann doch der Admin machen.</span></span></span></i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">) </span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span>
<li><div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Support-Telefonanlage konfigurieren </span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">
</span></span></span><div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">(</span></span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Müssen wir uns jetzt Gedanken über die Warteschleifenansage machen? Alle Supportanrufe kommen gerade auf nur einem Telefon an.</span></span></span></i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">)</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></li>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></ul>
</div>
<h4 style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Schlüsselpartnerschaften (Key Partnerships)</span></span></i></h4>
<div>
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></div>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJSDmptDP4Q928D7H_mlR8VKGzYsGY83XyoyAozS_aRDb-9uJ6rPT-wYT4hWHNFlXL3zMa5rctvSe8l1JL4HUuKDTPvUgRyrE_nZtZF1HEOVw85lMVQhJmMHitU56tgwYzhDLZON6i6SJx/s1600/Key_Partnerships.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: left;"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJSDmptDP4Q928D7H_mlR8VKGzYsGY83XyoyAozS_aRDb-9uJ6rPT-wYT4hWHNFlXL3zMa5rctvSe8l1JL4HUuKDTPvUgRyrE_nZtZF1HEOVw85lMVQhJmMHitU56tgwYzhDLZON6i6SJx/s320/Key_Partnerships.png" width="320" /></a></div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Bei
der Kundensegmentierung und der damit einhergehenden Verfeinerung des
Wertversprechens werdet ihr häufig feststellen, dass ihr nicht alle
Schlüsselressourcen für die Umsetzung im Unternehmen habt. Ihr
braucht also Partner. Versucht alles auszulagern, das nicht von eurem
Team professionell erledigt werden kann.</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><span style="color: #3d85c6;">Bei orderbird war dies zum Beispiel der Hardwareversand. Wir hatten kein Lager und auch keine Erfahrung mit Warenwirtschaft.
Also raus damit.</span></span></span></div>
</div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
</div>
<h4 style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
Cost Structure
</span></span></i></h4>
<div>
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></div>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGl1VRNR3XX6TlgOgGiHNbwIh8Pz5JbznDkbta26c1Q7qBL300NZ7DWxMfgNKa3R5xvt-17v-A_UTuh8VHSUdT9wAuAr4rVdy8RchjTtZ66K12cdRxPOuBYWynIavicFy2fQh90Rb8urs3/s1600/Cost_Structure.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: left;"><img border="0" height="169" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGl1VRNR3XX6TlgOgGiHNbwIh8Pz5JbznDkbta26c1Q7qBL300NZ7DWxMfgNKa3R5xvt-17v-A_UTuh8VHSUdT9wAuAr4rVdy8RchjTtZ66K12cdRxPOuBYWynIavicFy2fQh90Rb8urs3/s320/Cost_Structure.png" width="320" /></a></div>
<div style="text-align: justify;">
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Was
kosten euch eure Schlüsselressourcen, Schlüsselaktivitäten, Kanäle
etc.? Wie viel Geld benötigt ihr, um euer Business-Modell am Laufen
zu halten? Können die Einkommensströme die Kosten abfangen?</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span>
<br />
<div style="margin-bottom: 0in;">
<span style="color: #262626;"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">An
diesem Punkt wird oftmals ersichtlich, ob es realistisch ist, euer
Modell umzusetzen. Wenn nicht, beginnt ihr an den verschiedenen
Stellschrauben zu drehen. Für höhere Einkommensströme muss ein
anderes Segment mit einem anderen Wertversprechen bedient werden. Ein
anderes Segment erfordert unter Umständen einen anderen Kanal, der
wiederum andere Kosten verursacht ...</span></span></span></div>
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"></span></span></div>
</div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Das ist die Business Model Canvas. Hier noch eine Kurzfassung:</span></span></i></div>
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></div>
<div style="text-align: left;">
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/QoAOzMTLP5s" width="560"></iframe><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">
</span></span></div>
<div style="text-align: left;">
<i><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></i></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Uns hat die BMC extrem geholfen, uns unsere Strategie für die
Anfangsphase klar zu machen. </span></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Also, schnappt euch einen Stapel Klebezettel, druckt euch mehrere Examplare der Business Model Canvas aus, setzt euch in den Park und fangt an zu modellieren! Die BMC gibt es </span></span><a href="http://www.businessmodelgeneration.com/downloads/business_model_canvas_poster.pdf"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">hier</span></span></a><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">.</span></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">Alle Bilder und Information gibt es auf </span></span><a href="http://www.businessmodelgeneration.com/"><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">www.businessmodelgeneration.com</span></span></a><span style="font-size: small;"><span style="font-family: "Verdana", sans-serif;">.</span></span></div>
</div>
Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-8905557490180910492011-12-27T05:19:00.000-08:002012-02-01T23:01:18.148-08:00orderbird - more than a POS<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCCoG9O2xIAMpcv4-zzmUbLTWX74WaitZkfegG4bl661Rsx2GuxQxs1c1Wh_CuZiFt3rBVyNbFqMZQfO9xhB2H9y2FkbkI1Lf-B9U3Va-yL-P3TBuX2MwM4OcEEzrVFrEJioNwLlFN5E08/s1600/orderbird_logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="52" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCCoG9O2xIAMpcv4-zzmUbLTWX74WaitZkfegG4bl661Rsx2GuxQxs1c1Wh_CuZiFt3rBVyNbFqMZQfO9xhB2H9y2FkbkI1Lf-B9U3Va-yL-P3TBuX2MwM4OcEEzrVFrEJioNwLlFN5E08/s200/orderbird_logo.png" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
During christmas, I had a conversation with my uncle about <a href="http://www.orderbird.com/">orderbird</a> which started like this:<br />
<br />
my uncle: <i>"Why should someone invest in orderbird? orderbird is just a <a href="http://itunes.apple.com/de/app/orderbird-pos/id449862571?mt=8">Point of Sale (POS) system</a>!"</i><br />
<br />
me: <i>"Because its not just a POS system. It will be THE platform provider for the gastronomy."</i><br />
<br />
my uncle: <i>"Platform Provider? Are you going to produce oil rigs?"</i><br />
<br />
me: <i>" ... No ... and ... No.</i><br />
<i> orderbird will bring together all stakeholders relevant to gastronomy: gastronomists, guests, suppliers. <br /><br />All of them will do their daily business with orderbird:</i><br />
<ul>
<li><i>Gastronomists run their restaurants with orderbird.</i></li>
<li><i>Guests reserve tables, place orders, and pay with orderbird.</i><i> </i></li>
<li><i>For an optimal supply chain, suppliers and gastronomists work hand-in-hand with orderbird.</i></li>
</ul>
<i>"</i><br />
<br />
.. Ok, Ok, .. I must admit that the last elevator-pitch-part was added to make the dialog more appealing.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn5swAYZcQF-7IbnDcnyEvlqToh0aQmksjlmWKwHO0GzY4Y2GrJNsUvavxSHNARVW6cqW0rR9gjIosJNxDVrNm46PJQRBRuBnyswzsZgWF4f8rk_bvclTWekNIM6YvkqmcZUw3ddSSl1Ap/s1600/orderbird_platform.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn5swAYZcQF-7IbnDcnyEvlqToh0aQmksjlmWKwHO0GzY4Y2GrJNsUvavxSHNARVW6cqW0rR9gjIosJNxDVrNm46PJQRBRuBnyswzsZgWF4f8rk_bvclTWekNIM6YvkqmcZUw3ddSSl1Ap/s320/orderbird_platform.png" width="320" /></a></div>
<br />
<div style="text-align: justify;">
Seriously, orderbird's business model can be classified as a <i><b>Multi-Sided Platform (MSP)</b></i>.</div>
<div style="text-align: justify;">
It does not strictly follow the MSP pattern as defined in <a href="http://www.businessmodelgeneration.com/book">BMG</a>. Here's why:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Using a plain MSP business model, a MSP-company can hardly run profitabel without having customers that cover ALL customer segments that make up the MSP. Related to orderbird, this means that orderbird's business model would not work if orderbird only had gastronomists, only had guests, only had gastronomists and suppliers, and so forth. </div>
<br />
<div style="text-align: justify;">
This is only partially true. Ok, if orderbird only had guests and suppliers, the business model should surely be adapted. But in some settings it can be built and scaled incrementally. While bringing one sutomer segment onto the platform, profits can be made without having to wait for another customer segment to enter the platform.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Consider the current state of the evolution of orderbird's business model. </div>
<div style="text-align: justify;">
orderbird has entered the german gastronomy market successfully having the 100st customer reachable at the end of the beta phase. Until a critical mass is reached, orderbird will improve <a href="http://itunes.apple.com/de/app/orderbird-pos/id449862571?mt=8">its POS system</a> to help gastronomists getting even more out of their business and tapping on the revenue streams generated from its POS system.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
While creating more value for gastronomists, orderbird is sketching and evaluating market entry strategies for bringing guests onto their platform. If a critical mass of customers is on the platform, the MSP model starts kicking! While offering guests an uncomplicated ordering and restaurant experience, gastronomists can profit from a better capacity utilization. And orderbird … orderbird is tapping on a new revenue stream: guest ordering. For every placed order orderbird will receive a turnover percentage. If guests pay via orderbird, a turnover percentage on these transactions is imaginable, too.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Besides the synergies among gastronomists and guests, the platform allows for better integration of gastronomists and supplier operations. Gastronomists will be able to choose from a variety of suppliers of beverages, food, and other goods they need to run their business. Suppliers can offer their products and services to a much broader audience. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Let's sum things up. If you thought about investing in orderbird, do not base your thoughts and calculations on the assumption that you will invest in a company that simply delivers a POS system. orderbird's business model follows the pattern of a Multi-sided Platform (MSP): orderbird will bring together all relevant gastronomy stakeholders. This consolidation of stakeholders will give orderbird the possibility to get a share on multiple gastronomy related markets: POS systems, guest orders and reservations, guest payments, and supply chains. The orderbird platform will be THE marketplace for the gastronomy.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjvn1mBhBAVWtRuVIPksFXpUHDbPK_-WjCqI7hMfWVMY_1U5rp5MFgYD4n-yrgUT_PAYLvlkEwrC14d-__uiA0eyE1JzkvyRYZ7PLkOJcimFs8aTwEhAZpOJ-OpJIcl4iKIacMz1dOOZJV/s1600/orderbird_awards.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjvn1mBhBAVWtRuVIPksFXpUHDbPK_-WjCqI7hMfWVMY_1U5rp5MFgYD4n-yrgUT_PAYLvlkEwrC14d-__uiA0eyE1JzkvyRYZ7PLkOJcimFs8aTwEhAZpOJ-OpJIcl4iKIacMz1dOOZJV/s320/orderbird_awards.png" width="320" /></a></div>
<div style="text-align: justify;">
Furthermore, what makes orderbird unique besides its business model is its team. The founder's talent and experience ranges from a deep understanding of the gastronomy market, to the planning and implementation of marketing and financial strategies, to a customer focussed development of software products. The founders are supported by a great team of software engineers, sales & support people, designers, partners and board of directors. The spirit and success of orderbird is reflected by the awards we earned so far.</div>
<br />
I never felt so much enthusiasm and energy in a company!!<br />
<br />
Rock on!Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com2tag:blogger.com,1999:blog-9012523243285862585.post-39824672804458748652011-11-20T06:16:00.001-08:002011-11-20T07:01:18.456-08:00Xtext Serialization: Challenges serializing enums.For the <a href="http://www.xtext.org/">Xtext</a> based modelling tool chain to model objective c (iPhone, iPad) applications for <a href="http://www.orderbird.com/">orderbird</a> I needed to manipulate an Xtext model programmatically and serialize it back to disk.<br />
I did encounter some challenges while serializing enums and want to share my experience in this post.<br />
<br />
Here is a snippet of the grammar I am using for the well known use case of entity modelling:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">EntityModel:</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> (entities += Entity)*</span><br />
<span style="font-family: "Courier New",Courier,monospace;">;</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">Entity:</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> (annotations+=Annotation)*</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> 'entity' name=ID '{' '}'</span><br />
<span style="font-family: "Courier New",Courier,monospace;">;</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">Annotation:</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> '@' option=ConfigOption (':' value=ConfigValue)?</span><br />
<span style="font-family: "Courier New",Courier,monospace;">; </span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">enum ConfigOption:</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> persistency</span><br />
<span style="font-family: "Courier New",Courier,monospace;">; </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace;">enum ConfigValue:</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> <a href="http://en.wikipedia.org/wiki/Core_Data">CoreData</a> | <a href="https://github.com/ccgus/fmdb">FMDB</a></span><br />
<span style="font-family: "Courier New",Courier,monospace;">;</span><br />
<br />
So, entities can be annotated to determine with which technology they will be stored persistently.<br />
<br />
At first glance, serialization does not seem to be a hassle. Having an <span style="font-family: "Courier New",Courier,monospace;">IResourceSetProvider</span>, I can get the model from its <span style="font-family: "Courier New",Courier,monospace;">XtextResource</span>:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">@Inject</span><br />
<span style="font-family: "Courier New",Courier,monospace;">private IResourceSetProvider provider;</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">private EntityModel loadEntityModelFromFile(IFile file) {</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> ResourceSet xrs = provider.get(file.getProject());</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true);</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> Resource resource = xrs.getResource(uri, true);</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> EntityModel em = (EntityModel)resource.getContents().get(0); </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> return em;</span><br />
<span style="font-family: "Courier New",Courier,monospace;">}</span><br />
<br />
Now I can programmatically change the model and then serialize it back to disk by saving it in a XtextResource:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">private void save(EntityModel em) {</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> ResourceSet xrs = provider.get(getProject());</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> XtextResource xr = </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> (XtextResource) xrs.getResource</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> (URI.createPlatformResourceURI(getModelPath(), true) , true);</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> xr.getContents().set(0, em);</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> Map<object, object=""> options = new HashMap<object, object="">();</object,></object,></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> SaveOptions.defaultOptions().addTo(options);</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> xr.save(options);</span><br />
<span style="font-family: "Courier New",Courier,monospace;">}</span><br />
<br />
Serializing this model:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">@persistency:CoreData</span><br />
<span style="font-family: "Courier New",Courier,monospace;">entity Foo {}</span><br />
<br />
I get:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">@persistencyentity Foo {}</span><br />
<br />
The ConfigOption is missing! Hmmm, why? Xtext somehow assumes the ConfigOption to be transient (not serializable).<br />
<br />
The Xtext documentation says "<i>The default transient value service considers a model element to be transient if it is unset or equals its default value.</i>" and "<i>By default, EMF returns false for eIsSet(..) if the value equals the default value.</i>"<br />
<br />
Looking at the generated java code for the ecore meta model, the 'CoreData' literal is defined as the default:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">/*</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> * @generated</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> */</span><br />
<span style="font-family: "Courier New",Courier,monospace;">public class AnnotationImpl extends EObjectImpl implements Annotation {</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> //... </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> protected static final ConfigValue VALUE_EDEFAULT = ConfigValue.CORE_DATA;</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> protected ConfigValue value = VALUE_EDEFAULT;</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> //...</span><br />
<span style="font-family: "Courier New",Courier,monospace;">}</span><br />
<br />
In order to tell Xtext which model elements can be considered as (non) transient, an instance of <span style="font-family: "Courier New",Courier,monospace;">ITransientValueService</span> has to be specified in your DSL's guice runtime module. This seems to be an easy task: Inherit from <span style="font-family: "Courier New",Courier,monospace;">DefaultTransientValueService</span> and overwrite<span style="font-family: "Courier New",Courier,monospace;"> isTransient(…)</span> to yield the correct semantics:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">public class DataDslTransientValueService extends DefaultTransientValueService {</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> @Override</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> public boolean isTransient(EObject owner, EStructuralFeature feature, int index) {</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> if (owner instanceof Annotation && DataDslPackage.ANNOTATION__VALUE == feature.getFeatureID()) {</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> return false;</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> }</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> return super.isTransient(owner, feature, index);</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> }</span><br />
<span style="font-family: "Courier New",Courier,monospace;">}</span><br />
<br />
… and hook it into the guice module:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">public Class bindITransientValueService() {</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> return DataDslTransientValueService.class;</span><br />
<span style="font-family: "Courier New",Courier,monospace;">}</span><br />
<br />
Damn! Still the same errorneous output:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">@persistencyentity Foo {}</span><br />
<br />
A little bit of code archeology and debugging reveals that Xtext has two distinct hierarchies of the <span style="font-family: "Courier New",Courier,monospace;">ITransientValueService</span> interface.<br />
One in the <span style="font-family: "Courier New",Courier,monospace;">package org.eclipse.xtext.parsetree.reconstr</span> and the other in the <span style="font-family: "Courier New",Courier,monospace;">package org.eclipse.xtext.serializer.sequencer</span>.<br />
<br />
My DataDslTransientValueService implemented org.eclipse.xtext.parsetree.reconstr.ITransientValueService. But this does not seem to be sufficient. Thus, I also implemented org.eclipse.xtext.serializer.sequencer.ITransientValueService:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">@SuppressWarnings("restriction")</span><br />
<span style="font-family: "Courier New",Courier,monospace;">public class SequencerTransientValueService extends TransientValueService {</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> public ValueTransient isValueTransient(EObject semanticObject, EStructuralFeature feature) {</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> if (semanticObject instanceof Annotation && DataDslPackage.ANNOTATION__VALUE == feature.getFeatureID()) {</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> return ValueTransient.NO;</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> }</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"> return super.isValueTransient(semanticObject, feature);</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> }</span><br />
<span style="font-family: "Courier New",Courier,monospace;">}</span><br />
<br />
My DSL's guice runtime module contains these two bindings for ITransientValueService:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">public Class bindITransientValueService() {</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> return DataDslTransientValueService.class;</span><br />
<span style="font-family: "Courier New",Courier,monospace;">}</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> </span><br />
<span style="font-family: "Courier New",Courier,monospace;">public Class bindITransientValueService2() {</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> return SequencerTransientValueService.class;</span><br />
<span style="font-family: "Courier New",Courier,monospace;">}</span><br />
<br />
And finally the serialization yields the correct result!<br />
<br />
<br />
As you might have noticed I annotated the <span style="font-family: "Courier New",Courier,monospace;">SequencerTransientValueService</span> with <span style="font-family: "Courier New",Courier,monospace;">@SuppressWarnings("restriction")</span>. The class<span style="font-family: "Courier New",Courier,monospace;"> org.eclipse.xtext.serializer.sequencer.TransientValueService</span> seems not be intended for public use. But obviously it is required to get the serialization to work correctly.<br />
<br />
<br />
At the time of writing this post, I also realized that my grammar's enum <span style="font-family: "Courier New",Courier,monospace;">ConfigOption</span> only has one literal that is defined as default and should thus not be serialized by default. But in my implementations of the two ITransientValueService interfaces I only specified <span style="font-family: "Courier New",Courier,monospace;">ConfigValue</span> to be non-transient. However, ConfigOption is serialized without adding the corresponding semantics to the implementations of the ITransientValueService. Maybe this is due to the Annotation's <span style="font-family: "Courier New",Courier,monospace;">option</span> attribute not being optional in the grammar as the <span style="font-family: "Courier New",Courier,monospace;">value</span> attribute is. And maybe I should study the Xtext documentation in more detail. Maybe ..<br />
<br />
Regards,<br />
<br />
steven<br />
<br />Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-43986323117378498112011-10-18T08:54:00.000-07:002015-05-27T02:47:16.824-07:00Xtext Objective C Formatter/Beautifier<blockquote>
</blockquote>
This post shows how I integrated <a href="http://uncrustify.sourceforge.net/">uncrustify</a> into <a href="http://www.eclipse.org/Xtext/">Xtext</a>. At the end of this post you will be able to package uncrustify with your language UI plugin and run uncrustify as part of a <a href="http://www.eclipse.org/Xtext/documentation/2_0_0/118-mwe-in-depth.php">MWE2</a> workflow (the described approach was tested with Xtext 2.0 on Mac OS X 10.7).<br />
<div>
<br /></div>
<div>
First, you have to <a href="http://sourceforge.net/projects/uncrustify/files/uncrustify/">get uncrustify</a>. Unpack it, run <span class="Apple-style-span" style="font-family: 'courier new';">./configure</span> and then <span class="Apple-style-span" style="font-family: 'courier new';">make</span>. The binary is located in the <span class="Apple-style-span" style="font-family: 'courier new';">src/</span> folder and is named <span class="Apple-style-span" style="font-family: 'courier new';">uncrustify</span> - what a surprise. Create a folder <span class="Apple-style-span" style="font-family: 'courier new';">formatting/</span> in your language's UI plugin. Copy the binary into this folder. To tell uncrustify how to format the code we have to supply it with a config file. A config file for objective c can be found <a href="http://blog.carbonfive.com/2009/08/07/code-formatting-in-xcode/">here</a>. Download this file and put it into the <span class="Apple-style-span" style="font-family: 'courier new';">formatting/</span> folder. Besides the binary and a config file we need a shell script that runs uncrustify. Create a file <span class="Apple-style-span" style="font-family: 'courier new';">formatSource.sh</span> in <span class="Apple-style-span" style="font-family: 'courier new';">formatting/</span>. The shell script looks like this:</div>
<div>
<pre>#! /bin/sh
touch files.txt
find . -name "*.[hm]" > files.txt
while read line; do
./uncrustify_osx -l OC -c ./uncrustify_obj_c.cfg --no-backup $line
done < files.txt </pre>
<pre>rm files.txt </pre>
This script will look for *.h and *.m files recursively down from its location, run over them, and format them without creating a backup copy.</div>
<div>
<br /></div>
<div>
Now that we have the necessary files for running uncrustify ... oh well ... we must be able to run uncrustify from within java. For executing shell scripts from within a java process - welcome platform dependency - check out my <a href="https://github.com/stevenreinisch/modulob/blob/master/eclipse_plugins/de.dubmas.modulob.util/src/de/dubmas/modulob/util/ShellCommandExecutor.java">ShellCommandExecutor</a>. This class is also used for making the shell script <span class="Apple-style-span" style="font-family: 'courier new';">formatSource.sh</span> executable after copying it to a language project:</div>
<div>
<pre>private void copyFormattingFiles(final IProject project){
<span class="Apple-tab-span" style="white-space: pre;"> </span>Bundle bundle = SystemDslActivator.getInstance().getBundle();
<span class="Apple-tab-span" style="white-space: pre;"> </span>IPath scriptPath = copyFile("formatting/formatSource.sh" , "formatSource.sh", project, bundle);
<span class="Apple-tab-span" style="white-space: pre;"> </span>IPath binaryPath = copyFile("formatting/uncrustify_osx", "uncrustify_osx", project, bundle);
<span class="Apple-tab-span" style="white-space: pre;"> </span>copyFile("formatting/uncrustify_obj_c.cfg", "uncrustify_obj_c.cfg", project, bundle);
<span class="Apple-tab-span" style="white-space: pre;"> </span>//make script and binary executable
<span class="Apple-tab-span" style="white-space: pre;"> </span>try {
<span class="Apple-tab-span" style="white-space: pre;"> </span>ShellCommandExecutor.execute("chmod", "+x", scriptPath.toString());
<span class="Apple-tab-span" style="white-space: pre;"> </span>ShellCommandExecutor.execute("chmod", "+x", binaryPath.toString());
<span class="Apple-tab-span" style="white-space: pre;"> </span>} catch (Exception e) {
<span class="Apple-tab-span" style="white-space: pre;"> </span>//TODO: write to error log
<span class="Apple-tab-span" style="white-space: pre;"> </span>}
}</pre>
The above method can be found in <a href="https://github.com/stevenreinisch/modulob/blob/master/eclipse_plugins/de.dubmas.modulob.systemdsl.ui/src/de/dubmas/modulob/ui/wizard/util/TheProjectCreator.java">this class</a>. The execution of <span class="Apple-style-span" style="font-family: 'courier new';">formatSource.sh</span> in a <a href="https://github.com/stevenreinisch/modulob/blob/master/eclipse_plugins/de.dubmas.modulob.util/src/de/dubmas/modulob/util/ObjectiveCFormatter.java">MWE2 workflow component</a> looks like this:</div>
<div>
<pre>public class ObjectiveCFormatter extends org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2{
private static final String SCRIPT_PATH = "./formatSource.sh";
@Override
protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) {
try{
CommandResult cr = ShellCommandExecutor.execute(SCRIPT_PATH, new String[]{});
if (cr.success){
System.out.println("Formatting complete!");
} else{
issues.addError(cr.output);
}
}catch (Exception e){
issues.addError(e.getMessage());
}
}
}</pre>
If you add this component after your objective c generator in your workflow all *.h and *.m files will be formatted as described by the <a href="http://blog.carbonfive.com/2009/08/07/code-formatting-in-xcode/">uncrustify objective c config file</a>.</div>
<div>
<br /></div>
<div>
regards,</div>
<div>
<br /></div>
<div>
steven</div>
Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-30658751164803480812011-07-19T12:24:00.000-07:002011-07-19T12:29:41.045-07:00LaTex: Linebreak, NewLine in CaptionI you want to have a line break, a.k.a. new line, in your latex document's captions import the package "caption" like this:<div><br /></div><div> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><!--StartFragment--><span class="Apple-style-span" style="font-family:'courier new';">\usepackage{caption}</span><!--EndFragment--></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In your caption's you can add the <span class="Apple-style-span" style="font-family: 'courier new'; ">\newline </span>command:</p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><!--StartFragment--><span class="Apple-style-span" style="font-family:'courier new';">\begin{figure}</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="Apple-style-span" style="font-family:'courier new';">\centering</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="Apple-style-span" style="font-family:'courier new';">\includegraphics{<reftoapicture>}</reftoapicture></span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="Apple-style-span" style="font-family:'courier new';">\caption{Bla Bla Bla \newline Bla Bla Bla after line break}</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="Apple-style-span" style="font-family:'courier new';">\label{fig:aLabel}</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span class="Apple-style-span" style="font-family:'courier new';">\end{figure}</span><!--EndFragment--></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">regards</p><p></p><!--EndFragment--><p></p></div>Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-25338586788259791822011-03-15T10:10:00.001-07:002011-03-15T10:10:50.487-07:00iOS Class Browser<div><br /></div><div>check <a href="http://inexdo.com/CocoaNav_JS">this</a> out!</div>Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-80509023795110563822011-03-07T05:26:00.000-08:002015-05-27T02:47:55.724-07:00CoreData Performance Measurement<div>
world,</div>
<div>
<br /></div>
check out this <a href="http://cocoawithlove.com/2008/03/testing-core-data-with-very-big.html">evaluation</a> on CoreData Performance.<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
s</div>
Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-54716004985857868132010-11-23T03:27:00.000-08:002010-11-23T03:30:25.415-08:00xtext value converter tutorialhi folks,<div><br /></div><div>just a redirect to this nice <a href="http://pettergraff.blogspot.com/2009/11/xtext-valueconverter.html">description of how to use value converters in xtext</a>.</div><div><br /></div><div>s</div><div><br /></div><div><br /></div>Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-56544007254201822992010-06-30T03:40:00.000-07:002010-06-30T03:49:29.876-07:00Git ignore already added filesdear world,<br /><br />I wanted git to ignore files that I have already added to the repository. Unfortunately, if a file was added, changing .gitignore does not help. But there are two options:<br /><br /><ul><li><pre>git update-index --assume-unchanged [filename(s)]</pre></li><li><pre>git update-index --skip-worktree [path_to_ignore]<span style="font-family: Georgia,serif;"></span></pre></li></ul><span style="font-family: Georgia,serif;">the first tells git to ignore changes to single files;<br />the second tells it to ignore all files below a given path .. a complete directory.<br /><br />so far this works and I hope I did not mess something up.<br /><br />regards,<br /><br />s<br /></span>Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com1tag:blogger.com,1999:blog-9012523243285862585.post-1901708872361620882010-03-05T08:56:00.000-08:002010-03-05T09:00:17.494-08:00error C2275 illegal use of this type as an expressionYou are probably programming c or c++ and banging your head against the wall because of <span style="font-style: italic;">error C2275 illegal use of this type as an expression.<br /><br /></span>check if you have declared a variable <span style="font-style: italic;">after</span> the frist assignment in a function! remember: in c all variables have to be declared before any other statement.<br /><br />stop banging!Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-47496340214809559052009-12-17T16:20:00.000-08:002009-12-17T16:35:44.612-08:00Arduino Burn Bootloader on Atmega328Phi little world,<br /><br />for those of you spending hours on trying to burn the <a href="http://arduino.cc/en/Tutorial/Bootloader">bootloader </a>on an atmega328 on your <a href="http://www.arduino.cc/">arduino</a>, check out <a href="http://blog.modifiedelectronics.com/2009/08/arduino-atmega328-fuse-settings.html">this</a>.<br /><br />If you wonder, how to get to the screen shown in the above mentioned post: in avr studio, press the button looking like a microcontroller with the label "AVR":<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWLcTsgDBPpgjiCQ-1pZyi9_FxmrGO2qCbEA9-r3HY2YYJoLw5I0Gs9qfthcYDPJZEgEq8xWbSSVimbKL9b66BfT7FOgUwJJwyZmwrEb1SSH1ElGIbNsKD4fh6hxZM_PeVLyxx6ULCFFsZ/s1600-h/avr_studio_button.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 79px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWLcTsgDBPpgjiCQ-1pZyi9_FxmrGO2qCbEA9-r3HY2YYJoLw5I0Gs9qfthcYDPJZEgEq8xWbSSVimbKL9b66BfT7FOgUwJJwyZmwrEb1SSH1ElGIbNsKD4fh6hxZM_PeVLyxx6ULCFFsZ/s320/avr_studio_button.JPG" alt="" id="BLOGGER_PHOTO_ID_5416368112278005666" border="0" /></a><br /><br />I am using AVRISP mkII and AVR Studio and it works perfectly.<br /><br /><br />byeSteven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-5794523196744436542009-11-05T11:28:00.000-08:002009-11-05T15:08:04.476-08:00Xtext, Supply Chains, Mobile Ad-hoc Networks, and IT-EntrepreneurshipMy third semester at the HPI has started!<br />This is a list of themes that will catch my attention during this semester:<br /><br /><ul><li><a href="http://sodecon.blogspot.com/2009/11/xtext-supply-chains-mobile-ad-hoc.html#pcm">Protocol Compiler and Middleware</a></li><li><a href="http://sodecon.blogspot.com/2009/11/xtext-supply-chains-mobile-ad-hoc.html#track">Tracking of pharmaceutical products in supply chains</a></li><li><a href="http://sodecon.blogspot.com/2009/11/xtext-supply-chains-mobile-ad-hoc.html#emb">Ad-hoc networks for embedded systems with AUTOSAR</a></li><li><a href="http://sodecon.blogspot.com/2009/11/xtext-supply-chains-mobile-ad-hoc.html#xtext">Linking in Xtext</a></li><li><a href="http://sodecon.blogspot.com/2009/11/xtext-supply-chains-mobile-ad-hoc.html#ite">IT-Entrepreneurship</a></li></ul><br /><br /><span style="font-weight: bold;"><a name="pcm">Protocol Compiler and Middleware</a></span><br /><br />Together with <a href="http://www.xing.com/profile/Richard_Metzler3">Richard</a> we will implement a middleware for <a href="http://www.dcl.hpi.uni-potsdam.de/teaching/mds/twp3.txt">The Wire Protocol</a> in Java, and a protocol compiler. The protocol compiler will read a specification of a TWP protocol and generate code that implements the specified protocol on the basis of our middleware. The compiler will be built upon <a href="http://www.eclipse.org/Xtext/">Xtext</a>.<br /><br /><br /><span style="font-weight: bold;"><a name="track">Tracking of pharmaceutical products in supply chains</a></span><br /><br />This is my first research activity at the <a href="http://epic.hpi.uni-potsdam.de/Home/WebHome">chair of Hasso Plattner</a>, the founder of the <a href="http://www.hpi.uni-potsdam.de/welcome.html?L=1">HPI</a>. I will investigate the efficient tracing of pharmaceuticals from production to the end-consumer. The goal of such a tracing is the verification of the authenticity of pharmaceuticals. So, if you are at the pharmacy, a pharmaceutical's way from the producer to your hands can be followed completely, and thus preventing you from taking pills produced in some of your neighbour's basement.<br />Actual tracing mechanisms are too slow and I hope to find a way to make them faster.<br />The exact title of my work is: "Algorithms and Data Structures for Data Capturing and Data Retrieval in the Context of EPC Discovery Services".<br /><br /><br /><span style="font-weight: bold;"><a name="emb">Mobile Ad-hoc networks for embedded systems with AUTOSAR</a></span><br /><br />In the seminar <a href="http://www.hpi.uni-potsdam.de/teaching/lehrangebot/veranstaltung/advanced_software_engineering_for_embedded_systems.html?L=1&cHash=68d661d21d">Advanced Software Engineering for Embedded Systems</a> I will develop an infrastructure for mobile ad-hoc networks for autonomous robots. The development will be based on <a href="http://en.wikipedia.or/wiki/AUTOSAR">AUTOSAR</a>.<br /><br /><br /><span style="font-weight: bold;"><a name="xtext">Linking in Xtext</a></span><br /><br />The focus of my work for the seminar <a href="http://www.hpi.uni-potsdam.de/hirschfeld/teaching/index.html">Software Design</a> will be the linking-feature of Xtext. I will take a deep dive into the Xtext code to fully understand how the linker works. This should not be a big burden because I am already used to the (almost uncommented ;) )code written by Xtext developers since my <a href="http://wiki.eclipse.or/Refactorings_for_Xpand_/_Xtend_/_Check">google summer of code project in 2008</a>. After arising from the depths of the Xtext code I will conduct some experiments and thrill the world with Xtext's capabilities :D.<br /><br /><br /><span style="font-weight: bold;"><a name="ite">IT-Entrepreneurship</a></span><br /><br />Last but not least I will write a business plan with <a href="http://danielbierwirth.de/">Daniel</a> and Toni. The cool thing about this seminar is that we are taught by <a href="http://www.hp-ventures.com/who-we-are/team.html">Rouven Westphal</a>. Rouven is a ... at <a href="http://www.hp-ventures.com/">Hasso Plattner Ventures (HPV)</a>. HPV is a venture capital fund founded by - surpise :) - <a href="http://en.wikipedia.org/wiki/Hasso_Plattner">Hasso Plattner</a>.<br />So, Rouven's every day business is judging business plans; opposed to last year's teacher Prof. Wagner who took a too heavy weight theoretical approach to entrepreneurship - Prof. Wagner basically had no entrpreneurial spirit.<br />Our first business idea is about increasing sales for food retailers. We think of a web platform that gives consumers access to retailers' shelfs in the digital world. Consumers create recipes that can be accessed by other consumers on their mobile devices in the store. The first effect is an increased shopping experience for customers: everything that is needed for a recipe is in one store - they do not have to go to a different store. And here comes the side door for retailers: if a retailer's stock is for instance full of salad that needs to be sold in one day and would be thrown away at the end of the day, the retailer places a special offer as a salad-recipe on the web-platform. This recipe will appear before any other recipe on customer's mobile devices when they enter the store. This has the effect that not only the salad is sold but also the other ingredients like cottage cheese, tomates, bread, and other stuff you need for a good salad.<br />But these days I am thinking more and more about the iPhone as a platform for (IT-)Entrepreneurs. So many fellows are talking about iPhone App development - I never heard so many it-people talking about ONE platform for a basis for (fast) revenue. It's like a gold rush! And if there is a gold rush, invest in gold picks and shovels! But more to that in a later post.Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-69132768166654578922009-10-26T14:51:00.000-07:002009-10-26T15:37:15.822-07:00Domain Prices Explain The World!wake up! stop coding ;)! and do some market research!<br /><br />I was looking for prices of internet domains, and found some numbers on this <a href="http://www.domain-recht.de/handel/preise.php">site</a>. compare the rankings of .de (german domains) and .com domains. if you list the three most expensive .com domain names, you get this list:<br /><ol><li>sex</li><li>porn</li><li>business<br /></li></ol><br />for .de domains you get this one:<br /><br /><ol><li>kredit<br /></li><li>poker</li><li>kasino<br /></li></ol>If we assume that a domain price is a <a href="http://www.businessweek.com/innovate/FineOnMedia/archives/2009/03/twitter_and_the.html">monetization</a> of attention, we can interpret these list as follows:<br /><ul><li>most of germany's attention can be caught on gambling sites, and of course on sites giving credit to player's. </li><li>germans have no sex, just gambling</li><li>they do not care about business, just gambling</li><li>surprising: they do not care about unemployment, just gambling<br /></li></ul>the rest of the world:<br /><ul><li>is doing business</li><li>otherwise just ..<br /></li></ul><br />always trust the numbers!<br /><br />best,<br /><br />steven<br /><br />P.S. Sorry dear google user if you landed on this blog while searching for satisfaction! some words in this post do not have a common semantic ..Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-51183412057356613512009-09-10T12:34:00.001-07:002015-05-27T02:48:19.374-07:00Create Elicpse Plug-in Project programmatically<br />
Hello,<br />
<br />
I need to create an eclipse plug-in project at runtime but don't know how!<br />
<br />
I think about reusing the <a href="http://mobius.inria.fr/eclipse-doc/org/eclipse/pde/internal/ui/wizards/plugin/NewPluginProjectWizard.html">New-Plug-in wizard</a>, but after almost three hours of tweaking this wizard to fit my needs, I decided to do on my own!<br />
<br />
But wait, coding all this stuff .. create source folder, manifest folder, manifest file, plugin.xml file ... too much .. can't someone else do it?!<br />
<br />
praise opensource! I remember that <a href="http://www.openarchitectureware.org/">oaw</a> generates an eclipse-plug-in for you if you create a new oaw project. I go through oaw's <a href="http://architecturware.cvs.sourceforge.net/viewvc/architecturware/">cvs</a> and find this promising <a href="http://architecturware.cvs.sourceforge.net/viewvc/architecturware/oaw_v4/core.plugin/plugin.oaw4/main/src/org/openarchitectureware/wizards/EclipseHelper.java?revision=1.13&view=markup">class</a>.<br />
<br />
After some minor modifications, e.g. removing the dependency to 'org.openarchitectureware.dependencies' in its createManifest(...) method, it does a perfect job!<br />
<br />
<br />
So, go get this <a href="http://architecturware.cvs.sourceforge.net/viewvc/architecturware/oaw_v4/core.plugin/plugin.oaw4/main/src/org/openarchitectureware/wizards/EclipseHelper.java?revision=1.13&view=markup">class</a>, adapt it to your needs and generate eclipse plug-in projects at runtime!<br />
<br />
bye,<br />
<br />
stevenSteven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-82830324298333024892009-07-17T01:37:00.000-07:002009-07-17T02:31:38.770-07:00Eclipse CDO problems with Apache Derbyhi folks,<br /><br />these days I was having problems with my CDO server:<br /><br />after inserting some models into a repository, and then restarting the server, I was getting this error:<br /><br />[ERROR] Rollback in DBStore: org.eclipse.net4j.db.DBException: SQL Exception: A lock could not be obtained within the time requested<br /><br />First, I thought, I forgot to commit/close a transaction; but this was not the case.<br />In the emf news group, <a href="http://thegordian.blogspot.com/">eike </a>told me, that there was a similar problem in the tests based on apache derby.<br /><br />So, I switched to <a href="http://www.h2database.com/html/main.html">H2</a>, and the error did not occur anymore.<br /><br />I was desperately looking for the net4j H2Adapter in the latest net4j releases but was not able to find it. Finally, I found it <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.net4j/plugins/org.eclipse.net4j.db.h2/src/org/eclipse/net4j/db/h2/H2Adapter.java?root=Modeling_Project&view=co">here</a>, copied to my workspace, and changed the creation of the IStore:<br /><br /><span style="font-size:85%;"><span style="font-family:courier new;"> org.h2.jdbcx.JdbcDataSource dataSource = new JdbcDataSource();</span><br /><span style="font-family:courier new;"> dataSource.setURL("jdbc:h2:~/h2Test");</span><span style="font-family:courier new;"><br /><br /><br /></span><span style="font-family:courier new;"> IDBAdapter dbAdapter = new H2Adapter();</span><span style="font-family:courier new;"><br /><br /> </span><br /><span style="font-family:courier new;"> IMappingStrategy mappingStrategy = CDODBUtil.createHorizontalMappingStrategy(true);</span><br /><span style="font-family:courier new;"> <br /><br /> IDBConnectionProvider dbConnectionProvider = DBUtil.createConnectionProvider(dataSource);</span><br /><span style="font-family:courier new;"> <br /><br /> IStore store = CDODBUtil.createStore(mappingStrategy, dbAdapter, dbConnectionProvider);</span></span><br /><br /><br />cheers,<br /><br />stevenSteven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-29758628842753449852009-05-15T07:51:00.000-07:002009-05-15T08:40:32.419-07:00Eclipse CDO Example<div style="text-align: justify;">hi folks,<br /><br />I found an <a href="http://thegordian.blogspot.com/2009/04/modeling-goes-enterprise.html">example application for Eclipse CDO</a>. And I describe how to get it running.<br />Download the latest Eclipse Modeling Tools: from <a href="http://www.eclipse.org/downloads/">Eclipse download</a> choose <span style="font-style: italic;">Development Builds</span> to get the latest tools. Fortunately, the site lets you know, that there are some problems for mac users with the 3.5M7 release. One problem is that there is no 'dropins' folder; but I will show you how we can bypass this problem (creating a folder named 'dropins' does not work :( ). Go get the Modeling tools!<br />Additionally you need: the latest builds of <a href="http://www.eclipse.org/modeling/emf/downloads/?project=cdo">CDO</a> vers. 2.x (not 1.09!), <a href="http://www.eclipse.org/modeling/emf/downloads/?project=net4j">Net4J</a> vers. 2.x (not 1.09!), and <a href="http://www.eclipse.org/modeling/emf/downloads/?project=teneo">Teneo</a>.<br />Download them, create a folder 'CDO_runtime' and copy all plugins found in the CDO, Net4j and Teneo builds into this folder. Next, save the <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.cdo/develop/setup/psf/pserver/cdo-gastro-example.psf?root=Modeling_Project&view=co">Team Project Set file</a> as 'cdo_example.psf'<br />Now, start Eclipse of your Modeling Tools. In the Package Explorer right click-><span style="font-style: italic;">Import... ->Team->Team Project Set</span> and choose 'cdo_example.psf'.<br />The next step is to add the cdo, net4j and teneo plugins to the Eclipse runtime. Normally, you do that by throwing them into Eclipse's 'dropin' folder which is absent in the current os x build. Therefore, we create a new <span style="font-style: italic;">Target Definition</span>. Choose one of the CDO example projects, press CMD+N, choose <span style="font-style: italic;">Plug-in Development->Target Definition</span> and name the file 'cdo_target'. Open the created 'cdo_target.target' file. In the upcoming editor press <span style="font-style: italic;">Add...</span>, choose <span style="font-style: italic;">Installation->Next</span>, type '${eclipse_home}' as location and press <span style="font-style: italic;">Finish</span>. Now, we add our 'CDO_runtime' folder as location; so again press <span style="font-style: italic;">Add...</span>, then choose <span style="font-style: italic;">Directory->Next</span>, browse to this folder and press <span style="font-style: italic;">Finish</span>. Finally, press <span style="font-style: italic;">Set as Target Platform</span> in the upper right of the editor. At this point, all required plugins for the CDO example are installed.<br />If you want to change your target platform back to the original Eclipse installation, open the preferences (CMD+,), choose <span style="font-style: italic;">Plug-in Development->Target Platform</span> and select <span style="font-style: italic;">Running Platform</span>.<br />I did not have the time to play around with the example .. the installation took sooo long ;).<br />I will post after further investigations have been done.<br /><br />Happy experimenting with CDO!<br /><br />greetzn,<br /><br />steven</div>Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com1tag:blogger.com,1999:blog-9012523243285862585.post-4194039127250883152009-01-21T01:45:00.000-08:002009-01-21T02:05:15.354-08:00Your generator knows it!Currently I am working on a Java-to-.Net-Compiler. In addition to using <br /> <a href="http://www.antlr.org">ANTLR</a> and <a href="http://connect.microsoft.com/Phoenix">Micosoft's Phoenix framework</a> I have to write a lot of C# code that lends itself to be generated.<br /> <br />Besides the need for a java grammar, which can be found <a href="http://www.antlr.org/grammar/list">here</a>, we need an AST (Abstract Syntax Tree) to accomplish the semantic analysis. ANTLR offers an AST construction mechanism and generates an AST walker from a tree grammar. Basically the semantic analysis can be done solely with ANTLR. But, we are facing the challenge that each teammate needs to work with the AST and not everyone knows ANTLR. Thus we need an ANTLR independent AST.<br /><br />The basis of our Java AST is the <a href="http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/dom/package-summary.html">Eclipse JDT AST</a>. My task is to implement the AST using C#. So, <span style="font-style:italic;">to implement</span> means <span style="font-style:italic;">to copy</span> since the JDT AST seems be a good model. <br />Did I say model? This sounds like feeding the JDT AST code into a code generator and letting the generator create the C# implementation.<br /><br />Consequently we create a generator using <a href="http://www.openarchitectureware.org">openArchitectureWare</a> that will take an UML2 class model, yes we decided to create an UML model of the AST ;), and generate C# classes.<br />I sat down with a teammate having C# experiences to create the generator templates for generating C# code.<br />Perfect! Now, our generator knows how to create C# classes .. and my teammate can go home :D. Furthermore we generate the basic visitor code for the AST from its model.<br /><br />By the way .. a language grammar lends itself to automatic AST generation .. check out this <a href="http://jeff.over.bz/papers/2008/sle2008.pdf">paper</a>.<br /><br />Generators are knowledge containers!<br /><br />stevenSteven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-87481027758976957822008-08-06T08:13:00.000-07:002008-08-06T09:22:02.357-07:00new oaw refactoring featureshello folks,<br /><br />here are news from the oaw code frontier. I finished implementing the move extension and rename resource feature. the move extension feature was trickier than I thought .. you not only have to delete the extension from the source file and insert it into the target file, you have to check which namespace and extensions are required to get the moved extension running within the target xtend file and you have to determine where to insert each import. I had a lot of <a href="http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/text/edits/MalformedTreeException.html">MalformedTreeExceptions</a> meaning that the insertions of new imports overlap or the inserted extension is not inside the document range :@!<br />the tricky part of the calculation of the import offsets, the positions each import shall be inserted at, is the differentiation of different cases: is the target file empty, does it contain imports only, does it contain imports and extensions .. my code was covered with ugly nested, not understandable if-statements. to come up with this mess, I used the Strategy Pattern. the <a href="http://en.wikipedia.org/wiki/Design_Patterns">gof book</a> says that it should be applied, if "different algorithms will be appropriate at different times". my base strategy class handles the common operations for the movement of an extension: remove the extension from the source file, update imports in all other files etc. it contains an abstract method called "<span style="font-style: italic;">createTargetFileChanges</span>", which has to be overridden by subclasses implementing a different insertion strategy. according to the target file's state, an appropriate strategy is chosen. the code is much clearer now and new cases can be handled (added) easier.<br /><br />A screencast showing the implemented features in action can be found <a href="http://gonzo.uni-weimar.de/%7Ereinisch/gsoc/oaw_refac.avi">here</a> (.avi, 24.2 mb). the ui looks a little bit inconsistent and unhandy .. this is my next implementation step.<br /><br />I could not work that much the last days, since I got my admission for the master program at the <span style="font-style: italic;"><a href="http://www.hpi.uni-potsdam.de/willkommen.html?L=1">hasso-plattner-institute for software systems engineering</a></span> (YESSSS!) and I had to do a lot of administrative stuff .. get rid of my old flat, leave my old university.<br /><br />I planned to submit a paper about the modeling tool and distributed model simulation environment for information retrieval processes developed during my <a href="http://www.uni-weimar.de/medien/webis/publications/downloads/theses/reinisch_2007.pdf">bachelor thesis</a> to the <a href="http://mdsd08.techjava.de/">mdsd today conference</a>, but due to the upcoming <a href="http://code.google.com/opensource/gsoc/2008/faqs.html#0.1_timeline">gsoc deadline</a> I will not have the time for writing one :(.<br /><br />So, during the next days I will focus my implementation efforts on the ui aspects of the oaw refactoring feature and finally I will test it using a real life oaw project.<br /><br /><br /><br />stay tuned!<br /><br />stevenSteven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0tag:blogger.com,1999:blog-9012523243285862585.post-71172345173391410292008-07-24T06:28:00.000-07:002008-07-24T08:04:42.993-07:00Google Summer of Code (GSoC) 2008Recently I am taking part in the GSoC. My job is to implement a refacoring feature for the MDA/MDD generator framework <a href="http://www.openarchitectureware.org/">openArchitectureWare</a>.<br />As you can see at the <a href="http://wiki.eclipse.org/Refactorings_for_Xpand_/_Xtend_/_Check">project's wiki site</a>, I am almost finished implementing the required features.<br /><br />I implemented a protoypic eclipse integration using the <a href="http://www.eclipse.org/articles/Article-LTK/ltk.html">Language Toolkit (LTK)</a> first. This was (and still is :)) a prototype, since I wanted to focus my efforts on the algorithms the whole refactoring is based on. The UI sugar comes later ;).<br /><br />The implementation was easier than I thought. I became aquainted with the oAW source quickly, although it is commented very very raley :D. Very helpful were the Eclipse <span style="font-style: italic;">Type Hierarchy</span> and <span style="font-style: italic;">Call Hierarchy</span>. The Call Hierarchy is your perfect buddy for figuring out, how an API works.<br /><br />A screencast showing the refactorings <span style="font-style: italic;">Rename Extension</span> and <span style="font-style: italic;">Rename DEFINE</span> can be found <a href="http://uni-weimar.de/~reinisch/gsoc/oawRefacScreenCast.flv">here</a> (.flv 22.6 mb). Note that it is in german .. it was not meant to be published .. just a little status report for my gsoc mentor <a href="http://www.peterfriese.de/">peter</a> .. but if you cannot wait to see the refacorings in action, go for it! I will publish another screen cast with even more cool features the coming days.<br /><br />I planned to finish the implementation of the refactoring algorithms by the end of this week.<br />Right now I am working on the <span style="font-style: italic;">Move Extension</span> feature.<br /><br />If this feature is implemented, I will take some days to clean up the code and make the abstractions clearer. Then I will start working on the user experience .. precondition checking, meaningful dialogs etc.Steven Reinischhttp://www.blogger.com/profile/13943760213837158791noreply@blogger.com0