<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Awesome PaaS on Medium]]></title>
        <description><![CDATA[Stories by Awesome PaaS on Medium]]></description>
        <link>https://medium.com/@AwesomePaaS?source=rss-e03d14e1d660------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4xPUqKs62Dx1Dfm9.png</url>
            <title>Stories by Awesome PaaS on Medium</title>
            <link>https://medium.com/@AwesomePaaS?source=rss-e03d14e1d660------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 05:56:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@AwesomePaaS/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[OpenPaaS UX Documentation for Everyone]]></title>
            <link>https://medium.com/@AwesomePaaS/openpaas-ux-documentation-for-everyone-a0b8ba91a6b6?source=rss-e03d14e1d660------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0b8ba91a6b6</guid>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[guidelines]]></category>
            <category><![CDATA[openpaas]]></category>
            <category><![CDATA[ux-design]]></category>
            <dc:creator><![CDATA[Awesome PaaS]]></dc:creator>
            <pubDate>Thu, 17 Nov 2016 12:41:41 GMT</pubDate>
            <atom:updated>2016-11-17T14:13:43.834Z</atom:updated>
            <cc:license>https://creativecommons.org/publicdomain/mark/1.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lLj8AmCzSSWwNFxw5qyDuA.png" /><figcaption>UX Documentation for Everyone</figcaption></figure><h3>Introduction</h3><p>Hi , i’m Jeremie Kornobis, UX designer at OpenPaaS project and I want to share you the documentation I established from multiples sources listed in the document for every new incomer on project OpenPaaS.</p><p>The purpose of the this document is to give every new incomer on project the keys to understand the User Experience (UX) Linagora want for OpenPaaS. The document introduces the main principles of the project, the rules and guidelines we follow to keep consistency in UX and UI when we work on OpenPaaS project.</p><h3>Keys Principle of OpenPaaS</h3><h4>OpenPaaS is Mobile First</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*eZ5LI1GEW2Sg-TXlS7oNgg.png" /></figure><p>The mobile-first approach is exactly as it sounds: designing for the smallest screen and working your way up. It is one of the best strategies to create either a responsive or adaptive design.</p><h3>Mobile First = Content First</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/228/1*r0jVl4lzlHUzfvWvPXV8Ag.jpeg" /></figure><p>If your site is good on a mobile device, it translates better to all devices. More important, though, is that the mobile-first approach is also a content-first approach. Mobile has the most limitations, screen size and bandwidth to name a few, and so designing within these parameters force you to prioritize content ruthlessly.</p><p>The mobile-first approach organically leads to a design that’s more content-focused, and therefore user-focused. The heart of the site is content — that’s what the users are there for.</p><p>Mobile users sometimes require different content than desktop users. Device-specific content can be gauged by considering context.</p><h4>Things to remember in Mobile First Design/Development</h4><p><a href="https://www.uxpin.com/studio/blog/a-hands-on-guide-to-mobile-first-design/"><em>https://www.uxpin.com/studio/blog/a-hands-on-guide-to-mobile-first-design/</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*9uBWIUg8ubKc5Lx_rOFS1Q.png" /><figcaption>Touch illustration</figcaption></figure><p><strong>Enlarge touch targets</strong> — Fingers are much wider than pixel-precise mouse cursors, and so need larger elements on which to tap. At the time of this writing, Apple recommends 44 pixels square for touch targets. Give hyperlinks plenty of space, and slightly enlarge buttons, and make sure that</p><p><strong>Don’t count on hovers</strong> — It almost goes without saying, but designers often rely on hover and mouse over effects in their interactive work. If you’re thinking mobile-friendly, don’t. There is no hover control for fingertips yet.</p><p><strong>Test it in a real device</strong> — Nothing beats discovering for yourself how usable a website is (or isn’t). Step away from your desktop/laptop computer and load your current work on a real phone or tablet. Tap through pages. Is the app easy to navigate? Does it load in a timely fashion? Are the text and graphics easy to read?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*CuGDAsp2wiwEgoDQ8VuNww.jpeg" /></figure><h3>Material Design</h3><p><a href="https://material.google.com/"><em>https://material.google.com</em></a></p><p>To have a consistency through the apps of OpenPaaS, we choose to follow most of the guidelines of the project Material Design from Google. The project offer basic rules to filled Mobile first requirement with branding customization.</p><h4>Material is the metaphor</h4><p>A material metaphor is the unifying theory of a rationalized space and a system of motion. The material is grounded in tactile reality, inspired by the study of paper and ink, yet technologically advanced and open to imagination and magic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*s-dxwU6ujrrlm_9drcpgbg.png" /><figcaption>Layers of cards</figcaption></figure><p>Surfaces and edges of the material provide visual cues that are grounded in reality. The use of familiar tactile attributes helps users quickly understand <a href="https://en.wikipedia.org/wiki/Affordance">affordances</a>.</p><h4>Bold, graphic, intentional</h4><p>The foundational elements of print-based design — typography, grids, space, scale, color, and use of imagery — guide visual treatments. These elements do far more than please the eye. They create hierarchy, meaning, and focus. Deliberate color choices, edge-to-edge imagery, large-scale typography, and intentional white space create a bold and graphic interface that immerse the user in the experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*Zb7TeYAtSbi58LXXkf6kCQ.png" /><figcaption>FAB Button</figcaption></figure><p>An emphasis on user actions makes core functionality immediately apparent and provides waypoints for the user.</p><h4>Motion provides meaning</h4><p>Motion respects and reinforces the user as the prime mover. Primary user actions are inflection points that initiate motion, transforming the whole design.</p><p>All action takes place in a single environment. Objects are presented to the user without breaking the continuity of experience even as they transform and reorganize.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*GKTFKCTgKvrkeQ1qqyv4dQ.png" /><figcaption>motion illustration</figcaption></figure><p>Motion is meaningful and appropriate, serving to focus attention and maintain continuity. Feedback is subtle yet clear. Transitions are efﬁcient yet coherent.</p><h3>Must read about Material Design Specification</h3><h4>Layout:</h4><p><a href="https://material.google.com/layout/structure.html#structure-ui-regions"><em>https://material.google.com/layout/structure.html#structure-ui-regions</em></a></p><h4>Style:</h4><ul><li><a href="https://material.google.com/style/writing.html"><em>https://material.google.com/style/writing.html</em></a></li><li><a href="https://material.google.com/style/color.html"><em>https://material.google.com/style/color.html</em></a></li></ul><h4>Components:</h4><ul><li><a href="https://material.google.com/components/buttons.html"><em>https://material.google.com/components/buttons.html</em></a></li><li><a href="https://material.google.com/components/buttons-floating-action-button.html"><em>https://material.google.com/components/buttons-floating-action-button.html</em></a></li><li><a href="https://material.google.com/components/cards.html"><em>https://material.google.com/components/cards.html</em></a></li><li><a href="https://material.google.com/components/lists.html#lists-usage"><em>https://material.google.com/components/lists.html#lists-usage</em></a></li><li><a href="https://material.google.com/components/menus.html"><em>https://material.google.com/components/menus.html</em></a></li><li><a href="https://material.google.com/components/tabs.html"><em>https://material.google.com/components/tabs.html</em></a></li></ul><h4>Patterns:</h4><ul><li><a href="https://material.google.com/patterns/confirmation-acknowledgement.html#confirmation-acknowledgement-confirmation"><em>https://material.google.com/patterns/confirmation-acknowledgement.html#confirmation-acknwledgement-confirmation</em></a></li><li><a href="https://material.google.com/patterns/errors.html"><em>https://material.google.com/patterns/errors.html</em></a></li><li><a href="https://material.google.com/patterns/navigation.html"><em>https://material.google.com/patterns/navigation.html</em></a></li><li><a href="https://material.google.com/patterns/navigational-transitions.html"><em>https://material.google.com/patterns/navigational-transitions.html</em></a></li><li><a href="https://material.google.com/patterns/notifications.html"><em>https://material.google.com/patterns/notifications.html</em></a></li><li><a href="https://material.google.com/patterns/permissions.html"><em>https://material.google.com/patterns/permissions.html</em></a></li><li><a href="https://material.google.com/usability/accessibility.html#accessibility-principles"><em>https://material.google.com/usability/accessibility.html#accessibility-principles</em></a></li></ul><h3>CSS guideline : Idiomatic-CSS</h3><p><a href="https://github.com/necolas/idiomatic-css/blob/master/README.md"><em>github.com/necolas/idiomatic-css</em></a></p><h4>General principles</h4><p><em>“Part of being a good steward to a successful project is realizing that writing code for yourself is a Bad Idea™. If thousands of people are using your code, then write your code for maximum clarity, not your personal preference of how to get clever within the spec.” -</em><strong> Idan Gazit</strong></p><ul><li>Don’t try to prematurely optimize your code; keep it readable and understandable.</li><li>All code in any code-base should look like a single person typed it, even when many people are contributing to it.</li><li>Strictly enforce the agreed-upon style.</li><li>If in doubt when deciding upon a style use existing, common patterns.</li></ul><h4>Whitespace</h4><p>Only one style should exist across the entire source of your code-base. Always be consistent in your use of whitespace. Use whitespace to improve readability.</p><ul><li><em>Never</em> mix spaces and tabs for indentation.</li><li>Choose soft indents (spaces) against real tabs.</li><li><strong>2 spaces</strong> per indentation level.</li></ul><h4>Comments</h4><p>Well commented code is extremely important. Take time to describe components, how they work, their limitations, and the way they are constructed. Don’t leave others in the team guessing as to the purpose of uncommon or non-obvious code.</p><p>Comment style should be simple and consistent within a single code base.</p><ul><li>Place comments on a new line above their subject.</li><li>Keep line-length to a sensible maximum, e.g., 80 columns.</li><li>Make liberal use of comments to break CSS code into discrete sections.</li><li>Use “sentence case” comments and consistent text indentation.</li></ul><p>Tip: configure your editor to provide you with shortcuts to output agreed-upon comment patterns.</p><h4>Format</h4><p>The chosen code format must ensure that code is: easy to read; easy to clearly comment; minimizes the chance of accidentally introducing errors; and results in useful diffs and blames.</p><ul><li>Use one discrete selector per line in multi-selector rulesets</li><li>Include a single space before the opening brace of a ruleset</li><li>Include one declaration per line in a declaration block</li><li>Use one level of indentation for each declaration</li><li>Include a single space after the colon of a declaration</li><li>Use lowercase and shorthand hex values: <strong>#aaa</strong>.</li><li>Use double quotes consistently: <strong>content: “”</strong></li><li>Quote attribute values in selectors: <strong>input[type=”checkbox”]</strong></li><li><em>Where allowed</em>, avoid specifying units for zero-values: <strong>margin: 0</strong></li><li>Include a space after each comma in comma-separated property or function values</li><li>Include a semi-colon at the end of the last declaration in a declaration block</li><li>Place the closing brace of a ruleset in the same column as the first character of the ruleset</li><li>Separate each ruleset by a blank line</li></ul><blockquote>.selector-1,<br>.selector-2,<br>.selector-3[type=”text”] {<br> box-sizing: border-box;<br> display: block;<br> font-family: helvetica, arial, sans-serif;<br> color: #333;<br> background: #fff;<br>}</blockquote><blockquote>.selector-a,<br>.selector-b {<br> padding: 10px;<br>}</blockquote><h4>Declaration order</h4><p>If declarations are to be consistently ordered, it should be in accordance with a single, simple principle: prefer to cluster related properties (e.g. positioning and box-model) together.</p><blockquote>.selector {<br> /* Positioning */<br> position: absolute;<br> z-index: 10;<br> top: 0;<br> right: 0;<br> bottom: 0;<br> left: 0;</blockquote><blockquote>/* Display &amp; Box Model */<br> display: inline-block;<br> overflow: hidden;<br> box-sizing: border-box;<br> width: 100px;<br> height: 100px;<br> padding: 10px;<br> border: 10px solid #333;<br> margin: 10px;</blockquote><blockquote>/* Other */<br> background: #000;<br> color: #fff;<br> font-family: sans-serif;<br> font-size: 16px;<br> text-align: right;<br>}</blockquote><h4>Exceptions and slight deviations</h4><p>Large blocks of single declarations can use a slightly different, single-line format. In this case, a space should be included after the opening brace and before the closing brace.</p><blockquote>.selector-1 { width: 10%; }<br>.selector-2 { width: 20%; }</blockquote><h3>Web Accessibility Initiative (WAI)</h3><p><a href="https://www.w3.org/standards/webdesign/accessibility"><em>https://www.w3.org/standards/webdesign/accessibility</em></a></p><p>The Web is fundamentally designed to work for all people, whatever their hardware, software, language, culture, location, or physical or mental ability. When the Web meets this goal, it is accessible to people with a diverse range of hearing, movement, sight, and cognitive ability.</p><p>Thus the impact of disability is radically changed on the Web because the Web removes barriers to communication and interaction that many people face in the physical world. However, when websites, web technologies, or web tools are badly designed, they can create barriers that exclude people from using the Web.</p><p>The mission of the <a href="https://www.w3.org/standards/webdesign/accessibility#wai">Web Accessibility Initiative (WAI)</a> is to lead the Web to its full potential to be accessible, enabling people with disabilities to participate equally on the Web.</p><h4>Learn More</h4><p>WAI provides a wide range of resources on different aspects of web accessibility standards, education, implementation, and policy, including:</p><ul><li><a href="http://www.w3.org/WAI/intro/accessibility.php"><em>Introduction to Web Accessibility</em></a></li><li><a href="http://www.w3.org/WAI/intro/components.php"><em>Essential Components of Web Accessibility</em></a></li><li><a href="http://www.w3.org/WAI/intro/people-use-web"><em>How People with Disabilities Use the Web</em></a></li><li><a href="http://www.w3.org/WAI/impl/improving"><em>Improving the Accessibility of Your Web Site</em></a></li><li><a href="http://www.w3.org/WAI/managing.html"><em>Managing Accessibility</em></a></li><li><a href="http://www.w3.org/WAI/eval/"><em>Evaluating Web Accessibility</em></a></li><li><em>Standards, guidelines, and techniques for making accessible</em></li><li><em>— websites: </em><a href="http://www.w3.org/WAI/intro/wcag.php"><em>Web Content Accessibility Guidelines (WCAG)</em></a></li><li><em>— authoring tools: </em><a href="http://www.w3.org/WAI/intro/atag.php"><em>Authoring Tool Accessibility Guidelines (ATAG)</em></a></li><li><em>— browsers: </em><a href="http://www.w3.org/WAI/intro/uaag.php"><em>User Agent Accessibility Guidelines (UAAG)</em></a></li><li><em>— web applications: </em><a href="http://www.w3.org/WAI/intro/aria.php"><em>Accessible Rich Internet Applications (WAI-ARIA)</em></a></li><li><a href="https://www.w3.org/WAI/bcase/Overview"><em>Developing a Web Accessibility Business Case for Your Organization</em></a></li><li><a href="http://www.w3.org/WAI/"><em>WAI home page highlights</em></a></li><li><em>and more </em><a href="http://www.w3.org/WAI/Resources/"><em>WAI Resources</em></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0b8ba91a6b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IMAP RFCs]]></title>
            <link>https://medium.com/@AwesomePaaS/imap-rfcs-c92960325d1d?source=rss-e03d14e1d660------2</link>
            <guid isPermaLink="false">https://medium.com/p/c92960325d1d</guid>
            <dc:creator><![CDATA[Awesome PaaS]]></dc:creator>
            <pubDate>Mon, 01 Jun 2015 13:44:07 GMT</pubDate>
            <atom:updated>2015-06-01T13:44:07.001Z</atom:updated>
            <content:encoded><![CDATA[<h2>functional testing</h2><p>by Matthieu Baechler / mbaechler@linagora.com</p><p>IMAP being a text line-oriented protocol, it’s quite easy to write functional tests based on recorded sessions. It’s also a very well-documented protocol with a good base-RFC and a lot of extension RFCs.</p><p>We would like to write a comprehensive testsuite that could be able to check standard respect for various IMAP servers.</p><h3>James MPT</h3><p>James is an Apache project that aims at creating a very modular and customizable Java Mail Server.</p><p>As very smart people worked on this project in the past, it comes with a functional test tool called MPT.</p><p>An imap session looks like the following snippet :</p><pre>* OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE AUTH=PLAIN SASL-IR] test Cyrus IMAP v2.4.17-caldav-beta10-Debian-2.4.17+caldav~beta10-18 server ready<br>. LOGIN Bob toto<br>. OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE LIST-EXTENDED WITHIN QRESYNC SCAN XLIST X-REPLICATION URLAUTH URLAUTH=BINARY LOGINDISABLED COMPRESS=DEFLATE IDLE] User logged in SESSIONID=&lt;cyrus-227-1432893832-1&gt;<br>A1 LIST &quot;&quot; &quot;*&quot;<br>* LIST (\HasChildren) &quot;.&quot; INBOX<br>A1 OK Completed (0.000 secs 3 calls)<br>A2 SELECT INBOX<br>* 0 EXISTS<br>* 0 RECENT<br>* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)<br>* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)] Ok<br>* OK [UIDVALIDITY 1432893822] Ok<br>* OK [UIDNEXT 1] Ok<br>* OK [HIGHESTMODSEQ 1] Ok<br>* OK [URLMECH INTERNAL] Ok<br>A2 OK [READ-WRITE] Completed</pre><p>IMAP sessions are composed of commands, like <strong>LIST</strong> and <strong>SELECT</strong>. Each command includes a tag, e.g. <strong>A1</strong> which will be used in the answer.</p><p>The response includes tagged answers to link response lines with the sent command:</p><pre>A1 OK Completed (0.000 secs 3 calls)<br>A2 OK [READ-WRITE] Completed</pre><p>Answers can also be untagged, in this case they are prefixed with a star:</p><pre>* LIST (\HasChildren) &quot;.&quot; INBOX<br>* 0 EXISTS<br>* 0 RECENT<br>* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)<br>* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)] Ok<br>* OK [UIDVALIDITY 1432893822] Ok<br>* OK [UIDNEXT 1] Ok<br>* OK [HIGHESTMODSEQ 1] Ok<br>* OK [URLMECH INTERNAL] Ok</pre><p>Untagged answers can actually be unrelated to the input command. The only sure thing is that once you reached the next tagged answer, you should have received every information you asked for. Theses information could just be interleaved with unrequested lines.</p><p>That said, with some simple constructions, you can create a functional test language and it’s exactly what MPT is for.</p><p>If you would like to test the previous IMAP exchange, you could write an MPT test like this:</p><pre>S: \* OK.*<br>C: \. LOGIN Bob toto<br>S: \. OK .*<br>C: A1 LIST &quot;&quot; &quot;*&quot;<br>S: \* LIST \(\\HasChildren\) &quot;\.&quot; INBOX<br>S: A1 OK .*<br>C: A2 SELECT INBOX<br>SUB {<br>* 0 EXISTS<br>* 0 RECENT<br>* FLAGS \(\\Answered \\Flagged \\Draft \\Deleted \\Seen\)<br>* OK \[PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)] Ok<br>* OK \[UIDVALIDITY \d+\] Ok<br>* OK \[UIDNEXT \d+\] Ok<br>* OK \[HIGHESTMODSEQ \d+\] Ok<br>* OK \[URLMECH INTERNAL\] Ok<br>}<br>S: A2 OK \[READ-WRITE\] .*</pre><p>You can see the MPT language features :</p><ul><li><strong>C: </strong>is for client commands, just append a string behind, it’ll be sent to the server as is</li><li><strong>S:</strong> is for expected answers, the whole line is a regular expression, hence the backslashes everywhere</li><li><strong>SUB {}:</strong> is a section with unordered lines, it will check that all lines are matching one server response in any order. Again, each line is a regular expression.</li></ul><p><strong>And that’s it: Simple yet powerful !</strong></p><h3>What is MPT used for ?</h3><p>Today, MPT is here to test James at the outer scope. If the output is correct for a given input, the server is doing the right thing.</p><p>What’s really interesting is the very small distance between RFC’s terms and the test language : any IMAP-speaking person is able to understand and write any test, nothing is James specific.</p><h3>What else could we do ?</h3><p>At Linagora, we are long-time Cyrus IMAP users. But like a lot of other Cyrus users, we’d like to add some value inside our IMAP server and scale it at the cloud level.</p><p>We started to think about switching to James for some of our customers but we would really like to check that both servers act the same way : same implemented RFCs and same level of protocol compliance.</p><p>We think that MPT is exactly what we need : we write some tests and run them on both Cyrus and James.</p><h3>How we do it</h3><p>MPT is mostly some java code. To run on a given server, one needs to implement an interface for methods like “start”, “stop”, “add user”, “create mailbox”.</p><p>Cyrus IMAP being a C unix daemon, we made use of the usual swiss army knife to solve the problem: Docker.</p><p>For every single test, we start a Docker with an admin account configured and MPT runs its scripts to check the results.</p><h3>What is coming next ?</h3><p>We think that writing a conformance test suite that runs on (at least) two implementations is really a great thing for James. Not only will we check that everything works as expected, we will also make sure it works like everyone thinks it should.</p><p>We are already writing tests based on the IMAP ACL RFCs and we aim at running them on both Cyrus and James. Running them on a given implementation is just a matter of activating the right Maven profile. We’ll try to make existing MPT tests work on Cyrus, too. And finally, any new test will target both, everytime.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c92960325d1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cassandra:]]></title>
            <link>https://medium.com/@AwesomePaaS/cassandra-b2ff7cc07294?source=rss-e03d14e1d660------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2ff7cc07294</guid>
            <dc:creator><![CDATA[Awesome PaaS]]></dc:creator>
            <pubDate>Wed, 27 May 2015 08:01:36 GMT</pubDate>
            <atom:updated>2015-05-27T08:01:36.495Z</atom:updated>
            <content:encoded><![CDATA[<h2><strong>Working around Tuple</strong></h2><p>Antoine Duprat <a href="/service/mailto:aduprat@linagora.com">aduprat@linagora.com</a></p><h3>1. Needs</h3><p>In a current development, we have to store some <em>properties</em> in a <strong>Cassandra</strong> table.</p><p>Such <em>properties</em> can be represented as the following class:</p><pre><strong>public</strong> <strong>class</strong> <strong>Property</strong> {</pre><pre>    <strong>private</strong> <strong>final</strong> <strong>String</strong> namespace;<br>    <strong>private</strong> <strong>final</strong> <strong>String</strong> localName;<br>    <strong>private</strong> <strong>final</strong> <strong>String</strong> value;</pre><pre>    <strong>public</strong> Property(<strong>String</strong> namespace, <strong>String</strong> localName, <strong>String</strong> value) {<br>        this.namespace = namespace;<br>        this.localName = localName;<br>        this.value = value;<br>    }<br>...</pre><p>Where:</p><ul><li><strong>namespace</strong>: is part of the composed key</li><li><strong>localName</strong>: is the second part of the composed key</li><li><strong>value</strong>: is the corresponding value</li></ul><p>We may use a map for such data, but we don’t wanted to create a user-defined type for the key. The last constraint was that we want to store those <em>properties</em> as a simple column in <strong>Cassandra</strong>. So that’s why we choose to look at lists of tuple.</p><h3>2. CQL</h3><p>First of all, we have made some tests under cqlsh, in order to check that it really fits our needs.</p><h4>2.1 Table creation</h4><p>The column definition is a list of frozen tuple, as explain in the <strong>Cassandra</strong> documentation, the tuple has to be <strong>frozen</strong>.</p><p>Table creation:</p><pre>cassandra@cqlsh:test&gt; <strong>CREATE</strong> <strong>TABLE</strong> test (id <strong>int</strong> <strong>PRIMARY</strong> <strong>KEY</strong>, properties list&lt;frozen&lt;tuple&lt;<strong>text</strong>, <strong>text</strong>, <strong>text</strong>&gt;&gt;&gt;);</pre><h4>2.2 Inserting data</h4><p>Such operation is simple, we just have to insert a list of tuple which are surrounded by parentheses.</p><p>Inserting data:</p><pre>cassandra@cqlsh:test&gt; <strong>INSERT</strong> <strong>INTO</strong> test.test (id, properties) <strong>VALUES</strong> (1, [ (&#39;ns1&#39;, &#39;key1&#39;, &#39;value1&#39;), (&#39;ns1&#39;, &#39;key2&#39;, &#39;value2&#39;), (&#39;ns2&#39;, &#39;key1&#39;, &#39;value3&#39;) ]);</pre><h4>2.3 Retrieving data</h4><p>Nothing more to say than the example, data are well stored.</p><p>Retrieving data:</p><pre>cassandra@cqlsh:test&gt; <strong>SELECT</strong> * <strong>FROM</strong> test;</pre><pre> id | properties<br>----+-----------------------------------------------------------------------------------<br>  1 | [(&#39;ns1&#39;, &#39;key1&#39;, &#39;value1&#39;), (&#39;ns1&#39;, &#39;key2&#39;, &#39;value2&#39;), (&#39;ns2&#39;, &#39;key1&#39;, &#39;value3&#39;)]</pre><pre>(1 rows)</pre><h3>3. Coding with Java</h3><blockquote><strong><em>In this example, we use the 2.1.5 version of cassandra-driver-core.<br>You also need Java 8 to be installed.</em></strong></blockquote><blockquote><strong><em>All the code in this article is available at </em></strong><a href="https://github.com/aduprat/cassandra-tuple.git"><strong><em>Github</em></strong></a></blockquote><h4>3.1 Defining your data type</h4><p>First of all, we thought it easier in our code to use a constant in order to define the column.</p><pre><strong>public</strong> <strong>static</strong> <strong>final</strong> TupleType PROPERTY_TYPE = TupleType.of(DataType.text(), DataType.text(), DataType.text());</pre><h4>3.2 Table creation</h4><p>Then, the table creation is a simple list of our predefined <strong>TupleType</strong>.</p><pre><strong>private</strong> <strong>void</strong> createTableIfNotExists(Session session) {<br>    Create tableCreation = SchemaBuilder.createTable(TABLE_NAME)<br>        .ifNotExists()<br>        .addPartitionKey(ID, DataType.cint())<br>        .addColumn(PROPERTIES, DataType.list(PROPERTY_TYPE));<br>    session.execute(tableCreation);<br>}</pre><h4>3.3. Inserting data</h4><p>The TupleType API comes with the <strong>newValue</strong> method, which takes a <strong>varargs</strong> parameter. The order of the given parameters match the order of the <strong>TupleType</strong> definition, hence, you just have to respect that ordering.</p><pre><strong>public</strong> <strong>void</strong> save(<strong>int</strong> id, <strong>List</strong>&lt;Property&gt; properties) {<br>    Insert query = QueryBuilder.insertInto(TABLE_NAME)<br>            .value(ID, id)<br>            .value(PROPERTIES, properties.stream()<br>                    .map(x -&gt; PROPERTY_TYPE.newValue(x.getNamespace(), x.getLocalName(), x.getValue()))<br>                    .collect(Collectors.toList()));<br>    session.execute(query);<br>}</pre><h4>3.4. Retrieving data</h4><p>When retrieving data, you have to use the <strong>getList</strong> method from the <strong>Row</strong> class. The first parameter correspond to the underlying column, and the second to the class for the elements (<strong>TupleValue</strong> in our case).</p><pre><strong>public</strong> <strong>List</strong>&lt;Property&gt; get(<strong>int</strong> id) {<br>    Where query = QueryBuilder.select(PROPERTIES).from(TABLE_NAME)<br>        .where(QueryBuilder.eq(ID, id));</pre><pre>    <strong>ResultSet</strong> result = session.execute(query);<br>    <strong>if</strong> (result.isExhausted()) {<br>        <strong>return</strong> ImmutableList.of();<br>    }</pre><pre>    <strong>return</strong> result.one().getList(PROPERTIES, TupleValue.class).stream()<br>        .map(x -&gt; <strong>new</strong> Property(x.getString(0), x.getString(1), x.getString(2)))<br>        .collect(Collectors.toList());<br>}</pre><h3>Appendix : Source code</h3><pre><strong>package</strong> <strong>org.linagora.tuple</strong>;</pre><pre><strong>import</strong> <strong>com.google.common.base.Objects</strong>;</pre><pre><strong>public</strong> <strong>class</strong> <strong>Property</strong> {</pre><pre>    <strong>private</strong> <strong>final</strong> <strong>String</strong> namespace;<br>    <strong>private</strong> <strong>final</strong> <strong>String</strong> localName;<br>    <strong>private</strong> <strong>final</strong> <strong>String</strong> value;</pre><pre>    <strong>public</strong> Property(<strong>String</strong> namespace, <strong>String</strong> localName, <strong>String</strong> value) {<br>        this.namespace = namespace;<br>        this.localName = localName;<br>        this.value = value;<br>    }</pre><pre>    <strong>public</strong> <strong>String</strong> getNamespace() {<br>        <strong>return</strong> namespace;<br>    }</pre><pre>    <strong>public</strong> <strong>String</strong> getLocalName() {<br>        <strong>return</strong> localName;<br>    }</pre><pre>    <strong>public</strong> <strong>String</strong> getValue() {<br>        <strong>return</strong> value;<br>    }</pre><pre>    @Override<br>    <strong>public</strong> <strong>int</strong> hashCode() {<br>        <strong>return</strong> Objects.hashCode(namespace, localName, value);<br>    }</pre><pre>    @Override<br>    <strong>public</strong> <strong>boolean</strong> equals(<strong>Object</strong> obj) {<br>        <strong>if</strong> (obj <strong>instanceof</strong> Property) {<br>            Property that = (Property) obj;<br>            <strong>return</strong> Objects.equal(this.namespace, that.namespace)<br>                &amp;&amp; Objects.equal(this.localName, that.localName)<br>                &amp;&amp; Objects.equal(this.value, that.value);<br>        }<br>        <strong>return</strong> false;<br>    }</pre><pre>    @Override<br>    <strong>public</strong> <strong>String</strong> toString() {<br>        <strong>return</strong> Objects.toStringHelper(this)<br>                .add(&quot;namespace&quot;, namespace)<br>                .add(&quot;localName&quot;, localName)<br>                .add(&quot;value&quot;, value)<br>                .toString();<br>    }<br>}</pre><pre><strong>package</strong> <strong>org.linagora.tuple</strong>;</pre><pre><strong>import</strong> <strong>static</strong> <strong>org.linagora.tuple.Table.TableDefinition.ID</strong>;<br><strong>import</strong> <strong>static</strong> <strong>org.linagora.tuple.Table.TableDefinition.PROPERTIES</strong>;<br><strong>import</strong> <strong>static</strong> <strong>org.linagora.tuple.Table.TableDefinition.PROPERTY_TYPE</strong>;<br><strong>import</strong> <strong>static</strong> <strong>org.linagora.tuple.Table.TableDefinition.TABLE_NAME</strong>;</pre><pre><strong>import</strong> <strong>java.util.List</strong>;<br><strong>import</strong> <strong>java.util.stream.Collectors</strong>;</pre><pre><strong>import</strong> <strong>com.datastax.driver.core.DataType</strong>;<br><strong>import</strong> <strong>com.datastax.driver.core.ResultSet</strong>;<br><strong>import</strong> <strong>com.datastax.driver.core.Session</strong>;<br><strong>import</strong> <strong>com.datastax.driver.core.TupleType</strong>;<br><strong>import</strong> <strong>com.datastax.driver.core.TupleValue</strong>;<br><strong>import</strong> <strong>com.datastax.driver.core.querybuilder.Insert</strong>;<br><strong>import</strong> <strong>com.datastax.driver.core.querybuilder.QueryBuilder</strong>;<br><strong>import</strong> <strong>com.datastax.driver.core.querybuilder.Select.Where</strong>;<br><strong>import</strong> <strong>com.datastax.driver.core.schemabuilder.Create</strong>;<br><strong>import</strong> <strong>com.datastax.driver.core.schemabuilder.SchemaBuilder</strong>;<br><strong>import</strong> <strong>com.google.common.collect.ImmutableList</strong>;</pre><pre><strong>public</strong> <strong>class</strong> <strong>Table</strong> {</pre><pre>    <strong>private</strong> <strong>final</strong> Session session;</pre><pre>    <strong>public</strong> Table(Session session) {<br>        this.session = session;<br>        createTableIfNotExists(session);<br>    }</pre><pre>    <strong>private</strong> <strong>void</strong> createTableIfNotExists(Session session) {<br>        Create tableCreation = SchemaBuilder.createTable(TABLE_NAME)<br>            .ifNotExists()<br>            .addPartitionKey(ID, DataType.cint())<br>            .addColumn(PROPERTIES, DataType.list(PROPERTY_TYPE));<br>        session.execute(tableCreation);<br>    }</pre><pre>    <strong>public</strong> <strong>void</strong> save(<strong>int</strong> id, <strong>List</strong>&lt;Property&gt; properties) {<br>        Insert query = QueryBuilder.insertInto(TABLE_NAME)<br>                .value(ID, id)<br>                .value(PROPERTIES, properties.stream()<br>                        .map(x -&gt; PROPERTY_TYPE.newValue(x.getNamespace(), x.getLocalName(), x.getValue()))<br>                        .collect(Collectors.toList()));<br>        session.execute(query);<br>    }</pre><pre>    <strong>public</strong> <strong>List</strong>&lt;Property&gt; get(<strong>int</strong> id) {<br>        Where query = QueryBuilder.select(PROPERTIES).from(TABLE_NAME)<br>            .where(QueryBuilder.eq(ID, id));</pre><pre>        <strong>ResultSet</strong> result = session.execute(query);<br>        <strong>if</strong> (result.isExhausted()) {<br>            <strong>return</strong> ImmutableList.of();<br>        }</pre><pre>        <strong>return</strong> result.one().getList(PROPERTIES, TupleValue.class).stream()<br>            .map(x -&gt; <strong>new</strong> Property(x.getString(0), x.getString(1), x.getString(2)))<br>            .collect(Collectors.toList());<br>    }</pre><pre>    <strong>public</strong> <strong>interface</strong> <strong>TableDefinition</strong> {</pre><pre>        <strong>public</strong> <strong>static</strong> <strong>final</strong> <strong>String</strong> TABLE_NAME = &quot;test&quot;;<br>        <strong>public</strong> <strong>static</strong> <strong>final</strong> TupleType PROPERTY_TYPE = TupleType.of(DataType.text(), DataType.text(), DataType.text());</pre><pre>        <strong>public</strong> <strong>static</strong> <strong>final</strong> <strong>String</strong> ID = &quot;id&quot;;<br>        <strong>public</strong> <strong>static</strong> <strong>final</strong> <strong>String</strong> PROPERTIES = &quot;properties&quot;;</pre><pre>        <strong>public</strong> <strong>static</strong> <strong>final</strong> <strong>List</strong>&lt;<strong>String</strong>&gt; FIELDS = ImmutableList.of(ID, PROPERTIES);<br>    }<br>}</pre><pre><strong>package</strong> <strong>org.linagora.tuple</strong>;</pre><pre><strong>import</strong> <strong>static</strong> <strong>org.assertj.core.api.Assertions.assertThat</strong>;</pre><pre><strong>import</strong> <strong>java.util.List</strong>;</pre><pre><strong>import</strong> <strong>org.cassandraunit.CassandraCQLUnit</strong>;<br><strong>import</strong> <strong>org.cassandraunit.dataset.CQLDataSet</strong>;<br><strong>import</strong> <strong>org.junit.Before</strong>;<br><strong>import</strong> <strong>org.junit.Rule</strong>;<br><strong>import</strong> <strong>org.junit.Test</strong>;<br><strong>import</strong> <strong>org.linagora.tuple.Property</strong>;<br><strong>import</strong> <strong>org.linagora.tuple.Table</strong>;</pre><pre><strong>import</strong> <strong>com.google.common.collect.ImmutableList</strong>;</pre><pre><strong>public</strong> <strong>class</strong> <strong>TableTest</strong> {</pre><pre>    @Rule <strong>public</strong> CassandraCQLUnit cassandraCQLUnit = <strong>new</strong> CassandraCQLUnit(<strong>new</strong> CQLDataSet() {</pre><pre>        @Override<br>        <strong>public</strong> <strong>boolean</strong> isKeyspaceDeletion() {<br>            <strong>return</strong> true;<br>        }</pre><pre>        @Override<br>        <strong>public</strong> <strong>boolean</strong> isKeyspaceCreation() {<br>            <strong>return</strong> true;<br>        }</pre><pre>        @Override<br>        <strong>public</strong> <strong>String</strong> getKeyspaceName() {<br>            <strong>return</strong> &quot;test&quot;;<br>        }</pre><pre>        @Override<br>        <strong>public</strong> <strong>List</strong>&lt;<strong>String</strong>&gt; getCQLStatements() {<br>            <strong>return</strong> ImmutableList.of();<br>        }<br>    });</pre><pre>    <strong>private</strong> Table testee;</pre><pre>    @Before<br>    <strong>public</strong> <strong>void</strong> setup() {<br>        testee = <strong>new</strong> Table(cassandraCQLUnit.session);<br>    }</pre><pre>    @Test<br>    <strong>public</strong> <strong>void</strong> getShouldReturnEmptyListWhenNoMatch() {<br>        <strong>List</strong>&lt;Property&gt; properties = testee.get(1);<br>        assertThat(properties).isEmpty();<br>    }</pre><pre>    @Test<br>    <strong>public</strong> <strong>void</strong> saveEmptyList() {<br>        testee.save(1, ImmutableList.of());<br>        <strong>List</strong>&lt;Property&gt; properties = testee.get(1);<br>        assertThat(properties).isEmpty();<br>    }</pre><pre>    @Test<br>    <strong>public</strong> <strong>void</strong> saveASingleton() {<br>        ImmutableList&lt;Property&gt; expectedProperties = ImmutableList.of(<strong>new</strong> Property(&quot;ns1&quot;, &quot;key1&quot;, &quot;value1&quot;));<br>        testee.save(1, expectedProperties);<br>        <strong>List</strong>&lt;Property&gt; properties = testee.get(1);<br>        assertThat(properties).isEqualTo(expectedProperties);<br>    }</pre><pre>    @Test<br>    <strong>public</strong> <strong>void</strong> saveMultipleProperties() {<br>        ImmutableList&lt;Property&gt; expectedProperties = ImmutableList.of(<br>                <strong>new</strong> Property(&quot;ns1&quot;, &quot;key1&quot;, &quot;value1&quot;),<br>                <strong>new</strong> Property(&quot;ns1&quot;, &quot;key2&quot;, &quot;value2&quot;),<br>                <strong>new</strong> Property(&quot;ns2&quot;, &quot;key1&quot;, &quot;value3&quot;));<br>        testee.save(1, expectedProperties);<br>        <strong>List</strong>&lt;Property&gt; properties = testee.get(1);<br>        assertThat(properties).isEqualTo(expectedProperties);<br>    }<br>}</pre><pre>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;<br>  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br>  &lt;groupId&gt;linagora.org&lt;/groupId&gt;<br>  &lt;artifactId&gt;cassandra-tests&lt;/artifactId&gt;<br>  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;</pre><pre>  &lt;dependencies&gt;<br>    &lt;dependency&gt;<br>        &lt;groupId&gt;com.datastax.cassandra&lt;/groupId&gt;<br>        &lt;artifactId&gt;cassandra-driver-core&lt;/artifactId&gt;<br>        &lt;version&gt;2.1.5&lt;/version&gt;<br>        &lt;scope&gt;compile&lt;/scope&gt;<br>    &lt;/dependency&gt;<br>    &lt;dependency&gt;<br>        &lt;groupId&gt;com.google.guava&lt;/groupId&gt;<br>        &lt;artifactId&gt;guava&lt;/artifactId&gt;<br>        &lt;version&gt;16.0&lt;/version&gt;<br>    &lt;/dependency&gt;<br>    &lt;dependency&gt;<br>        &lt;groupId&gt;org.cassandraunit&lt;/groupId&gt;<br>        &lt;artifactId&gt;cassandra-unit&lt;/artifactId&gt;<br>        &lt;version&gt;2.0.2.2&lt;/version&gt;<br>        &lt;scope&gt;test&lt;/scope&gt;<br>    &lt;/dependency&gt;<br>    &lt;dependency&gt;<br>        &lt;groupId&gt;org.assertj&lt;/groupId&gt;<br>        &lt;artifactId&gt;assertj-core&lt;/artifactId&gt;<br>        &lt;version&gt;2.0.0&lt;/version&gt;<br>        &lt;scope&gt;test&lt;/scope&gt;<br>    &lt;/dependency&gt;<br>  &lt;/dependencies&gt;</pre><pre>  &lt;build&gt;<br>    &lt;plugins&gt;<br>      &lt;plugin&gt;<br>        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;<br>        &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;<br>        &lt;version&gt;3.3&lt;/version&gt;<br>        &lt;configuration&gt;<br>          &lt;source&gt;1.8&lt;/source&gt;<br>          &lt;target&gt;1.8&lt;/target&gt;<br>        &lt;/configuration&gt;<br>      &lt;/plugin&gt;<br>    &lt;/plugins&gt;<br>  &lt;/build&gt;<br>&lt;/project&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2ff7cc07294" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linagora at Mix-IT 2015]]></title>
            <link>https://medium.com/@AwesomePaaS/linagora-at-mix-it-2015-895f764f1749?source=rss-e03d14e1d660------2</link>
            <guid isPermaLink="false">https://medium.com/p/895f764f1749</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[talks]]></category>
            <dc:creator><![CDATA[Awesome PaaS]]></dc:creator>
            <pubDate>Mon, 27 Apr 2015 12:43:30 GMT</pubDate>
            <atom:updated>2015-04-27T12:43:30.145Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*buup79FxRNx7b9xCDUl4xQ.jpeg" /></figure><h2>What is Mix-IT ?</h2><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k4mA4P0dQfwBBMA2vHLWQg.png" /></figure><p><a href="http://www.mix-it.fr/">Mix-It</a> is a French conference organized by <a href="http://lyonjug.org/">the Lyon Java User Group</a> and <a href="http://lyon.clubagilerhonealpes.org/">the Club Agile Rhône-Alpes</a>. The main topics are development, agility (Scrum, Kanban, XP, Lean Startup…), innovation, IT trends, serious games… Mix-It conference was held on 16 and 17 April 2015. 7 keynotes were planned, 37 talks, 20 workshops, 72 speakers for about 550 attendees.</p><p>There is also a session for kids, called <a href="https://mixteen.github.io/">Mix-Teen</a>, because we need next generations to focus on IT technologies as young as possible, thanks to <a href="http://scratch.mit.edu/">Scratch</a> and <a href="http://www.algoid.net/">Algoid</a>.</p><p>As usual, organizers have a real worry of making these two days a healthy and relaxing period: pancakes at will, fruits, “viennoiseries”, real good local fruit-juices, coffee, tea, local tasty and healthy (organic?) food for lunch… Can you imagine that? no Pizza, no beer for geeks!</p><p>There were also talks about our responsibility about IT specialists (Do you want to build softwares spying civil population? Do you want to help banks have more efficient high frequency algorithms for the glory of the finance world? We talk a lot nowadays in France (and also in the rest of the world) of a French Intelligence bill (see what <a href="https://blog.mozilla.org/netpolicy/2015/04/22/mozilla-speaks-out-on-french-intelligence-bill/">Mozilla</a> thinks about it) and Tristan <a href="https://twitter.com/nitot">Nitot</a> (former president of <a href="https://en.wikipedia.org/wiki/Mozilla_Europe">Mozilla Europe,</a> now C3PO @MyCozyCloud) was here as a great advocate against this law, and with a lot humor underscore its highlight inconsistencies. Here’s the talk and slides on <a href="http://www.infoq.com/fr/presentations/cloud-vie-privee">InfoQ</a>. <a href="https://twitter.com/bortzmeyer">Stephane Bortzmeyer</a> was not left out either on the topic during his presentation named “Come to the dark side”. No, we don’t want to work for the dark side, with Linagora, we are working only for free open-source Software.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*N9qIHER5dHCB--1ATY-4PQ.jpeg" /></figure><p><a href="https://twitter.com/FlorencePorcel">Florence Porcel</a> (Author, actor, animator) was here too to narrate her experience as a competitor for the <a href="http://www.mars-one.com/">Mars One</a> expedition (one way ticket to Mars planned in 2027, yes, no return…). Unfortunately she failed during the Skype interview (should have used <a href="https://hubl.in/">Hubl.in</a> maybe), even if she was pre-selected in the final 1 058 candidates amongst 202 586. Her conclusion: “If you have a passion, go for it!”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*ePkBCc6ckFY-ou-tNxIMdw.png" /></figure><p>Our passion is Open-source software, and we daily go for it. A group of <a href="http://www.linagora.com/">Linagorians</a> (members of the <a href="http://www.obm.org/">OBM</a> team, <a href="http://www.open-paas.org/">Open-PaaS</a> team or <a href="http://www.linid.org/">linID</a> team) had the chance to be there. We (Antoine, Clément, Stéphane and Thomas) participated in many talks and workshops depending on our interests.</p><p>We will not describe all of them, but only a few ones we want to share with you. Then, at the end of this blog article, we will give you links to slides, videos or any website related.</p><h2>CQRS and event-sourcing</h2><p><em>by </em><a href="https://twitter.com/t_hilaire"><em>Thomas Hilaire</em></a><em> (Workshop by Clément Bouillier, Jean Helou, Emilien Pecoul &amp; Florent Pellet)</em></p><p>Throughout the good ambiance, nice talks and awesome Baos &amp; crepes I’ve been at the <a href="http://martinfowler.com/bliki/CQRS.html">CQRS</a> <a href="http://www.mix-it.fr/session/1041/agilite-par-le-code-grace-a-cqrs-et-eventsourcing">workshop</a>. Such hands-on makes more sense to me than 10 blog articles so I want to explain what I learnt through... another blog article! I won’t talk about the whole CQRS or<a href="http://martinfowler.com/eaaDev/EventSourcing.html"> event-sourcing</a> concepts but only show how an <a href="http://obm.org/">OBM</a>’s functionality can be rewritten following these patterns.</p><h3>The old and harmful way</h3><p><a href="http://obm.org/">OBM</a> is the free messaging and collaboration platform we develop. The following picture shows how OBM could search all invitations not yet replied for an user. Don’t worry, it’s not really like that!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*6FDE-AGg_6OF3plgZKkrJA.jpeg" /></figure><p>Events or meetings are known as a hell to be managed correctly in a computerized system. Because it’s time related, some data are user specific, representing a recurrence is painful and its exceptions even more…</p><p>To avoid to duplicate any stuff and keep their database terribly rigid, programmers like us have designed for years their data model as many single-concern tables, linked together with some constraints. So much that when you want to know a simple thing like “What are my not yet replied meetings ?” you fall in a bunch of *-joins, sub-queries and SQL conditions. So a simple need can lead to poor performance SQL requests, hard to test and to maintain.</p><h3>How CQRS and event-sourcing can kill that complexity</h3><h4>CQRS</h4><p>CQRS can be understood as a data-model pattern. It makes your application writing stuff in different “views” that you want to request later. Those “views” must hold all events needed by the business logic to decide what action should be done when an user interact with.</p><p>In this example, creating a meeting, accepting or declining it leads to write on the “meetings” table and in the “calendar_activity” table too. So “calendar_activity” is a view that your application can request in a simple way to know all activities done on a user calendar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*_6zLZUvermaEwSbkwSod_g.jpeg" /></figure><h4>Event-sourcing</h4><p>For its part, event-sourcing would be the code side pattern. It allows to consume all events recorded with the CQRS pattern. Mix-it facilitators have found some well colored pencils to draw some schema that I won’t reproduce ☺. You can find more theoretic explanations on their <a href="https://github.com/DevLyon/mixter/raw/Slide/slide.pdf">slides</a>.</p><p>Following the previous schema and to continue my example, the “calendar_activity” table can contains rows like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9j2ohv5dg6lRzCrJ4tAjiw.jpeg" /></figure><p>The event-sourcing way to figure out what are the “pending invitations” of the user “me@domain” is:</p><ul><li>Build the aggregate (a simple class) related to the feature “user invitations”</li><li>Execute the command “listPendingInvitations()” onto the aggregate</li><li>The aggregate fetches all user’s calendar activities (like “SELECT * FROM calendar_activity WHERE user = ‘me@domain’;”)</li><li>The aggregate constructs its “projection” (also call “state”) by replaying every activity</li><li>Then it “decides” what are the “pending invitations” and returns them to the caller.</li></ul><p>In this case the aggregate should returns only the event 16.</p><h2>Offline Web with Service Workers</h2><p><em>by </em><a href="https://twitter.com/antduprat"><em>Antoine Duprat</em></a><em> (Talk made by Hubert Sablonnière)</em></p><h3>Statement</h3><p>We perform multiple consulting of the same information, and then suffer from the vagaries of connections.<br>The connection is a feature, and the sites must be able to function without it.</p><h3>Offline first</h3><p>Websites should be designed to operate offline.<br>This principle helps relieve:</p><ul><li>Users</li><li>its battery</li><li>its data package</li><li>servers</li></ul><p>Websites should be available all the time just like native applications.</p><h3>Application Cache</h3><p>Improves the speed of multiple consultations.<br>But this approach is not beyond reproach:</p><ul><li>obligation to update the manifest</li><li>unable to list all</li><li>no additional unit</li><li>no unitary update</li><li>no unitary suppression</li></ul><p>Example: <a href="http://devdocs.io/">devdocs.io</a></p><h3>Service workers</h3><p>API specification by the W3C <a href="http://www.w3.org/TR/service-workers/">http://www.w3.org/TR/service-workers/</a><br>This is a low-level API, using a client-side proxy programmable between pages and server, with its own cache.<br>It allows to intercept/handle requests, so in the interest of safety, it is available in HTTPS only.</p><p>Example:</p><pre>if (&#39;serviceWorker&#39; in navigator) {<br>  navigator.serviceWorker.register(&#39;/sw.js&#39;)<br>  .then(function (registration) {<br>    console.log(&#39;SW OK&#39;, registration.scope);<br>  })<br>  .catch(function (err) {<br>    console.log(&#39;SW KO&#39;, err);<br>  })<br>}</pre><h4>New APIs for storage: The Cache</h4><p>Introduced a map request / response, not to be confused with an HTTP cache.</p><p>Example:</p><pre>self.addEventListener(&#39;fetch&#39;, function(event) {<br>  event.respondWith(caches.match(event.request));<br>});</pre><h4>New Query API: fetch ()</h4><p>Replaces XMLHttpRequest, easier to implement, fluent.</p><p>Example:</p><pre>var url = &#39;/api/conferences&#39;;<br>fetch (url)<br>  .then(function (response) {<br>    return response.json();<br>  })<br>  .then(function (conferences) {<br>    console.log(&#39;confs&#39;, conferences);<br>  })</pre><h4>Lifecycle</h4><p>The life cycle is driven by events:</p><ul><li>install: Installation of a new service worker</li><li>activate: activation of the new service worker</li></ul><p>Example:</p><pre>var CURRENT_CACHE = &#39;mon-site-v1&#39;,<br>  urlsToCache = [<br>    &#39;/&#39;,<br>    &#39;/main.css&#39;,<br>    &#39;/index.js&#39;,<br>    &#39;/logo.jpg&#39;<br>  ];<br><br>self.addEventListener(&#39;install&#39;, function (event) {<br>  event.waitUntil (<br>    caches.open(CURRENT_CACHE).then(function (cache) {<br>      return cache.addAll(urlsToCache);<br>    })<br>  );<br>});<br><br>self.addEventListener(&#39;activate&#39;, function (event) {<br>  // le SW essaye de s&#39;activer<br>});</pre><p>Other Custom events can be created:<br>Example:</p><pre>navigator.serviceWorker.register(&#39;/sw.js&#39;)<br>  .then(function (registration) {<br>    ref.active.postMessage({<br>      command: &#39;forceUdate&#39;,<br>      foobar: 42<br>    });<br>});<br><br>...<br><br>self.addEventListener(&#39;message&#39;, function (event) {<br>  if (event.data.command == &#39;forceUpdate&#39;) {<br>  }<br>}</pre><h3>Support</h3><p>Partially supported by:</p><ul><li>Chrome</li><li>Opera</li><li>Firefox (nightly)</li><li>IE: under consideration</li><li>Safari: ???</li></ul><h4>Useful links</h4><ul><li><a href="http://www.w3.org/TR/service-workers/">http://www.w3.org/TR/service-workers/</a></li><li><a href="http://jakearchibald.com/2014/offline-cookbook/">http://jakearchibald.com/2014/offline-cookbook/</a></li><li><a href="http://www.html5rocks.com/en/tutorials/service-worker/introduction/">http://www.html5rocks.com/en/tutorials/service-worker/introduction/</a></li></ul><h2>Material design implementation in Android</h2><p><em>by </em><a href="https://twitter.com/s_colson"><em>Stéphane Colson</em></a><em> (Talk by Mathieu Calba)</em></p><h3>What is Material design ?</h3><p><em>Material design (promoted by </em><a href="http://www.google.com/design/spec/material-design"><em>Google</em></a><em>)</em></p><p>If you use Google Inbox or Google Calendar (up to date on Android), or the awesome <a href="https://play.google.com/store/apps/details?id=com.linagora.esn">Open-PaaS application</a>, you know what is material design, but maybe you didn’t understand well what are the underlying concepts.</p><p>Material design is “a visual language that synthesizes classic principles of good design with the innovation and possibility of technology and science” (A rational approach to visual, interaction, and motion design).</p><p>This visual language is developed with single underlying systems compatible with all platforms and device sizes (coherent cross-platform experience).</p><h4>Principles</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*luHQj7WC3RufYrl9pTm8LQ.png" /></figure><p><strong>Material is the metaphor:</strong> the material is inspired by the experience you should have with paper and ink, with several layers you can show up or slip below another layer. By this way, user can easily links the design to the real physical world.</p><p>A new axis Z is introduced. Z = Elevation (The base depth of a view) + Translation Z (For the animations of the element). Then you can have an app bar with is a few dp (Density Pixel) above the base (2 dp is a low elevation, 8 is a high elevation). A drop shadow appears in order to highlight this elevation. Only starting with <a href="https://developer.android.com/about/versions/android-5.0.html">API Level 21</a> and above.</p><p>“Cards are a piece of paper with unique related data that serves as an entry point to more detailed information”. Cards have real shadows on API Level 21+, but PNG shadow on pre API Level 21.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*z0gTNyJOVEp9cIpVpUz2jA.png" /></figure><p><strong>Bold, graphic, intentional</strong>: material design, thanks to typography, grids, spaces, color, scale and use of imagery, guide visual treatments.</p><p>About colors, you have Primary and Accented colors. For your applications, because it’s not that easy to chose a primary and an accent color with all gradients that will transcend the User Experience, <a href="http://www.materialpalette.com/">http://www.materialpalette.com</a> can be a real help.</p><p>Imagery (and Google Calendar is a good example) is a good way to differentiate your product. It is possible to extract colors from images (for example from the cover of an album) and then use a sort-of auto-generated palette in all the design (be immersive).</p><p>Typography has also a lot of possibilities with many cool stuff starting one more time with API21.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*lcgKn83n10Xm3J8jARyUlg.png" /></figure><p><strong>Motion provides meaning</strong>: Even for a business application (not directly related to animation movies), your Material Design gains a lot from motions.</p><p>I suggest you to read this <a href="http://www.tandemseven.com/blog/how-to-use-disneys-principles-of-animation-to-improve-ux/">article</a> linking <a href="https://vimeo.com/93206523">Disney’s principle of animation</a> with UX application design.</p><p>Material Design allows you to add these animations to your application:</p><ul><li>Ripple (API 21+) when clicking somewhere (in a list)</li><li>Circular reveal (API 21+) to emphasize a group of UI elements (for example if new important data are added and you want the user to notice it)</li><li>Activity transitions when changing a view. You have this when selecting one application in the list of applications running (Android Launcher) on Android, or in most images applications when selecting an image in a list, this one is smoothly enlarged in full size.</li></ul><p>And of course, <strong>Adaptive Design</strong>. A Material Design application is totally responsive. You can use this <a href="https://play.google.com/store/apps/details?id=com.faizmalkani.keylines">Keyline</a> application to better design your application.</p><p>After this talk, I don’t see Material Designed applications with the same eyes.</p><p>Slides are available on <a href="https://speakerdeck.com/mathieu_calba/material-design-implementation-in-android">speakerdeck</a>.</p><h2>Links to other talks</h2><ul><li><a href="http://blog.testdouble.com/posts/2014-12-02-the-social-coding-contract.html">The social coding contract</a> by <a href="http://twitter.com/searls">Justin Searls</a></li><li><a href="https://speakerdeck.com/tastapod/the-three-ages-of-innovation">The three ages of Innovation</a> by <a href="https://twitter.com/tastapod">Dan North</a></li><li><a href="http://fr.slideshare.net/inseo/integration-web-qualite-productivite-ftw">Integration web : qualite &amp; productivite (FR)</a> by <a href="http://twitter.com/agence_inseo">Corinne Schillinger</a></li><li><a href="http://fr.slideshare.net/SamehBENFREDJ/introduction-liot-du-capteur-la-donnepresentation-mixit2015">Introduction to Internet of Things (FR)</a> by <a href="https://twitter.com/SamehBenF">Sameh Ben Fredj</a> &amp; <a href="https://twitter.com/PhilippeAntoine">Philippe Antoine</a></li><li><a href="http://clementd-files.cellar-c1.clvrcld.net/blog/tip-tricks-rdbms.html">Tips and Tricks for Clean RDB Schemas</a> by <a href="https://twitter.com/clementd">Clement Delafargue</a></li><li><a href="http://fr.slideshare.net/funnythingtodo/re-cadrage-en-quipe-agile">(Re)Cadrage en équipe agile (FR)</a> by <a href="https://twitter.com/clairemorin">Claire Morin</a> &amp; <a href="https://twitter.com/laure_delahaye">Laure Delahaye</a></li><li><a href="https://docs.google.com/presentation/d/1uBki-6ovuVelwSCJtINx-AiSG-Mcyakbow0SD8qbTpE">Jeu des prénoms revisités (FR)</a> by <a href="https://twitter.com/AlfredAlmendra">Alfred Almendra</a></li><li><a href="http://bit.ly/gradle-plugin">Build your own binary Gradle Plugin</a> by <a href="https://twitter.com/Eyal_Lezmy">Eyal Lezmy</a></li><li><a href="https://speakerdeck.com/vladislavpernin/mixit-2015-retour-dexperience-sur-kafka">Retour d’expérience sur Kafka (FR)</a> by <a href="https://twitter.com/vladislavpernin">Vladislav Pernin</a></li><li><a href="https://speakerdeck.com/julienvey/microplugins-with-docker">Microplugins with Docker</a> by <a href="https://twitter.com/julienvey">Julien Vey</a></li><li><a href="http://le-panda-roux-est-mon-nouvel-ami.jops-dev.com/">Le Panda roux est mon nouvel ami — Firefox OS (FR)</a> by <a href="https://twitter.com/johanpoirier">Johan Poirier</a></li><li><a href="http://fr.slideshare.net/erikschon/the-mental-leaps-at-ericsson-3g-ways-of-working-in-the-networked-society">The mental leaps at Ericsson 3G</a> by <a href="https://twitter.com/erik_schon">Erik Schön</a></li><li><a href="https://speakerdeck.com/bclozel/cloud-native-apps-with-spring-cloud">Cloud native apps with Spring Cloud</a> by <a href="https://twitter.com/brianclozel">Brian Clozel</a></li><li><a href="https://speakerdeck.com/corinnekrych/switch-to-swift-presented-at-mix-it2015">Switch to Swift</a> by <a href="https://twitter.com/corinnekrych">Corinne Krych</a></li><li>And soon videos on <a href="http://www.infoq.com/">InfoQ</a>…</li></ul><p>The conference was awesome as usual. We’d like to thank the <a href="http://www.mix-it.fr/staff">organizers</a>, the <a href="http://www.cpe.fr/">Ecole Supérieure de Chimi</a>e’s student volunteers that hosted the conference and the <a href="http://www.mix-it.fr/mixit15/sponsors">sponsors</a>. See you next year !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=895f764f1749" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is inline validation ?]]></title>
            <link>https://medium.com/@AwesomePaaS/what-is-inline-validation-522ad7c48626?source=rss-e03d14e1d660------2</link>
            <guid isPermaLink="false">https://medium.com/p/522ad7c48626</guid>
            <dc:creator><![CDATA[Awesome PaaS]]></dc:creator>
            <pubDate>Fri, 17 Apr 2015 14:07:28 GMT</pubDate>
            <atom:updated>2015-04-17T14:07:28.259Z</atom:updated>
            <content:encoded><![CDATA[<p>Inline validation is the name of a reactive validation system applied to some fields. In real life, it’s when you are typing “John Smith” in a nickname registration field and the service, after an awkward slight cough, turn everything on red and suggest you “john_smith_983543″ instead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*n8PHKleipy-7EiixuGJMxg.png" /></figure><p><em>Or maybe not. John smith buffer overflow ? (Twitter inline validation for sign up)</em></p><p>This method provide more feedback, is always up-to-date help users to complete forms faster, improve their satisfaction and provide a great check system for fields with high probability of error, especially when the errors are known only by the platform !</p><h4>Let’s go for the implementation</h4><p>Inline validation is finally a simple idea. That’s fortunate, because it <strong>has to</strong> be simple as possible. But despite this appearance, a lot of questions emerge as soon as we decide to write specifications and codes.</p><ul><li>Should we start the validation query at the first character typed to avoid useless request or wait for a convenient minimum ?</li><li>Should we put a grace period before send the query, and if we do it, how long should it be ?</li><li>Where are the visual feedback ?</li><li>What should becomes in error ? All the field ? Only the border ?</li></ul><p>And tons of little more questions. Although some of them can be perceived as futility, the addition of all this small decisions build a real implementation behavior, which is enough different to be noticed by the users. In this case, from a poor user experience to a great one : the devil is in the detail !</p><h4>So, we write a guideline to share the decision</h4><ul><li>At the first display, the field is neutral (no error)</li><li>An error of inline validation is :</li><li>A error red message, probably placed under the field A red border around the filed A font color of user input still as the original (not red)</li><li>If possible, no additional message under the field (like “has to be unique”). If it’s required, this additional message is not replaced by the error message. The both are displayed</li><li>Use a 1 second grace period*.</li><li>Display a throbber at the right of the input.</li><li>Live validation starts at the first char typed.</li><li>Live validation doesn’t replace classic validation for classics forms (by opposition for inline edition). If the error is triggered when user submit the form, use inline validation error message and display.</li><li>When user types or removes a char, hide the error message and the look of the field backs to normal, and call inline validation with grace period again.</li><li>When a field in error becomes correct after validation, field stay normal. No more error and no validation mark.(Example at pinterest. Counter example at Twitter).</li><li>If the field required a minimum length and the user stops his input before this limit, the inline validation should give a proper error message according this minimum requirement.</li></ul><p>* Actually in the best of all possible world, the grace period should be set in regard of operation duration. IE if a query take 3 sec itself to answer, 3 sec query + 1 sec grace period = 4 too long seconds with 1 artificial sec.</p><p>Fine. But it’s text, and we want to design UI.</p><h4>Illustrating guideline through wireframe</h4><p>You can find in the following link, a wireframe to illustrate our inline validation, with 3 parts : * Cinematic of a classic validation * Field places and combinations * Which feedback give when a user submit an apparently validated form but in fact there are still some remaining errors</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ReJ7_N7fz4uDVkVvDEI5Sg.png" /></figure><p>Even if it doesn’t seem to be a big deal, we hope everyone will enjoy this implementation !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=522ad7c48626" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>