The advantage for working for a company doing web and interactive tech is that I can see what tools are being used, what technology other developers are excited about and find out about things I’d not seen uses for in the past. Then what I need, of course, is a project to work on. Sometimes work provides those, but it’s usually a good idea to build something yourself before you commit to your work that a thing can be done. Plus you then have a good idea of what the sweet spot for the tech is, and how to use it — or know to stay away from it. My hard dives are littered with half-started projects that I abandoned after seeing how the library functioned in a real project — or didn’t.
A few weeks ago, I was considering a text editor, or rather, a word processor. I use Google Docs for a lot of my personal text editing, but there’s a feature that I want that it doesn’t have — and it’s not open enough for me to write a plugin for it. The idea was that I wanted an index alongside my document, but not part of it. I’m not looking for headers, but rather an outline. I want the outline to be there when I’m editing, but not be there in the document, cluttering things up. The document sections can be any size, so it needs to visual expand as I type, but keep the outline it’s attached to right there with it, so I know what section I’m working on. Google Docs doesn’t have a plugin architecture, and I don’t really want to rewrite a word processor just to get this feature, so I shelved and let it sit.
One of my co-workers is working on an internal app that’s data-centric, and using angular.js for that. We talked about it a bit, and I grabbed a copy of it, and messed around with it. It’s kind of interesting, I can see using Yii or Cake’s REST API routing (and dropping their front end generation) to build an app with it At the same time, that feels like overkill for a lot of things.
But what I did realize is that angular.js and some clever JS and HTML could deal with the data issues I would have with the text editor + outline. I could have an app that could save and load files locally perhaps, or use cloud storage. I did a bit of research on databases with node, and most things are supported. However, I’ve been spoiled by the models in Cake and Yii, so I don’t want something where I’m constantly writing SQL statements and messing around at that level.
The key storage for node, though, seems to be MongoDB, via mongoose. MongoDB is a no-sql database that’s quite different from what I’m used to. I loved my DB classes in college, relational algebra, set theory, it’s all nice. The first half of my career was really writing SQL code, stored procedures and things like that. But the world is changing, and exactly that kind of experience is starting to age a bit.
So, that’s the new project: an outline-based word processor written as a web application, using AngularJS for the frontend and Node/MongoDB as the backend. There’s a few features that we’ll have to support, but I’ll go into them in the next blog.