SlideShare ist ein Scribd-Unternehmen logo
1 von 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/

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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++
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...ritikasharma
 
👙 Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service
👙  Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service👙  Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service
👙 Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Serviceanamikaraghav4
 
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
 
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...russian goa call girl and escorts service
 
Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...
Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...
Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...Riya Pathan
 
Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448ont65320
 
Call Girl Service Belur - 7001035870 with real photos and phone numbers
Call Girl Service Belur - 7001035870 with real photos and phone numbersCall Girl Service Belur - 7001035870 with real photos and phone numbers
Call Girl Service Belur - 7001035870 with real photos and phone numbersanamikaraghav4
 
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...rahim quresi
 
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser... Shivani Pandey
 
Call Girl Nashik Saloni 7001305949 Independent Escort Service Nashik
Call Girl Nashik Saloni 7001305949 Independent Escort Service NashikCall Girl Nashik Saloni 7001305949 Independent Escort Service Nashik
Call Girl Nashik Saloni 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
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
 
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
 
Russian Escorts Agency In Goa 💚 9316020077 💚 Russian Call Girl Goa
Russian Escorts Agency In Goa  💚 9316020077 💚 Russian Call Girl GoaRussian Escorts Agency In Goa  💚 9316020077 💚 Russian Call Girl Goa
Russian Escorts Agency In Goa 💚 9316020077 💚 Russian Call Girl Goasexy call girls service in goa
 
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...noor ahmed
 
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...noor ahmed
 
Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...Riya Pathan
 

Kürzlich hochgeladen (20)

Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
Behala ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready ...
 
👙 Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service
👙  Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service👙  Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service
👙 Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service
 
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...
 
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 Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
 
Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...
Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...
Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...
 
Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448
 
Call Girl Service Belur - 7001035870 with real photos and phone numbers
Call Girl Service Belur - 7001035870 with real photos and phone numbersCall Girl Service Belur - 7001035870 with real photos and phone numbers
Call Girl Service Belur - 7001035870 with real photos and phone numbers
 
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
 
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
 
Call Girl Nashik Saloni 7001305949 Independent Escort Service Nashik
Call Girl Nashik Saloni 7001305949 Independent Escort Service NashikCall Girl Nashik Saloni 7001305949 Independent Escort Service Nashik
Call Girl Nashik Saloni 7001305949 Independent Escort Service Nashik
 
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
 
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
 
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
 
Call Girls New Ashok Nagar Delhi WhatsApp Number 9711199171
Call Girls New Ashok Nagar Delhi WhatsApp Number 9711199171Call Girls New Ashok Nagar Delhi WhatsApp Number 9711199171
Call Girls New Ashok Nagar Delhi WhatsApp Number 9711199171
 
Russian Escorts Agency In Goa 💚 9316020077 💚 Russian Call Girl Goa
Russian Escorts Agency In Goa  💚 9316020077 💚 Russian Call Girl GoaRussian Escorts Agency In Goa  💚 9316020077 💚 Russian Call Girl Goa
Russian Escorts Agency In Goa 💚 9316020077 💚 Russian Call Girl Goa
 
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Howrah ⟟ 8250192130 ⟟ High Class Call Girl In...
 
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
 
CHEAP Call Girls in Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in  Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in  Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online 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/