<?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 magbeat on Medium]]></title>
        <description><![CDATA[Stories by magbeat on Medium]]></description>
        <link>https://medium.com/@magbeat?source=rss-82db2a219dd9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Gdx7nJnIShkB27ITRSOGnA.jpeg</url>
            <title>Stories by magbeat on Medium</title>
            <link>https://medium.com/@magbeat?source=rss-82db2a219dd9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 07:40:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@magbeat/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[My first Flutter project as an long time Angular developer]]></title>
            <link>https://medium.com/novaloop-ag/my-first-flutter-project-as-an-long-time-angular-developer-385ed2b0f5c0?source=rss-82db2a219dd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/385ed2b0f5c0</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[magbeat]]></dc:creator>
            <pubDate>Tue, 20 Sep 2022 08:42:08 GMT</pubDate>
            <atom:updated>2022-09-27T20:22:07.033Z</atom:updated>
            <content:encoded><![CDATA[<p>I am a full stack software engineer with 10 years of experience with .Net (Core) and Angular (I have started with AngularJS).</p><p>We, at <a href="https://www.novaloop.ch/en">Novaloop</a> needed an MVP (or rather a working prototype) and we decided to implement it in Flutter. We chose Flutter mainly because we wanted to be quick and we wanted the MVP to potentially run on all different platforms.</p><h3>The search for a new community</h3><p>As a long time user of the .Net Framework and Angular, I am very familiar with influential people in the community that create good content. This is definitely not the case for Flutter.</p><p>It’s not easy coming from the outside into a new community and catching up for several years.</p><p>There is a very active Discord channel (<a href="https://discord.com/invite/N7Yshp4">https://discord.com/invite/N7Yshp4</a>) and also a lot going on in the Subreddit (<a href="https://www.reddit.com/r/FlutterDev/">https://www.reddit.com/r/FlutterDev/</a>). Many developers are also very active on Twitter.</p><p>I have put together a Twitter list: <a href="https://twitter.com/i/lists/1540588470950846466">https://twitter.com/i/lists/1540588470950846466</a></p><p>And here are a few selected Twitter accounts.</p><h3>Twitter Community</h3><p>Hint: The Flutter community handles use the blue heart emoji extensively ;)</p><p>No particular order:</p><ul><li><a href="https://twitter.com/RydMike">@RydMike</a> Learn a lot about theming</li><li><a href="https://twitter.com/vandadnp">@vandadnp</a> Flutter courses on YouTube</li><li><a href="https://twitter.com/RobertBrunhage">@RobertBrunhage</a> Great Flutter courses</li><li><a href="https://twitter.com/felangelov">@felangelov</a> Author of the Bloc library</li><li><a href="https://twitter.com/vgventures">@vgventures</a> Maintainer of the Bloc library</li><li><a href="https://twitter.com/remi_rousselet">@remi_rousselet</a> Author of Provider and Riverpod</li><li><a href="https://twitter.com/biz84">@biz84</a> Great Flutter courses</li><li><a href="https://twitter.com/ThomasBurkhartB">@ThomasBurkhartB</a> Author of get_it dependency injection</li><li><a href="https://twitter.com/mhadaily">@mhadaily</a> Community leader and organizer</li><li><a href="https://twitter.com/verry_codes">@verry_codes</a> Flutterista and community leader Flutter DACH</li><li><a href="https://twitter.com/letsgetwckd">@letsgetwckd</a> Great Flutter courses (flutterly)</li><li><a href="https://twitter.com/resocoder">@resocoder</a> Great flutter courses</li><li><a href="https://twitter.com/devangelslondon">@devangelslondon</a> Community leader</li><li><a href="https://twitter.com/ASalvadorini">@ASalvadorini</a> Flutter speaker</li><li><a href="https://twitter.com/roaakdm">@roaakdm</a> Flutterista and Flutter Vikings speaker</li><li><a href="https://twitter.com/CFDevelop">@CFDevelop</a> Flutter Dev</li><li><a href="https://twitter.com/luke_pighetti">@luke_pighetti</a> Flutter GDE (Genuinely Disturbed Engineer)</li></ul><h3>Learning Resources</h3><p>Of course, and everyone will say this, the best resource is the official site and the respective documentation of the packages.</p><p>But on my way to the first Flutter project, the following materials helped me a lot.</p><ul><li><a href="https://docs.flutter.dev/">https://docs.flutter.dev</a></li><li>Decoding Flutter <a href="https://www.youtube.com/playlist?list=PLjxrf2q8roU1fRV40Ec8200rX6OuQkmnl">https://www.youtube.com/playlist?list=PLjxrf2q8roU1fRV40Ec8200rX6OuQkmnl</a></li><li>Flutter widget of the week <a href="https://www.youtube.com/playlist?list=PLjxrf2q8roU23XGwz3Km7sQZFTdB996iG">https://www.youtube.com/playlist?list=PLjxrf2q8roU23XGwz3Km7sQZFTdB996iG</a></li><li>The Boring Show <a href="https://www.youtube.com/playlist?list=PLjxrf2q8roU3ahJVrSgAnPjzkpGmL9Czl">https://www.youtube.com/playlist?list=PLjxrf2q8roU3ahJVrSgAnPjzkpGmL9Czl</a></li><li>Code with Andrea, very comprehensive Flutter courses <a href="https://codewithandrea.com/">https://codewithandrea.com/</a></li><li>Flutter Community @ Reddit <a href="https://www.reddit.com/r/FlutterDev/">https://www.reddit.com/r/FlutterDev/</a></li><li>Flutter Community @ Youtube <a href="https://www.youtube.com/c/FlutterCommunityVideos">https://www.youtube.com/c/FlutterCommunityVideos</a></li><li>Flutter @ Youtube <a href="https://www.youtube.com/c/flutterdev">https://www.youtube.com/c/flutterdev</a></li><li>Flutterfly @ Youtube <a href="https://www.youtube.com/c/Flutterly">https://www.youtube.com/c/Flutterly</a></li><li>Majid Hajian @ Youtube <a href="https://www.youtube.com/c/mhadaily">https://www.youtube.com/c/mhadaily</a></li><li>Reso Coder @ Youtube <a href="https://www.youtube.com/c/ResoCoder">https://www.youtube.com/c/ResoCoder</a></li><li>Vandad Nahavandipoor @ Youtube <a href="https://www.youtube.com/c/VandadNP">https://www.youtube.com/c/VandadNP</a></li><li>Robert Brunhage @ Youtube <a href="https://www.youtube.com/c/RobertBrunhage">https://www.youtube.com/c/RobertBrunhage</a></li><li>Robert Brunhage Courses <a href="https://robertbrunhage.com/">https://robertbrunhage.com/</a></li><li>FilledStacks @ Youtube <a href="https://www.youtube.com/c/FilledStacks/featured">https://www.youtube.com/c/FilledStacks/featured</a></li></ul><p>And following Udemy courses I bought and watched individual chapters when needed during the development.</p><ul><li>Dart &amp; Flutter — Zero to Mastery [2022] + Clean Architecture (German) <a href="https://www.udemy.com/course/dart-flutter-leicht-gemacht/">https://www.udemy.com/course/dart-flutter-leicht-gemacht/</a></li><li>Flutter &amp; Dart — The Complete Guide [2022 Edition] <a href="https://www.udemy.com/course/learn-flutter-dart-to-build-ios-android-apps/">https://www.udemy.com/course/learn-flutter-dart-to-build-ios-android-apps/</a></li><li>The Complete 2021 Flutter Development Bootcamp with Dart <a href="https://www.udemy.com/course/flutter-bootcamp-with-dart/">https://www.udemy.com/course/flutter-bootcamp-with-dart/</a></li><li>Flutter — Intermediate <a href="https://www.udemy.com/course/flutter-intermediate/">https://www.udemy.com/course/flutter-intermediate/</a></li><li>Dart and Flutter: The Complete Developer’s Guide <a href="https://www.udemy.com/course/dart-and-flutter-the-complete-developers-guide/">https://www.udemy.com/course/dart-and-flutter-the-complete-developers-guide/</a></li></ul><h3>First steps</h3><h3>Dart</h3><p>Coming from C# and Typescript, Dart wasn’t too much of a hurdle. Long story short: I learned to love Dart.</p><p>Sure, compared to Typescript, certain tasks are more tedious, e.g. parsing JSON responses to objects. But the static analysis over the project works very well and is worth its weight in gold ;)</p><h3>Everything is a Widget</h3><p>At the beginning it takes a bit of getting used to, but with time it actually becomes very natural.</p><p>Flutter’s declarative widget system has allowed us to quickly and easily implement specifications from UX designers. At a pace that I have never seen before.</p><h3>Architecture and Code Organization</h3><p>As with many things, Flutter is not very opiniated. It is up to the team to choose the appropriate architecture and also to determine the appropriate solution for the organization of the code.</p><p>Feature-first, layer-first — your choice</p><h3>Configuration</h3><p>I’m used to the framework already bringing solutions and making it easy for a developer to ship different environments. To my knowledge, there is no official solution.</p><p>Andrea has published a good article with a suggestion: <a href="https://codewithandrea.com/articles/flutter-api-keys-dart-define-env-files/">https://codewithandrea.com/articles/flutter-api-keys-dart-define-env-files/</a></p><h3>Hot Topics</h3><h3>State Management</h3><p><a href="https://docs.flutter.dev/development/data-and-backend/state-mgmt/options">https://docs.flutter.dev/development/data-and-backend/state-mgmt/options</a></p><p>Periodically, Mike Rydstrom (<a href="https://twitter.com/RydMik">https://twitter.com/RydMik</a>) publishes an overview of the State Management Solutions with the most LIKEs. <a href="https://twitter.com/RydMike/status/1528827017172504579">https://twitter.com/RydMike/status/1528827017172504579</a></p><p>This is the hottest topic in the community. Hardly anyone doesn’t have an opinion on it. As far as I understand, there is no official recommendation from Google. There is a discussion about whether there was once an official endorsement for Flutter BLoC. At IO ’18, it seems that the BLoC architecture was presented and the package was then developed according to this architecture design. At the moment there seems to be a big momentum for Provider and for the next generation of it: Riverpod. These are maintained by Remi Rousselet (<a href="https://twitter.com/remi_rousselet">https://twitter.com/remi_rousselet</a>). Soon there will be a new major release (2.0) of Riverpod and there seems to be a lot of changes and simplifications coming our way in the next few months. See also the talk of Remi at the Flutter Vikings conference <a href="https://youtu.be/C2Zp731g8Es?t=12762">https://youtu.be/C2Zp731g8Es?t=12762</a></p><p>The courses of Andrea Bizzotto are great when it comes to Riverpod and a possible architecture. Andrea proposes an architecture and calls it Riverpod Architecture <a href="https://codewithandrea.com/articles/flutter-app-architecture-riverpod-introduction/">https://codewithandrea.com/articles/flutter-app-architecture-riverpod-introduction/</a></p><p>To get a feel for both architectures, we developed our project with both state management solutions. To be fair, the first version was implemented with Riverpod and the second version with BLoC, so we had already learned a lot during the implementation of the second version. I know NgRx very well from Angular and therefore felt very quickly at home with the BLoC pattern. We also want to store a part of the state in local memory and reload it on restart. We have implemented this with Riverpod itself in the BLoC package there is already a solution hydrated_bloc. Also the possibility of global observers has helped us a lot in the development and has helped a bit over the lack of Redux tools (in the browser).</p><p>Detailed overview by <a href="https://twitter.com/illiaromanenko">@illiaromanenko</a>: <a href="https://github.com/illia-romanenko/flutter_state_management_investigation/blob/main/readme.md">https://github.com/illia-romanenko/flutter_state_management_investigation/blob/main/readme.md</a></p><h3>GetX</h3><p>This seems to be the red rag in the community. In the world of Harry Potter, it would be compared to Voldemort. In the popularity rankings it is high up, if not on the first place when it comes to state management and dependency injection. But as far as I understand it is considered by the community as its own framework and not as an extension for Flutter. It uses completely different approaches and thus hides much of the Flutter DNA.</p><h3>Dependency Injection</h3><p>As a .NET and Angular developer, I am very familiar with Dependency Injection and use it extensively. So I was rather surprised that there is no solution in the framework out of the box. Again, there are many options and packages. Some even do without Dependency Injection and use singletons or instantiate classes directly. But new is glue and it makes it difficult to write tests.</p><p>Riverpod already brings a lot with Provider. For the rest and for BLoC we relied on get_it from Thomas Burkhart (<a href="https://twitter.com/ThomasBurkhartB">https://twitter.com/ThomasBurkhartB</a>).</p><h3>Router</h3><p>Not so long ago Flutter released a new Navigator 2.0. It offers a new declarative API and was received controversially by the community. It is said to be very complicated and hard to learn. (As far as I know you can use Navigator 1.0 together with Navigator 2.0).</p><p>There are several packages that aim to make the usage of the new Navigator 2.0 easier. We have decided on using the `go_router` package. There was a new major release just a few days ago: <a href="https://pub.dev/packages/go_router">https://pub.dev/packages/go_router</a></p><p>We were missing the guard functionality of the Angular router. As a hint: most of the guard logic can be implemented in the `redirect` block of the `go_router`.</p><h3>Flutter on the Web</h3><p>What finally moved us to work with Flutter was the possibility to publish for the web as well. Unfortunately, the implementation is quite “unconventional”. Unlike Angular or React, Flutter does not produce HTML and CSS, but uses the canvas. There are two different rendering options with their advantages and disadvantages.</p><p>Some background articles on this:</p><ul><li><a href="https://docs.flutter.dev/development/platform-integration/web/renderers">https://docs.flutter.dev/development/platform-integration/web/renderers</a></li><li><a href="https://wilsonwilson.dev/articles/flutter-web-renderers">https://wilsonwilson.dev/articles/flutter-web-renderers</a></li><li><a href="https://medium.com/flutter/hummingbird-building-flutter-for-the-web-e687c2a023a8">https://medium.com/flutter/hummingbird-building-flutter-for-the-web-e687c2a023a8</a></li><li><a href="https://medium.com/flutter/flutter-web-support-updates-8b14bfe6a908">https://medium.com/flutter/flutter-web-support-updates-8b14bfe6a908</a></li><li><a href="https://medium.com/@GSYTech/how-to-optimize-flutter-web-and-how-flutter-web-work-in-html-renderer-b399ffd66718">https://medium.com/@GSYTech/how-to-optimize-flutter-web-and-how-flutter-web-work-in-html-renderer-b399ffd66718</a></li></ul><h3>Router</h3><p>Not so long ago Flutter released a new Navigator 2.0. It offers a new declarative API and was received controversially by the community. It is said to be very complicated and hard to learn. (As far as I know you can use Navigator 1.0 together with Navigator 2.0).</p><p>There are several packages that aim to make the usage of the new Navigator 2.0 easier. We have decided on using the `go_router` package. There was a new major release just a few days ago: <a href="https://pub.dev/packages/go_router">https://pub.dev/packages/go_router</a></p><p>We were missing the guard functionality of the Angular router. As a hint: most of the guard logic can be implemented in the `redirect` block of the `go_router`.</p><h3>Testing Flutter Web Apps</h3><p>This is what I missed the most from Angular. I am a big one of integration testing in the frontend. For this I prefer to use Cypress. Cypress is unfortunately not usable with Flutter, resp. only via detours and by far not as comfortable as Angular. With the integration_test package similar results can be achieved and hot reload seems to be possible. Unfortunately I failed there. For the current project we have also set the BLoC package and for a certain part of the state we need the hydrated_bloc package. Unfortunately at the moment it seems that no integration tests can be realized: <a href="https://github.com/flutter/flutter/issues/96939">https://github.com/flutter/flutter/issues/96939</a></p><h3>Conclusion</h3><p>The next comments are strictly my personal opinion and refer only to the web version and not to the mobile development part of Flutter.</p><p>I love Flutter’s declarative widget system. The speed at which prototypes and executable MVPs can be developed, for all platforms, is impressive.</p><p>I would not, as of today, implement a complex and long-lived web application with Flutter. For an executable prototype or a small MVP to test the market, Flutter is great.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=385ed2b0f5c0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/novaloop-ag/my-first-flutter-project-as-an-long-time-angular-developer-385ed2b0f5c0">My first Flutter project as an long time Angular developer</a> was originally published in <a href="https://medium.com/novaloop-ag">Novaloop AG</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Complex Configuration in Cypress.io]]></title>
            <link>https://medium.com/ecologic/complex-configuration-in-cypress-io-4f61a47840a9?source=rss-82db2a219dd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f61a47840a9</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[cypress]]></category>
            <category><![CDATA[cypress-io]]></category>
            <category><![CDATA[e2e-testing]]></category>
            <dc:creator><![CDATA[magbeat]]></dc:creator>
            <pubDate>Tue, 26 Feb 2019 17:42:00 GMT</pubDate>
            <atom:updated>2019-02-26T17:42:00.357Z</atom:updated>
            <content:encoded><![CDATA[<h3>Work in Progress</h3><p>In our setup, multiple sites are deployed with the same code base. So it would make sense to reuse a lot of the testing code for all sites. To achieve this we decided to reuse the same Docker container and provide the needed configuration variables via the entrypoint script.</p><p>We have a config Folder in the cypress Folder and are building the final configuration file together from all the pieces.</p><p>To do so we use the index.js file in the pluginsfolder:</p><p>(we also installed the merge-json npm package)</p><pre>const fs = require<em>(</em>&#39;fs-extra&#39;<em>)</em>;<br>const mergeJSON = require<em>(</em>&#39;merge-json&#39;<em>)</em>;<br>const path = require<em>(</em>&#39;path&#39;<em>)</em>;<br><br><br>async function getConfigurationByFile<em>(</em>division, environment, locale<em>) {<br><br><br>    </em>let defaultConfig = <em>{<br>        </em>&quot;env&quot;: <em>{</em>&quot;localePrefix&quot;: locale<em>}<br>    }</em>;<em><br><br>    </em>const filePaths = <em>[<br>        </em>path.resolve<em>(</em>`cypress/config/$<em>{</em>division<em>}</em>`, &#39;defaults.json&#39;<em>)</em>,<br>        path.resolve<em>(</em>`cypress/config/$<em>{</em>division<em>}</em>`, &#39;pages.json&#39;<em>)</em>,<br>        path.resolve<em>(</em>`cypress/config/$<em>{</em>division<em>}</em>`, &#39;seo.json&#39;<em>)</em>,<br>        path.resolve<em>(</em>`cypress/config/$<em>{</em>division<em>}</em>`, `env-$<em>{</em>environment<em>}</em>.json`<em>)<br>    ]</em>;<br><br>    for <em>(</em>let filePath of filePaths<em>) {<br>        </em>const config = await fs.readJson<em>(</em>filePath<em>)</em>;<br>        if <em>(</em>config.env<em>) {<br>            </em>Object.keys<em>(</em>config.env<em>)</em>.forEach<em>((</em>key<em>) </em>=&gt; <em>{<br>                </em>config.env<em>[</em>key<em>] </em>= JSON.stringify<em>(</em>config.env<em>[</em>key<em>])</em>;<br>            <em>})</em>;<br>            defaultConfig = mergeJSON.merge<em>(</em>defaultConfig, config<em>)</em>;<br>        <em>}<br>    }<br><br>    </em>return new Promise<em>((</em>resolve, reject<em>) </em>=&gt; <em>{<br>        </em>resolve<em>(<br>            </em>defaultConfig<br>        <em>)</em>;<br>    <em>})<br>}<br><br></em>module.exports = <em>(</em>on, config<em>) </em>=&gt; <em>{<br>    </em>const division = config.env.division;<br>    const environment = config.env.environment;<br>    const locale = config.env.locale;<br><br>    return getConfigurationByFile<em>(</em>division, environment, locale<em>)</em>;<br><em>}</em>;</pre><p>Cypress does only allow to store key / value pairs env of the config. Therefore we apply JSON.stringify() on them and later on in the spec file we parse them back to JSON objects JSON.parse(Cypress.env(&#39;&lt;env_key&gt;&#39;))</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f61a47840a9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ecologic/complex-configuration-in-cypress-io-4f61a47840a9">Complex Configuration in Cypress.io</a> was originally published in <a href="https://medium.com/ecologic">EcoLogic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a DatoCMS Plugin using Angular]]></title>
            <link>https://medium.com/ecologic/create-a-datocms-plugin-using-angular-4679b558a56d?source=rss-82db2a219dd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4679b558a56d</guid>
            <category><![CDATA[datocms]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[magbeat]]></dc:creator>
            <pubDate>Wed, 07 Nov 2018 08:22:56 GMT</pubDate>
            <atom:updated>2018-11-07T08:23:44.398Z</atom:updated>
            <content:encoded><![CDATA[<h3>Example: DatoCMS Multiselect Plugin</h3><p><a href="https://github.com/EcoLogicAG/datocms-plugin-multiselect">EcoLogicAG/datocms-plugin-multiselect</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*gda2IP8v0wYQqEGVf1DCAQ.png" /></figure><h3>The Beginning</h3><pre>ng new datocms-plugin-&lt;purpose&gt;<br>npm install --save datocms-plugins-sdk</pre><p>You won’t need a router for the plugin.</p><p>Add the DatoCMS CSS to index.html</p><pre>&lt;head&gt;<br>   ...<br>   &lt;link <em>href=</em>&quot;https://unpkg.com/datocms-plugins-sdk/dist/sdk.css&quot; <em>media=</em>&quot;all&quot; <em>rel=</em>&quot;stylesheet&quot;/&gt;<br>   ...<br>&lt;/head&gt;</pre><p><a href="https://github.com/EcoLogicAG/datocms-plugin-multiselect/blob/master/src/index.html">https://github.com/EcoLogicAG/datocms-plugin-multiselect/blob/master/src/index.html</a></p><p>Import the SDK in app.component.ts</p><pre><em>import </em>DatoCmsPlugin <em>from </em>&#39;datocms-plugins-sdk&#39;;</pre><pre>...</pre><pre>export class AppComponent implements OnInit {</pre><pre>   ...</pre><pre>   ngOnInit(): void {<br>      DatoCmsPlugin.init((plugin) =&gt; {<br>         <br>         ...</pre><pre>      });<br>   }<br>}</pre><p><a href="https://github.com/EcoLogicAG/datocms-plugin-multiselect/blob/master/src/app/app.component.ts">https://github.com/EcoLogicAG/datocms-plugin-multiselect/blob/master/src/app/app.component.ts</a></p><p>Do your stuff with the template and the component.</p><p><a href="https://www.datocms.com/docs/plugins/sdk-reference/">https://www.datocms.com/docs/plugins/sdk-reference/</a></p><p>For development and testing you can serve the app on <a href="http://localhost:4200/">http://localhost:4200</a> as usual. Then create a new private plugin over at DatoCMS and use <a href="http://localhost:4200/">http://localhost:4200</a> as the “Entry point URL”. (You have to allow unsafe content in the browser for testing)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*J2ot-9RJTntsq0iSP7DX3w.png" /></figure><h3>Publish</h3><p><a href="https://www.datocms.com/docs/plugins/publishing/">https://www.datocms.com/docs/plugins/publishing/</a></p><h3>What Went Wrong</h3><p>The plugins are served on unpkg.com from a subdirectory, eg. <a href="https://unpkg.com/@ecologic/datocms-plugin-multiselect@0.0.7/dist/index.html">https://unpkg.com/@ecologic/datocms-plugin-multiselect@0.0.7/dist/index.html</a></p><p>For this to work with Angular we need to adapt the &lt;base href=”/”&gt; path in index.html. The easiest way to do this is using the package.json file:</p><pre>{</pre><pre>...<br>   &quot;version&quot;: &quot;0.0.7&quot;,<br>   ...<br>   &quot;scripts&quot;: {<br>      &quot;build&quot;: &quot;ng build --prod --configuration production --base-href https://unpkg.com/@ecologic/datocms-plugin-multiselect@$npm_package_version/dist/ --output-path dist&quot;<br>   }<br>}</pre><p><a href="https://github.com/EcoLogicAG/datocms-plugin-multiselect/blob/master/package.json">EcoLogicAG/datocms-plugin-multiselect</a></p><p>Then build and publish your plugin an you should be fine.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4679b558a56d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ecologic/create-a-datocms-plugin-using-angular-4679b558a56d">Create a DatoCMS Plugin using Angular</a> was originally published in <a href="https://medium.com/ecologic">EcoLogic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplified Image Dialog for TinyMCE in Directus]]></title>
            <link>https://medium.com/ecologic/simplified-image-dialog-for-tinymce-in-directus-aca5c00380af?source=rss-82db2a219dd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/aca5c00380af</guid>
            <category><![CDATA[tinymce]]></category>
            <category><![CDATA[directus]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[magbeat]]></dc:creator>
            <pubDate>Fri, 16 Feb 2018 16:51:06 GMT</pubDate>
            <atom:updated>2018-08-24T15:44:48.608Z</atom:updated>
            <content:encoded><![CDATA[<p>For one of our customers we have created a <a href="https://github.com/EcoLogicAG/tiny-images">simplified image dialog</a> when using the full WYSIWYG editor in the <a href="https://getdirectus.com/">Directus</a> backend.</p><p>Our customer is not interested in inserting external images to a text but wants to chose from the images already uploaded to Directus. There is an image list which can be enabled in the column settings of the table. Go to the column settings -&gt; interface options and scroll down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*u1RGT9hFBUZqkihw55pwhw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*g8x_b6Qtc9yWn2Ld2bOMtA.png" /></figure><p>Unfortunately this basic image list does only show a list of titles. Our customer wants to see thumbnails for images. So we replaced the standard image plugin of the bundled tinyMce editor with a custom one. This plugin looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*etk97QxvxUZD4V5LbGPEPQ.png" /></figure><p>When you click on an image it gets sent to the editor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*cBxE3iHr6iuEOoTlWNLRDQ.png" /></figure><p>To use the custom plugin, simply copy over plugin.min.js and styles.css from <a href="https://github.com/EcoLogicAG/tiny-images">github</a> to assets/js/vendor/tinymce/plugins/image. Enable the ‘image’ plugin in app/core/interfaces/wysiwyg_full/interface.js. Thats it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*2xtX4uIpvmcJVssl0xvViQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/1*GA7OjhplQ0z8vHXcdoeq7A.png" /></figure><p>Thats it. The repository is <a href="https://github.com/EcoLogicAG/tiny-images">https://github.com/EcoLogicAG/tiny-images</a></p><p>To use the plugin as an additional plugin one could rename the plugin (and the button and menu identifier) and add it as an new plugin in app/core/interfaces/wysiwyg_full/interface.js (Needs to be added to the plugins and the toolbar properties.)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aca5c00380af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ecologic/simplified-image-dialog-for-tinymce-in-directus-aca5c00380af">Simplified Image Dialog for TinyMCE in Directus</a> was originally published in <a href="https://medium.com/ecologic">EcoLogic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Localization in AutoMapper with .NET Core]]></title>
            <link>https://medium.com/ecologic/using-localization-in-automapper-with-net-core-47e6d1ea8c0b?source=rss-82db2a219dd9------2</link>
            <guid isPermaLink="false">https://medium.com/p/47e6d1ea8c0b</guid>
            <category><![CDATA[aspnet]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[microsoft]]></category>
            <dc:creator><![CDATA[magbeat]]></dc:creator>
            <pubDate>Mon, 20 Mar 2017 08:37:43 GMT</pubDate>
            <atom:updated>2018-08-24T15:45:03.312Z</atom:updated>
            <content:encoded><![CDATA[<p>The author of AutoMapper Jimmy Bogard wrote a nice blog post on how he integrated AutoMapper in the new Dependency Injection framework of .NET Core.</p><p><a href="https://lostechies.com/jimmybogard/2016/07/20/integrating-automapper-with-asp-net-core-di/">Integrating AutoMapper with ASP.NET Core DI</a></p><p>To use localization in AutoMapper we had to basically change three lines of code in Startup.cs and install the AutoMapper.Extensions.Microsoft.DependencyInjection NuGet package.</p><pre>var config = new MapperConfiguration(cfg =&gt; { cfg.AddProfile(new AutoMapperConfig()); });<br>services.AddSingleton(sp =&gt; config.CreateMapper());</pre><p>Becomes:</p><pre>services.AddMvc();<br>services.AddAutoMapper(typeof(Startup));</pre><p>It is important to note that `services.AddAutoMapper()` has to be called after `services.AddMvc()`.</p><p>You don’t need to supply AutoMapper with your profiles anymore. AutoMapper will search the assemblies to initialize itself. All resolvers will be registered in the DI container of .NET Core by AutoMapper.</p><p>You can now use the localizer in your profile:</p><pre>public class AutoMapperConfig : Profile<br>{<br>    public AutoMapperConfig()<br>    {<br>        CreateMap&lt;Model, ViewModel&gt;()<br>            .ForMember(dest =&gt; dest.Titel, opt =&gt; opt.ResolveUsing&lt;TranslateResolver, string&gt;(src =&gt; src.Titel));<br>    }</pre><pre>public class TranslateResolver : IMemberValueResolver&lt;object, object, string, string&gt;<br>    {<br>        private readonly IStringLocalizer&lt;TranslateResolver&gt; _localizer;</pre><pre>public TranslateResolver(IStringLocalizer&lt;TranslateResolver&gt; localizer)<br>        {<br>            _localizer = localizer;<br>        }<br>        <br>        public string Resolve(object source, object destination, string sourceMember, string destMember,<br>            ResolutionContext context)<br>        {<br>            return _localizer[sourceMember];<br>        }<br>    }<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47e6d1ea8c0b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ecologic/using-localization-in-automapper-with-net-core-47e6d1ea8c0b">Using Localization in AutoMapper with .NET Core</a> was originally published in <a href="https://medium.com/ecologic">EcoLogic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>