SlideShare una empresa de Scribd logo
1 de 22
WEB
Programming

telecom, finance, el
ectronics etc.

j2ee, gwt, android, d
art, javascript, etc
.

Senior Developer at i2i
systems

Mobile Programming

Ali PARMAKSIZ

@parmaksiza
What?

Why?

When?
Some Companies .....

Canonical, BBC

Heroku, CloudFoundry

SoundCloud, Mob Rules Games, Carbon Games

Google 
IntelliJ

Eclipse

Netbeans

LiteIDE

TextMate

Komodo
Some Data Types...

Boolean, String

Numeric

Array, Slice, Map

Channel, Interface, Struct, Pointer, Function
func variables() (variableResult int) {
//Explicit type declartion var
var1, var2, var3 int = 1, 2, 3
//The type is implied
var4, var5, var6 := 4, 5, 6
//variableResult is a named //result
parameter variableResult = var1 + var2 +
var3 + var4 + var5 + var6

type vertex struct {
x, y int
}

Struct

//Don't need to return anything since
variableResult was //assigned above.
return }

Variables

type vertex struct { x, y int } func pointers() {
vertexOrignal := vertex{1, 2}
//This is going to make a copy of the original.
vertexCopy := vertexOrignal
vertexCopy.x = 3 vertexCopy.y = 4
//vertexOrignal.x, vertexOrignal.y will remain
//unchange since it mutated the //copy
//This will assign a pointer to
//vertexReference instead of //copying the
//value.
vertexReference := &vertexOrignal
vertexCopy.x = 3 vertexCopy.y = 4
//vertexOrignal.x, vertexOrignal.y will change
//since it mutated the the pointer. }

Pointers

SLICES
func sliceLength() { //Create slice with length of five
sliceWithLength := make([]vertex, 5)
for i := 0; i < len(sliceWithLength); i++ {
sliceWithLength[i] = vertex{i, i + 1} }
}

func sliceNil() { //Create a nil slice. Used in the cases where you get
//the size at runtime.

var sliceWithNil []vertex
for i := 0; i < 5; i++ {
sliceWithNil = append(sliceWithNil, vertex{i, i + 1}) }
}

func mutatingSlices() { // This function mutates slices
sliceVertices := make([]vertex, 5)
for i := 0; i < len(sliceVertices); i++ { sliceVertices[i] = vertex{i, i + 1} }
//Won't change the //value in the slice
for _, vertex := range vertices { vertex.x++ vertex.y++ }
//Will change the value in the slice
for i := 0; i < len(vertices); i++ { vertex := &vertices[i] vertex.x++ vertex.y++ } }

SLICES
elements := make(map[string]string)
elements["H"] = "Hydrogen"
elements["He"] = "Helium"
elements["Li"] = "Lithium"
elements["Be"] = "Beryllium"
elements["B"] = "Boron"
elements["C"] = "Carbon“
elements["N"] = "Nitrogen"
elements["O"] = "Oxygen“
elements["F"] = "Fluorine"
elements["Ne"] = "Neon"}
func main() {
elements := map[string]map[string]string{ "H": map[string]string{ "name":"Hydrogen", "state":"gas", }, "He":
map[string]string{ "name":"Helium", "state":"gas", }, "Li": map[string]string{ "name":"Lithium", "state":"solid", }, "Be":
map[string]string{ "name":"Beryllium", "state":"solid", }, "B": map[string]string{ "name":"Boron", "state":"solid", },
"C": map[string]string{ "name":"Carbon", "state":"solid", }, "N": map[string]string{ "name":"Nitrogen", "state":"gas", },
"O": map[string]string{ "name":"Oxygen", "state":"gas", }, "F": map[string]string{ "name":"Fluorine", "state":"gas", },
"Ne": map[string]string{ "name":"Neon", "state":"gas", }, }
if el, ok := elements["Li"];
ok { fmt.Println(el["name"], el["state"]) }
}

MAPS
Go's philosophically, to concurrency differs from the traditional use of threads
and shared memory can be summarized as
Concurreny model in GO

Channels

Go routines

So what is channels and Go routines ?
Coming .......Go routines
What is a channel ?
//Declaring and initializing..
var c chan int
c= make (chan int)
//or
c:=make(chan int)

//Send value to channel
c<-1

//get value from channel
value<-c
As a result of channel and go routines ....
Set it up to make 5 request a second and stop after 15 request were made. It's passing both web services 40 for the number of iterations to
do, a CPU-intensive taking about 2 seconds to process
Node.js starts off by finishing the first four request simultaneously in about 4 seconds. Then it takes 3 seconds to finish one request at a time. It
takes a total of nearly 34 seconds to complete all the requests
Go takes 2 seconds to finish 2 requests, another 4 to do 4 more and then down to 2 again and so on. It finishes all of them in about 6.5 seconds
See more at: https://c2fo.com/insights/exploring-googles-go-programming-language/

Más contenido relacionado

La actualidad más candente

Mono + .NET Core = ❤️
Mono + .NET Core =  ❤️Mono + .NET Core =  ❤️
Mono + .NET Core = ❤️Egor Bogatov
 
Kotlin Slides from Devoxx 2011
Kotlin Slides from Devoxx 2011Kotlin Slides from Devoxx 2011
Kotlin Slides from Devoxx 2011Andrey Breslav
 
C Code and the Art of Obfuscation
C Code and the Art of ObfuscationC Code and the Art of Obfuscation
C Code and the Art of Obfuscationguest9006ab
 
Functor, Apply, Applicative And Monad
Functor, Apply, Applicative And MonadFunctor, Apply, Applicative And Monad
Functor, Apply, Applicative And MonadOliver Daff
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Romain Francois
 

La actualidad más candente (8)

Mono + .NET Core = ❤️
Mono + .NET Core =  ❤️Mono + .NET Core =  ❤️
Mono + .NET Core = ❤️
 
Kotlin Slides from Devoxx 2011
Kotlin Slides from Devoxx 2011Kotlin Slides from Devoxx 2011
Kotlin Slides from Devoxx 2011
 
Go之道
Go之道Go之道
Go之道
 
TRICK
TRICKTRICK
TRICK
 
C Code and the Art of Obfuscation
C Code and the Art of ObfuscationC Code and the Art of Obfuscation
C Code and the Art of Obfuscation
 
Functor, Apply, Applicative And Monad
Functor, Apply, Applicative And MonadFunctor, Apply, Applicative And Monad
Functor, Apply, Applicative And Monad
 
C++ via C#
C++ via C#C++ via C#
C++ via C#
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++
 

Destacado

BBS Flyers 11/2015
BBS Flyers 11/2015BBS Flyers 11/2015
BBS Flyers 11/2015Umut IŞIK
 
BBS Flyers 05/2016
BBS Flyers 05/2016BBS Flyers 05/2016
BBS Flyers 05/2016Umut IŞIK
 
BBS Flyers 03/2016
BBS Flyers 03/2016BBS Flyers 03/2016
BBS Flyers 03/2016Umut IŞIK
 
Infinite Scalable Systems with Docker
Infinite Scalable Systems with DockerInfinite Scalable Systems with Docker
Infinite Scalable Systems with DockerHüseyin BABAL
 
Ankara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG Şubat 2014 Etkinliği - Design PatternsAnkara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG Şubat 2014 Etkinliği - Design PatternsAnkara JUG
 
BBS Flyers 07/2016
BBS Flyers 07/2016BBS Flyers 07/2016
BBS Flyers 07/2016Umut IŞIK
 
BBS Flyers 08/2016
BBS Flyers 08/2016BBS Flyers 08/2016
BBS Flyers 08/2016Umut IŞIK
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in actionAnkara JUG
 
What ya smokin'?
What ya smokin'?What ya smokin'?
What ya smokin'?Kapil Mohan
 
Happy Developer's Guide to the Galaxy: Thinking About Motivation of Developers
Happy Developer's Guide to the Galaxy: Thinking About Motivation of DevelopersHappy Developer's Guide to the Galaxy: Thinking About Motivation of Developers
Happy Developer's Guide to the Galaxy: Thinking About Motivation of DevelopersLemi Orhan Ergin
 

Destacado (10)

BBS Flyers 11/2015
BBS Flyers 11/2015BBS Flyers 11/2015
BBS Flyers 11/2015
 
BBS Flyers 05/2016
BBS Flyers 05/2016BBS Flyers 05/2016
BBS Flyers 05/2016
 
BBS Flyers 03/2016
BBS Flyers 03/2016BBS Flyers 03/2016
BBS Flyers 03/2016
 
Infinite Scalable Systems with Docker
Infinite Scalable Systems with DockerInfinite Scalable Systems with Docker
Infinite Scalable Systems with Docker
 
Ankara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG Şubat 2014 Etkinliği - Design PatternsAnkara JUG Şubat 2014 Etkinliği - Design Patterns
Ankara JUG Şubat 2014 Etkinliği - Design Patterns
 
BBS Flyers 07/2016
BBS Flyers 07/2016BBS Flyers 07/2016
BBS Flyers 07/2016
 
BBS Flyers 08/2016
BBS Flyers 08/2016BBS Flyers 08/2016
BBS Flyers 08/2016
 
Java EE7 in action
Java EE7 in actionJava EE7 in action
Java EE7 in action
 
What ya smokin'?
What ya smokin'?What ya smokin'?
What ya smokin'?
 
Happy Developer's Guide to the Galaxy: Thinking About Motivation of Developers
Happy Developer's Guide to the Galaxy: Thinking About Motivation of DevelopersHappy Developer's Guide to the Galaxy: Thinking About Motivation of Developers
Happy Developer's Guide to the Galaxy: Thinking About Motivation of Developers
 

Similar a Web Programming Fundamentals in Go

Writing a compiler in go
Writing a compiler in goWriting a compiler in go
Writing a compiler in goYusuke Kita
 
Type safe embedded domain-specific languages
Type safe embedded domain-specific languagesType safe embedded domain-specific languages
Type safe embedded domain-specific languagesArthur Xavier
 
UIKonf App & Data Driven Design @swift.berlin
UIKonf App & Data Driven Design @swift.berlinUIKonf App & Data Driven Design @swift.berlin
UIKonf App & Data Driven Design @swift.berlinMaxim Zaks
 
Jugar Introduccion a Scala
Jugar Introduccion a ScalaJugar Introduccion a Scala
Jugar Introduccion a ScalaSocialmetrix
 
IntroToCSharpcode.ppt
IntroToCSharpcode.pptIntroToCSharpcode.ppt
IntroToCSharpcode.pptpsundarau
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
Starting with Scala : Frontier Developer's Meetup December 2010
Starting with Scala : Frontier Developer's Meetup December 2010Starting with Scala : Frontier Developer's Meetup December 2010
Starting with Scala : Frontier Developer's Meetup December 2010Derek Chen-Becker
 
Kotlin Austin Droids April 14 2016
Kotlin Austin Droids April 14 2016Kotlin Austin Droids April 14 2016
Kotlin Austin Droids April 14 2016DesertJames
 
Codestrong 2012 breakout session hacking titanium
Codestrong 2012 breakout session   hacking titaniumCodestrong 2012 breakout session   hacking titanium
Codestrong 2012 breakout session hacking titaniumAxway Appcelerator
 
Python 101 language features and functional programming
Python 101 language features and functional programmingPython 101 language features and functional programming
Python 101 language features and functional programmingLukasz Dynowski
 
Functional programming basics
Functional programming basicsFunctional programming basics
Functional programming basicsopenbala
 
A la découverte de TypeScript
A la découverte de TypeScriptA la découverte de TypeScript
A la découverte de TypeScriptDenis Voituron
 
Functional programming using underscorejs
Functional programming using underscorejsFunctional programming using underscorejs
Functional programming using underscorejs偉格 高
 
Cocoa Design Patterns in Swift
Cocoa Design Patterns in SwiftCocoa Design Patterns in Swift
Cocoa Design Patterns in SwiftMichele Titolo
 
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016Luigi Dell'Aquila
 
Roslyn and C# 6.0 New Features
Roslyn and C# 6.0 New FeaturesRoslyn and C# 6.0 New Features
Roslyn and C# 6.0 New FeaturesMichael Step
 
つくってあそぼ Kotlin DSL ~拡張編~
つくってあそぼ Kotlin DSL ~拡張編~つくってあそぼ Kotlin DSL ~拡張編~
つくってあそぼ Kotlin DSL ~拡張編~kamedon39
 
TDC2018SP | Trilha Java - Java SE 8 for Java EE Developers
TDC2018SP | Trilha Java - Java SE 8 for Java EE DevelopersTDC2018SP | Trilha Java - Java SE 8 for Java EE Developers
TDC2018SP | Trilha Java - Java SE 8 for Java EE Developerstdc-globalcode
 

Similar a Web Programming Fundamentals in Go (20)

Writing a compiler in go
Writing a compiler in goWriting a compiler in go
Writing a compiler in go
 
Type safe embedded domain-specific languages
Type safe embedded domain-specific languagesType safe embedded domain-specific languages
Type safe embedded domain-specific languages
 
UIKonf App & Data Driven Design @swift.berlin
UIKonf App & Data Driven Design @swift.berlinUIKonf App & Data Driven Design @swift.berlin
UIKonf App & Data Driven Design @swift.berlin
 
Jugar Introduccion a Scala
Jugar Introduccion a ScalaJugar Introduccion a Scala
Jugar Introduccion a Scala
 
IntroToCSharpcode.ppt
IntroToCSharpcode.pptIntroToCSharpcode.ppt
IntroToCSharpcode.ppt
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
Starting with Scala : Frontier Developer's Meetup December 2010
Starting with Scala : Frontier Developer's Meetup December 2010Starting with Scala : Frontier Developer's Meetup December 2010
Starting with Scala : Frontier Developer's Meetup December 2010
 
Kotlin Austin Droids April 14 2016
Kotlin Austin Droids April 14 2016Kotlin Austin Droids April 14 2016
Kotlin Austin Droids April 14 2016
 
mobl
moblmobl
mobl
 
Codestrong 2012 breakout session hacking titanium
Codestrong 2012 breakout session   hacking titaniumCodestrong 2012 breakout session   hacking titanium
Codestrong 2012 breakout session hacking titanium
 
Python 101 language features and functional programming
Python 101 language features and functional programmingPython 101 language features and functional programming
Python 101 language features and functional programming
 
Functional programming basics
Functional programming basicsFunctional programming basics
Functional programming basics
 
A la découverte de TypeScript
A la découverte de TypeScriptA la découverte de TypeScript
A la découverte de TypeScript
 
C program
C programC program
C program
 
Functional programming using underscorejs
Functional programming using underscorejsFunctional programming using underscorejs
Functional programming using underscorejs
 
Cocoa Design Patterns in Swift
Cocoa Design Patterns in SwiftCocoa Design Patterns in Swift
Cocoa Design Patterns in Swift
 
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
 
Roslyn and C# 6.0 New Features
Roslyn and C# 6.0 New FeaturesRoslyn and C# 6.0 New Features
Roslyn and C# 6.0 New Features
 
つくってあそぼ Kotlin DSL ~拡張編~
つくってあそぼ Kotlin DSL ~拡張編~つくってあそぼ Kotlin DSL ~拡張編~
つくってあそぼ Kotlin DSL ~拡張編~
 
TDC2018SP | Trilha Java - Java SE 8 for Java EE Developers
TDC2018SP | Trilha Java - Java SE 8 for Java EE DevelopersTDC2018SP | Trilha Java - Java SE 8 for Java EE Developers
TDC2018SP | Trilha Java - Java SE 8 for Java EE Developers
 

Último

Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...noor ahmed
 
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service AjmerLow Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service AjmerRiya Pathan
 
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsCall Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsApsara Of India
 
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...anamikaraghav4
 
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...Riya Pathan
 
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...aamir
 
(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Riya Pathan
 
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
Call Girl Nashik Amaira 7001305949 Independent Escort Service NashikCall Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
Call Girl Nashik Amaira 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...
College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...
College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...perfect solution
 
VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...
VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...
VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...Neha Kaur
 
Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7Riya Pathan
 
Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7Riya Pathan
 
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...aamir
 
Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448ont65320
 
Verified Call Girls Esplanade - [ Cash on Delivery ] Contact 8250192130 Escor...
Verified Call Girls Esplanade - [ Cash on Delivery ] Contact 8250192130 Escor...Verified Call Girls Esplanade - [ Cash on Delivery ] Contact 8250192130 Escor...
Verified Call Girls Esplanade - [ Cash on Delivery ] Contact 8250192130 Escor...anamikaraghav4
 
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...anamikaraghav4
 
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment BookingCall Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment Bookingnoor ahmed
 

Último (20)

Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
Independent Joka Escorts ✔ 8250192130 ✔ Full Night With Room Online Booking 2...
 
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service AjmerLow Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
 
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal EscortsCall Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
Call Girls In Karnal O8860008073 Sector 6 7 8 9 Karnal Escorts
 
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
 
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
 
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
 
(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(DIVYA) Dhanori Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
 
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur EscortsCall Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
Call Girl Nagpur Roshni Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
 
Call Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
Call Girl Nashik Amaira 7001305949 Independent Escort Service NashikCall Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
Call Girl Nashik Amaira 7001305949 Independent Escort Service Nashik
 
College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...
College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...
College Call Girl in Rajiv Chowk Delhi 9634446618 Short 1500 Night 6000 Best ...
 
VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...
VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...
VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...
 
Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Howrah 👉 8250192130 ❣️💯 Available With Room 24×7
 
Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7
Kolkata Call Girl Bara Bazar 👉 8250192130 ❣️💯 Available With Room 24×7
 
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
 
Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448
 
Verified Call Girls Esplanade - [ Cash on Delivery ] Contact 8250192130 Escor...
Verified Call Girls Esplanade - [ Cash on Delivery ] Contact 8250192130 Escor...Verified Call Girls Esplanade - [ Cash on Delivery ] Contact 8250192130 Escor...
Verified Call Girls Esplanade - [ Cash on Delivery ] Contact 8250192130 Escor...
 
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
 
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment BookingCall Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
Call Girls in Barasat | 7001035870 At Low Cost Cash Payment Booking
 

Web Programming Fundamentals in Go

  • 1.
  • 2.
  • 3. WEB Programming telecom, finance, el ectronics etc. j2ee, gwt, android, d art, javascript, etc . Senior Developer at i2i systems Mobile Programming Ali PARMAKSIZ @parmaksiza
  • 5. Some Companies ..... Canonical, BBC Heroku, CloudFoundry SoundCloud, Mob Rules Games, Carbon Games Google 
  • 7. Some Data Types... Boolean, String Numeric Array, Slice, Map Channel, Interface, Struct, Pointer, Function
  • 8. func variables() (variableResult int) { //Explicit type declartion var var1, var2, var3 int = 1, 2, 3 //The type is implied var4, var5, var6 := 4, 5, 6 //variableResult is a named //result parameter variableResult = var1 + var2 + var3 + var4 + var5 + var6 type vertex struct { x, y int } Struct //Don't need to return anything since variableResult was //assigned above. return } Variables type vertex struct { x, y int } func pointers() { vertexOrignal := vertex{1, 2} //This is going to make a copy of the original. vertexCopy := vertexOrignal vertexCopy.x = 3 vertexCopy.y = 4 //vertexOrignal.x, vertexOrignal.y will remain //unchange since it mutated the //copy //This will assign a pointer to //vertexReference instead of //copying the //value. vertexReference := &vertexOrignal vertexCopy.x = 3 vertexCopy.y = 4 //vertexOrignal.x, vertexOrignal.y will change //since it mutated the the pointer. } Pointers SLICES
  • 9. func sliceLength() { //Create slice with length of five sliceWithLength := make([]vertex, 5) for i := 0; i < len(sliceWithLength); i++ { sliceWithLength[i] = vertex{i, i + 1} } } func sliceNil() { //Create a nil slice. Used in the cases where you get //the size at runtime. var sliceWithNil []vertex for i := 0; i < 5; i++ { sliceWithNil = append(sliceWithNil, vertex{i, i + 1}) } } func mutatingSlices() { // This function mutates slices sliceVertices := make([]vertex, 5) for i := 0; i < len(sliceVertices); i++ { sliceVertices[i] = vertex{i, i + 1} } //Won't change the //value in the slice for _, vertex := range vertices { vertex.x++ vertex.y++ } //Will change the value in the slice for i := 0; i < len(vertices); i++ { vertex := &vertices[i] vertex.x++ vertex.y++ } } SLICES
  • 10. elements := make(map[string]string) elements["H"] = "Hydrogen" elements["He"] = "Helium" elements["Li"] = "Lithium" elements["Be"] = "Beryllium" elements["B"] = "Boron" elements["C"] = "Carbon“ elements["N"] = "Nitrogen" elements["O"] = "Oxygen“ elements["F"] = "Fluorine" elements["Ne"] = "Neon"} func main() { elements := map[string]map[string]string{ "H": map[string]string{ "name":"Hydrogen", "state":"gas", }, "He": map[string]string{ "name":"Helium", "state":"gas", }, "Li": map[string]string{ "name":"Lithium", "state":"solid", }, "Be": map[string]string{ "name":"Beryllium", "state":"solid", }, "B": map[string]string{ "name":"Boron", "state":"solid", }, "C": map[string]string{ "name":"Carbon", "state":"solid", }, "N": map[string]string{ "name":"Nitrogen", "state":"gas", }, "O": map[string]string{ "name":"Oxygen", "state":"gas", }, "F": map[string]string{ "name":"Fluorine", "state":"gas", }, "Ne": map[string]string{ "name":"Neon", "state":"gas", }, } if el, ok := elements["Li"]; ok { fmt.Println(el["name"], el["state"]) } } MAPS
  • 11. Go's philosophically, to concurrency differs from the traditional use of threads and shared memory can be summarized as
  • 12. Concurreny model in GO Channels Go routines So what is channels and Go routines ?
  • 14. What is a channel ?
  • 15. //Declaring and initializing.. var c chan int c= make (chan int) //or c:=make(chan int) //Send value to channel c<-1 //get value from channel value<-c
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. As a result of channel and go routines ....
  • 22. Set it up to make 5 request a second and stop after 15 request were made. It's passing both web services 40 for the number of iterations to do, a CPU-intensive taking about 2 seconds to process Node.js starts off by finishing the first four request simultaneously in about 4 seconds. Then it takes 3 seconds to finish one request at a time. It takes a total of nearly 34 seconds to complete all the requests Go takes 2 seconds to finish 2 requests, another 4 to do 4 more and then down to 2 again and so on. It finishes all of them in about 6.5 seconds See more at: https://c2fo.com/insights/exploring-googles-go-programming-language/