<?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: Akos Kovacs</title>
    <description>The latest articles on DEV Community by Akos Kovacs (@plaidshirtakos).</description>
    <link>https://dev.to/plaidshirtakos</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%2F236813%2F4a24d1d2-c9d8-41b9-8bd2-0103dadb4e3b.jpg</url>
      <title>DEV Community: Akos Kovacs</title>
      <link>https://dev.to/plaidshirtakos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/plaidshirtakos"/>
    <language>en</language>
    <item>
      <title>Which is your favourite static website generator?</title>
      <dc:creator>Akos Kovacs</dc:creator>
      <pubDate>Thu, 03 Sep 2020 20:34:08 +0000</pubDate>
      <link>https://dev.to/plaidshirtakos/which-is-your-favourite-static-website-generator-1b01</link>
      <guid>https://dev.to/plaidshirtakos/which-is-your-favourite-static-website-generator-1b01</guid>
      <description>&lt;p&gt;Static websites are becoming more and more popular. This is because of its speed. Sites are generated in build-time. It offers high level of security because these aren't CMS based sites. The development workflow is really simple without backend and any database connections.&lt;br&gt;
You can find a list of these tools here: &lt;a href="https://www.staticgen.com/"&gt;https://www.staticgen.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which is your favourite and why?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Connect to Apache Derby database</title>
      <dc:creator>Akos Kovacs</dc:creator>
      <pubDate>Thu, 03 Sep 2020 14:54:45 +0000</pubDate>
      <link>https://dev.to/plaidshirtakos/connect-to-apache-derby-database-4dcm</link>
      <guid>https://dev.to/plaidshirtakos/connect-to-apache-derby-database-4dcm</guid>
      <description>&lt;p&gt;I would like to show a simple example, how you can set up &lt;em&gt;Apache Derby&lt;/em&gt; on your local Windows machine and connect to it with Java code to write and read data. It is a lightweight relational database management system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Windows side configuration and steps&lt;/strong&gt;&lt;br&gt;
You can download it &lt;a href="http://xenia.sote.hu/ftp/mirrors/www.apache.org/db/derby/db-derby-10.15.2.0/"&gt;here&lt;/a&gt;. Choose one of the compressed binary packages. After that it is needed to be unzipped. A new environment variable, named &lt;em&gt;DERBY_HOME&lt;/em&gt; needs to be set to the extracted folder, where Derby &lt;em&gt;bin&lt;/em&gt; distribution is located.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;set  DERBY_HOME=c:\Derby
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Once &lt;em&gt;DERBY_HOME&lt;/em&gt; environment variable is set and it is included also in the PATH environment variable, shortened commands are available to use the Derby tools.&lt;br&gt;
To start the server you need to execute &lt;em&gt;/bin/startNetworkServer.bat&lt;/em&gt; file, which will open a command prompt window. When you close this, server will be stopped. By default it is running on port number 1527.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java side steps&lt;/strong&gt;&lt;br&gt;
Create a new Maven project and add the following dependencies to pom.xml file. You can check for newer versions on &lt;a href="https://mvnrepository.com/artifact/org.apache.derby/derby"&gt;MVNrepository&lt;/a&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;dependency&amp;gt;  
 &amp;lt;groupId&amp;gt;org.apache.derby&amp;lt;/groupId&amp;gt;  
 &amp;lt;artifactId&amp;gt;derby&amp;lt;/artifactId&amp;gt;  
 &amp;lt;version&amp;gt;10.15.2.0&amp;lt;/version&amp;gt;  
&amp;lt;/dependency&amp;gt;  
&amp;lt;dependency&amp;gt;  
 &amp;lt;groupId&amp;gt;org.apache.derby&amp;lt;/groupId&amp;gt;  
 &amp;lt;artifactId&amp;gt;derbyclient&amp;lt;/artifactId&amp;gt;  
 &amp;lt;version&amp;gt;10.15.2.0&amp;lt;/version&amp;gt;  
&amp;lt;/dependency&amp;gt;  
&amp;lt;dependency&amp;gt;  
 &amp;lt;groupId&amp;gt;org.apache.derby&amp;lt;/groupId&amp;gt;  
 &amp;lt;artifactId&amp;gt;derbytools&amp;lt;/artifactId&amp;gt;  
 &amp;lt;version&amp;gt;10.15.2.0&amp;lt;/version&amp;gt;  
&amp;lt;/dependency&amp;gt;  
&amp;lt;dependency&amp;gt;  
 &amp;lt;groupId&amp;gt;org.apache.derby&amp;lt;/groupId&amp;gt;  
 &amp;lt;artifactId&amp;gt;derbynet&amp;lt;/artifactId&amp;gt;  
 &amp;lt;version&amp;gt;10.15.2.0&amp;lt;/version&amp;gt;  
&amp;lt;/dependency&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Create a new class and initialize connection with connection string.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Connection connect = DriverManager.getConnection("jdbc:derby://localhost:1527/testdb" + System.currentTimeMillis() + ";create=true");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I use &lt;code&gt;System.currentTimeMillis()&lt;/code&gt; method to create a differently named database in each execution. &lt;br&gt;
After that you need to write necessary SQL queries and store those in String objects.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String query = "CREATE TABLE EmployeeData( "  
  + "Id INT NOT NULL GENERATED ALWAYS AS IDENTITY, "  
  + "Name VARCHAR(255), "  
  + "Salary INT NOT NULL, "  
  + "Location VARCHAR(255), "  
  + "PRIMARY KEY (Id))";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;These will be executed as &lt;code&gt;Statements&lt;/code&gt;.&lt;br&gt;
You can check also the whole code, which is needed to establish a database connection, create a database, a table and get data from it.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.sql.*;  

public class HandleDBExample {  
    public static void main(String args[]) throws Exception {  
        try {  
            Class.forName("org.apache.derby.jdbc.ClientDriver");  
            Connection connect = DriverManager.getConnection("jdbc:derby://localhost:1527/testdb" + System.currentTimeMillis() + ";create=true");  
            Statement stmt = connect.createStatement();  

            System.out.println("Database info: " + connect.getMetaData().getURL() + " " + connect.getMetaData().getDatabaseProductName());  

            String query = "CREATE TABLE EmployeeData( "  
            + "Id INT NOT NULL GENERATED ALWAYS AS IDENTITY, "  
            + "Name VARCHAR(255), "  
            + "Salary INT NOT NULL, "  
            + "Location VARCHAR(255), "  
            + "PRIMARY KEY (Id))";  

            stmt.execute(query);  
            System.out.println("Table created");  

            query = "INSERT INTO EmployeeData("  
            + "Name, Salary, Location) VALUES "  
            + "('Amit', 30000, 'Hyderabad'), "  
            + "('Kalyan', 40000, 'Vishakhapatnam'), "  
            + "('Renuka', 50000, 'Delhi'), "  
            + "('Archana', 15000, 'Mumbai'), "  
            + "('Trupthi', 45000, 'Kochin'), "  
            + "('Suchatra', 33000, 'Pune'), "  
            + "('Rahul', 39000, 'Lucknow'), "  
            + "('Trupthi', 45000, 'Kochin')";  

            stmt.execute(query);  
            System.out.println("Values inserted");  

            ResultSet rs = stmt.executeQuery("Select * from EmployeeData");  
            System.out.println("Contents of the table EmployeeData table:");  
            while(rs.next()) {  
                  System.out.print("ID: "+rs.getInt("ID")+", ");  
                  System.out.print("Name: "+rs.getString("Name")+", ");  
                  System.out.print("Salary: "+rs.getInt("Salary")+", ");  
                  System.out.print("Location: "+rs.getString("Location"));  
                  System.out.println();  
           }  
           connect.close();  
      } catch (Exception e) {  
            throw e;  
      }  
    }  
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>database</category>
      <category>java</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Label requests by reponse time in JMeter</title>
      <dc:creator>Akos Kovacs</dc:creator>
      <pubDate>Sun, 05 Jul 2020 17:37:25 +0000</pubDate>
      <link>https://dev.to/plaidshirtakos/label-requests-by-reponse-time-in-jmeter-jnd</link>
      <guid>https://dev.to/plaidshirtakos/label-requests-by-reponse-time-in-jmeter-jnd</guid>
      <description>&lt;p&gt;JMeter is a defacto standard in performance measurement. There are a lot of existing &lt;a href="https://jmeter-plugins.org/"&gt;plugins&lt;/a&gt; you can add easily to your project, but sometimes additional functionality needed. In this case &lt;em&gt;JSR223 Sampler&lt;/em&gt; is the solution. With use of this sampler you can write your own script to use up response data.&lt;/p&gt;

&lt;p&gt;Response times are really important on the internet. It is a cardinal question, how long should visitor waiting for the page to be loaded. Technical solutions are changing really fast, but users are the same. They need short loading times. Performance optimalization has a long history. Please check following article.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Response Times: The 3 Important Limits&lt;br&gt;
by Jakob Nielsen on January 1, 1993&lt;/p&gt;

&lt;p&gt;Summary: There are 3 main time limits (which are determined by human perceptual abilities) to keep in mind when optimizing web and application performance.&lt;/p&gt;

&lt;p&gt;Excerpt from Chapter 5 in my book Usability Engineering, from 1993:&lt;/p&gt;

&lt;p&gt;The basic advice regarding response times has been about the same for thirty years [Miller 1968; Card et al. 1991]:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;0.1 second&lt;/strong&gt; is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result.&lt;br&gt;
&lt;strong&gt;1.0 second&lt;/strong&gt; is about the limit for the user's flow of thought to stay uninterrupted, even though the user will notice the delay. Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data.&lt;br&gt;
&lt;strong&gt;10 seconds&lt;/strong&gt; is about the limit for keeping the user's attention focused on the dialogue. For longer delays, users will want to perform other tasks while waiting for the computer to finish, so they should be given feedback indicating when the computer expects to be done. Feedback during the delay is especially important if the response time is likely to be highly variable, since users will then not know what to expect.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So you have to keep focus on response times during the testing process.&lt;br&gt;
Labeling requests by response times is a fairly good solution for this purpose. In the following example I define intervals. You has to do this for all single request in your &lt;em&gt;Thread Group&lt;/em&gt;. Exact numbers could be defined with help of previous measurement data or specification.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (prev.getTime() &amp;gt; 170 &amp;amp;&amp;amp; prev.getTime() &amp;lt; 340) {
    prev.setSampleLabel(prev.getSampleLabel() + " &amp;gt; 170")
} else if (prev.getTime() &amp;gt; 340 &amp;amp;&amp;amp; prev.getTime() &amp;lt; 4000) {
    prev.setSampleLabel(prev.getSampleLabel() + " &amp;gt; 340")
} else if (prev.getTime() &amp;gt; 4000 &amp;amp;&amp;amp; prev.getTime() &amp;lt; 8000) {
    prev.setSampleLabel(prev.getSampleLabel() + " &amp;gt; 4000")
} else if (prev.getTime() &amp;gt; 8000) {
    prev.setSampleLabel(prev.getSampleLabel() + " &amp;gt; 8000")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this way each request will have more lines in the table of &lt;em&gt;Aggregate Report&lt;/em&gt;, which will show how many requests are in the predefined time intervals. So you can create more precise reports and check criteria.&lt;/p&gt;

</description>
      <category>jmeter</category>
      <category>performance</category>
      <category>testing</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Sign files electronically with DSS</title>
      <dc:creator>Akos Kovacs</dc:creator>
      <pubDate>Wed, 29 Jan 2020 20:43:05 +0000</pubDate>
      <link>https://dev.to/plaidshirtakos/sign-files-electronically-with-dss-24ca</link>
      <guid>https://dev.to/plaidshirtakos/sign-files-electronically-with-dss-24ca</guid>
      <description>&lt;p&gt;Electronic signatures are widely used to provide the same legal standing as handwritten signatures. This process is regulated by eIDAS in European Union. SD-DSS is the european free and open-source tool to handle electronic signatures. It is capable to create, extend and validate electronic signatures. SD comes from Services Directive, because it was developed originally in context of 2006/123/EC. Mission is to provide Digital Signature Service, which is trusted by administrations, businesses and citizens and ensure interoperability between EU member states.&lt;/p&gt;

&lt;h1&gt;
  
  
  About application
&lt;/h1&gt;

&lt;p&gt;Sofware is developed and also supported by Nowina Solutions, based in Luxembourg. Releases are available for download from &lt;a href="https://github.com/esig/dss/releases" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. There is a so called demo webapplication, which is not recommended to be used in production, but gives a lot of examples and best practices about integration. You can use it as a simple reference client. A live demo is available on &lt;a href="http://dss.nowina.lu/" rel="noopener noreferrer"&gt;Nowina's site&lt;/a&gt; and package is available for download &lt;a href="https://ec.europa.eu/cefdigital/wiki/display/CEFDIGITAL/DSS+releases" rel="noopener noreferrer"&gt;here&lt;/a&gt;. It is also possible to build your own one from dss-demonstartions Github repository with use of Maven. Technically it is faster to rebuild root project instead of subprojects.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F6LPnxiC.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F6LPnxiC.png" alt="User interface of Demo WebApplication"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  How to use it
&lt;/h1&gt;

&lt;p&gt;Demo webapplication uses a built-in PKCS #12 certificate for server-signing process, so it is need to make a new build if you want to change it for your own signer certificate. You can use Maven Lifecycle plugins for this purpose if you use an IDE or just simply execute following command: mvn clean install. To sign a document with use of SOAP webservice, you need to go through following steps, call of following services in predefined order is necessary to construct a digitally signed file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;getDataToSign : computes the data from input document to be signed, input is your file,&lt;/li&gt;
&lt;li&gt;sign : signs the previous result with a smartcard, keystore, HSM, etc. to create signatureValue,&lt;/li&gt;
&lt;li&gt;signDocument : creates the signed document with the given signatureValue.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The parameter values in getDataToSign and signDocument methods must be equals. To get alias of your signer certificate you need to execute getKeys request.&lt;br&gt;
&lt;a href="https://i.giphy.com/media/3orieOSehVQs29STDi/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3orieOSehVQs29STDi/giphy.gif" alt="Decoration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is a cookbook and a lot of demonstrations about usage of DSS on GitHub. dss-cookbook offers also a sample SoapUI project with all of the available &lt;a href="https://github.com/esig/dss/tree/master/dss-cookbook/src/main/soapui" rel="noopener noreferrer"&gt;SOAP requests&lt;/a&gt;. You need to run your own instance of DSS Demo WebApplication to use these features. Signature operation is delegated to NexU when you call it from user interface. NexU Bundle is available for download from &lt;a href="https://github.com/nowina-solutions/nexu/releases" rel="noopener noreferrer"&gt;here&lt;/a&gt;, which is an open-source, multi-platform remote signature tool from Nowina. There are plenty of other handy tools in &lt;a href="http://dss.nowina.lu/pki-factory/keystore/list" rel="noopener noreferrer"&gt;PKI Factory&lt;/a&gt;, but please keep in mind, all of these are just for testing purpose.&lt;br&gt;
I hope this short explanation was useful and you got a big picture about usage possibilities of DSS.&lt;br&gt;
Following slides provide more detailed theoretical explanation about Public Key Infrastructure.&lt;/p&gt;


 &lt;strong&gt; &lt;a href="//www.slideshare.net/DavidNaramski1/open-source-tools-for-e-signature-yajug-v3" title="Open source tools for e signature - yajug - v3"&gt;Open source tools for e signature - yajug - v3&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href="//www.slideshare.net/DavidNaramski1"&gt;David Naramski&lt;/a&gt;&lt;/strong&gt; 

&lt;h1&gt;
  
  
  Sources:
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;DSS Documentation: &lt;a href="https://github.com/esig/dss/blob/master/dss-cookbook/src/main/asciidoc/dss-documentation.adoc" rel="noopener noreferrer"&gt;https://github.com/esig/dss/blob/master/dss-cookbook/src/main/asciidoc/dss-documentation.adoc&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;DSS Releases: &lt;a href="https://ec.europa.eu/cefdigital/wiki/display/CEFDIGITAL/DSS+releases" rel="noopener noreferrer"&gt;https://ec.europa.eu/cefdigital/wiki/display/CEFDIGITAL/DSS+releases&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;DSS Issue tracker: &lt;a href="https://ec.europa.eu/cefdigital/tracker/projects/DSS/issues" rel="noopener noreferrer"&gt;https://ec.europa.eu/cefdigital/tracker/projects/DSS/issues&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>dss</category>
      <category>digitalsignature</category>
      <category>soap</category>
      <category>pki</category>
    </item>
  </channel>
</rss>
