Meeskond: Travo 2.0: Difference between revisions

From ICO wiki
Jump to navigationJump to search
Treinpal (talk | contribs)
No edit summary
Treinpal (talk | contribs)
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Kodutöö aines "Võrgurakendused II: hajussüsteemide ehitamine"=
=Kodutöö aines "Võrgurakendused II: hajussüsteemide ehitamine"=
Lähtekood on kättesaadav GitHubis privaatses repositooriumis: [https://github.com/Tarpsvo/Travo Travo].
Lähtekood on kättesaadav GitHubi repositooriumis: [https://github.com/Tarpsvo/Travo Travo].


== Tiim ==
== Tiim ==
Line 13: Line 13:
* Kasutaja saab jälgida ülesannete tegemisele kulunud aega
* Kasutaja saab jälgida ülesannete tegemisele kulunud aega
* Kasutaja ajajälgimised kajastuvad logis ning kasutaja näeb logi põhjal loodud statistikat
* Kasutaja ajajälgimised kajastuvad logis ning kasutaja näeb logi põhjal loodud statistikat
=== Must have ===
* Konto haldus (registreerimine, sisselogimine)
* Tahvlite, veergude, ülesannete haldus
* Aja jälgimine


== Arendus ==
== Arendus ==
=== Tehnoloogiad ===
=== Tehnoloogiad ===
* ASP.NET 4.5.2
* ASP.NET 4.5
* ASP.NET Web API 2
* ASP.NET Web API 2
* Entity Framework 6
* Entity Framework 6
* Ninject 3.2
* OWIN 1.0
* Aurelia (TypeScript)
* Aurelia (TypeScript)
* UIkit
* UIkit
Line 44: Line 51:
*'''[http://i.imgur.com/d6hocMR.png 19.03.2016 I]'''
*'''[http://i.imgur.com/d6hocMR.png 19.03.2016 I]'''


== XML/XSD/XSLT ==
== Muud ülesanded ==
 
=== XML/XSD/XSLT ===
=== XML ===
[[Meeskond: Travo 2.0 XML]]
<pre>
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="XML.xslt" ?>
<!-- Kooli andmebaas -->
<School>
  <!-- Klassid -->
  <Groups>
    <Group id="1">
      <Name><![CDATA[1]]></Name>
     
      <Group id="2">
        <Name><![CDATA[1A]]></Name>
      </Group>
      <Group id="3">
        <Name><![CDATA[1B]]></Name>
      </Group>
    </Group>
   
    <Group id="4">
      <Name><![CDATA[2]]></Name>
     
      <Group id="5">
        <Name><![CDATA[2A]]></Name>
      </Group>
      <Group id="6">
        <Name><![CDATA[2B]]></Name>
      </Group>
    </Group>
  </Groups>
 
  <!-- Õpilased -->
  <Students>
    <Student id="1" birthDate="2008-03-09 16:05:07.123">
      <Name><![CDATA[Mait Käver]]></Name>
      <GroupId>2</GroupId>
    </Student>
    <Student id="2" birthDate="2008-03-09 16:05:07.123">
      <Name><![CDATA[Poska-Käver Maitandres]]></Name>
      <GroupId>2</GroupId>
    </Student>
    <Student id="3" birthDate="2008-03-09 16:05:07.123">
      <Name><![CDATA[Andres Poska]]></Name>
      <GroupId>5</GroupId>
    </Student>
  </Students>
 
  <!-- Kursused -->
  <Courses>
    <Course id="1">
      <Name><![CDATA[Võrgurakendused 2: XML-i algkursus C# baasil]]></Name>
      <Students>
        <Student id="1"></Student>
        <Student id="2"></Student>
      </Students>
    </Course>
    <Course id="2">
      <Name><![CDATA[XML 3: C# baaskursus Java baasil]]></Name>
      <Students>
        <Student id="1"></Student>
        <Student id="2"></Student>
        <Student id="3"></Student>
      </Students>
    </Course>
  </Courses>
</School>
</pre>
=== XSD ===
<pre>
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="School">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Groups">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="Group">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Name">
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                          <xs:maxLength value="32"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element maxOccurs="unbounded" name="Group">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="Name">
                            <xs:simpleType>
                              <xs:restriction base="xs:string">
                                <xs:minLength value="1"/>
                                <xs:maxLength value="32"/>
                              </xs:restriction>
                            </xs:simpleType>
                          </xs:element>
                        </xs:sequence>
                        <xs:attribute name="id" type="xs:unsignedByte" use="required" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="id" type="xs:unsignedByte" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Students">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="Student">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Name">
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                          <xs:maxLength value="32"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="GroupId" type="xs:unsignedByte" />
                  </xs:sequence>
                  <xs:attribute name="id" type="xs:unsignedByte" use="required" />
                  <xs:attribute name="birthDate" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Courses">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="Course">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Name">
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:minLength value="1"/>
                          <xs:maxLength value="32"/>
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="Students">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element maxOccurs="unbounded" name="Student">
                            <xs:complexType>
                              <xs:attribute name="id" type="xs:unsignedByte" use="required" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="id" type="xs:unsignedByte" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
</pre>
=== XSLT ===
<pre>
<?xml version="1.0" encoding="UTF-8"?>
 
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" indent="yes"/>
 
  <!-- Key definitions -->
  <xsl:key name="group" match="Group" use="@id" />
  <xsl:key name="student" match="School/Students/Student" use="@id" />
 
  <xsl:template match="/">
    <html>
      <body>
        <h1>Kool</h1>


        <!-- Klassid -->
== Kasulikud lingid ==
        <h2>Klassid</h2>
=== Aurelia ===
        <xsl:for-each select="School/Groups/Group">
*[https://github.com/behzad888/Aurelia-styleguide Aurelia styleguide]
          <h4>
*[http://ilikekillnerds.com/2015/10/how-to-structure-an-aurelia-application/ How to structure an Aurelia application]
            Klassi grupp: <xsl:value-of select="Name"/>
*[https://auth0.com/blog/2015/08/05/creating-your-first-aurelia-app-from-authentication-to-calling-an-api/ Creating your first Aurelia app (from authentication to calling an API)]
          </h4>
*[https://github.com/chenkie/aurelia-jwt-auth Aurelia-node authentication example (GitHub)]
*[https://github.com/Foursails/sentry Sentry - Aurelia template with authentication (GitHub)]


          <table border="1">
=== ASP.NET ===
            <tr bgcolor="#9acd32">
*[https://github.com/cornflourblue/angular-webapi-authentication-example Angular + ASP.NET Web API 2 HTTP authentication example]
              <th>Id</th>
*[http://www.dotnetcurry.com/aspnet/1223/secure-aspnet-web-api-using-tokens-owin-angularjs ASP.NET Web API token authentication + AngularJS tutorial]
              <th>Nimi</th>
*[http://www.c-sharpcorner.com/UploadFile/ff2f08/token-based-authentication-using-Asp-Net-web-api-owin-and-i/ Token based authentication using ASP.NET Web API, OWIN and Identity with EF]
            </tr>
*[http://bitoftech.net/2014/06/01/token-based-authentication-asp-net-web-api-2-owin-asp-net-identity/ Token based auth using ASP.NET Web API 2, OWIN and Identity]
            <xsl:for-each select="Group">
*[http://codereview.stackexchange.com/questions/63049/returning-status-codes-from-business-layer Returning status codes from Business Layer]
              <tr>
*[http://www.codeproject.com/Articles/990492/RESTful-Day-sharp-Enterprise-Level-Application RESTful Day #1: Enterprise Level Application Architecture with Web APIs using Entity Framework, Generic Repository Pattern and Unit of Work]
                <td>
*[http://www.codeproject.com/Articles/1028416/RESTful-Day-sharp-Request-logging-and-Exception-ha RESTful Day #6: Request logging and Exception handling/logging in Web APIs using Action Filters, Exception Filters and NLog]
                  <xsl:value-of select="@id"/>
                </td>
                <td>
                  <xsl:value-of select="Name"/>
                </td>
              </tr>
            </xsl:for-each>
          </table>
        </xsl:for-each>
       
        <!-- Õpilased -->
        <h2>Õpilased</h2>
        <table border="1">
          <tr bgcolor="#9acd32">
            <th>Id</th>
            <th>Nimi</th>
            <th>Klass</th>
          </tr>
          <xsl:for-each select="School/Students/Student">
            <tr>
              <td>
                <xsl:value-of select="@id"/>
              </td>
              <td>
                <xsl:value-of select="Name"/>
              </td>
              <td>
                <xsl:for-each select="key('group', GroupId)">
                    <xsl:value-of select="Name"/>
                </xsl:for-each>
              </td>
            </tr>
          </xsl:for-each>
        </table>
 
        <!-- Kursused -->
        <h2>Kursused</h2>
        <table border="1">
          <tr bgcolor="#9acd32">
            <th>Id</th>
            <th>Nimi</th>
            <th>Tudengid</th>
          </tr>
          <xsl:for-each select="School/Courses/Course">
            <tr>
              <td>
                <xsl:value-of select="@id"/>
              </td>
              <td>
                <xsl:value-of select="Name"/>
              </td>
              <td>
                <xsl:for-each select="key('student', Students/Student/@id)">
                  <xsl:value-of select="Name"/>
                  <br/>
                </xsl:for-each>
              </td>
            </tr>
          </xsl:for-each>
        </table>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>
</pre>

Latest revision as of 13:45, 28 May 2016

Kodutöö aines "Võrgurakendused II: hajussüsteemide ehitamine"

Lähtekood on kättesaadav GitHubi repositooriumis: Travo.

Tiim

  • Tarvo R. - Projektijuht, kokk-disainer-arendaja-keevitaja

Kirjeldus

Travo on veebirakendus, mis liidab kokku Toggli, Trello ja Todoisti võimekused. Täpsemalt pakub Travo läbi lihtsa kasutajaliidese võimalust luua to-do ülesandeid ning jälgida ülesannete tegemisele kulunud aega.

Üldine spetsifikatsioon

  • Kasutaja saab luua to-do ülesandeid
  • To-do ülesandeid saab liigendada märksõnadega (tagide) abil
  • Kasutaja saab jälgida ülesannete tegemisele kulunud aega
  • Kasutaja ajajälgimised kajastuvad logis ning kasutaja näeb logi põhjal loodud statistikat

Must have

  • Konto haldus (registreerimine, sisselogimine)
  • Tahvlite, veergude, ülesannete haldus
  • Aja jälgimine

Arendus

Tehnoloogiad

  • ASP.NET 4.5
  • ASP.NET Web API 2
  • Entity Framework 6
  • Ninject 3.2
  • OWIN 1.0
  • Aurelia (TypeScript)
  • UIkit
  • Gulp (ja vastavad pluginad)
  • BrowserSync

Tööriistad

  • Microsoft Visual Studio 2015 CE (Back-end arenduseks)
  • Microsoft SQL Server Management Studio 2014
  • Atom (Front-end arenduseks)

Arenduse logi

Arendusprotsess

  • 21.09.2015 - Travo idee
  • 30.01.2016 - Travo 1.0 arenduse lõpp
  • 21.02.2016 - Travo 2.0 esimene commit
  • 28.02.2016 - API dokumentatsioon valmis
  • 19.03.2016 - Töötav tokenitel põhinev autentimine nii back kui ka front-endis

Disainiprotsess

Landing page

Travo

Muud ülesanded

XML/XSD/XSLT

Meeskond: Travo 2.0 XML

Kasulikud lingid

Aurelia

ASP.NET