Re: [racket-users] dogfood a simple structured discussion forum in racket

2019-07-21 Thread Bogdan Popa
In case someone sets out to do this, here are some things I have open
sourced (from my closed source projects) in the web space that may help:

  * koyo[1]: a general toolking built on top of web-server-lib that adds
many of the things you need in a real web application (CSRF, CORS,
database utils, flash messages, localization, profiling, sessions,
and others -- the documentation is still a little rough, but if
there is interest then I can spend some more time on improving it)

  * deta[2]: a library for mapping between database tables and Racket
structs

  * forms[3]: declarative web form (and JSON) validation -- different
from formlets in that validation and presentation are separate

  * north[4]: database migrations

  * marionette[5]: control Firefox programmatically; great for
end-to-end tests

  * postmark-client[6]: a client for https://postmarkapp.com

  * sentry[7]: runtime error reporting via https://sentry.io (they also
offer an open source variant of the software which the client will
work with just fine)

  * geoip[8]: geolocation using the MaxMind databases

And a couple that are a little more niche and may not apply here:

  * mobilpay[9]: a client for a popular credit card gateway in Romania

  * twilio[10]: a client for the https://twilio.com API

And some libraries I myself have found extremely helpful:

  * sql[11]: s-expression combinators for generating SQL

  * struct-plus-plus[12]: structs on steroids

  * gregor[13]: my personal favorite; a library for working with dates
and times


[1]: https://koyo.defn.io/
[2]: https://deta.defn.io/
[3]: https://docs.racket-lang.org/forms/index.html
[4]: https://pkg-build.racket-lang.org/doc/north@north/index.html
[5]: https://docs.racket-lang.org/marionette/index.html
[6]: https://pkg-build.racket-lang.org/doc/postmark@postmark-client/index.html
[7]: https://pkg-build.racket-lang.org/doc/sentry@sentry-doc/index.html
[8]: https://docs.racket-lang.org/geoip/index.html
[9]: https://github.com/Bogdanp/mobilpay
[10]: https://github.com/Bogdanp/racket-twilio
[11]: https://pkg-build.racket-lang.org/doc/sql@sql/index.html
[12]: https://docs.racket-lang.org/struct-plus-plus/index.html
[13]: https://docs.racket-lang.org/gregor/index.html

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/m21ryjl602.fsf%40192.168.0.139.


[racket-users] dogfood a simple structured discussion forum in racket

2019-07-21 Thread Neil Van Dyke

If someone wants to do a useful and doable Web application in Racket...

You could make threaded discussion Web forum (or email) software.

(Implementation suggestions... Use Racket `db` interface, and deploy in 
PostgreSQL by default.  Consider storing each threaded comment in its 
own row (with IDs for things like parent comment), and keeping a cache 
representation of each threaded topic as a blob in a separate 
table/memory/file, so save you from some nasty querying every time you 
want to show someone the topic.  The cache for each topic can be 
s-expression/objects (which lets you someday apply user-specific 
personalization on the server before sending), HTML that's later pasted 
into a page (traditional), or (less-traditional-Web-friendly, but 
more-Webservice-friendly) JSON that's then turned into DOM/HTML by JS on 
the client.  You might have multiple caches per topic, such as for 
different sorting criteria, if that's a thing.)


After the basic threaded Web forum is done, you can make an email 
gateway/notifications for it, and/or RSS/Atom, to keep people engaged 
rather than them having to keep monitoring and going to a Web site.


There's also a dogfooding aspect.  A basic threaded Web forum should be 
able to be doable enough in Racket to be suitable for a book example 
project, and maybe a tutorial.


An alternative to the above would be to reverse the priorities, and the 
order in which you build it: make a discussion email server that mirrors 
to a Web archive/reader (and maybe the Web archive permits posting 
comments).


Bonus: Racketeers will get warm-fuzzies from using something homegrown 
in Racket (compared to feverish indigestion, from having to use certain 
other things).


--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/6f364c1b-c153-3d53-f092-c09f1b1fe574%40neilvandyke.org.