FAQ
This shows a variety of possible applications of my "Widget" framework for building customized, DIY webapps for personal use. The Widget framework provides a high degree of simplicity and ease of development, and as you can see, many different applications can be built using the framework.
- What is a Widget?
- What kind of things can I do with a Widget?
- How does a Widget Work?
- How Fast are Widgets?
- Can I get my Widget data?
- How is Widget data stored?
- What is the Rise-and-Fall Problem?
- What makes Widgets so easy to build?
- Can I use Widgets on my phone or tablet?
- Can I copy your Widgets?
- Do I need a complex web framework (like React)?
- What technology do I need to know to build Widgets?
- Is Widget development a good way to learn to code?
- Will the Widgets system always be hosted on danburfoot.net?
- How can I upload / download my Widgets data?
- What are the limitations of the Widget framework?
- Do you provide tech support?
- How much does it cost?
What is a Widget?
A Widget is a do-it-yourself web application (WebApp) intended for use by individual, families, or small groups. The central idea of the Widget philosophy is: It should be just as easy to build a WebApp as it is to write a web page.
Since they are very easy to develop, Widgets can be highly customized to suit individual user's interests, goals, and tastes. This philosophy stands in stark contrast to the economics of mainstream sofware, which depends on a building a product that is highly polished but generic so that it can be sold to large numbers of people.
What kind of things can I do with a Widget?
Widgets can be used for a wide variety of applications relating to organization, productivity, fitness, diet, finances, and learning. As you build more widgets and get to understand how to use them effectively, you will naturally discover more and more potential use cases. I personally have built widgets for the following use cases:
- Workout logging
- Studying Chinese
- TODO List management
- Project management
- Reading list prioritization
- Expense tracking
- Junk Food / Alcohol logging
- Chore Reminders
- Personal Question/Answer database
- Link Management
How does a Widget work?
First, all of the data for a Widget is stored in a SQLite file on the server. When the Widget loads, the data in the file is transformed into JavaScript objects and sent to the browser, along with the HTML and other assets (images, etc) that make up the page. The JavaScript code running on the browser can then perform whatever computations are desired to format and display the data to the user. The Widget typically provides the user a variety of ways to manipulate the data and create new data (for example, in a training log, the user can log new workouts). These data updates are sent back to the server for long-term storage. The Widget framework provides a simple API for querying and updating the JS objects that correspond to SQLite records.
How Fast are Widgets?
FAST, except for the initial page load, which might take half a second.
The lifecycle of a user interaction with a Widget consists of two steps: the initial page load, and subsequent updates, queries, or data input that is performed by the user. In the initial load phase, the server converts all of the data in the underlying SQLite file into JavaScript objects and sends it to the client. Thus, this phase can take a short but perceptible amount of time, depending on the amount of data in the DB file. However, after the initial page load, all updates and operations should be nearly instantaneous, because all of the data is present in the browser's memory, and the server updates are performed asynchronously.
For example, suppose you are using a TODO List Widget and you add a new task. This requires the page to be redisplayed to include the new task. The redisplay can be performed instantaneously, without waiting for a server response, because the browser already has all the data it needs to redraw the page. The actual update to the SQLite DB won't happen for perhaps half a second after the user makes a change, but this latency is invisible to the user.
How is Widget Data Stored?
Widget data is stored in SQLite database files.
The use of SQLite is one of the core design factors of the Widget system. SQLite makes it so that every Widget user can design their own data structures. Furthermore, users can easily upload and download their data files, ensuring that members truly own their data.
Can I get my Widget's Data?
YES, absolutely.
The service we provide makes it extremely easy to download the SQLite files that contain the Widget data. Not only do you have the data, but because you are the developer of the Widget, it will be easy for you to understand, access, and modify the data. You will know the exact schema of the DB, and you will know what each field of the DB means in terms of the Widget's functionality.
What is the Rise-and-Fall Problem?
The Rise-and-Fall (RNF) problem is one of the most serious challenges facing people who want to aggressively adapt to new technology. It is a well-known issue in technology companies, but it afflicts individuals as well. The RNF problem refers to the fact that new technologies are constantly coming and going - rising and falling - and this endless cycle often destroys the value of technology investment.
Imagine you are the CTO of a tech company that produces a popular mobile app. It is a constant struggle for you to make sure the Android and iPhone versions have the same functionality, and interact with your backend databases in the same way. Now a new technology appears that promises you the potential of writing both iOS and Android versions using the same codebase. Do you jump on board with the new tech?
These kinds of questions are very difficult to answer. The new framework may very well save you dozens of man-years of labor over the next five years... but only after you've invested almost as much effort in the first year, as a price to be paid to adopt the new framework. Furthermore, if the new framework fails, all of that effort will be wasted. More commonly, the framework thrives for a couple of years, and then a new one appears that grabs all the mindshare. This continual cycle of boom and bust causes the RNF problem.
The Web Widgets system is a new framework, that requires some investment to get started. But the design of the Widget system protects you from the RNF problem because it is built on core web standards such as HTML5 and JavaScript. These standards are built into every browser, as well as millions of web sites around the world. They are not going anywhere soon.
What makes Widgets so easy to build?
To answer this question, it's useful to ask a related question, which is "What makes mainstream WebApps so difficult to build?" Mainstream WebApps have to satisfy a lot of requirements:
- They must display correctly for every browser (Chrome/Firefox/Edge), including older versions. But each browser version has a slightly different set of functionality and quirks, especially when it comes to JavaScript. This makes it extremely difficult to implement client-side functionality.
- They must be built to be scalable, and handle extremely high loads. Even if the load isn't very high on a daily basis, every entrepreneur dreams that her business will suddenly go viral and start gaining users rapidly. For this reason, developers must spend great efforts designing the application backend.
- They need to look very professional and "slick" for the sake of branding. That means the designers must spend a lot of time thinking about the app's color scheme and making sure every icon looks perfect.
As you can see, Widget developers don't need to worry about any of these issues. Since you are the main user of your Widget, you can make sure to use a browser that is new enough to handle the version of JavaScript you want to use. You don't need to worry about designing the backend. And you can make your Widgets as slick or as basic as you want, depending on your own taste in web design.
Can I use Widgets on my phone or tablet?
YES, basically. Widgets are WebApps that run in the browser, and all modern smartphones and tablets have browsers, so you can access the Widgets that way.
However, in my personal experience, it is somewhat tricky to get Widgets to display properly or nicely on multiple display formats of widely varying size. If I have a Widget that I developed to access on my laptop browser, I can certainly see it on my phone, and it will work correctly. But it is often more difficult to use, and I often have to zoom into a certain part of the display to see the information I want. It is probably possible to design pages that display well in both a laptop screen and on a phone, but that's a bit beyond my level of expertise with HTML and CSS.
Can I copy your Widgets?
YES, by all means! All of the Widgets in the Widget Gallery can be used or remixed for any purpose. I invite you to either copy my Widgets entirely, or make small changes to them to suite your use case.
Do I need to use a complex framework like React/Vue/Ember?
NO, definitely not! In fact, we recommend that you use plain, vanilla Javascript for your Widgets. Use JavaScript to compose HTML strings and then plug those strings into span or div tags to create dynamic behavior. Check out the code in the Gallery section of the GitHub repo for examples of how to do this.
Of course, if you have a special reason to want to use these frameworks, you certainly have the option of doing so. For example, if part of your goal for using Widgets is to learn front-end development, then using a popular framework might be a good idea.
What technology do I need to know to build Widgets?
Our goal is to make it as easy to build a simple Widget as it is to create a simple Web page. For that reason, widgets are built using the most basic and industry-standard technologies of web design: HTML, JavaScript, and CSS. If you have a beginner-level understanding of these tools, you should be able to create Widgets. You can find a ton of great information on these topics at W3Schools.com. Here are some typical things you might need to do when developing a Widget:
- Create a table with several rows and columns to display your Widget data.
- Create a link, that is attached to a JavaScript function, that allows the user to create a new record.
- Create a drop-down menu with a dynamically generated list of options.
- Filter a JavaScript list to remove some items, and then sort the remaining items.
You need to know just a bit of another technology to create the DB for the widget: SQLite. SQLite is the most installed database on the planet and is used in hundreds of applications. However, for basic Widget development you just need to know basic SQLite CREATE TABLE syntax to define the data structure for your Widget.
Can I learn to code by building Widgets?
YES, Widgets are a great way to get started with coding! One of the most important aspects of learning to code is building systems that you can actually use. When you build a Widget for your own use, you will see immediately if there are any problems, either in the area of logic or the area of useability. You will gain basic understanding of how to organize data, perform operations on data collections, and present the data to the user. You will learn the basics of JavaScript, HTML, CSS, and SQL. Since these are the most fundamental technologies for web development, your investment in learning will pay off many times over the course of your career.
Will the Widgets system always be hosted on danburfoot.net?
Probably not. In the future I will probably register a new domain name to host system. I will make sure to let all users know in advance about the change of address.
How can I upload / download my Widgets data?
The Widgets system is intended to make it very easy to upload and download both Widget code (JS, HTML, etc) and Widget databases (SQLite) from the server. These data transfers operations are implemented via a small set of Python scripts that make CURL calls to the server. In particular the code uploader script will package a widget directory into a .zip file, send it to the server, and unpack it. This produces a very efficient development workflow: you can view the widget running on the server, edit the code to produce the change, upload the code and observe the change immediately. You can view the Python code in the scripts directory of the GitHub Repo.
What are the limitations of the Widget framework?
The basic trick of the Widget framework is that it loads all the DB data into the browser memory when the page loads. Then the server listens for updates from the browser, and saves the updates into the DB. There are two basic limitations that are a direct result of this approach.
First, the approach cannot handle multiple DB-update streams arriving from multiple sources. If several users are attempting to update the same Widget DB at the same time, they will receive annoying error messages and be forced to reload the page to retry. For individual users, this is almost never a problem. For small groups, it's usually acceptable, especially if the users are unlikely to try to edit the data simultaneously. For large groups, it becomes unwieldy if many users need to edit the data at the same time (if the group is large but most members are read-only, it should work fine).
Secondly, the amount of data used by a single Widget should not be too big, since all the data must be served to the browser on page load, and then held in the browser's memory. This limitation is an extremely remote concern for apps like note-taking, life-logging, and so on. Say you have a workout logging Widget, and you do two workouts on average every day for 20 years. That adds up to about 15,000 records, which can easily be stored in few megabytes. In comparison, sites like Facebook and YouTube typically consume hundreds of megabytes of memory.
Do you provide tech support?
YES, but for a limited time only! If you need help or support in getting your Widgets working, please reach out.
How much does it cost?
FREE, for early adopters! We are grateful to our early users for trying out the service and as a token of our appreciation we are happy to offer the service for free to the first 100 users.