<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michele Rizzi Web PageMichele Rizzi Web Page</title>
	<atom:link href="https://www.rizzimichele.it/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.rizzimichele.it</link>
	<description>Passion of IT</description>
	<lastBuildDate>Mon, 05 Dec 2016 20:53:30 +0000</lastBuildDate>
	<language>en-GB</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.8.41</generator>
	<item>
		<title>Water ripple javascript</title>
		<link>https://www.rizzimichele.it/water-ripple-javascript/</link>
		<comments>https://www.rizzimichele.it/water-ripple-javascript/#comments</comments>
		<pubDate>Mon, 05 Dec 2016 20:53:12 +0000</pubDate>
		<dc:creator><![CDATA[Michele Rizzi]]></dc:creator>
				<category><![CDATA[All articles (75)]]></category>
		<category><![CDATA[Programming languages (51)]]></category>

		<guid isPermaLink="false">http://www.rizzimichele.it/?p=1107</guid>
		<description><![CDATA[Here]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.rizzimichele.it/javascriptHTML/waterEffect/Rippleexample.html">Here</a></p>
<p><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fwater-ripple-javascript%2F&amp;linkname=Water%20ripple%20javascript" title="Facebook" rel="nofollow" target="_blank"></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fwater-ripple-javascript%2F&amp;linkname=Water%20ripple%20javascript" title="Twitter" rel="nofollow" target="_blank"></a><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fwater-ripple-javascript%2F&amp;linkname=Water%20ripple%20javascript" title="Google+" rel="nofollow" target="_blank"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=https%3A%2F%2Fwww.rizzimichele.it%2Fwater-ripple-javascript%2F&amp;title=Water%20ripple%20javascript" id="wpa2a_2"></a></p>]]></content:encoded>
			<wfw:commentRss>https://www.rizzimichele.it/water-ripple-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AngularJS Dashboard</title>
		<link>https://www.rizzimichele.it/angularjs-dashboard/</link>
		<comments>https://www.rizzimichele.it/angularjs-dashboard/#comments</comments>
		<pubDate>Sun, 27 Nov 2016 11:07:34 +0000</pubDate>
		<dc:creator><![CDATA[Michele Rizzi]]></dc:creator>
				<category><![CDATA[All articles (75)]]></category>
		<category><![CDATA[Programming languages (51)]]></category>

		<guid isPermaLink="false">http://www.rizzimichele.it/?p=1099</guid>
		<description><![CDATA[I found this great Dashboard using AngularJS &#160; Enjoy]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.rizzimichele.it/javascriptHTML/angularDashboard/#/sample/01">I found this great Dashboard using AngularJS</a></p>
<p>&nbsp;</p>
<p>Enjoy</p>
<p><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fangularjs-dashboard%2F&amp;linkname=AngularJS%20Dashboard" title="Facebook" rel="nofollow" target="_blank"></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fangularjs-dashboard%2F&amp;linkname=AngularJS%20Dashboard" title="Twitter" rel="nofollow" target="_blank"></a><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fangularjs-dashboard%2F&amp;linkname=AngularJS%20Dashboard" title="Google+" rel="nofollow" target="_blank"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=https%3A%2F%2Fwww.rizzimichele.it%2Fangularjs-dashboard%2F&amp;title=AngularJS%20Dashboard" id="wpa2a_4"></a></p>]]></content:encoded>
			<wfw:commentRss>https://www.rizzimichele.it/angularjs-dashboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sudoku With AngularJS</title>
		<link>https://www.rizzimichele.it/sudoku-with-angularjs/</link>
		<comments>https://www.rizzimichele.it/sudoku-with-angularjs/#comments</comments>
		<pubDate>Sun, 27 Nov 2016 09:50:58 +0000</pubDate>
		<dc:creator><![CDATA[Michele Rizzi]]></dc:creator>
				<category><![CDATA[All articles (75)]]></category>
		<category><![CDATA[Programming languages (51)]]></category>

		<guid isPermaLink="false">http://www.rizzimichele.it/?p=1096</guid>
		<description><![CDATA[Here is available a sudoku solver using AngularJS]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.rizzimichele.it/javascriptHTML/sudoku-with-angularjs/">Here</a> is available a sudoku solver using AngularJS</p>
<p><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fsudoku-with-angularjs%2F&amp;linkname=Sudoku%20With%20AngularJS" title="Facebook" rel="nofollow" target="_blank"></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fsudoku-with-angularjs%2F&amp;linkname=Sudoku%20With%20AngularJS" title="Twitter" rel="nofollow" target="_blank"></a><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fsudoku-with-angularjs%2F&amp;linkname=Sudoku%20With%20AngularJS" title="Google+" rel="nofollow" target="_blank"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=https%3A%2F%2Fwww.rizzimichele.it%2Fsudoku-with-angularjs%2F&amp;title=Sudoku%20With%20AngularJS" id="wpa2a_6"></a></p>]]></content:encoded>
			<wfw:commentRss>https://www.rizzimichele.it/sudoku-with-angularjs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m off the market</title>
		<link>https://www.rizzimichele.it/out-of-the-market/</link>
		<comments>https://www.rizzimichele.it/out-of-the-market/#comments</comments>
		<pubDate>Thu, 24 Nov 2016 10:00:55 +0000</pubDate>
		<dc:creator><![CDATA[Michele Rizzi]]></dc:creator>
				<category><![CDATA[All articles (75)]]></category>
		<category><![CDATA[Off Topic (8)]]></category>

		<guid isPermaLink="false">http://www.rizzimichele.it/?p=1089</guid>
		<description><![CDATA[Since my contract with Zurich insurance will expire at the end of December 2016 I was looking for a Job and I&#8217;ve taken the decision of joining Liberty insurance. I&#8217;ll work for Liberty from December onward so I&#8217;m officially off the market.]]></description>
				<content:encoded><![CDATA[<p>Since my contract with Zurich insurance will expire at the end of December 2016 I was looking for a Job and I&#8217;ve taken the decision of joining Liberty insurance.<br />
I&#8217;ll work for Liberty from December onward so I&#8217;m officially off the market.</p>
<p><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fout-of-the-market%2F&amp;linkname=I%E2%80%99m%20off%20the%20market" title="Facebook" rel="nofollow" target="_blank"></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fout-of-the-market%2F&amp;linkname=I%E2%80%99m%20off%20the%20market" title="Twitter" rel="nofollow" target="_blank"></a><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fout-of-the-market%2F&amp;linkname=I%E2%80%99m%20off%20the%20market" title="Google+" rel="nofollow" target="_blank"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=https%3A%2F%2Fwww.rizzimichele.it%2Fout-of-the-market%2F&amp;title=I%E2%80%99m%20off%20the%20market" id="wpa2a_8"></a></p>]]></content:encoded>
			<wfw:commentRss>https://www.rizzimichele.it/out-of-the-market/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Multitouch API</title>
		<link>https://www.rizzimichele.it/javascript-multitouch-api/</link>
		<comments>https://www.rizzimichele.it/javascript-multitouch-api/#comments</comments>
		<pubDate>Sun, 20 Nov 2016 10:05:04 +0000</pubDate>
		<dc:creator><![CDATA[Michele Rizzi]]></dc:creator>
				<category><![CDATA[All articles (75)]]></category>
		<category><![CDATA[Programming languages (51)]]></category>

		<guid isPermaLink="false">http://www.rizzimichele.it/?p=1086</guid>
		<description><![CDATA[here is one example on how to use the multi touch in a web application]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.rizzimichele.it/wp-content/uploads/2016/11/multitouch.png"><img class="aligncenter size-full wp-image-1087" alt="multitouch" src="http://www.rizzimichele.it/wp-content/uploads/2016/11/multitouch.png" width="605" height="347" /></a><a href="http://www.rizzimichele.it/javascriptHTML/multitouch.html">here</a> is one example on how to use the multi touch in a web application</p>
<p><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fjavascript-multitouch-api%2F&amp;linkname=Javascript%20Multitouch%20API" title="Facebook" rel="nofollow" target="_blank"></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fjavascript-multitouch-api%2F&amp;linkname=Javascript%20Multitouch%20API" title="Twitter" rel="nofollow" target="_blank"></a><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fjavascript-multitouch-api%2F&amp;linkname=Javascript%20Multitouch%20API" title="Google+" rel="nofollow" target="_blank"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=https%3A%2F%2Fwww.rizzimichele.it%2Fjavascript-multitouch-api%2F&amp;title=Javascript%20Multitouch%20API" id="wpa2a_10"></a></p>]]></content:encoded>
			<wfw:commentRss>https://www.rizzimichele.it/javascript-multitouch-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hadoop Big Data</title>
		<link>https://www.rizzimichele.it/hadoop-big-data/</link>
		<comments>https://www.rizzimichele.it/hadoop-big-data/#comments</comments>
		<pubDate>Sat, 19 Nov 2016 10:19:01 +0000</pubDate>
		<dc:creator><![CDATA[Michele Rizzi]]></dc:creator>
				<category><![CDATA[All articles (75)]]></category>
		<category><![CDATA[Programming languages (51)]]></category>
		<category><![CDATA[Software engineering, architectures and distribuited systems (16)]]></category>

		<guid isPermaLink="false">http://www.rizzimichele.it/?p=1075</guid>
		<description><![CDATA[This week I got a chance of studying big data and Hadoop and I&#8217;ve written this short document What is big data? Big data is large amount of data to store and process on the server. They can be the user activities of big applications such as social media (facebook), search engines (google), Internet of [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This week I got a chance of studying big data and Hadoop and I&#8217;ve written this short document</p>
<p><strong>What is big data?</strong></p>
<p>Big data is large amount of data to store and process on the server.</p>
<p>They can be the user activities of big applications such as social media (facebook), search engines (google), Internet of things (sensors, machines, transports etc)</p>
<p>Today 1TB hard drive costs around 50 euro so it&#8217;s cheap storing large amount of data but processing it requires long time using SQL database and NoSQL databases are better way for storing these informations and also they are other frameworks for processing them such as Hadoop.</p>
<p><strong>Big Data technologies</strong></p>
<p>There are two classes of technologies to handle big data, they are complementary and usually used together:</p>
<ul>
<li><strong>Operational big data</strong>: technologies for storing and processing the big data: NoSQL databases</li>
<li><strong>Analytical Big Data</strong>: Systems for Massive Parallel Processing such as Hadoop</li>
</ul>
<p><strong>Google Hadoop</strong></p>
<p>in the usual client-server approach we have a client that gets the information from the database.</p>
<p>Hadoop splits the task in small parts assigning each one to a computer connected to the network and connects all the information afterward.This is the MapReduce algorithm.</p>
<p>This means that Hadoop has the below components:</p>
<ul>
<li>his own distributed file system called HDFS: it&#8217;s made of masters NameNode which manages many slaves nodes DataNodes. A file is divided into many blocks stored in set of DataNode. NameNode makes the mapping between the file and the block</li>
<li>his own common libraries</li>
<li>the framework called YARN</li>
<li>the map reduce algorithm: made by a Map task which converts the input in a map and a Reduce task which splits the map in a smaller set of tuple. The map reduce Algorithm has a single master called Job Tracker responsible for resource management and scheduling jobs, and a slave TaskTraker which executes the task</li>
</ul>
<p>Hadoop works as below:</p>
<ul>
<li>the user submits a job to Hadoop with a input/output elements, a MapReduce algorithm, the job configuration</li>
<li>the jobTraker takes the responsibility of the job submitting it to the slaves</li>
<li>the task traker executes its task</li>
</ul>
<p><a href="http://hadoop.apache.org/docs/r3.0.0-alpha1/hadoop-project-dist/hadoop-common/SingleCluster.html">Here is a guide on how to install Hadoop</a></p>
<p><a href="http://hadoop.apache.org/docs/r3.0.0-alpha1/hadoop-project-dist/hadoop-common/FileSystemShell.html">Here is a list of the hadoop file system commands</a></p>
<p>I tested a couple of commands: mkdir and ls, they work fine</p>
<p>Finally I&#8217;ve written a simple map reduce example:</p>
<p><a href="http://hadoop.apache.org/docs/r3.0.0-alpha1/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html">Here is an example of the MapReduce algorithm</a></p>
<pre>

package com.michele.rizzi.hadoop;
import java.io.IOException;
import java.util.StringTokenizer;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

public class WordCount {

public static class TokenizerMapper
extends Mapper&lt;Object, Text, Text, IntWritable&gt;{

private final static IntWritable one = new IntWritable(1);
private Text word = new Text();

public void map(Object key, Text value, Context context
) throws IOException, InterruptedException {
StringTokenizer itr = new StringTokenizer(value.toString());
while (itr.hasMoreTokens()) {
word.set(itr.nextToken());
context.write(word, one);
}
}
}

public static class IntSumReducer
extends Reducer&lt;Text,IntWritable,Text,IntWritable&gt; {
private IntWritable result = new IntWritable();

public void reduce(Text key, Iterable&lt;IntWritable&gt; values,
Context context
) throws IOException, InterruptedException {
int sum = 0;
for (IntWritable val : values) {
sum += val.get();
}
result.set(sum);
context.write(key, result);
}
}

public static void main(String[] args) throws Exception {
Configuration conf = new Configuration();
Job job = Job.getInstance(conf, "word count");
job.setJarByClass(WordCount.class);
job.setMapperClass(TokenizerMapper.class);
job.setCombinerClass(IntSumReducer.class);
job.setReducerClass(IntSumReducer.class);
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(IntWritable.class);
FileInputFormat.addInputPath(job, new Path(args[0]));
FileOutputFormat.setOutputPath(job, new Path(args[1]));
System.exit(job.waitForCompletion(true) ? 0 : 1);
}
}

</pre>
<p>&nbsp;</p>
<p>The mapper sets all words in the context with key=word, value=1.</p>
<p>if the text file is like the one below</p>
<blockquote><p>Michele Michele Rizzi</p></blockquote>
<p>the context at the end of the mapper method will have</p>
<p>key:Michele, value:1</p>
<p>key:Michele value:1</p>
<p>key=Rizzi value:1</p>
<p>&nbsp;</p>
<p>The reducer automatically groups the items with the same key, the input parameters will be</p>
<p>key=&#8221;Michele&#8221; values={1,1}</p>
<p>key=&#8221;Rizzi&#8221; values={1}</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Difference Flink Hadoop</strong></p>
<p>Map/Reduce is a protocol where one transformation takes most likely two phases: One map phase, one reduce phase. Between these phases, the results are spilled to disk. If you have more than one transformation, it stacks up.</p>
<p>One of the limitations of Hadoop MapReduce is that the framework can only batch process one job at a time.</p>
<p>MapReduce may be a legacy system for many companies who started their Big Data journey when Hadoop first came out. This framework has been the workhorse for large data projects. One of the significant challenges for systems developed with this framework is its high-latency, batch-mode response. Since MapReduce has evolved over the last 10 years some developers would complain that it’s difficult to maintain because of inherent inefficiencies in its design and code.<br />
Flink tries to combine all transformation into a job. If the job is started the transformations are done in this jobs, intermediate results are kept in memory. One of the highlights of Flink is its own memory management to prevent Garbage Collection and overflows.</p>
<p>Flink provides a true data streaming platform that uses high-performance dataflow architecture. It is also a strong tool for batch processing since Flink handles batch as a special case of streaming. Flink processes streaming data in real-time streams by pipelining data elements as soon as the elements arrive.</p>
<p>&nbsp;</p>
<p><a href="http://www.rizzimichele.it/aboutMePHP/MicheleRizzi.php?tech=hadoop">Here is available the source code of the application</a></p>
<p><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fhadoop-big-data%2F&amp;linkname=Hadoop%20Big%20Data" title="Facebook" rel="nofollow" target="_blank"></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fhadoop-big-data%2F&amp;linkname=Hadoop%20Big%20Data" title="Twitter" rel="nofollow" target="_blank"></a><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fhadoop-big-data%2F&amp;linkname=Hadoop%20Big%20Data" title="Google+" rel="nofollow" target="_blank"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=https%3A%2F%2Fwww.rizzimichele.it%2Fhadoop-big-data%2F&amp;title=Hadoop%20Big%20Data" id="wpa2a_12"></a></p>]]></content:encoded>
			<wfw:commentRss>https://www.rizzimichele.it/hadoop-big-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ReactJS with WebPack</title>
		<link>https://www.rizzimichele.it/reacrjs-with-webpack/</link>
		<comments>https://www.rizzimichele.it/reacrjs-with-webpack/#comments</comments>
		<pubDate>Sat, 12 Nov 2016 09:58:51 +0000</pubDate>
		<dc:creator><![CDATA[Michele Rizzi]]></dc:creator>
				<category><![CDATA[All articles (75)]]></category>

		<guid isPermaLink="false">http://www.rizzimichele.it/?p=1060</guid>
		<description><![CDATA[After making my first AngularJS2 on NodeJS through the WebPack I wanted to use the same technology on ReactJS: &#160; AngularJS2 doesn&#8217;t allow to use the &#60;script&#62; tag and the only way for making a project using that technology is using NPM: install all dependencies on NodeJS using NPM including the WebPack deploy the application [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>After making my first AngularJS2 on NodeJS through the WebPack I wanted to use the same technology on ReactJS:</p>
<p>&nbsp;</p>
<p>AngularJS2 doesn&#8217;t allow to use the &lt;script&gt; tag and the only way for making a project using that technology is using NPM:</p>
<ul>
<li>install all dependencies on NodeJS using NPM including the WebPack</li>
<li>deploy the application on the NodeJS instance running locally on your computer</li>
<li>building a HTML/JS file for making it running on the Apache</li>
</ul>
<p>That&#8217;s much more different from the usual way of working which needed just to write a html file importing the js file inside and opening the html file using a normal browser for testing the application</p>
<p>&nbsp;</p>
<p>ReactJS allows the user to choose between using the &lt;script&gt; tag or making the application using nodejs and NPM.</p>
<p>My previous applications were made using ReactJS and the &lt;script&gt; tag, today I&#8217;ve tested the second way of working.</p>
<p>What I did was to:</p>
<ul>
<li>Download a ReactJS seed project which has already set up webpack, npm, grunt, gulp and contains a guide about how to run the project locally and how to build the project in production</li>
<li>I installed React Scroll spy on that seed project</li>
<li>I replaced the source code of the ReactJS seed project with the React Scroll spy NPM plugin project</li>
<li>I installed React Bootstrap</li>
<li>I integrated the bootstrap modal to that project</li>
</ul>
<p>Basically I&#8217;ve written few lines of code but I&#8217;ve done a huge configuration-integration work and now I think I&#8217;m able to work with ReactJS and NPM without using the &lt;script&gt; tag which I believe will be mandatory in the future</p>
<p><a title="ReactJS Npm" href="http://www.rizzimichele.it/javascriptHTML/ReactJSNpm/">Here is available the result</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Freacrjs-with-webpack%2F&amp;linkname=ReactJS%20with%20WebPack" title="Facebook" rel="nofollow" target="_blank"></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Freacrjs-with-webpack%2F&amp;linkname=ReactJS%20with%20WebPack" title="Twitter" rel="nofollow" target="_blank"></a><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Freacrjs-with-webpack%2F&amp;linkname=ReactJS%20with%20WebPack" title="Google+" rel="nofollow" target="_blank"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=https%3A%2F%2Fwww.rizzimichele.it%2Freacrjs-with-webpack%2F&amp;title=ReactJS%20with%20WebPack" id="wpa2a_14"></a></p>]]></content:encoded>
			<wfw:commentRss>https://www.rizzimichele.it/reacrjs-with-webpack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design Book object in Amazon Website</title>
		<link>https://www.rizzimichele.it/design-book-object-in-amazon-website/</link>
		<comments>https://www.rizzimichele.it/design-book-object-in-amazon-website/#comments</comments>
		<pubDate>Tue, 08 Nov 2016 07:34:00 +0000</pubDate>
		<dc:creator><![CDATA[Michele Rizzi]]></dc:creator>
				<category><![CDATA[All articles (75)]]></category>
		<category><![CDATA[Programming languages (51)]]></category>
		<category><![CDATA[Software engineering, architectures and distribuited systems (16)]]></category>

		<guid isPermaLink="false">http://www.rizzimichele.it/?p=1056</guid>
		<description><![CDATA[How it should be designed a book object in the Amazon website? Should it have a logic? if I were the architect of the system I wouldn&#8217;t have put any logic in that book object so it should be just a container and below are my reasons The clean code says that one class should [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>How it should be designed a book object in the Amazon website?</p>
<p>Should it have a logic?</p>
<p><strong>if I were the architect of the system I wouldn&#8217;t have put any logic in that book object so it should be just a container</strong> and below are my reasons</p>
<ol>
<li>The clean code says that one class should be as short as possible with just one responsibility. the less methods and the less code is inside the better it is.</li>
<li>I imagine the Amazon web site made of the Model View Control pattern and SQL database using the DAO pattern. If that&#8217;s implemented using also Spring and the Dependency injenction pattern and Hibernate the system should be designed as below
<ol>
<li>View: normal HTML  Javascript page so when the user wants to see the list of the book it calls the REST endpoint in the Spring book controller called getBook</li>
<li>Controller: Spring Book controller with the initial business logic for verifying the input of the user, calling the model, populating a response object which contains a list of books and returns it to the view
<ol>
<li>All logic should be in the controller and its method getBooks, the book should contain just informations</li>
</ol>
</li>
<li>Model: Another REST endpoint which like the controller has the logic. The logic is inside the rest book service and the book object should be just a container.
<ol>
<li>That rest service can collect the information from the SQL database using hibernate and as usual the Hibernate book object is just a mapping of the book table, all logic should be inside the BookDAO using the DAO design pattern</li>
</ol>
</li>
</ol>
</li>
</ol>
<p>For me the book should be just a bean POJO with private variables, getters, setters and constructors</p>
<p>The more logic you put inside the less clean is the code</p>
<p>&nbsp;</p>
<p><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fdesign-book-object-in-amazon-website%2F&amp;linkname=Design%20Book%20object%20in%20Amazon%20Website" title="Facebook" rel="nofollow" target="_blank"></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fdesign-book-object-in-amazon-website%2F&amp;linkname=Design%20Book%20object%20in%20Amazon%20Website" title="Twitter" rel="nofollow" target="_blank"></a><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fdesign-book-object-in-amazon-website%2F&amp;linkname=Design%20Book%20object%20in%20Amazon%20Website" title="Google+" rel="nofollow" target="_blank"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=https%3A%2F%2Fwww.rizzimichele.it%2Fdesign-book-object-in-amazon-website%2F&amp;title=Design%20Book%20object%20in%20Amazon%20Website" id="wpa2a_16"></a></p>]]></content:encoded>
			<wfw:commentRss>https://www.rizzimichele.it/design-book-object-in-amazon-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comparison of all front end technologies</title>
		<link>https://www.rizzimichele.it/comparison-of-all-front-end-technologies/</link>
		<comments>https://www.rizzimichele.it/comparison-of-all-front-end-technologies/#comments</comments>
		<pubDate>Sun, 06 Nov 2016 09:42:48 +0000</pubDate>
		<dc:creator><![CDATA[Michele Rizzi]]></dc:creator>
				<category><![CDATA[All articles (75)]]></category>

		<guid isPermaLink="false">http://www.rizzimichele.it/?p=1044</guid>
		<description><![CDATA[HTML means hyper text markup language and it&#8217;s a language for adding markup elements (Tags) necessary for making the structure of the document. The HTML is processed by the HTTP client (Browser) for showing the web pages. An evolution of the HTML document is the XML (eXtended markup language) which allows to convert any object [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>HTML</strong> means hyper text markup language and it&#8217;s a language for adding markup elements (Tags) necessary for making the structure of the document.</p>
<p>The HTML is processed by the HTTP client (Browser) for showing the web pages.</p>
<p>An evolution of the HTML document is the XML (eXtended markup language) which allows to convert any object to this type of data and make the communication between different systems or storing configuration.</p>
<p>The HTML pages can have different color, style, font so it was necessary one more language for split the structure of the page from his style and <strong>CSS</strong> were born. CSS is Cascade Style Sheet because it works in cascade from the root of the HTML document to the leaf.</p>
<p>The HTML pages have a logic inside about how to populate it, how to validate the choice of the user and about its behavior, how to communicate with the back end using SOAP (REST). The way for making this logic is using <strong>Javascript</strong></p>
<p>Javascript is a language for making dynamic HTML document adding nodes, making conditions, check if the input of the user is correct.</p>
<p>&nbsp;</p>
<p>Initially we had the first three technologies:</p>
<ul>
<li>HTML: structure of the page, its skeleton</li>
<li>CSS: style of the page</li>
<li>Javascript: make HTML and CSS dynamic</li>
</ul>
<p>One Next library useful for making Javascript easier to use is <strong>JQuery, </strong>JQuery allows also to create plugins easy to embed in your web page for instance if you need a table with fixed header you can download the Jquery plugin and embed in your web page</p>
<p>Another step forward was making the front end framework which contains already written component made of HTML,CSS, Javascript in this way the developer shouldn&#8217;t make one menu from the scratch but it&#8217;s enough using the component.</p>
<p>These frameworks are the <strong>Twitter Bootstrap</strong> and <strong>Foundation</strong></p>
<p>Another improvement is making CSS &#8220;Object oriented&#8221; with the possibility of making inheritance and reuse of styles and they were born<strong> LESS, SASS</strong> and all CSS preprocessors</p>
<p>Another idea was to make a Javascript server in this way the Javascript developer can work back end side and it was born <strong>NodeJS.</strong></p>
<p>I was able to integrate NodeJS with Mongodb, Rest services and SQL database. it&#8217;s a real back end server made of Javascript</p>
<p>There are many Javascript libraries and write a huge HTML file with many imports on its head is bad for this reason NodeJS allows to execute the build like Maven and Gradle for Java using <strong>NPM</strong> (Node Package Manager) and the evolute building tools like <strong>GruntJS and GulpJS.</strong></p>
<p>&nbsp;</p>
<p>At this time we had many already built plugins:</p>
<ul>
<li>Javascript pure: allows to do everything but it&#8217;s complex</li>
<li>Foundation and Bootstrap with components already built which are mobile first</li>
<li>Jquery:  with plugin already built</li>
</ul>
<p>Instead of building a HTML page from the scratch it&#8217;s enough to find the component and embed it in your page.</p>
<p>&nbsp;</p>
<p>Another challenge was making Javascript more object oriented and the first framework which allows to do that is <strong>RequireJS</strong></p>
<pre>

var messages = require('./messages');
var print = require('print');
print(messages.getHello());

</pre>
<p>Messages:</p>
<p>&nbsp;</p>
<pre>

define(function () {
return {
getHello: function () {
return 'Hello World';
}
};
});

</pre>
<p>so now Javascript is object Oriented.</p>
<p>Then Google invented its <strong>AngularJS </strong>which is very powerful.</p>
<p>Now Javascript is an hybrid between functions for navigating HTML document and Object oriented.</p>
<p>A huge step forward was made by<strong> ReactJS and EXTJS</strong> because both these languages are fully object oriented: you don&#8217;t need to make HTML tag of the div but just to use the &#8220;Div&#8221; object which will be rendered as DIV.</p>
<p>The developer doesn&#8217;t need to write HTML tags but just using an object provided by the technology which will be rendered as the necessary tags.</p>
<p>&nbsp;</p>
<p>And now there is the monster <strong>AngularJS2 </strong>which is fully object oriented like ReactJS and EXTJs and needs to write a perfect Javascript code:</p>
<p>Javascript is a language without rules so you can do something like this:</p>
<pre>

var a=0; //a is a number

a="hello";//now a is a string

a.color="red";//now a is an object

a=function (){}; //now a is a function

</pre>
<p>if you embed this code in your html page with the script tag it works.</p>
<p>If you use AngularJS2 it doesn&#8217;t work because you should compile the code with the Angular framework and then build it in a HTML file.</p>
<p>So the tag script doesn&#8217;t work anymore</p>
<h2><strong>Comparison between all technologies</strong></h2>
<ul>
<li>Using only <strong>HTML, CSS, Javascript</strong> for making an HTML page is difficult even because the most of the site are responsive etc. Why build one component from the scratch when there is one already built and tested carefully?</li>
<li><strong>Bootstrap,Foundation, Jquery: </strong>made plugins for extending the old version of Javascript not fully object oriented but made of functions for make dynamic a HTML/ CSS document</li>
<li><strong>AngularJS, ReactJS, AngularJS2, ExtJS, RequireJS</strong>: made a new way of using Javascript Object oriented making a conversion from their objects in HTML tags. You don&#8217;t need to write HTML tags anymore but just the object using your framework and it will be converted in HTML tag automatically</li>
<li><strong>SASS LESS</strong> and all CSS preprocessors make object oriented CSS styles</li>
<li><strong>NodeJS</strong> with NPM, Grunt and Gulp is an evolute Javascript web server</li>
<li><strong>AngularJS2: </strong>is not only a object oriented framework but also it requires to use NodeJS for validating the web page and for building it. AngularJS2 is a little bit more complex than the other front end frameworks but it&#8217;s better structured.</li>
</ul>
<p>&nbsp;</p>
<h2>Integration of technologies</h2>
<p>If you work with <strong>HTML file</strong> you can use all technologies together: HTML, CSS, Javascript, JQuery plugin together with a Foundation component and a Bootstrap component. That&#8217;s easy to do it&#8217;s just enough to import the js file in your HTML document</p>
<p>If you work in an <strong>Object Oriented Domain </strong>the integration with the technologies is very hard because an ReactJS class is finally converted in HTML tags so you don&#8217;t have the fully control of the final HTML document.</p>
<p>Fortunately there are ReactJS classes which produce Bootstrap components etc.</p>
<p>So if you choose to use ReactJS your web application it should be built using only ReactJS, the same for AngularJs2 and ExtJs.</p>
<p>AngulatJS1 is an hybrid so it uses html tag with special attributes such as ng-app, ng-if, ng-switch so it&#8217;s easily integrable with Bootstrap Foundation and other frameworks.</p>
<h3> Finally which technology should I choose?</h3>
<p>It&#8217;s necessary to choose one technology fully tested and with a plenty of components already built</p>
<p>AngularJS is great even if it&#8217;s not fully object oriented it can used with JQuery, Bootstrap Foundation and all plugins. I believe it&#8217;s the best technology to use.</p>
<p>ReactJS has been built since a long time and if it&#8217;s not possible to use with all JQUERY / Bootstrap /Foundation components, there are many libraries and many components already built and it&#8217;s fully object oriented</p>
<p>&nbsp;</p>
<p>AngularJS2 it&#8217;s the best framework but it has been built two months ago and I believe there are few components already built and since it&#8217;s object oriented it cannot be integrated with Jquery plugins bootstrap foundation. If needed to do something and it&#8217;s not available any component already built you should make it on your own. Is it worthy?</p>
<p>I believe we should wait a little bit more for using Angular2 in real important big projects</p>
<p>&nbsp;</p>
<p><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fcomparison-of-all-front-end-technologies%2F&amp;linkname=Comparison%20of%20all%20front%20end%20technologies" title="Facebook" rel="nofollow" target="_blank"></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fcomparison-of-all-front-end-technologies%2F&amp;linkname=Comparison%20of%20all%20front%20end%20technologies" title="Twitter" rel="nofollow" target="_blank"></a><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fcomparison-of-all-front-end-technologies%2F&amp;linkname=Comparison%20of%20all%20front%20end%20technologies" title="Google+" rel="nofollow" target="_blank"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=https%3A%2F%2Fwww.rizzimichele.it%2Fcomparison-of-all-front-end-technologies%2F&amp;title=Comparison%20of%20all%20front%20end%20technologies" id="wpa2a_18"></a></p>]]></content:encoded>
			<wfw:commentRss>https://www.rizzimichele.it/comparison-of-all-front-end-technologies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AngularJS 2 Mixed words</title>
		<link>https://www.rizzimichele.it/angularjs-mixed-words/</link>
		<comments>https://www.rizzimichele.it/angularjs-mixed-words/#comments</comments>
		<pubDate>Sat, 05 Nov 2016 14:59:08 +0000</pubDate>
		<dc:creator><![CDATA[Michele Rizzi]]></dc:creator>
				<category><![CDATA[All articles (75)]]></category>
		<category><![CDATA[Programming languages (51)]]></category>

		<guid isPermaLink="false">http://www.rizzimichele.it/?p=1041</guid>
		<description><![CDATA[Here is available an example about how to use AngularJS2 made by me]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.rizzimichele.it/javascriptHTML/angular2mix/index.html">Here</a> is available an example about how to use AngularJS2 made by me</p>
<p><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fangularjs-mixed-words%2F&amp;linkname=AngularJS%202%20Mixed%20words" title="Facebook" rel="nofollow" target="_blank"></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fangularjs-mixed-words%2F&amp;linkname=AngularJS%202%20Mixed%20words" title="Twitter" rel="nofollow" target="_blank"></a><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=https%3A%2F%2Fwww.rizzimichele.it%2Fangularjs-mixed-words%2F&amp;linkname=AngularJS%202%20Mixed%20words" title="Google+" rel="nofollow" target="_blank"></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=https%3A%2F%2Fwww.rizzimichele.it%2Fangularjs-mixed-words%2F&amp;title=AngularJS%202%20Mixed%20words" id="wpa2a_20"></a></p>]]></content:encoded>
			<wfw:commentRss>https://www.rizzimichele.it/angularjs-mixed-words/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
