๐Ÿ—ป James Van Dyne

โœˆ๏ธTrips ๐Ÿ—บ๏ธMaps โœ๏ธ๏ธBlog ๐Ÿ”—๏ธ๏ธLinks ๐ŸƒRuns ๐Ÿ‘‰Now
  • ๐ŸกHome
  • โœˆ๏ธTrips
  • ๐Ÿ—บ๏ธMaps
  • โœ๏ธBlog
  • ๐Ÿ”—๏ธLinks
  • ๐ŸƒRuns
  • ๐Ÿ‘‰Now
  • โœ๏ธArticles
  • ๐Ÿ“ค๏ธReplies
  • ๐Ÿ’ฌStatus
  • ๐Ÿ”–๏ธ๏ธBookmarks
  • ๐Ÿ—บCheckins
  • ๐Ÿ“…The Week
  • ๐Ÿ–ฅTech
  • ๐ŸŒฒSustainability
  • ๐ŸƒRunning
  • ๐Ÿง Thoughts
  • ๐Ÿ‡ฏ๐Ÿ‡ตJapan
  • ๐Ÿ’กTIL
  • โ›ฐTanzawa
  • ๐ŸกHome
  • โœ๏ธArticles
  • ๐Ÿ“ค๏ธReplies
  • ๐Ÿ’ฌStatus
  • ๐Ÿ”–๏ธ๏ธBookmarks
  • ๐Ÿ—บCheckins
  • ๐Ÿ“…The Week
  • ๐Ÿ–ฅTech
  • ๐ŸŒฒSustainability
  • ๐ŸƒRunning
  • ๐Ÿง Thoughts
  • ๐Ÿ‡ฏ๐Ÿ‡ตJapan
  • ๐Ÿ’กTIL
  • โ›ฐTanzawa
  • Mar 07, 2021
    by James
    First steps in displaying location in the Tanzawa admin interface. Default point is Mount Tonodake in the Tanzawa mountain range. Still using the default OSM map included with GeoDjango.

    I imagine this will be a Leaflet powered map in the end. I've got a couple of different ideas surrounding the location interface:

    1. 1. I'm probably not going to display the full address form and instead have a single unified search form + map when no location is set.
    2. 2. Once an address is set, I may show it in plain text below the map. Perhaps there with an "edit" link to manually override the address for whatever reason.
    3. 3. I'll probably do an initial release as-is (using OSM) and then focus one of my later sprints on really polishing the mapping interface.

    A first attempt at locations
    ๐Ÿ”—permalink 2 interactions
  • Mar 07, 2021
    by James
    Handling "related" data about an entry is proving to be a bit more difficult than anticipated. It could be the way I've chosen to validate data. For my micropub endpoint I'm using DRF for request validation and then transform and pass that data to the Django Form I use when posting with the admin interface. The Django Form is important because it's where I prepare the actual records that get saved into the database.

    Handling this complex data with DRF in micropub feels natural โ€“ mostly because DRF Serializers handle nested data natively and microformat data is nested. Django Forms are made for regular forms (single level) and don't handle nested data.

    Flattening all nested "related" data (like locations) and putting it into a single form isn't a good long-term solution. That said, I do flatten nested data for content as it's required to create an entry. However using both Forms (for base entry data) and DRF serializers (for related data) in both my admin views and micropub endpoint seems like a bad architecture as I'm mixing concerns.

    Rather I think it's I need to start introducing Formsets for related data for my webforms. And then have my micropub endpoint continue doing what it's currently doing: sanity-check ย the request, transform it into format that matches my web form request, and then process as usual. This will also keep the data flowing aย  single direction:

    micrpub request: Micropub -> DRF -> Form Input -> Form -> DB
    admin request: Form Input -> Form -> DB
    ๐Ÿ”—permalink
  • Mar 06, 2021
    by James
    Started working on support for checkins (posted via backend micropub only) and adding locations to any post kind. I'm not sure how I'll expose adding a location to a post. One way would be get your current location. The other would be to let you just pick a point on a map. Or maybe default to your current location and let you adjust it?

    Since my coordinates are all stored as a geo-django PointField, my hope is that it will allow me to create fun little apps on top of Tanzawa. "Make me a rollup of my checkins in Yokohama", "Show me my photos from Texas", and so forth.
    ๐Ÿ”—permalink
  • Response to The small web is beautiful

    Mar 05, 2021
    by James
    However, itโ€™s not just about raw size, but about an โ€œethos of smallโ€. Itโ€™s caring about the users of your site: that your pages download fast, are easy to read, have interesting content, and donโ€™t load scads of JavaScript for Google or Facebookโ€™s trackers.

    I bookmarked this post over on the Tanzawa blog, but I felt this post was worth a proper response on my regular blog.

    Ben's thinking about the small web overlaps a lot with what I think: the small web is beautiful. Not just small size (so it's fast, uses less power and so forth), but as he says an "ethos of small". He expands to say we should use smaller images and fewer scripts. (Consistent, no-nonsense, efficient and lazy loading images were actually a major motivating factor for me starting Tanzawa)

    While Ben extends this ethos of small about caring about your users - I feel it goes a step further than that.
    An "ethos of small" is about respecting your readers. Respect that they may not be on the latest and greatest machine. Respect they might be on a limit Internet plan. Respect they might be running on battery. Respect their (and your) privacy.

    The small web is about "just enough". Just enough code. Just enough html/css/Javascript. Just enough infrastructure. We are the small web: Just enough.

    ๐Ÿ”—permalink
  • Mar 05, 2021
    by James
    As you may be able to tell from the previous post I just launched Bookmark support in Tanzawa. I'm contemplating if I shouldn't add a dedicated "bookmarks" page that just makes a long list of bookmarks, but for now it's good enough.

    I realized one of the hardest parts about microformatting your html is making sure you haven't broken it in some subtle way. Mine were broken. I added some tests that verify a) I fixed them and b) they won't get broken again.
    ๐Ÿ”—permalink
  • ๐Ÿ”— The small web is beautiful

    Mar 05, 2021
    by James
    However, itโ€™s not just about raw size, but about an โ€œethos of smallโ€. Itโ€™s caring about the users of your site: that your pages download fast, are easy to read, have interesting content, and donโ€™t load scads of JavaScript for Google or Facebookโ€™s trackers.
    Ben really hit the nail on the head with this one. The small web really lines up with my goals for Tanzawa โ€“ maybe this desire to return to a smaller, more independent web is part of a larger trend?
    1. Tagged with
    2. internet
    3. indieweb
    ๐Ÿ”—permalink 3 interactions
  • Mar 04, 2021
    by James
    I've got bookmarks working - it's been mostly a copy/paste of the reply templates and generalizing the views to share as much as possible.

    One thing I noticed was that while myย  extract method works with sites with proper microformat or schema data - it doesn't work for sites without either. So tomorrow I'll modify it to default to the page title and then update that value based on parsed meta-data.

    Adding a bookmark in Tanzawa
    ๐Ÿ”—permalink 1 interaction
  • Mar 03, 2021
    by James
    Added support for replies to my micropub endpoint today. Super simple. Adding support for bookmarks shouldn't take but a day or two as it's mostly the same as replies. Switching to Tanzawa is getting closer and closer.
    ๐Ÿ”—permalink
  • Counting Down the Tasks

    Mar 02, 2021
    by James
    I got a good question from Adam (@TalAdam) about why I have Tanzawa on a subdomain, rather than my main domain. While the answer is simple it's a good opportunity to discuss my plans for Tanzawa in the mid-term future.

    To answer Adam's question:

    1. 1. When I started Tanzawa I didn't have a domain (or even a name), so I started with a domain I owned.
    2. 2. I need to build up my minimal feature parity of my current blog before I can switch my main domain from Wordpress to Tanzawa.

    What's remaining for my minimal feature parity? Only three parts:ย  bookmarks/likes, checkins (w/ maps), and photo posts. Technically four - but photo posts are lower on the list. Once that's done I'll need to figure out how to migrate my data and create a huge redirect map for nginx. Perhaps by the end of the month?ย 

    Once I migrate my main site to Tanzawa what's left for this blog? I plan to redirect it somewhere on the tanzawa.blog domain. From there, I'll continuing using this blog as a development blog as I polish Tanzawa for a proper release that other people can use.
    ๐Ÿ”—permalink
  • Response to The Week #34

    Mar 02, 2021
    by James
    I started working on replies in Tanzawa. Introducing Turbo to add some dynamism to admin interface. Itโ€™s turned into a bigger rabbit hole than expected. I imagine most rails devs are familiar with the basics of Turbo (Links) but as a Django dev, things like Turbo arenโ€™t included, so thereโ€™s a bit of a learning curve for me to implement it properly. That said โ€“ itโ€™s coming along.
    Although I said it's coming along earlier today, I got it all working andย  I decided to ship despite replies not being implemented in my micropub endpoint yet.

    One thing I'd like is to make responding to a tweet via Tanzawa as smooth as butter, so it's quick to tweet and reply from your own site. I imagine I can do that if I integrate with Bridgy.
    ๐Ÿ”—permalink 6 interactions
Previous 163 of 369 Next
Reply by email
Powered by
๐Ÿ”Tanzawa

โ† An IndieWeb Webring ๐Ÿ•ธ๐Ÿ’โ†’
Photo of James Van Dyne James Van Dyne Japan

Web developer living in Japan.