some fixes

This commit is contained in:
Andreas Zweili 2018-03-14 15:58:02 +01:00
parent c1906e9ffa
commit d22d279cef
2 changed files with 82 additions and 130 deletions

View File

@ -26,39 +26,36 @@
<body>
<div class="reveal">
<div class="slides">
<section id="sec-title-slide"><h1 class="title">Case-Study</h1><h2 class="author">Ivan Hörler und Andreas Zweili</h2><p class="date">Created: 2018-03-14 Mit 14:53</p>
<section id="sec-title-slide"><h1 class="title">Case-Study</h1><h2 class="author">Ivan Hörler und Andreas Zweili</h2><p class="date">Created: 2018-03-14 Mit 15:56</p>
</section>
<section id="table-of-contents">
<nav id="table-of-contents">
<h2>Inhaltsverzeichnis</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#/slide-org8529c66">Ausgangslage</a></li>
<li><a href="#/slide-orgb395864">Varianten</a></li>
<li><a href="#/slide-orgb5d00f0">Kosten</a></li>
<li><a href="#/slide-org75a1fcd">Vorgehen</a></li>
<li><a href="#/slide-org08d0509">Fazit</a></li>
<li><a href="#/slide-org32ea894">Ausgangslage</a></li>
<li><a href="#/slide-org3bf6c19">Varianten</a></li>
<li><a href="#/slide-orgdc12e46">Kosten</a></li>
<li><a href="#/slide-org2edfd64">Vorgehen</a></li>
<li><a href="#/slide-org6911068">Fazit</a></li>
</ul>
</div>
</nav>
</section>
<section>
<section id="slide-org8529c66">
<h2 id="org8529c66">Ausgangslage</h2>
<section id="slide-org32ea894">
<h2 id="org32ea894">Ausgangslage</h2>
<ul>
<li>Webshop erstellen</li>
<li>Währungsumrechnung CHF zu &#x2026;</li>
<li>Freie Software in Bezug auf Open-Source Code.</li>
</ul>
<p>
Um einen ersten Anhaltspunkt zu haben, haben wir ein Mindmap gezeichnet in
welchem wir unsere ersten Ideen erfassten.
</p>
</section>
<section id="slide-org622ab5a">
<h3 id="org622ab5a">Vision</h3>
<section id="slide-org5573951">
<h3 id="org5573951">Vision</h3>
<p>
Die Vision wurde anhand eines Mindmaps erstmals grob umfasst:
</p>
@ -70,8 +67,8 @@ Die Vision wurde anhand eines Mindmaps erstmals grob umfasst:
</figure>
</section>
<section id="slide-orgafaef7f">
<h3 id="orgafaef7f">Vision - Artikel</h3>
<section id="slide-orgbe8457b">
<h3 id="orgbe8457b">Vision - Artikel</h3>
<figure>
<img src="pictures/Vision-Artikel.png" alt="Vision-Artikel.png" width="80%">
@ -79,33 +76,24 @@ Die Vision wurde anhand eines Mindmaps erstmals grob umfasst:
</figure>
</section>
<section id="slide-orge9af401">
<h3 id="orge9af401">Vision - Warenkorb</h3>
<section id="slide-org96f7c15">
<h3 id="org96f7c15">Vision - Warenkorb</h3>
<figure>
<img src="pictures/Vision-Warenkorb.png" alt="Vision-Warenkorb.png" width="80%">
</figure>
</section>
<section id="slide-orgf6a87cf">
<h3 id="orgf6a87cf">Vision - Abgaben</h3>
<figure>
<img src="pictures/Vision-Abgaben.png" alt="Vision-Abgaben.png" width="80%">
</figure>
</section>
</section>
<section>
<section id="slide-orgb395864">
<h2 id="orgb395864">Varianten</h2>
<div class="outline-text-2" id="text-orgb395864">
<section id="slide-org3bf6c19">
<h2 id="org3bf6c19">Varianten</h2>
<div class="outline-text-2" id="text-org3bf6c19">
</div>
</section>
<section id="slide-org0733de6">
<h3 id="org0733de6">C# und SQL Server</h3>
<section id="slide-orgab20119">
<h3 id="orgab20119">C# und SQL Server</h3>
<figure>
<img src="pictures/csharp.png" alt="csharp.png">
@ -113,8 +101,8 @@ Die Vision wurde anhand eines Mindmaps erstmals grob umfasst:
</figure>
</section>
<section id="slide-orgde289dc">
<h3 id="orgde289dc">Laravel und MySQL</h3>
<section id="slide-orgd5ad8ba">
<h3 id="orgd5ad8ba">Laravel und MySQL</h3>
<figure>
<img src="pictures/laravel.png" alt="laravel.png">
@ -122,8 +110,8 @@ Die Vision wurde anhand eines Mindmaps erstmals grob umfasst:
</figure>
</section>
<section id="slide-orgd7869c6">
<h3 id="orgd7869c6">Django und MariaDB</h3>
<section id="slide-org2b8377e">
<h3 id="org2b8377e">Django und MariaDB</h3>
<figure>
<img src="pictures/django.png" alt="django.png">
@ -131,21 +119,21 @@ Die Vision wurde anhand eines Mindmaps erstmals grob umfasst:
</figure>
</section>
<section id="slide-org50b31d8">
<h3 id="org50b31d8">Kriterien</h3>
<section id="slide-org42ac8b9">
<h3 id="org42ac8b9">Kriterien</h3>
<ul>
<li>Freie Software</li>
<li>Cross Plattform nutzbar</li>
<li>Lesbarkeit des Codes</li>
<li>Einfachheit des Setups</li>
<li>Ohne spezielle Tools nutzbar</li>
<li>Vorkenntnisse Lernfaktor</li>
<li>Vorkenntnisse und Lernfaktor</li>
</ul>
</section>
<section id="slide-orgefecf15">
<h3 id="orgefecf15">Vergleich</h3>
<section id="slide-orgf3f0904">
<h3 id="orgf3f0904">Vergleich</h3>
<table>
@ -157,7 +145,7 @@ Die Vision wurde anhand eines Mindmaps erstmals grob umfasst:
<thead>
<tr>
<th scope="col" class="org-left"><b>Variante</b></th>
<th scope="col" class="org-right"><b>Erreichte Punktzahl</b></th>
<th scope="col" class="org-right"><b>Erreichte Punktzahl von 235</b></th>
</tr>
</thead>
<tbody>
@ -178,20 +166,16 @@ Die Vision wurde anhand eines Mindmaps erstmals grob umfasst:
</tbody>
</table>
</section>
<section id="slide-org697eecf">
<h3 id="org697eecf">Auswahl</h3>
</section>
</section>
<section>
<section id="slide-orgb5d00f0">
<h2 id="orgb5d00f0">Kosten</h2>
<div class="outline-text-2" id="text-orgb5d00f0">
<section id="slide-orgdc12e46">
<h2 id="orgdc12e46">Kosten</h2>
<div class="outline-text-2" id="text-orgdc12e46">
</div>
</section>
<section id="slide-org6007343">
<h3 id="org6007343">Laravel Webshop</h3>
<section id="slide-orgda17a3e">
<h3 id="orgda17a3e">Laravel Webshop</h3>
<table>
@ -221,8 +205,8 @@ Die Vision wurde anhand eines Mindmaps erstmals grob umfasst:
</table>
</section>
<section id="slide-org75b985b">
<h3 id="org75b985b">Django Webshop</h3>
<section id="slide-org32ae043">
<h3 id="org32ae043">Django Webshop</h3>
<table>
@ -259,28 +243,25 @@ Die Vision wurde anhand eines Mindmaps erstmals grob umfasst:
</section>
</section>
<section>
<section id="slide-org75a1fcd">
<h2 id="org75a1fcd">Vorgehen</h2>
<div class="outline-text-2" id="text-org75a1fcd">
<section id="slide-org2edfd64">
<h2 id="org2edfd64">Vorgehen</h2>
<div class="outline-text-2" id="text-org2edfd64">
</div>
</section>
<section id="slide-org45a7d17">
<h3 id="org45a7d17">Currencies - App</h3>
<section id="slide-orgc7783c4">
<h3 id="orgc7783c4">Currencies - App</h3>
<ul>
<li>Wurde in Django als eigenen App entwickelt und sollte daher problemloos in</li>
<li>Wurde in Django als eigenen App entwickelt und sollte daher problemlos in andere Applikationen eingebunden werden können.</li>
</ul>
<p>
andere Applikationen eingebunden werden können.
</p>
<ul>
<li>Die Quelle der Währungen ist die Schweizerische Nationalbank mit der URL:</li>
</ul>
<p>
<a href="https://www.snb.ch">https://www.snb.ch</a> | resp:
<a href="https://www.snb.ch">https://www.snb.ch</a>
</p>
<p>
<a href="https://www.snb.ch/selector/de/mmr/exfeed/rss">https://www.snb.ch/selector/de/mmr/exfeed/rss</a>
</p>
@ -291,32 +272,30 @@ andere Applikationen eingebunden werden können.
</figure>
</section>
<section id="slide-org37951ed">
<h3 id="org37951ed">Currencies - Quelle</h3>
<section id="slide-orgbdbee89">
<h3 id="orgbdbee89">Currencies - Quelle</h3>
<figure>
<img src="pictures/currencies-rss-xml.png" alt="currencies-rss-xml.png" width="80%">
<img src="pictures/currencies-rss-xml.png" alt="currencies-rss-xml.png">
</figure>
</section>
<section id="slide-orga3fa668">
<h3 id="orga3fa668">Currencies - Parsing</h3>
<section id="slide-org772234a">
<h3 id="org772234a">Currencies - Parsing</h3>
<ul>
<li>Das Konvertieren des XML&rsquo;s wurde mit Python eigener Module gemacht.</li>
<li>für das Herunterladen des XML&rsquo;s wurde das Modul &rsquo;urllib&rsquo; verwendet (1)</li>
<li>für das Parsen über die einzelnen items/nodes das Modul xml.etree.ElementTree. (2)</li>
<li><a href="https://docs.python.org/2/library/urllib.html">https://docs.python.org/2/library/urllib.html</a></li>
<li><a href="https://docs.python.org/2/library/xml.etree.elementtree.html">https://docs.python.org/2/library/xml.etree.elementtree.html</a></li>
</ul>
<p>
(1) <a href="https://docs.python.org/2/library/urllib.html">https://docs.python.org/2/library/urllib.html</a>
(2) <a href="https://docs.python.org/2/library/xml.etree.elementtree.html">https://docs.python.org/2/library/xml.etree.elementtree.html</a>
</p>
</section>
<section id="slide-org6f4ad42">
<h3 id="org6f4ad42">Currencies - Ablauf</h3>
<section id="slide-org0ce0986">
<h3 id="org0ce0986">Currencies - Ablauf</h3>
<figure>
<img src="pictures/currencies.png" alt="currencies.png" width="55%">
@ -324,8 +303,8 @@ andere Applikationen eingebunden werden können.
</figure>
</section>
<section id="slide-org7ae1cc2">
<h3 id="org7ae1cc2">Infrastruktur</h3>
<section id="slide-org5ccb0d2">
<h3 id="org5ccb0d2">Infrastruktur</h3>
<aside class="notes">
<p>
Andreas erzählt wie die infrastruktur aufgebaut ist.
@ -335,54 +314,33 @@ Andreas erzählt wie die infrastruktur aufgebaut ist.
<figure>
<img src="pictures/Server-Architecture.png" alt="Server-Architecture.png" width="60%">
<img src="pictures/Server-Architecture.png" alt="Server-Architecture.png" width="90%">
</figure>
</section>
<section id="slide-org2d4f3dd">
<h3 id="org2d4f3dd">Programmierung</h3>
<p>
vieleicht zwei Schwierigkeiten
</p>
<section id="slide-org102e85d">
<h3 id="org102e85d">Programmierung</h3>
</section>
<section id="slide-orgb4cc1ca">
<h3 id="orgb4cc1ca">Programmierung - Hürde #1</h3>
<ul>
<li>Django hat ein modul das die Forms speziell handelt so dass man mit wehnig Code</li>
<figure>
<img src="pictures/form.png" alt="form.png" width="60%">
</ul>
<p>
Einen HTML Button oder ein Feld erzeugen kann.
</p>
<ul>
<li>Die schwierigkeit war nun heraus zu finden wie man dem Feld ein von der DB stammenden</li>
</figure>
</ul>
<p>
default wert mitgeben konnte.
</p>
<ul>
<li>Es stellte sich heraus dass das Feld ein Key: Value paar benötigte um zu wissen wohin es</li>
<div class="org-src-container">
</ul>
<p>
den wert schreiben soll&#x2026;.
</p>
<pre class="src src-python"><span style="color: #657b83; background-color: #fdf6e3;">amount_form</span> = CartForm<span style="color: #268bd2;">(</span>
<span style="color: #93a1a1; background-color: #eee8d5;"> </span> <span style="color: #657b83; background-color: #fdf6e3;">initial</span>=<span style="color: #2aa198;">{</span><span style="color: #2aa198;">'amount_form'</span>: cart_position.amount<span style="color: #2aa198;">}</span>
<span style="color: #268bd2;">)</span>
</pre>
</div>
<p>
Note: hier den code higlighter einfügen:
amount_form = CartForm(
initial={&rsquo;amount_form&rsquo;: cart_position.amount}
)
</p>
</section>
</section>
<section>
<section id="slide-org08d0509">
<h2 id="org08d0509">Fazit</h2>
<section id="slide-org6911068">
<h2 id="org6911068">Fazit</h2>
<p>
special thanks to:
</p>

View File

@ -97,7 +97,6 @@ https://www.snb.ch/selector/de/mmr/exfeed/rss
** Currencies - Quelle
#+ATTR_HTML: :width 80%
[[file:pictures/currencies-rss-xml.png]]
** Currencies - Parsing
@ -106,8 +105,8 @@ https://www.snb.ch/selector/de/mmr/exfeed/rss
- für das Herunterladen des XML's wurde das Modul 'urllib' verwendet (1)
- für das Parsen über die einzelnen items/nodes das Modul xml.etree.ElementTree. (2)
(1) https://docs.python.org/2/library/urllib.html
(2) https://docs.python.org/2/library/xml.etree.elementtree.html
1. https://docs.python.org/2/library/urllib.html
2. https://docs.python.org/2/library/xml.etree.elementtree.html
** Currencies - Ablauf
@ -120,25 +119,20 @@ https://www.snb.ch/selector/de/mmr/exfeed/rss
Andreas erzählt wie die infrastruktur aufgebaut ist.
#+END_NOTES
#+ATTR_HTML: :width 60%
#+ATTR_HTML: :width 90%
[[file:pictures/Server-Architecture.png]]
** Programmierung
vieleicht zwei Schwierigkeiten
** Programmierung - Hürde #1
#+ATTR_HTML: :width 60%
[[file:pictures/form.png]]
- Django hat ein modul das die Forms speziell handelt so dass man mit wehnig Code
Einen HTML Button oder ein Feld erzeugen kann.
- Die schwierigkeit war nun heraus zu finden wie man dem Feld ein von der DB stammenden
default wert mitgeben konnte.
- Es stellte sich heraus dass das Feld ein Key: Value paar benötigte um zu wissen wohin es
den wert schreiben soll....
Note: hier den code higlighter einfügen:
#+BEGIN_SRC python
amount_form = CartForm(
initial={'amount_form': cart_position.amount}
)
#+END_SRC
* Fazit