Skip to content

Commit

Permalink
Improve the package introduction docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rur committed Feb 24, 2020
1 parent 52d413f commit 56e53a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions doc.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
/*
Package treetop is a library for incorporating HTML fragment requests into Go
web applications.
Package treetop provides tools for handlers to support a HTML template request protocol .
Fragments requests are specified by a protocol with the goal of removing some of the common
causes of JavaScript boilerplate in modern web applications. Reliance on data APIs can also be greatly reduced.
So your webpage does IO; and you need to show updates without clobbering the interface.
The common approach is to expose a data API and dispatch JavaScript to micromanage the client.
That will work, but it is pretty heavy duty for what seems like a simple problem.
Conventional HTTP works very well for navigation and web forms alike, no micromanagement required.
Perhaps it could be extended to solve our dynamic update problem. That is the starting point for Treetop,
to see how far we can get with a simple protocol.
Treetop is unique because it puts the server-side hander in complete control of how the page will be updated
following a request.
For documentation and examples see https://github.com/rur/treetop and https://github.com/rur/treetop-recipes
Expand Down
2 changes: 1 addition & 1 deletion response.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

// Response extends the http.ResponseWriter interface to give ViewHandelersFunc's limited
// ability to control the hierarchical request handing.
// ability to control the hierarchical request handling.
//
// Note that writing directly to the underlying ResponseWriter in the handler will cancel the
// treetop handling process. Taking control of response writing in this way is a very common and
Expand Down

0 comments on commit 56e53a0

Please sign in to comment.