From c48361bb23ec21c672096104d6885c87f5ecbef6 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 11 May 2024 13:10:04 -0700 Subject: Update: README. Add: print-all-route-documentation --- README.org | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) (limited to 'README.org') diff --git a/README.org b/README.org index e48cfe9..a7a1939 100644 --- a/README.org +++ b/README.org @@ -38,29 +38,21 @@ See [[./examples][examples]] for a few examples. ** Advantages of the Approach -OOPyness is an advantage. For example: you can easily recycle -authentication and authorization by creating mix-in classes on which -~authorize~ and ~authenticate~ are specialized. Anytime you want to -add a new endpoint that must be authorized in a particular way, it is -as easy as adding your mix-in to your new endpoint's superclasses. +OOPyness is an advantage. Object orientation allows one to: -The same thing applies to establishing and dis-establishing database -connections - you simply specialize ~handle~'s ~:around~ method, or -~:before~ and ~:after~ methods, on your endpoint class. +- Recycle logic by defining protocol methods on mixin superclasses of + endponit classes. Whole regions of a site or API can easly be + extended or modified. -If you want special processing on your endpoint classes themselves, -you can sublcass the ~endpoint~ metaclass and specialize -~intstantiate-instance~ methods. +- ~ENDPOINT~ itself can be sublcassed for special endpoint definition + logic. E.g. ensuring a route prefix without having to type it each + time can be acheived by specializing ~instantiate-instance~ on a + subclass of ~ENDPOINT~. -For example, if you would prefer every endpoint to be be prefixed by a -particular route string, you can transform the ~route-parts~ field -before they are processed by ~endpoint~'s ~instantiate-instance~ -method. +- You can use the reified endpoints to automatically generate nice + documentation. (Less than nice documentation is already provided via + the function ~weekend:print-all-route-documentation~.) -** Disadvantages of the Approach - -WEEKEND can be be a little verbose. You are free to define your own -class-defining macros. - -This version of weekend is strongly tied to Hunchentoot. +- Similarly, you can automatically generate API client code for your + langauge of choice. -- cgit v1.2.3