2. Goals
• Create a high level web-framework for Go,
like Django for Python or Rails for Ruby
• Be Go-ish
• Don’t make stuff more complicated than it
has to be
• Convention over configuration
• Easy setup and deployment
3. Current status
• In development for 10 months
• Work sponsored by STARTeurope
• Used in production for http://startuplive.in
• Go v1.0
4. What’s in it?
• MVC
• Prefer Go syntax to template languages
• HTML5 Boilerplate out of the box
• MongoDB
• All batteries included
5. All batteries included
• HTML5 Boilerplate
• jQuery
• External dependencies fetched
automatically:
go get -u github.com/ungerik/go-start
7. Philosophy
• Why learn another template language if you
can use Go syntax?
• DOM tree has a 1:1 Go object
representation on the server
• Every element has an ID to enable sync of
DOM tree and server view representation
24. Models
• Models are Go structs
(marshaling via reflection)
• Meta information for validation and display
is added via tags
• Forms and DB share the same model and
validation mechanism
• MongoDB is the default database
28. type ExampleDoc struct {
! mongo.DocumentBase `bson:",inline"` // Give it a Mongo ID
! Person mongo.Ref `gostart:"to=people"` // Mongo ID ref to a document in
"people" collection
! LongerText model.Text `gostart:"rows=5|cols=80|maxlen=400"`
! Integer model.Int `gostart:"min=1|max=100"`
! Email model.Email // Normalization + special treament in forms
! PhoneNumber model.Phone // Normalization + special treament in forms
! Password model.Password // Hashed + special treament in forms
! SubDoc struct {
! ! Day model.Date
! ! RealFloat model.Float `gostart:"valid"
! ! Drinks []mongo.Choice `gostart:"options=Beer,Wine,Water"`
! }
}
35. Additional packages
• Email (message creation missing in standard
mail package + Google Mail defaults)
• Gravatar
• RSS parsing
• Amiando event management
(used by http://startuplive.in)
36. Where to get it
• go get -u github.com/ungerik/go-start
• Documentation: http://go-start.org/