Kayıtlar

Welcome to Flutter -1

Resim
This lesson is introduction of Flutter language lesson series. First of all, you have to download flutter setup in order to prepare the environment. https://docs.flutter.dev/get-started/install/macos So, download flutter and follow instructions. As you realize, flutter does have quite detailed version control command. After running flutter doctor -v controls your environment and creates a detailed report.                                            Let's check simple Flutter commands; Let's take a quick look to most common commands. create -> creates a new project for ios,android and web. pub -> two parameters ; "get" downloads packages and "test" download test packages. build -> working with parameters "apk", "ios", "web".  you can also build desktop app. For instance "macos" for apple.  Now, let's install visual studio code as the IDE and ...

Svelte. Not famous one but good one…

Resim
I guess, many web developers may not heard about Svelte. It is one man show by Rich Harris.  It is also called as “CYBERNETICALLY ENHANCED WEB APPS”. “CYBERNETICALLY” ? Right, it needs explanation. Firstly, Let’s me share with you main page of svelte… https://svelte.dev/ You can realize that Svelte takes the responsibility of lots work. Let’s go over one by one. Compiler It has strong compiler. On the other hand, React, Angular and Vue.js are just library so they inject core javascript libraries to your page. In aspect of Svelte , at the end of the compilation process, pure Javascript bundle is created which can manage full operations on DOM without Virtual DOM need. Moreover, the build output is optimized and minimized. Here is the "helloworld" sample for Svelte. Bundle just 3KB! Easy and Quickly Running Let’s think about Angular project. You need to deal with many configuration files like routing,component. As for Svelte,  at first you will have just two files "mai...

Golang working with goroutines and channels -4

Resim
 We will continue with the last part of golang reading. In our previous examples, we worked with main method which runs on only one processor and all tasks executed sequentially. But what if we need multi task environment which be scheduled by golang get results from these tasks and use them.  How about Java Future. Sounds familiar ? Most of  the Java developers uses Future interface in order to handle asynchronous processes. https://www.baeldung.com/java-future Here is the following a task executor which makes simple math calculation. public class SquareCalculator { private ExecutorService executor = Executors.newSingleThreadExecutor(); public Future<Integer> calculate (Integer input) { return executor.submit(() -> { Thread.sleep( 1000 ); return input * input; }); } } What about execution ? It is so easy to implement. After creating an instance of executor we trigger "cal...

Golang working with interfaces and functions -3

Resim
When learning Golang one of the interesting part is interfaces. It has a little bit difference with respect to other languages. Let me start with how to identify a typical interface and structs and go over. Here it is following sample interface; type area interface {     getArea () float64 } type square struct {     sideLength float64 } type triangle struct {     height float64     base   float64 } By identifying this interface we expect to implement any structs with respect to its aim. Let me more specific. GetArea method should have math definition that calculates area of received shape.  On the following the calculation square and triangle ; func (s square) getArea () float64 {     return s.sideLength * s.sideLength } func (r triangle) getArea () float64 {     return 0.5 * r.base * r.height } As it is mentioned previous reading they are receiver functions. So same function receives (not parameter) d...

Golang Receiver Functions -2

In this lesson, we will talk about receiver functions over type structures. For example, it is quite similar to the C# extensions feature, which C# users are not far from. https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods If we do remember, there was an extension method that we defined as static in C#. Here, as a type safe, we add the variable of the type we specified with the "this" parameter as a method and send the content of the variable directly into the method. namespace ExtensionMethods { public static class MyExtensions { public static void PrintConsole ( this string message ) { Console.Writeln(message) } } } Main methodu static void M ain ( String[] args ) { String extensionTest = "demo"; extensionTest.PrintConsole(); } Our console application will print "demo". Golang receiver functions are also...

Welcome to Golang -1

Resim
This lesson is a introduction of Go language lesson series. First of all, you have to download golang setup in order to prepare environment. https://go.dev/dl/ So, start the installation and complete process just clicking 'Next'. Let's check simple Golang commands; In the following you will find most common commands. build -> builds one or more files. run -> first compiles one or more files and then runs. fmt -> formats the file. install -> Install packages. get -> gets the code as a resource. test -> runs test packages. Now, let's install visual studio code as the IDE and introduce Go as an extension. https://code.visualstudio.com/download After we have done our installation, we can add our extension. After clicking View-> Extension, let's add it as follows. After successfully installing our extension, let's create our go file. We can create our main.go file by showing an empty folder that we will create in Visual Studio. Let's fill our...

Quorum ile 3 node 'lü RAFT Blockchain Network kurulumu -4

Resim
     Malumunuz Blockchain teknolojisinin temeli verinin merkezilikten çıkarak dağıtık ve güvenilir bir şekilde tutulmasında yatıyor. Daha önceki yazılarımızda dev ortamı ganache ' i kullanarak tek node lu bir development ortamı üzerinden testlerimizi yapmıştık. Şimdi ise birden fazla node ile çalışarak yani dev ortamından çıkarak gerçek bir blockchain ortamı ile çalışmak için altyapı kurulumu yapalım. Web3j ve Ganache ile Ethereum Dünyasına Giriş - 1 (buraktunali.blogspot.com) Solidity ile Akıllı Kontratlar ve Ethereum Dünyası -2 (buraktunali.blogspot.com) React Native ve Web3 ile Transaction Ethereum Dünyası -3 (buraktunali.blogspot.com) Aslında birden fazla node kurulumunu quick start kurulum üzerinden yapabiliyorsunuz. Ancak biz bu yazımızda göstereceğimiz gibi bazı konfigurasyonlar üzerinden de yapabiliyor olacağız. Yazımızın temelinde olan Quorum ile başlayalım. https://consensys.net/quorum/ Quorum u tamamen açık kaynaklı blockchain teknolojisi sunan altyapı olarak t...