{"id":3000,"date":"2018-09-02T21:00:47","date_gmt":"2018-09-02T21:00:47","guid":{"rendered":"https:\/\/blog.paranoidprofessor.com\/?p=3000"},"modified":"2018-09-02T21:00:47","modified_gmt":"2018-09-02T21:00:47","slug":"software-development-the-easy-way","status":"publish","type":"post","link":"https:\/\/blog.paranoidprofessor.com\/index.php\/2018\/09\/02\/software-development-the-easy-way\/","title":{"rendered":"software development the easy way &#8230;"},"content":{"rendered":"<p>Is there really an easy way for software development?\u00a0 Over time there has been an increasing number of different attempts at providing the silver bullet to faster better development.\u00a0 The solutions have ranged from the tools such as adding syntax highlighting to editors, code generation and even fancy integrated development environments.<\/p>\n<p>In one sense, software development is not a boring field as there is a constant addition of new languages and tools.<\/p>\n<p>Back in the day, I was not terribly interested in designing web pages so I kept focused on developments in more traditional computing.\u00a0 The goal to improve the lot of internet\u00a0people everywhere continued without me.\u00a0 It started with the creation of javascript (in 95) and later the creation of jquery(06) actually did make the task of javascript and HTML development easier.<\/p>\n<p>The syntax for creating a table is actually really simple.\u00a0 You can create a header and footer, if you are really clever you can use the footer to display totals.<\/p>\n<pre>&lt;table id=\"example\" class=\"display\" style=\"width:100%\"&gt;\r\n &lt;thead&gt;\r\n  &lt;tr&gt;\r\n    &lt;th&gt;Name&lt;\/th&gt; \r\n    &lt;th&gt;Position&lt;\/th&gt; \r\n    &lt;th&gt;Start date&lt;\/th&gt; \r\n    &lt;th&gt;End date&lt;\/th&gt; \r\n    &lt;th&gt;days in office&lt;\/th&gt; \r\n &lt;\/tr&gt;\r\n &lt;\/thead&gt;\r\n &lt;tfoot&gt;\r\n  &lt;tr&gt;\r\n    &lt;th&gt;Name&lt;\/th&gt; \r\n    &lt;th&gt;Position&lt;\/th&gt; \r\n    &lt;th&gt;Start date&lt;\/th&gt;\r\n    &lt;th&gt;End date&lt;\/th&gt; \r\n    &lt;th&gt;days in office&lt;\/th&gt; \r\n &lt;\/tr&gt;\r\n &lt;\/tfoot&gt;<\/pre>\n<p>But the result of the simple html table is really really boring as well as feature poor.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3004\" src=\"https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2018\/08\/no-datasheets.png\" alt=\"\" width=\"1106\" height=\"518\" srcset=\"https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2018\/08\/no-datasheets.png 1106w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2018\/08\/no-datasheets-300x141.png 300w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2018\/08\/no-datasheets-768x360.png 768w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2018\/08\/no-datasheets-1024x480.png 1024w\" sizes=\"(max-width: 1106px) 100vw, 1106px\" \/><\/p>\n<p>Yet, there has been additional work to help make the process easier &#8211; especially when working with tables.\u00a0 This solution comes in the form of additional javascript libraries.\u00a0 These <a href=\"https:\/\/datatables.net\" target=\"_blank\" rel=\"noopener\">datatables<\/a>\u00a0\u00a0libraries (yup there are more than one) are available from datatables.net.<\/p>\n<p>They are actually like magic.\u00a0 With simply adding the tiniest amount of code you can get fully functional tables that look good and are very feature rich.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3005\" src=\"https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2018\/08\/with-datasheet.png\" alt=\"\" width=\"1104\" height=\"462\" srcset=\"https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2018\/08\/with-datasheet.png 1104w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2018\/08\/with-datasheet-300x126.png 300w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2018\/08\/with-datasheet-768x321.png 768w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2018\/08\/with-datasheet-1024x429.png 1024w\" sizes=\"(max-width: 1104px) 100vw, 1104px\" \/><\/p>\n<p>All that is necessary is the addition of the following table definition.<\/p>\n<pre>&lt;script&gt;\r\n   $(document).ready(function() {\r\n      $('#example').DataTable( {\r\n      });\r\n   } );\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>It is possible to define how many lines are displayed at one time, special buttons for exporting excel or csv data as well as defining the location of the buttons.<\/p>\n<pre>&lt;script&gt;\r\n   $(document).ready(function() {\r\n      $('#example').DataTable( {\r\n         \"lengthMenu\": [[7, 14, 28, -1], [7, 14, 28, \"All\"]]\r\n         ,\"dom\": '&lt;\"top\"l&gt;rt&lt;\"bottom\"Bip&gt;'\r\n         ,buttons: [\r\n         'copyHtml5','excelHtml5','pdfHtml5', 'csvHtml5', 'print'\r\n      ]\r\n      });\r\n   } );\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>This is just a tiny piece of what functionality is possible using this datatables\u00a0library.\u00a0 Displaying a table is pretty tame.\u00a0 It is possible to make the table editable.\u00a0 This actually makes it possible to create &#8220;proper&#8221; applications inside your browser.<\/p>\n<p>I am hoping to do a few blog postings showing off how powerful this library is.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Is there really an easy way for software development?\u00a0 Over time there has been an increasing number of different attempts at providing the silver bullet to faster better development.\u00a0 The solutions have ranged from the tools such as adding syntax &hellip; <a href=\"https:\/\/blog.paranoidprofessor.com\/index.php\/2018\/09\/02\/software-development-the-easy-way\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts\/3000"}],"collection":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/comments?post=3000"}],"version-history":[{"count":5,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts\/3000\/revisions"}],"predecessor-version":[{"id":3008,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts\/3000\/revisions\/3008"}],"wp:attachment":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/media?parent=3000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/categories?post=3000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/tags?post=3000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}