Osm Admin: Osm Admin Backlog
2 years ago ∙ 1 minute read
2 years ago ∙ 1 minute read
2 years ago ∙ 2 minutes read
The goal is to be the most productive and focused on the most important things, both personally, and (later) as a team.
After maintaining the "done" log for several months, I decided to improve my estimation accuracy, and here is how.
2 years ago ∙ 1 minute read
Before diving into what should be in the docs, let's define what you should more or less know before using Osm Admin.
There are four types of people who will read the docs: power users, developers, vendors and contributors.
2 years ago ∙ 1 minute read
Here are my thoughts on product backlog and roadmap.
2022 ∙ May ∙ Osm Framework
2 years ago ∙ 1 minute read
Use config:nginx
, config:host
and install:nginx
commands to automate Nginx configuration of your project. Now, it's fully automated!
2 years ago ∙ 1 minute read
Yesterday, I tested the instructions for installing Osm Admin locally as a contributor.
2 years ago ∙ 2 minutes read
Yesterday:
git push
.2 years ago ∙ 2 minutes read
Yesterday started as usual, planning new iteration, and then BAM! - one folk - Saif - joined the project. It made me correct the course a bit, and take care of potential contributors:
README
explains what the project is about, and how to get started as a contributor;2 years ago ∙ 3 minutes read
Yay! After implementing invalid data conversion, I finished the iteration #18 dedicated to diff-based migrations!
2 years ago ∙ 4 minutes read
I must say, it's a bit disturbing to implement the same thing for the third time. Still, the goal is to get it finished, and have it sustainable.
After the effort, the code has become su much easier to read!
2 years ago ∙ 1 minute read
I continued working on property diff algorithm that plans all the migration details.
2 years ago ∙ 3 minutes read
Yesterday, I finished implementing data conversion for int
and string
property types.
Then, I started refactoring it.
2 years ago ∙ 1 minute read
Last time, I pushed through string
property migrations and created a migration log.
Today, I continued solving data conversion issues.
2 years ago ∙ 4 minutes read
string
property migrations.2 years ago ∙ 3 minutes read
Yesterday, I finished writing int
property migrations. True, testing it is still a todo.
The major part of the code (type change, nullability and other attribute handling) will be reused in other property types.
2 years ago ∙ 3 minutes read
I refactored Property::migrate()
using additional Migration
classes. It's so much more convenient to compare property definition versions and generate migration SQLs!
New code structure already handles property explicitness changes.
2 years ago ∙ 7 minutes read
After enumerating what kind of changes can happen to a property, I started implementing the most hard one - changing property type.
2 years ago ∙ 2 minutes read
Estimating projects is hard. Here is my approach for getting better at it.
It's based on a concept of a "primitive problem" - something non-trivial that you can solve in one go.
You can use primitive problems as story points in agile project management.
2 years ago ∙ 3 minutes read
The Query::bulkUpdate()
method is implemented in the TDD way.
2 years ago ∙ 1 minute read
Yesterday, I identified the need to have some syntax in a formula query to join a notification table.
I'm still working on new Query::joinInsertNotifications()
and Query::joinUpdateNotifications()
methods.
2 years ago ∙ 2 minutes read
I wanted to implement incremental indexing in one go.
Not so quick.
I hit some major roadblocks, and I'm working on removing them, one by one.
2022 ∙ March ∙ Osm Framework
2 years ago ∙ 1 minute read
Use deleteAll()
method on a search query to, well, delete all entries from a search index.
2 years ago ∙ 2 minutes read
Yesterday, indexers started listening to query inserted
, updated
and deleted
notifications and creating records in notification tables.
Now, saving a product complains:
Table 'admin2.zi9__products__inserts' doesn't exist
Fair enough. Let's create it.
2022 ∙ March ∙ Osm Framework
2 years ago ∙ 3 minutes read
While testing notification logic in Osm Admin, an exception is thrown in $db->committing()
callback, and the logic in $db->rollback()
fails.
Let's review how transaction callbacks work, and fix it.
2 years ago ∙ 4 minutes read
Yesterday results:
POST /create
route handles the input of new object form.2 years ago ∙ 3 minutes read
I've got a little more organized, then fixed an error in selecting all products, and implemented filtered URL generation in the browser.
2 years ago ∙ 1 minute read
A list of references to the most useful blog posts about Osm Admin and Osm Framework. One day, they'll be a part of the official documentation.
2 years ago ∙ 1 minute read
Progress messages stopped working, and I fixed that. Then, I implemented a safety measure that prevent accidental deletion (or other operations) on all objects.
2 years ago ∙ 3 minutes read
In Osm Admin, I've finished implementing editing behavior of input and select controls.
For other control types, a step-by-step guide is prepared.
2 years ago ∙ 3 minutes read
In Osm Admin, object editing form is used not only for a single object editing, but also for editing multiple objects, and for creating a new object.
I also created the osmphp/extras
package as an easy way of adding Font Awesome icons to a project. Later, I'll add more optional reusable goodies to this package.
2 years ago ∙ 2 minutes read
On the list page, grid columns are implemented as control views. On the editing page, form fields are also implemented as control views.
The form Blade templates are completely migrated to Osm Admin v0.2
.
2 years ago ∙ 1 minute read
I redesigned control rendering on list and edit pages. From now, a control contains view prototypes for a grid column, a form field, and other.
2022 ∙ March ∙ Osm Framework
2 years ago ∙ 1 minute read
A View
is a short-living object that is created and computed during page rendering. You can also create a pre-configured a View
object prototype in advance, and then clone it for rendering.
It's important not to execute render-time properties while configuring the prototype.
Use view()
helper function to create render-time view instances, and mark render-time properties using #[RenderTime]
attribute to prevent accessing them before rendering.
2 years ago ∙ 2 minutes read
After getting the list page to work, I returned to the editing page.
Done:
2 years ago ∙ 3 minutes read
Yesterday, I polished the product color
facet, and, starting now, you can create a facet with a list of string options very quickly, just by marking a property as #[Faceted]
.
/**
* @property string $color #[Option(Color::class), Faceted]
*/
class Product extends Record
{
2 years ago ∙ 2 minutes read
In the product editing form, I implemented the id
filter, and made the UI query work in database-only mode, too.
2 years ago ∙ 4 minutes read
Three days ago, I started rendering faceted navigation, and namely, color
facet on the product list page.
Yesterday, I continued working on it and got the first render of the faceted navigation, defined URL action syntax, and the first facet filter applied on the product list page.
2022 ∙ March ∙ Osm Framework
2 years ago ∙ 1 minute read
The implementation of the faceted implementation in osm.software
blog has shown that sometimes you need only facet counts, or only total count of matching entries.
Until now, Osm Framework had always queried total count
, ids
and facets
. Not anymore - and the search engine only provides the information that is actually needed.
2022 ∙ March ∙ Osm Framework
2 years ago ∙ 1 minute read
The implicit ElasticSearch hit limit is confusing. And you can't get all the hits - there is 10000 maximum hit limit that you can't exceed anyway.
Be explicit about the maximum number of search hits.
2 years ago ∙ 1 minute read
In my opinion, obfuscating object ID in a URL is not worth the effort, and here is why.
2 years ago ∙ 4 minutes read
My current goal is a minimum list page, a form page and a faceted navigation for a Product
data class.
Today, I've:
2 years ago ∙ 5 minutes read
Today, I finished indexing design, described typical indexing logic, implemented full search reindexing.
2 years ago ∙ 6 minutes read
Starting today, I'll write a daily blog post about how the Osm Admin development goes.
This is the first one. It reviews where I am today, covers creation of a search index, and revisits the design of the indexing engine and how queries orchestrate the indexing.
2 years ago ∙ 3 minutes read
After 3 days of intensive work, I've got dot syntax working!
Along the way, I refactored the query internals once again, which reminds me a heuristics saying that you've got to implement something three times to get it right :)
New query implementation uses the concept of formulas - SQL-like expressions used for selecting, filtering and sorting data. Currently, formulas are quite limited, but with time, they should be a really powerful feature.
2 years ago ∙ 1 minute read
I decided to support selecting, filtering and ordering by properties of a related object using dot syntax: product.price
, parent.level
. This syntax will automatically join the table that stored related objects.
I realized that implementing joins requires a better query model than my current naive wrapper around Laravel query. This article describes the new query model.
2 years ago ∙ 2 minutes read
This article is about running SELECT and INSERT queries on data objects stored in the database.
In short, use the query()
function. It runs on top of Laravel Query\Builder
. It handles the mapping of data class properties onto table columns, and initiates the computation of indexed properties.
Currently, you can only SELECT and INSERT, other operations are coming soon.
2 years ago ∙ 3 minutes read
Today, I implemented computation of indexed properties during insert. The implementation dictated some changes in indexed property definitions compare to the initial design, and how indexers are reflected into the data schema.
Also, I implemented a table query class working on the top of Laravel Query\Builder
. More about it next time, for now I'll review how indexed properties are computed during INSERT operation.
2 years ago ∙ 3 minutes read
It's often needed to compute, or index, data in database tables based on data in other tables.
This article is the first sketch of a consistent indexing solution.
2 years ago ∙ 3 minutes read
I've finished refactoring how Osm Admin stores data objects in the database. Also, in order to support multi-website, multi-vendor, multi-language applications, I've introduced the concept of scopes.
Most reasoning from the first version is still valid, so let's take a fresh look of what's changed.
2 years ago ∙ 3 minutes read
I developed dehydrate()/hydrate()
functions for a very practical need - storing the data class schema:
This article describes the information stored in the schema, and unit tests that I prepared in order to be sure that schema classes are property hydrated.
2021 ∙ November ∙ Osm Framework
2 years ago ∙ 2 minutes read
Recently, I developed a couple of helper functions for transmitting PHP objects over the wire, and saving them in database records:
dehydrate()
- recursively converts an instance of a PHP class to a plain untyped object. Then, store the plain object in the database, or convert it to JSON and send it to a browser.hydrate()
- recursively converts a plain untyped object back to a PHP class instance. Use if after decoding a JSON received from the browser, or after loading a database record.This article describes how to use these functions.
2021 ∙ November ∙ Osm Framework
2 years ago ∙ 2 minutes read
When active, modal elements - dialogs, pickers, or AJAX spinners - need to prevent user interaction with the rest of the page.
A common approach is putting an overlay <div>
under the modal element covering the rest of the page, as a click shield. However, user can still navigate the page with the keyboard.
Today, I implemented a better solution by capturing mouse and keyboard events outside the modal element, and keeping focus inside.
2021 ∙ November ∙ Osm Framework
2 years ago ∙ 2 minutes read
Currently, I'm working on Osm Admin package, and I need a module to inject its HTML markup around some well-known place in a Blade template. However, Blade template extensibility is not a problem that's specific to Osm Admin project. It's a generic problem. Let's solve that.
2 years ago ∙ 1 minute read
As described in Migrations, most data objects of the same class will be stored in a database table.
But what about subclasses? In an e-commerce application, bags, dresses, and digital products, collectively known as subclasses, are all products stored in products
table, and they may have bad-specific, dress-specific or digital product specific properties that should also be stored there.
This article describes how subclasses are defined and stored in Osm Admin.
2 years ago ∙ 1 minute read
Different data classes have repeating structural patterns. For example, most data classes stored in database tables have the auto-incremented id
property. Use PHP traits to effectively introduce the same properties to different data classes over and over again.
2 years ago ∙ 2 minutes read
I partly implemented data schema migration. It takes data class definitions, and incrementally creates or alters underlying database tables.
The article below describes how schema migration works, and what's not implemented yet, but most probably will be.
Note. This topic is continued in the new article.
2021 ∙ May ∙ Osm Framework
3 years ago ∙ 4 minutes read
Full-text search and layered navigation is a common feature for e-commerce applications. It's also used in this blog. Actually, it makes browsing any non-trivial data better. Under the hood, search and layered navigation interact with ElasticSearch, or other search engine, and this article describes how.
Note. This post is moved to Osm Framework documentation.
2021 ∙ May ∙ Osm Framework
3 years ago ∙ 3 minutes read
Osm Framework is an open-source, insanely fast, unprecedentedly extensible, and fun to work with PHP 8 framework for creating modern Web applications. It's built on top of tried and tested Symfony and Laravel components.
Note. This post is moved to Osm Framework documentation.