<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: nikolaof</title>
    <description>The latest articles on DEV Community by nikolaof (@nikolaof).</description>
    <link>https://dev.to/nikolaof</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F90779%2Fd37f7dff-c432-4add-abfd-81fc5d6e7aa9.png</url>
      <title>DEV Community: nikolaof</title>
      <link>https://dev.to/nikolaof</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nikolaof"/>
    <language>en</language>
    <item>
      <title>AngularJS communication between two components</title>
      <dc:creator>nikolaof</dc:creator>
      <pubDate>Thu, 27 Sep 2018 20:12:06 +0000</pubDate>
      <link>https://dev.to/nikolaof/angularjs-communication-between-two-components-4ni8</link>
      <guid>https://dev.to/nikolaof/angularjs-communication-between-two-components-4ni8</guid>
      <description>&lt;p&gt;Hi. &lt;/p&gt;

&lt;p&gt;I'm writing an SPA using angularJS and so far I have created two distinct components for the app one called &lt;code&gt;loginModal&lt;/code&gt; and the other one &lt;code&gt;listFiles&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In the html I call them like&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;login-modal&amp;gt;&amp;lt;/login-modal&amp;gt;
&amp;lt;list-files&amp;gt;&amp;lt;/list-files&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;On init of the &lt;code&gt;loginModal&lt;/code&gt; component, I check if there is a valid JWT token stored and if not I ask for login. If the login is successful the modal closes and the JWT token is being stored. Along with the JWT also a string defining a directory path (for that specific user) is retrieved from the server.&lt;/p&gt;

&lt;p&gt;Now what I want to achieve after a successful login, is to somehow trigger a method inside the listFiles component to make a call to the API using the directory string taken before.&lt;/p&gt;

&lt;p&gt;Is something like this possible? Can someone provide me with some info resources on how to do such a thing?&lt;/p&gt;

&lt;p&gt;Also, any other idea is welcome.&lt;/p&gt;

&lt;p&gt;Thank you.&lt;/p&gt;

</description>
      <category>angular</category>
      <category>components</category>
      <category>help</category>
    </item>
    <item>
      <title>Handling user sessions when using the laravel just for the API and angularJS as a front-end</title>
      <dc:creator>nikolaof</dc:creator>
      <pubDate>Wed, 12 Sep 2018 19:57:04 +0000</pubDate>
      <link>https://dev.to/nikolaof/handling-user-sessions-when-using-the-laravel-just-for-the-api-and-angularjs-as-a-front-end-5emi</link>
      <guid>https://dev.to/nikolaof/handling-user-sessions-when-using-the-laravel-just-for-the-api-and-angularjs-as-a-front-end-5emi</guid>
      <description>&lt;p&gt;Hi.&lt;/p&gt;

&lt;p&gt;I'm building an app that could be used by both registered users and visitors. What those users could do, is to upload some files. The difference is that guests' files will be stored temporarily. So I'm trying to design a way to handle user sessions.&lt;/p&gt;

&lt;p&gt;As you can see in the image I posted below, for the registered users after login JWT will be stored on the browser's local storage and when user's next request is to list his/her files there will be a variable inside the JWT to tell the server where to look for the user's files (which path).&lt;/p&gt;

&lt;p&gt;Now for the guests, I thought that I should do something similar but without the login step. For example, when a guest enters to the site, javascript will check if there is a non-expired token on local storage. If that's true, then a random JWT that will point to a temp directory will be created from the server and will be stored onto the browser. But I don't know if this approach is reasonable or if there is any other better approach to do it.&lt;/p&gt;

&lt;p&gt;Here is the sketch on how I imagine it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sketch.io/render/sk-0e12e9fcabf7f97a14449ec02679ad73.jpeg"&gt;https://sketch.io/render/sk-0e12e9fcabf7f97a14449ec02679ad73.jpeg&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What do you think? Any ideas or suggestions will be helpful. Thanks.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>help</category>
    </item>
    <item>
      <title>Controlling a raspberry pi 3 from an android app</title>
      <dc:creator>nikolaof</dc:creator>
      <pubDate>Fri, 10 Aug 2018 13:35:27 +0000</pubDate>
      <link>https://dev.to/nikolaof/controlling-a-raspberry-pi-3-from-an-android-app-50dc</link>
      <guid>https://dev.to/nikolaof/controlling-a-raspberry-pi-3-from-an-android-app-50dc</guid>
      <description>&lt;p&gt;Hi.&lt;br&gt;
I'm planning to create an android app that will send commands and receive some results to/from a raspberry pi 3 module. For example one such command could be to enable a fan for 3 mins. For these three mins (while the fan is running) the raspberry pi will send the temperature data received from a temp sensor, in the app side, where a graph with these values will be provided. &lt;/p&gt;

&lt;p&gt;The way I'm thinking of it:&lt;br&gt;
The app is going to scan for available devices. &lt;br&gt;
It will connect to the raspberry pi.&lt;br&gt;
A python Bluetooth server will run on the raspberry pi site executing the commands that the android app sent to it and will send back to the app some of the data.&lt;/p&gt;

&lt;p&gt;So far I found by a search on the internet, the Evothings framework but I would like to read your suggestions on how to build quite easily such app.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

</description>
      <category>help</category>
      <category>android</category>
      <category>dev</category>
    </item>
  </channel>
</rss>
