<?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 Louis Lainé on Medium]]></title>
        <description><![CDATA[Stories by Louis Lainé on Medium]]></description>
        <link>https://medium.com/@llaine?source=rss-63b5e9bb84f2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MISDhuTHSd6paeWQCi-vdQ.jpeg</url>
            <title>Stories by Louis Lainé on Medium</title>
            <link>https://medium.com/@llaine?source=rss-63b5e9bb84f2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 13:22:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@llaine/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[How to do end-to-end testing on React Native with Detox]]></title>
            <link>https://medium.com/home-blog/how-to-do-end-to-end-testing-on-react-native-with-detox-2b7f404e7713?source=rss-63b5e9bb84f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b7f404e7713</guid>
            <category><![CDATA[end-to-end-testing]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[detox]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Louis Lainé]]></dc:creator>
            <pubDate>Wed, 09 Aug 2017 15:01:20 GMT</pubDate>
            <atom:updated>2017-09-11T12:57:07.642Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RQ--RfnManz02vrMz48FvA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*hWSfg4qxzielNrkEOyRTrg.gif" /><figcaption>Us <em>writing our React Native app at </em><a href="https://www.home.ht/"><em>Home</em></a></figcaption></figure><p><em>When we started writing our React Native app at </em><a href="https://www.home.ht/"><em>Home</em></a><em>, testing was something we took seriously from day one.</em></p><p><em>While it was easy to setup a proper unit-tests workflow with Jest and Typescript, we figure out end-to-end testing would be more difficult.</em></p><p><strong><em>But this was before discovering Detox.</em></strong></p><h3>What is end-to-end testing</h3><p>If I look over the internet and search for definitions about end-to-end testing, this is pretty much what I get :</p><blockquote>End-to-end testing is a technique used to test whether the flow of an application right from start to finish is behaving as expected. The purpose of performing end-to-end testing is to identify system dependencies and to ensure that the data integrity is maintained between various system components and systems.</blockquote><p>It’s basically like someone was using your application, except that this someone is a machine and follows your instructions very carefully.</p><p>Pretty much like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*uBKtt7rdxwnp9C6n4a21uQ.gif" /><figcaption>Detox in Action</figcaption></figure><h3>Why end-to-end testing</h3><p>Unit testing is great way to iterate over bits of your app and helps you understand the design of the code you are working on, end-to-end testing will be great to test the app as a whole.</p><p>For example before every new release we want to be sure that our critical paths are covered and we do not break existing features.</p><p>Another great thing about writing end-to-end tests is that you have put yourself in the user’s shoes and see how complex (or not) it is to perform a specific action on your app.</p><blockquote>- Did I tell you about this new great feature? It’s super easy to work with. Look all you have to do is login, Click here and then here and then double click here and …</blockquote><blockquote>- Wait, what? Wtf!</blockquote><p>Last but not least, you are automating the process of testing therefore the process of deployment is less painful and pushing new features is less stressful.</p><p>Meaning that you can enjoy some brew with your crew while the machines are doing the work for you 😉</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FZw3oBUuOlDJ3W%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fbeer-cheers-shaun-of-the-dead-Zw3oBUuOlDJ3W&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FZw3oBUuOlDJ3W%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="403" frameborder="0" scrolling="no"><a href="https://medium.com/media/113c26b21a41e32eedb979f3ead0279b/href">https://medium.com/media/113c26b21a41e32eedb979f3ead0279b/href</a></iframe><h3>Introducing Detox</h3><p><a href="https://github.com/wix/detox">Detox</a> is an end-to-end testing library for react native apps that enables you to emulate user behavior and test how your app reacts to it, automatically.</p><p>It also supports multiple device configurations, notifications, permissions and basically everything a user might do with your app.</p><p>Under the hood Detox uses <a href="https://github.com/mochajs/mocha">Mocha</a> as matchers and can be used natively with IOS and <a href="https://github.com/wix/detox/issues/96">soon Android</a>.</p><h3>Writing your first test using Detox</h3><p>Imagine that we have an app that allows a user to search for a specific employee and see their profile in order to contact them.</p><p>The app’s code is hosted on <a href="https://github.com/home-ht/react-native-detox-medium-article">Github</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vmfGAOobzHb8Yk46pj1KEQ.png" /></figure><p>Let’s start writing a simple test.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/06f005182726835083f152c8136c1d11/href">https://medium.com/media/06f005182726835083f152c8136c1d11/href</a></iframe><p>Now we can run it and look at the machine suffering while we are enjoying our beer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IYd4LLv6rTHD64SEJseAZw.gif" /></figure><p>Tasty, right?</p><p>Detox uses matchers to find UI elements in your app, actions to emulate user interaction with those elements and expectations to verify values on those elements.</p><p>Let’s have a look at them</p><p>Matchers find elements in your app that match one or more properties.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a47a364145dd51cdc3e38028349cb5a/href">https://medium.com/media/1a47a364145dd51cdc3e38028349cb5a/href</a></iframe><p>Actions are functions that emulate user behaviors. They are being performed on matched elements.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7386c74beb5b0048490e4a38aaf1b52/href">https://medium.com/media/e7386c74beb5b0048490e4a38aaf1b52/href</a></iframe><p>Expect verifies if a certain value is as expected to be.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f502befa42023eaa7e25f5c40c80c9e2/href">https://medium.com/media/f502befa42023eaa7e25f5c40c80c9e2/href</a></iframe><p>As we can see detox covers a lot of possible user interactions that can be automated.</p><h3>Make our tests more readable</h3><p>To be honest, we can do much better.</p><p>First let’s get rid of the duplication for matchers and actions</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d520b8a86540f14311181eb5dac6202a/href">https://medium.com/media/d520b8a86540f14311181eb5dac6202a/href</a></iframe><p>Now we can reduce the noise inside the tests and make them more readable.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e8623896e40a5cc3e9910adfa8baf9c6/href">https://medium.com/media/e8623896e40a5cc3e9910adfa8baf9c6/href</a></iframe><h3>What’s next ?</h3><h4>Automate the process and land on the moon 🚀</h4><p>Once we reached a certain amount of tests, we thought it could be nice to automate the process and think in terms of “continuous testing”.</p><p>That’s why we decided to run the end-to-end test on our build server.</p><p>Every new pull request that comes in, triggers unit tests with Jest on CircleCI and now also our end-to-end tests on Bitrise (our build server).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bo5ozfn-q037At6Ad0LQ3w.png" /></figure><p>Bitrise is super easy to work with, all you need to do is write a tiny recipe called “Workflow” (basically to say what needs to be done) and then sit back and relax. Look at the tests passing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UdVLdzjql5FEBAJGvc8J8w.png" /></figure><p>As you can see the whole process takes quite some time (15 minutes on avg in our case). This is mostly due to the Detox build scripts.</p><h4>Alternatives</h4><p>We also considered others libraries such as:</p><ul><li><a href="http://appium.io/">Appium</a> which is a cross platform test library where tests can be written in many languages (node, ruby, java, … ).</li><li><a href="https://github.com/kif-framework/KIF">Kif</a>, which describe itself as an iOS Functional Testing Framework.</li><li><a href="https://github.com/pixielabs/cavy">Cavy</a>, which is made for React-Native.</li></ul><p>Appium, even though its <a href="https://github.com/appium/sample-code/blob/master/sample-code/examples/node/android-complex.js">examples</a> looked very interesting, is fairly complicated to setup and use compared to Detox. Kif is only available on IOS and tests can only be written in Objective-C. In case of Cavy, we simply failed to get it to run. Hence, our choice of using Detox.</p><h3>Conclusion</h3><p>In this article we saw how to handle Detox and its API, how to automate everything with Bitrise (or any CI that can runs an IOS Simulator).</p><p>Thank’s to Detox, we became a happy <a href="https://www.home.ht/careers/">team</a> of react-native developers that drink way more beer than before. 🍻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b7f404e7713" width="1" height="1" alt=""><hr><p><a href="https://medium.com/home-blog/how-to-do-end-to-end-testing-on-react-native-with-detox-2b7f404e7713">How to do end-to-end testing on React Native with Detox</a> was originally published in <a href="https://medium.com/home-blog">Work at Home</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Taking GIT to the next level (Rewriting history).]]></title>
            <link>https://medium.com/@llaine/taking-git-to-the-next-level-rewriting-history-ce3628673445?source=rss-63b5e9bb84f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce3628673445</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Louis Lainé]]></dc:creator>
            <pubDate>Tue, 20 Oct 2015 10:46:17 GMT</pubDate>
            <atom:updated>2015-10-20T10:46:17.823Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<p>Last week I was to the <a href="http://www.bdx.io/#/home">bdxio</a> and I saw a wonderful talk about the advanced possibility of GIT.</p><p>In this tiny article we are going to play with <strong>rebase</strong>.</p><h3>Rebase</h3><p>What’s the point?</p><p><em>git-rebase — Forward-port local commits to the updated upstream head</em></p><p>Rebase is actually going to play again some commit over other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*dSCga_j6ye0I6CGVr0uFTw.png" /><figcaption>Before, replay commits over other</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*whkKW9TLcyR-PA8K1ln71Q.png" /><figcaption>After</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*TENc0YDhqbvzj_u2J4wjbA.png" /></figure><h4>Fast-forward</h4><p>If it’s possible git doesn’t look to create a merge commit even if a merge is requested.</p><p>For example, <a href="http://danielkummer.github.io/git-flow-cheatsheet/">git-flow</a> is using this technique. (I highly recommend you to use and to look at git-flow).</p><h3>Interactive-rebase</h3><p><em>git rebase -i &lt;COMMIT SHA&gt;</em></p><p>This command allow you to easily rewrite your history in a very flexible way, because you can rewrite pretty much everything.</p><p>You <strong>can</strong> reorder commits by just <strong>moving lines up or down</strong>, or removing commits by just <strong>removing a whole line</strong>.</p><p>In general, read what Git displays. For example, when you edit a commit, Git tells you what/how to do most of the things (git rebase — continue, etc.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*thXwIZwRm2ciL-vxzd_MLw.png" /></figure><h4>Be careful</h4><p>git rebase -i will display commits in chronological order, contrary to git log.</p><p>Enough theory, let’s practice.</p><h3>Easy ramp up</h3><p>I’ve work on a feature and I realize that I make commits that are not very useful.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/164fe58c58de8e1ecd55b49779dffa1d/href">https://medium.com/media/164fe58c58de8e1ecd55b49779dffa1d/href</a></iframe><p>The three commits are not consistent separately, I want to merge these commits to create only one (and remove all the useless (part X) part of the commit log).</p><p>Let’s use interactive rebase!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*-tZqk_bQk_fO7Pu2MexLLA.png" /><figcaption>git rebase -i HEAD~3</figcaption></figure><p>I’m going to replace <strong>pick</strong> with <strong>reword</strong> (or r) on the <strong>first</strong> commit, replace <strong>pick</strong> with <strong>f</strong> on the <strong>second</strong> and <strong>third</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*ryAtxNoHvC-ilkLoRqLaWw.png" /></figure><p>Save then git opens the editor to change the commit message.</p><p>Save and watch git squash automatically next commits.</p><p>You can now see with git log, that your three commit have been merged in one, and you have a clean history!</p><p>(You can also see what has been done, using the <strong>git reflog</strong> command).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*vp2mNx3JO_-5WgUT3quksA.gif" /></figure><h3>Bit harder</h3><p>Imagine now, that I have two commits that are a mess. They contain a dump of modifications, without much consistency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*oj44vgW26Ba48bAAOW9qEg.png" /></figure><p>Commit <strong>1e2ac</strong> contains different modifications :</p><ul><li>Adds a footer</li><li>Fixes the header added in the previous commit</li></ul><p>Commit <strong>a860 </strong>is a fix of commit <strong>1e2ac</strong>.</p><p>What I want, is split the “Add footer + rename header menus” commit to split it in two distinct commits (a first one with the header) and a second one with the footer part, and then just merge the “Add style.css (footer) commit into the second one we’ve just created.</p><ul><li>First, we need to open the interactive rebase on the first commit we want to modify, then put <strong>edit</strong> on the first line and <strong>fixup</strong> on the second one.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/68004df708e24608e90bb2e296718d45/href">https://medium.com/media/68004df708e24608e90bb2e296718d45/href</a></iframe><ul><li>Git puts us now on the <strong>a860a43 </strong>commit.</li><li>We need now to reset “softly” one commit behind (to keep the code modification) with <strong>git reset HEAD~</strong></li><li>git add -p, will allow us to interactively choose what we want to keep, split, etc. We are going to split with <strong>s </strong>to only stage the beginning of the file (the header).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*rTWv0UZsNLmyLjMV8pYsnw.png" /></figure><ul><li>After typing S, type Y, to save the split.</li><li>git commit -m “Added header”, to commit the split</li><li>git add -p again, to stage the end of the file</li><li>git commit -m “Added footer”</li><li>git rebase --continue to finish the rebase and update the master.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*jqQKtsY5wCV-09fuDx1H5g.gif" /></figure><p>Tadaaa</p><p>Quite simple right ?</p><p>We can now check our log and see that everything is fine!</p><p>I hope you guys enjoy reading this article, feel free to comment or just share this article!</p><h3>Ref and useful links</h3><ul><li><a href="http://ndpsoftware.com/git-cheatsheet.html">Mnemonic interactive webpage</a></li><li><a href="http://www.youtube.com/watch?v=4XpnKHJAok8">Git by Linus Torvald</a></li><li><a href="http://pcottle.github.com/learnGitBranching/">Learn git online</a></li><li><a href="https://github.com/schacon/git-presentations">Scott Chacon presentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce3628673445" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Meteor, the dark side of the moon.]]></title>
            <link>https://medium.com/@llaine/meteor-the-dark-side-of-the-moon-f885d8fdbf6a?source=rss-63b5e9bb84f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f885d8fdbf6a</guid>
            <category><![CDATA[meteor-framework]]></category>
            <category><![CDATA[meteorjs]]></category>
            <category><![CDATA[meteor]]></category>
            <dc:creator><![CDATA[Louis Lainé]]></dc:creator>
            <pubDate>Tue, 14 Jul 2015 09:37:23 GMT</pubDate>
            <atom:updated>2015-07-20T08:26:26.709Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<pre><strong>This article was not written in order to break the framework and the community. Just a feedback after a few months on the creation of an application by learning all the intricacies of the framework. All that is written here is the experience I had with the framework which can vary according to each .</strong></pre><p>TL;DR</p><p>I have seen many articles about how great meteor is few about the “drawbacks”. How it is to grow an app with meteor for a long term project with scaling purpose.</p><p>During almost one year, I wrote a big app with meteor During almost one year, I wrote a big app with meteor called <a href="https://nicetomateyou.com/">Nice to Mate You</a>, a social network to find the right roommates for your lifestyle.</p><p>Maybe I expected too much from this framework, and used it in the wrong way, but I hope that my experience will help all the new Meteor users. Here is my feedbacks :</p><h3>The Good Parts</h3><p>Last year, I had to choose a framework to begin the development of a social app. I discovered meteor and I was very excited about all the features the framework brings.</p><ol><li>Javascript on both the server and the client and the ability to share some code between the two.</li><li>Live page updates. Meteor has a very compelling model and performance has improved significantly with blaze.</li><li>Package management with meteor and npm works pretty well and there is a growing ecosystem of packages available around the <a href="https://atmospherejs.com/">meteor atmosphere</a>.</li></ol><p>Building features is very easy and exciting because you can very quickly build things that can “live” that you can try and use directly. All the template system with helpers or events attached is one of the reason that allow you do to that. In addition to the wow effect of meteor and you get something really pretty.</p><h3>The Good Parts (not that good)</h3><h4>Lack of structure</h4><p>The first thing you realised when you start developping with meteor, is the absence of specific tree structure (except for the client/server). Wich means your are absolutely free to create your own.</p><p>This looks pretty cool at the beginning but looking back it’s very difficult to maintain the whole structure.</p><p>Because when you have more than 10 features which themselves have more than 10 features, etc. (1 feature = at least 3 files. html, js and optionnally a css/less file).</p><p>Indeed you must be extremely accurate when you are choosing all your filename and the way you are going to create your structure because this will follow you until the end of the project.</p><blockquote>Okay but which structure ?</blockquote><p>A good tree structure would be something which is divided into functionnals blocks.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/64cb4df3eb9ee524f162d5cf9c4cd8c7/href">https://medium.com/media/64cb4df3eb9ee524f162d5cf9c4cd8c7/href</a></iframe><p>With this method everything is going to be “in place” and when I’m going to read the file at the line 9 (on the example) I would be reading all the helpers/utils function for my recover-password account feature.</p><p>Now Imagine something much more permissive.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa4db70f3705d6a14756cd0fe0a0517b/href">https://medium.com/media/fa4db70f3705d6a14756cd0fe0a0517b/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*EqC-zRuR8rjSFqLQP2qiOQ.jpeg" /></figure><h4>Battle against the framework</h4><p><strong>Livereload</strong>.</p><p>One of the key features of meteor is the live reload. This function which avoids you reloading the browser whenever something is added to a file.</p><p>Actually this feature is very good at the beginning. However as your codebase increase the small latent period between the moment you’r changing something and the moment the browser is reloading increase as well.</p><p>I have more than 300 files (less, js, html and assets) whenever I change something the latent time takes at least more than 5 seconds.</p><p>Thus my browser have to render all the DOM with assets and everything everytimes I press Ctrl + S with the latent period.</p><p>I have a late 2011 Macbookpro with 8 Gb of RAM and it blows a lot lately …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*0NOfACKX-s5q2cUDeB4QOQ.jpeg" /></figure><p>Oh and If you want to disable the hot code push feature <a href="http://stackoverflow.com/questions/24778312/how-can-i-prevent-meteor-hot-reloads-while-still-keeping-meteor-attempt-reload">do yourself a favor!!</a></p><p><strong>Debugging</strong></p><p>Without IDE (such as WebStorm) debugging in server side is quite complex and you have to use the old fashioned <em>console.log.</em></p><p>Debugging on the client works well enough using Chrome’s developer tools. Things get hairy again on the client when something goes wrong with your templates.</p><p>I definitely wasted too much time with meteor debugging on both the server and the client.</p><p><strong>MongoDb</strong></p><p>I came from the Node/Mongoose world where mongodb fit just perfectly with nodejs. But in the meteor world is not that simple … Because meteor use the mini mongo driver so you have some limitation.</p><blockquote>Minimongo is reimplementation of <strong>(almost) </strong>the entire MongoDB API, against an<br>in-memory JavaScript database.</blockquote><p>In fact in meteor mongodb’s findAndModify, upsert, aggregate functions, and map/reduce aren’t supported (for now I hope) without installing a third-party package.</p><p><strong>Production</strong></p><p>Deploying for free in meteor.com is a nice feature.</p><p>When it’s your turn to deploy on a bare metal server it’s not <a href="https://www.digitalocean.com/community/tutorials/how-to-deploy-a-meteor-js-application-on-ubuntu-14-04-with-nginx">as easy as</a> <em>meteor deploy</em> command.</p><p>Indeed the deployement show us that all the code is minified in one single file for the html, js and css and we are back in a node.js app. You have plenty of packages installed by default which process a lot of things and are very expensive in terms of CPU/Memory on a production server.</p><blockquote>So meteor is only about dev workflow ?</blockquote><p>Yes.</p><p>In fact meteor is very “narrow minded” and if you want to make thing out of the boundaries, the framework will make you understand that it’s not possible, you have to make different or hack the process.</p><h3>Bottom line</h3><p>Meteor is a very good idea and a good framework BUT.</p><ul><li>Be sure that you need all the features provided by meteor.</li></ul><blockquote>Do I need all those reactive features things and everything to create a blog ?</blockquote><ul><li>I wouldn’t recommend it as primary choice except to build a prototype to test your idea and move forward in a leaning process spirit.</li><li>If you want to use meteor, be very rigorous and ask yourself if you need all of those fancy things. (Otherwise you will regret it later I guarantee it).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*wPXOom4KdahZgIDMnFf3Pg.png" /><figcaption>MEAN vs METEOR</figcaption></figure><p>This picture express exactly the way I see meteor now.</p><p>You rely too much on the framework, you’re only the driver so if something break or does not <a href="https://github.com/meteor/windows-preview/issues/130#issuecomment-119463316">work as expected</a>. You either have to go to the mechanic or fix the thing by yourself (which has the end is not what we would expect from a framework).</p><p>I learned meteor during the past year by doing and making mistakes (the best and fastest way to learn). I struggled against the framework, maybe because all the features provided by meteor does not fit my needs. So I have decided to stop using Meteor and move on something new. First because I want to focus on my features rather than focus on “holy crap why is this not working normally” and secondly it’s always exciting to learn a new language and framework</p><p>Feel free to give your feedbacks about your own Meteor experience, comment and share if you are struggling too.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f885d8fdbf6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Operate with harmony (Symfony2 + AngularJS)]]></title>
            <link>https://medium.com/@llaine/operate-with-harmony-symfony2-angularjs-283b641d3b05?source=rss-63b5e9bb84f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/283b641d3b05</guid>
            <dc:creator><![CDATA[Louis Lainé]]></dc:creator>
            <pubDate>Sun, 08 Jun 2014 09:27:42 GMT</pubDate>
            <atom:updated>2014-06-08T09:27:42.555Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building an application with those wonderful frameworks.</h4><h3>Abstract</h3><p>Here’s my solution of the problem, maybe there is another which is less touchy. I succeeded in solving this problem. As I didn’t find any post about this subject, I want to explain you how I did it.</p><h3>Back end part, the API.</h3><p>As a web developer i love using <a href="http://symfony.com/"><strong>Symfony2</strong></a> for web based php project. The way you making PHP is really nice, clean and stable.</p><p>Recently i had to implement a web application based on REST. I chose Symfony to build this app. I looked at the <a href="https://github.com/FriendsOfSymfony/FOSRestBundle"><strong>FOSRestBundle</strong></a>, to help me but i found the bundle was quite complex for my app. I decided to build my own.</p><p>Indeed the framework allows you to create easily your own API.</p><p>On top of the HTTPFondation Component, you can create any type of response via the <a href="http://api.symfony.com/2.4/Symfony/Component/HttpFoundation/Response.html">Response</a> class by setting the right content and headers.</p><p>Moreover the Route component allows you to add HTTP method requirements for your routes. In addition to the URL, you can match the incoming request (i.e. GET, HEAD, POST, PUT, DELETE). Thereby, you can have two routes with the same URL using a different method, and for example render a form and submit it with the same URL.</p><h4>Controller</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*q3PCEiqAANA0EN0DkWVuWA.png" /><figcaption>A custom action rendering JSON</figcaption></figure><h4>Routing</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*kwxyrJ_wj1j2Zt52K7fIdg.png" /></figure><p>My API is now setup. I can store datas, return them in JSON matching my routes with HTTP requirements.</p><h3>Front-end part.</h3><p>I decided to use AngularJS, in other because of the MVC configuration, declarative user interface, easy DOM manipulations, unit testing with Karma …</p><p>After some research, i didn’t find an easy method or way to implement Angular with Symfony.</p><p>So i decided (once again), to build my own.</p><p>Symfony makes your life simpler to manage assets.</p><p>It’s very easy and all you need to do is put all your assets in your src/Foo/FooBarBundle/<em>Resources/public/ </em>folder<em>.</em></p><p>And include them in your templates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*tkFYWqWOVHzfdnHjfmKZ7Q.png" /><figcaption>Symfony documentation for Assetic</figcaption></figure><p>Using Assetic is nice, but will cause problem with angular.</p><p>All those assets are going to be publish in the <em>web/bundles</em> folder with a particular name generate by assetic.</p><p>Angular will be lost, and won’t find them.</p><p>So i decided to put by myself the javascript in the <em>web/bundles/FooBarBundle/js </em>and<em> …/partials </em>concerning the angular template.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*yXh_VV6AIMMYvbSSjxrDDw.png" /></figure><p>Include them in my base template.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*5kI6thEW88wEyGC1PAEe8w.png" /><figcaption>app/Resources/views/base.html.twig</figcaption></figure><p>As i want to use multiple template with angular, i need to use the <strong>ng-view </strong>directive.</p><p>So i created a single twig template, located in the <em>views</em>/ folders of my bundle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*adLLSEXhWchbsUP0D7b2Zw.png" /><figcaption>app-v2/<a href="https://bitbucket.org/llaine/seating-v2/src/4fb3eb55956b/src/?at=dev">src</a>/fooBar/fooBarBundle/<a href="https://bitbucket.org/llaine/seating-v2/src/4fb3eb55956b/src/SQLI/SeatingBundle/Resources/?at=dev">Resources</a>/<a href="https://bitbucket.org/llaine/seating-v2/src/4fb3eb55956b/src/SQLI/SeatingBundle/Resources/views/?at=dev">views</a>/<a href="https://bitbucket.org/llaine/seating-v2/src/4fb3eb55956b/src/SQLI/SeatingBundle/Resources/views/Default/?at=dev">Default</a>/index.html.twig</figcaption></figure><p>This template, is going to be my “main” template for all the angular views.</p><p>The last things i did is a little touchy. You need to provide a template each route with the framework.</p><p>Angular won’t know where to find them because of the special tree folder of symfony.</p><p>To tweak this, i use the <strong>document.location </strong>object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*-JK4lOduNSSwU-jAbPQSLw.png" /></figure><p>So now i can make request to my API in an Angular controller.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*eF6l5mFxXuGwCmKuN42eAg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=283b641d3b05" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>