Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(694)

Unified Diff: src/site/docs/serverguide.markdown

Issue 123553005: Added new server/cmdline/io programmers' guide. (Closed) Base URL: https://github.com/dart-lang/dartlang.org.git@master
Patch Set: Created 6 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/site/docs/index.markdown ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/site/docs/serverguide.markdown
diff --git a/src/site/docs/serverguide.markdown b/src/site/docs/serverguide.markdown
new file mode 100644
index 0000000000000000000000000000000000000000..1c50e319bf62e6b17d8a9e8c9961fe1ed8bc8ff2
--- /dev/null
+++ b/src/site/docs/serverguide.markdown
@@ -0,0 +1,149 @@
+---
+layout: article
+title: "Command-Line Apps"
+description: "Documentation, references, and more about server-side programming."
+has-permalinks: true
+---
+
+{% include docs_toc.html %}
+
+# {{ page.title }}
+
+You can use Dart for any kind of command-line app from scripts to servers.
+
+## Show me the code
+
+If you prefer to plow through code, start here.
Shams 2014/01/03 00:28:17 Does Google have a standard for verbiage for links
mem 2014/01/03 00:35:02 Done.
+These samples progress from simple to complex
+and illustrate a variety of APIs specific to command-line apps and servers.
+
+<hr>
+
+<div class="row">
+<div class="col-md-5">
+
+### Best place to start
+
+* [Dart by Example](/dart-by-example/#dart-io-and-command-line-apps)
+
+</div>
+<div class="col-md-7">
+
+#### Top 10
+
+10. Using files, directories, and symlinks
+9. Reading and writing files
+8. Listing contents of directories
+7. Using streams
+6. Making HTTP requests
+5. Getting the response
+4. Handling errors
+3. Serving index.html
+2. Adding custom headers
+1. Implementing an HTTP server
+0. ...and more...
+
+</div>
+</div>
+
+<hr>
+
+<div class="row">
+<div class="col-md-5">
+
+### Basic command-line apps
+
+* [dcat](https://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/samples/dcat/README.md)
+* [dgrep](https://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/samples/dgrep/README.md)
+</div>
+<div class="col-md-7">
+
+#### APIs
+
+* parsing command-line arguments
Shams 2014/01/03 00:28:17 The first section uses a numbered list and the fir
mem 2014/01/03 00:35:02 keeping the numbered list because it's the top 10.
+* reading a file
+* converting data
+* using stdin, stdout, and stderr
+* listing a directory recursively
+* testing and getting information about paths
+</div>
+</div>
+
+<hr>
+
+<div class="row">
+<div class="col-md-5">
+
+#### Servers
+
+* [slambookserver](https://github.com/dart-lang/dart-tutorials-samples/blob/master/web/slambook/)
+* [dartiverse_search](https://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/samples/dartiverse_search/readme.txt)
+
+</div>
+<div class="col-md-7">
+
+#### APIs
+
+* using the HttpServer class
+* handling GET, POST, and OPTIONS requests
+* using CORS headers
+* using WebSockets
+* getting responses
+* routing requests
+* handling errors
+
+</div>
+</div>
+
+<hr>
+
+## Read all about it
+
+Follow these links in order to gain a full understaning
Shams 2014/01/03 00:28:17 spelling...
mem 2014/01/03 00:35:02 Done.
+of how to write various kinds of command-line apps in Dart using
+various Dart libraries and packages.
Shams 2014/01/03 00:28:17 Use a different word (various twice in the same se
mem 2014/01/03 00:35:02 Done.
+
+### Prerequisites (dart:async library)
+
+* [Use Future-Based APIs](/docs/tutorials/futures/)
+<img src="/docs/tutorials/images/target.png" height="16" width="16">
+* [Use Streams for Data](/docs/tutorials/streams/)
+<img src="/docs/tutorials/images/target.png" height="16" width="16">
+
+### The Basics
+
+* [Write a Command-Line App](/docs/tutorials/cmdline/)
+<img src="/docs/tutorials/images/target.png" height="16" width="16">
+
+### Servers
+
+* [Get Input from a Form](/docs/tutorials/forms/)
+<img src="/docs/tutorials/images/target.png" height="16" width="16">
+(contains an HTTP server/client pair)
+* [Walkthrough: Dartiverse Search](/docs/dart-up-and-running/contents/ch05.html)
+* [Deploy to Heroku](https://github.com/igrigorik/heroku-buildpack-dart)
+
+{% comment %}
+* How to write a basic server using http_server package (sample link)
+* How to write a web server (sample link)
+* How to use Heroku to deploy (external link)
+
+#### Other server-specific tasks
+
+* How to perform server-side templating (??)
+* How to use SSL to perform secure web messaging (??)
+* Use zones for more control over your asychronous computations (??)
+* How to write a long-running server (??)
+* Using TCP for reliable transmissions (??)
+* Using UDP for lightweight, efficient transmissions (??)
+* Connecting to the postgres database (and concepts for other databases) (??)
+* URL routing for god knows what purpose (??)
+
+{% endcomment %}
+
+### Reference docs
+
+* [dart:io](https://api.dartlang.org/dart_io.html)
+* [args package](https://api.dartlang.org/args.html)
+* [dart:async](https://api.dartlang.org/dart_async.html)
+* [dart:convert](https://api.dartlang.org/dart_convert.html)
« no previous file with comments | « src/site/docs/index.markdown ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698