What I'm going to do a side-by-side comparison between Go and PHP. The reason I'm doing that is so I can illustrate the problem that happens with the dynamically typed language that is called PHP and does not happen with the statically typed that is Go.
Update it's really just an comparison between dynamically typed and statically typed, it's has nothing to do with the language itself! It's just happened that I chose Go and PHP!
Read on...
First thing first, I make one thing clear it's is not to be confused with the Ruby Project that goes by the similar name
In my time I have tried quite a few framework and I have read so many documentation on quite a few, I had a good look a the documentation of CodeIgnitor and Laravel, I was not satisfied with their URL Routing, CI was by far the worst, reflecting path towards classes and method by default, now that is a very bad idea, that give hackers the ability to determine which classes exist and which one does not, the information that I wouldn't want them to know at all. What were they thinking?
Read on...
Do you have any idea what the game might be? I bet you don't know!
Say if the vistor visted this site and somehow cause the server to panic (or throws an exception), the vistor will see a 500 Error and write a detailed error message to the file, that only I have access to.
HTTP/1.0, HEAD, cj-jackson.com, /, ? IP:xxx.xxx.xxx.xxx:xxx
template: html:1: http: request method or response status code does not allow body
D:/GOPATH/src/github.com/CJ-Jackson/webby/webby.go:93 (0x420118)
c:/go/src/pkg/runtime/proc.c:1443 (0x40f45b)
D:/GOPATH/src/github.com/CJ-Jackson/webby/error.go:17 (0x418c5e)
D:/GOPATH/src/github.com/CJ-Jackson/webby/error.go:11 (0x418c0b)
D:/GOPATH/src/github.com/CJ-Jackson/webby/html.go:48 (0x419cd4)
D:/GOPATH/src/github.com/CJ-Jackson/webby/html.go:65 (0x419eb6)
D:/GOPATH/src/github.com/CJ-Jackson/webby/html.go:127 (0x41a391)
D:/Google Drive/My Project/cj new blog/site/app/_boot/header.go:114 (0x424be2)
D:/Google Drive/My Project/cj new blog/site/app/_boot/master.go:42 (0x425851)
D:/Google Drive/My Project/cj new blog/site/app/blog/index.go:77 (0x42ae10)
D:/Google Drive/My Project/cj new blog/site/app/blog/blog.go:1 (0x42bd06)
D:/GOPATH/src/github.com/CJ-Jackson/webby/junction.go:67 (0x41a605)
D:/GOPATH/src/github.com/CJ-Jackson/webby/bootstrap.go:0 (0x422be7)
D:/GOPATH/src/github.com/CJ-Jackson/webby/router.go:205 (0x41d0ab)
D:/GOPATH/src/github.com/CJ-Jackson/webby/router.go:241 (0x41d52d)
D:/GOPATH/src/github.com/CJ-Jackson/webby/bootstrap.go:106 (0x417e72)
D:/GOPATH/src/github.com/CJ-Jackson/webby/bootstrap.go:0 (0x421f41)
D:/GOPATH/src/github.com/CJ-Jackson/webby/webby.go:142 (0x41f210)
D:/GOPATH/src/github.com/CJ-Jackson/webby/bootstrap.go:0 (0x42154f)
c:/go/src/pkg/net/http/server.go:669 (0x499590)
c:/go/src/pkg/runtime/proc.c:271 (0x40d561)
Request Header:
map[X-Real-Ip:[xxx.xxx.xxx.xxx] User-Agent:[parsijoo] Connection:[close]]
Form Values:
map[]
Form Values (Multipart):
<nil>
Time:
2013-03-25 18:07:01.200768 +0000 GMT
As you can see, it's got stack trace, it's quite useful for debugging. In Debug Mode, it would of outputted to the client (web browser). In PHP the default error handling is nowhere as useful at this, in my opinion the stack trace should of been the default feature in development but it isn't and to me that was a big mistake.
Anyway I have fixed the bug, I have written test cases but some bugs are very easy to overlook, but at least the server can retain operation after throwing an exception (and was able to output detailed error to the file), so therefore no collateral damage has been done. If that happened in NodeJS and you didn't monitor the process, the server would be rendered offline and therefore causing collateral damage.
I love the Go Programming Language, productive (lightweight syntax), predictable (statically typed) and very easy to debug (compiled), it was a wake up call. Hopefully it should allow me more time for jQuery, Illustrator and going to the Gym.
Apologise for not having a proper screendump, because that Macbook is not mine and I don't own one! Yet I own an iPhone and an Airport!
But I can say it's look stunning, infact I'm seriously considering dumping IE8 and below, so I can use SVG and go one step ahead of the web trend!