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

VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts ServiceVIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts ServiceApsara Of India
 
North Avenue Call Girls Services, Hire Now for Full Fun
North Avenue Call Girls Services, Hire Now for Full FunNorth Avenue Call Girls Services, Hire Now for Full Fun
North Avenue Call Girls Services, Hire Now for Full FunKomal Khan
 
Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)
Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)
Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)dollysharma2066
 
Statement Of Intent - - Copy.documentfile
Statement Of Intent - - Copy.documentfileStatement Of Intent - - Copy.documentfile
Statement Of Intent - - Copy.documentfilef4ssvxpz62
 
(伦敦大学毕业证学位证成绩单-PDF版)
(伦敦大学毕业证学位证成绩单-PDF版)(伦敦大学毕业证学位证成绩单-PDF版)
(伦敦大学毕业证学位证成绩单-PDF版)twfkn8xj
 
Taken Pilot Episode Story pitch Document
Taken Pilot Episode Story pitch DocumentTaken Pilot Episode Story pitch Document
Taken Pilot Episode Story pitch Documentf4ssvxpz62
 
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)bertfelixtorre
 
Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...
Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...
Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...Amil Baba Company
 
Gripping Adult Web Series You Can't Afford to Miss
Gripping Adult Web Series You Can't Afford to MissGripping Adult Web Series You Can't Afford to Miss
Gripping Adult Web Series You Can't Afford to Missget joys
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607dollysharma2066
 
Vip Delhi Ncr Call Girls Best Services Available
Vip Delhi Ncr Call Girls Best Services AvailableVip Delhi Ncr Call Girls Best Services Available
Vip Delhi Ncr Call Girls Best Services AvailableKomal Khan
 
Call Girls Near Delhi Pride Hotel New Delhi 9873777170
Call Girls Near Delhi Pride Hotel New Delhi 9873777170Call Girls Near Delhi Pride Hotel New Delhi 9873777170
Call Girls Near Delhi Pride Hotel New Delhi 9873777170Sonam Pathan
 
Vip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts Service
Vip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts ServiceVip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts Service
Vip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts ServiceApsara Of India
 
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort ServicesHi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort ServicesApsara Of India
 
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...First NO1 World Amil baba in Faisalabad
 
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCRdollysharma2066
 
Call Girls Chorasi 7397865700 Ridhima Hire Me Full Night
Call Girls Chorasi 7397865700 Ridhima Hire Me Full NightCall Girls Chorasi 7397865700 Ridhima Hire Me Full Night
Call Girls Chorasi 7397865700 Ridhima Hire Me Full Nightssuser7cb4ff
 
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa EscortsCash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa EscortsApsara Of India
 
Call Girls Near The Corus Hotel New Delhi 9873777170
Call Girls Near The Corus Hotel New Delhi 9873777170Call Girls Near The Corus Hotel New Delhi 9873777170
Call Girls Near The Corus Hotel New Delhi 9873777170Sonam Pathan
 
5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...
5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...
5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...Apsara Of India
 

Kürzlich hochgeladen (20)

VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts ServiceVIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
VIP Call Girls In Goa 7028418221 Call Girls In Baga Beach Escorts Service
 
North Avenue Call Girls Services, Hire Now for Full Fun
North Avenue Call Girls Services, Hire Now for Full FunNorth Avenue Call Girls Services, Hire Now for Full Fun
North Avenue Call Girls Services, Hire Now for Full Fun
 
Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)
Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)
Call US '' 8377087607'' !! Call Girls In Model Town Metro (Delhi NCR)
 
Statement Of Intent - - Copy.documentfile
Statement Of Intent - - Copy.documentfileStatement Of Intent - - Copy.documentfile
Statement Of Intent - - Copy.documentfile
 
(伦敦大学毕业证学位证成绩单-PDF版)
(伦敦大学毕业证学位证成绩单-PDF版)(伦敦大学毕业证学位证成绩单-PDF版)
(伦敦大学毕业证学位证成绩单-PDF版)
 
Taken Pilot Episode Story pitch Document
Taken Pilot Episode Story pitch DocumentTaken Pilot Episode Story pitch Document
Taken Pilot Episode Story pitch Document
 
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
LE IMPOSSIBRU QUIZ (Based on Splapp-me-do)
 
Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...
Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...
Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...
 
Gripping Adult Web Series You Can't Afford to Miss
Gripping Adult Web Series You Can't Afford to MissGripping Adult Web Series You Can't Afford to Miss
Gripping Adult Web Series You Can't Afford to Miss
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
 
Vip Delhi Ncr Call Girls Best Services Available
Vip Delhi Ncr Call Girls Best Services AvailableVip Delhi Ncr Call Girls Best Services Available
Vip Delhi Ncr Call Girls Best Services Available
 
Call Girls Near Delhi Pride Hotel New Delhi 9873777170
Call Girls Near Delhi Pride Hotel New Delhi 9873777170Call Girls Near Delhi Pride Hotel New Delhi 9873777170
Call Girls Near Delhi Pride Hotel New Delhi 9873777170
 
Vip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts Service
Vip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts ServiceVip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts Service
Vip Udaipur Call Girls 9602870969 Dabok Airport Udaipur Escorts Service
 
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort ServicesHi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
Hi Class Call Girls In Goa 7028418221 Call Girls In Anjuna Beach Escort Services
 
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
 
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
 
Call Girls Chorasi 7397865700 Ridhima Hire Me Full Night
Call Girls Chorasi 7397865700 Ridhima Hire Me Full NightCall Girls Chorasi 7397865700 Ridhima Hire Me Full Night
Call Girls Chorasi 7397865700 Ridhima Hire Me Full Night
 
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa EscortsCash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
Cash Payment Contact:- 7028418221 Goa Call Girls Service North Goa Escorts
 
Call Girls Near The Corus Hotel New Delhi 9873777170
Call Girls Near The Corus Hotel New Delhi 9873777170Call Girls Near The Corus Hotel New Delhi 9873777170
Call Girls Near The Corus Hotel New Delhi 9873777170
 
5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...
5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...
5* Hotel Call Girls In Goa 7028418221 Call Girls In Calangute Beach Escort Se...
 

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/