<?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>scala Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/scala/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 08 Jul 2021 17:38:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Install Play framework on Debian 10</title>
		<link>https://www.osradar.com/install-play-framework-debian-10/</link>
					<comments>https://www.osradar.com/install-play-framework-debian-10/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sun, 11 Jul 2021 23:59:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[scala]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=31107</guid>

					<description><![CDATA[<p>Hello, friends. Application development leads to the use of many different tools to make the process faster. Some of these tools are more or less complex according to what is required, but today we will show you how to install Play Framework on Debian 10. This Java and Scala compatible framework will allow you to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-play-framework-debian-10/">Install Play framework on Debian 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="has-line-data">Hello, friends. Application development leads to the use of many different tools to make the process faster. Some of these tools are more or less complex according to what is required, but today we will show you how to install Play Framework on Debian 10. This Java and Scala compatible framework will allow you to make quite robust web applications.</p>



<h2 class="code-line"><a id="What_is_Play_Framework_2"></a>What is Play Framework?</h2>



<p class="has-line-data"><a href="https://www.playframework.com/">Play Framework</a> is a framework that allows us to make <strong>web applications with Java &amp; Scala in a fast and easy way</strong>. These applications are based on scalability and the possibility that they can be adapted to many different needs.</p>



<p class="has-line-data">Like many current frameworks, <strong>it uses the MVC pattern for the logical processing of the applications</strong>. In addition to this, it has a lot of community support as well as brilliant official documentation.</p>



<p class="has-line-data">So with this introduction to Play, we can start the installation process.</p>



<h2 class="code-line"><a id="Install_Play_Framework_on_Debian_10_10"></a>Install Play Framework on Debian 10</h2>



<p class="has-line-data">Normally you would install this framework on a local computer, but it also works on a remote server.</p>



<p class="has-line-data">So, open a terminal and update Debian</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt upgrade</pre>



<p class="has-line-data">After that, you can install some necessary packages. Normally you should already have them but it’s always good to be sure.</p>



<pre class="wp-block-preformatted">sudo apt install git unzip zip curl</pre>



<p class="has-line-data">Then, with the <a href="https://www.osradar.com/how-to-use-curl-command-linux/" target="_blank" rel="noreferrer noopener"><code>curl</code> </a>command we have to download the SDK install script with which we will install <code>sbt</code> which is the tool with which we will finally manage the projects made with Play Framework.</p>



<pre class="wp-block-preformatted">curl -s "https://get.sdkman.io" | bash</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="680" height="236" src="https://www.osradar.com/wp-content/uploads/2021/07/1-1.png" alt="1.- SDK on Debian 10" class="wp-image-31122" srcset="https://www.osradar.com/wp-content/uploads/2021/07/1-1.png 680w, https://www.osradar.com/wp-content/uploads/2021/07/1-1-300x104.png 300w" sizes="(max-width: 680px) 100vw, 680px" /><figcaption>1.- SDK on Debian 10</figcaption></figure>



<p class="has-line-data">At the end of the process, it is necessary to refresh the user’s PATH.</p>



<pre class="wp-block-preformatted">source "$HOME/.sdkman/bin/sdkman-init.sh"</pre>



<p class="has-line-data">Now check the installed SDK version with the following command:</p>



<pre class="wp-block-preformatted">sdk version</pre>



<p class="has-line-data">Sample Output</p>



<pre class="wp-block-preformatted">==== BROADCAST =================================================================
* 2021-07-02: grails 3.3.14 available on SDKMAN!
* 2021-07-02: gradle 7.1.1 available on SDKMAN!
* 2021-07-01: grails 3.3.13 available on SDKMAN!
================================================================================

SDKMAN 5.11.6</pre>



<p class="has-line-data">When using the SDK, you should then <a href="https://www.osradar.com/install-java-16-debian-10/" target="_blank" rel="noreferrer noopener">install Java</a>. To do this, you can run the following command:</p>



<pre class="wp-block-preformatted">sdk install java $(sdk list java | grep -o "8\.[0-9]*\.[0-9]*\.hs-adpt" | head -1)</pre>



<p class="has-line-data">Sample output:</p>



<pre class="wp-block-preformatted">Done repackaging...

Installing: java 8.0.292.hs-adpt
Done installing!


Setting java 8.0.292.hs-adpt as default.
</pre>



<p class="has-line-data">now it uses SDK to install <code>sbt</code>.</p>



<pre class="wp-block-preformatted">sdk install sbt</pre>



<p class="has-line-data">Sample Output:</p>



<pre class="wp-block-preformatted">Installing: sbt 1.5.4
Done installing!

Setting sbt 1.5.4 as default.</pre>



<h3 class="code-line"><a id="Download_the_sample_project_for_Play_Framework_55"></a>Download the sample project for Play Framework</h3>



<p class="has-line-data">Make sure you are in your home folder and from there with the <code>git</code> command download the sample project.</p>



<pre class="wp-block-preformatted">cd ~
git clone https://github.com/playframework/play-samples.git
Cloning into 'play-samples'...
remote: Enumerating objects: 16564, done.
remote: Counting objects: 100% (362/362), done.
remote: Compressing objects: 100% (246/246), done.
remote: Total 16564 (delta 210), reused 199 (delta 105), pack-reused 16202
Receiving objects: 100% (16564/16564), 5.32 MiB | 12.35 MiB/s, done.
Resolving deltas: 100% (9846/9846), done.</pre>



<p class="has-line-data">Access the downloaded folder</p>



<pre class="wp-block-preformatted">cd play-samples/play-scala-hello-world-tutorial</pre>



<p class="has-line-data">And run the project</p>



<pre class="wp-block-preformatted">sbt run</pre>



<p class="has-line-data">This will make it available at <code>http://localhost:9000</code> which you can use a web browser to view the content.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="518" src="https://www.osradar.com/wp-content/uploads/2021/07/2-1-1024x518.png" alt="2.- Play Framework on Debian 10" class="wp-image-31123" srcset="https://www.osradar.com/wp-content/uploads/2021/07/2-1-1024x518.png 1024w, https://www.osradar.com/wp-content/uploads/2021/07/2-1-300x152.png 300w, https://www.osradar.com/wp-content/uploads/2021/07/2-1-768x388.png 768w, https://www.osradar.com/wp-content/uploads/2021/07/2-1-696x352.png 696w, https://www.osradar.com/wp-content/uploads/2021/07/2-1-1068x540.png 1068w, https://www.osradar.com/wp-content/uploads/2021/07/2-1.png 1349w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>2.- Play Framework on Debian 10</figcaption></figure>



<p class="has-line-data">Now if you are doing this installation on a remote server, then you will get an error. This is because the host has not been authorized.</p>



<p class="has-line-data">Finish running Play and edit the configuration file:</p>



<pre class="wp-block-preformatted">nano /home/user/play-samples/play-scala-hello-world-tutorial/conf/application.conf</pre>



<p class="has-line-data">And add the following:</p>



<pre class="wp-block-preformatted">play.filters.hosts {
  allowed = ["."]
}</pre>



<p class="has-line-data">Save the changes and close the editor so that when you start the framework again, it will be accessible.</p>



<h2 class="code-line"><a id="Creating_a_new_application_with_Play_Framework_on_Debian_10_84"></a>Creating a new application with Play Framework on Debian 10</h2>



<p class="has-line-data">First, create a folder for the new project. In my case I will call it <code>example</code> but you can call it whatever you want. Then access it.</p>



<pre class="wp-block-preformatted">mkdir ~/example
cd ~/example</pre>



<p class="has-line-data">And from there, you can download the template for java application development:</p>



<pre class="wp-block-preformatted">sbt new playframework/play-java-seed.g8</pre>



<p class="has-line-data">Now, access the generated folder and run it:</p>



<pre class="wp-block-preformatted">cd example
run</pre>



<p class="has-line-data">Stop it and start working on it.</p>



<h2 class="code-line"><a id="Conclusion_102"></a>Conclusion</h2>



<p class="has-line-data">In this post, you learned about the existence of a very interesting framework for the web like Play Framework. Besides this you are now able to install it on Debian 10.</p>



<p class="has-line-data">Enjoy it.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-play-framework-debian-10/">Install Play framework on Debian 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-play-framework-debian-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Is Scala better then Java , Why ?</title>
		<link>https://www.osradar.com/scala-better-java/</link>
					<comments>https://www.osradar.com/scala-better-java/#respond</comments>
		
		<dc:creator><![CDATA[Mel K]]></dc:creator>
		<pubDate>Tue, 02 Jan 2018 16:06:45 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[scala]]></category>
		<guid isPermaLink="false">http://www.osradar.com/?p=889</guid>

					<description><![CDATA[<p>Java is a language based on Object Oriented programming. Its objective is for the most part centered around to gather the data and to take the control of the given information. It tries to make applications accessible to regular clients with the assistance of realistic UIs and pattern related to object oriented, though then again [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/scala-better-java/">Is Scala better then Java , Why ?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Java is a language based on Object Oriented programming. Its objective is for the most part centered around to gather the data and to take the control of the given information. It tries to make applications accessible to regular clients with the assistance of realistic UIs and pattern related to object oriented, though then again Scala Programming simply takes after the conventional useful approach.</p>
<p>Scala not at all like Java, is a language based machine assembly. That implies, it is intended to keep running on a particular domain to some degree like the JVM and offers the mix of the practical and question oriented approach with the assistance of a compiler and a sort framework, examined at the compilation time which is again the same as Java, apart from that, it has a vivid syntax of high level languages for example like Ruby.</p>
<p>While the straightforwardness of the Java programming language has been a piece of its fame, but ironically it has likewise increased the complexity of this language. Indeed, you can compose anything in Java, however the lines of code required to do as such can be overwhelming. Programming in Scala, then again, has a marginally more unpredictable structure. Yet, in the event that you can compose a somewhat more mind boggling single line of code that replaces 20 &#8220;less difficult&#8221; lines of Java, which one is extremely more unpredictable?</p>
<p>In all actuality Java is regularly just much excessively verbose. In Scala, the compiler is staggeringly brilliant, so this maintains a strategic distance from the designer expecting to determine unequivocally those things that the compiler can induce. Think about, for instance, this basic &#8220;Hello World!&#8221; program in Java versus Scala:</p>
<p><img loading="lazy" class="size-medium wp-image-890 aligncenter" src="http://www.osradar.com/wp-content/uploads/2017/12/helloword-300x204.png" alt="" width="300" height="204" srcset="https://www.osradar.com/wp-content/uploads/2017/12/helloword-300x204.png 300w, https://www.osradar.com/wp-content/uploads/2017/12/helloword.png 603w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>Although there is not a huge difference in the syntax of both of languages, yet we can see that the Scala syntax is less verbose in this hello word example.</p>
<p><strong>Differences:</strong></p>
<p><strong>Size</strong></p>
<p>While utilizing Java language in the program, engineers are required to compose longer queues of code to achieve normal assignments. In any case, Scala empowers software engineers to achieve the assignments without composing longer queues of code. Further, it encourages developers to make the code more composed, precise and reusable. Such a significant number of software engineers decide on Scala to build up a brief, precise and viable code base.</p>
<p><strong>Complexity</strong></p>
<p>In spite of helping software engineers to achieve assignments with less code, Scala has a more mind boggling structure than Java. It expects engineers to compose a lower number of single line however complex code. Then again, Java empowers engineers to compose longer queues of basic code. Such huge numbers of novices think that its less demanding to learn Java than Scala.</p>
<p><strong>Structure of the code</strong></p>
<p>Scala have a high rank in syntax structure and language feature as compare to java. In any case, despite everything it has various structures that are not accessible in Java. For example, Scala can access case classes. The profoundly organized nature of Scala additionally empowers software engineers to change over it from simple language to Domain specific language. Therefore, the software engineers have alternative to redo Scala&#8217;s look and feel as per the particular needs of their design.</p>
<p><strong>Performance</strong></p>
<p>As per numerous sites, Scala is speedier than Java. A few software engineers even claim that Scala is 20% quicker than Java. Both java and Scala are keep running on JVM. So their code must be gathered into byte code before running on JVM. Yet, Scala compiler have the ability to support an enhancement method which is known as the tail call recursion. The advancement makes the Scala code aggregate speedier than Java code.</p>
<p>In general, both Java and Scala can be utilized in order to build a large project. However, each programming style has its own particular qualities and shortcomings. So it is critical for software engineers to remember that the particular needs of their task, while looking at the two programming styles.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/scala-better-java/">Is Scala better then Java , Why ?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/scala-better-java/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
