Tools For Better Developers

Latest Posts

Framework: View Prototypes And Render-Time Views

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.

News: 2022 Jan 31 - Feb 18

2022 February News

2 years ago ∙ 3 minutes read

I came with an idea of much cleaner Osm Admin data class "markup", and more straightforward architecture, and I decided to give it a go in a separate experimental branch v0.2, and to see if it's viable.

After three weeks of implementation effort, I can say that it is viable, and it's so much better! And it's not a completely new effort, I mostly copy code from v0.1 and some parts of osmphp/framework:old_v4, and adapt it.

You can already define data classes using new markup, generate the database tables, and query it using new formula syntax. I really wanted to come with some UI working, but there wasn't enough time for that. It stays my priority for the next iteration.

News: 2022 Jan 14 - 28

2022 January News

2 years ago ∙ 2 minutes read

Last two weeks were about implementing initial version of an Osm Admin grid, integrating it seamlessly with the editing form, and enabling mass-editing of multiple objects.

After finishing it, I realized that Osm Admin had become bigger than Osm Framework! To keep up, I started writing docs for it.

And now, you have a step-by-step guide for creating a project, adding Osm Admin to it and a practical example of an admin area that you can copy to your project and try it out locally.

News: 2021 Dec 20 - 2022 Jan 14

2022 January News

2 years ago ∙ 3 minutes read

The last 4 weeks were mostly a vacation. It's been a time for reflection, but still, I delivered some new features.

In Osm Admin, forms already allow creating new objects and saving them to the database, and editing one or several existing objects.

I've also implemented URL query filters that are applied to the underlying database query and that can be displayed in the user interface.

From now on, Osm Framework and all projects built with it - can be installed and developed under Apache and on Windows.

News: 2021 Oct 11 - Oct 22

2021 October News

2 years ago ∙ 1 minute read

This sprint was dedicated to writing Osm Framework documentation, and indeed, there are 8 new in-depth documentation articles, 4-5 minutes long each.

Despite documentation focus, I kept improving the website. From now on, you can assign a canonical URL to a blog post or a documentation page, and use GitHub friendly relative URLs in documentation.

But the most important thing - I started sharing progress and insights daily on Twitter.

News: 2021 Sep 27 - Oct 08

2021 October News

2 years ago ∙ 4 minutes read

osm.software website. From now on, Osm Framework documentation resides in the docs/ directory of the osmphp/framework repository, and it is displayed in a separate section of osm.software website. New data source indexing engine allows running complex interdependent data synchronization with a single command, osm index. New Placeholder class simplifies dynamic Markdown content generation.

Osm Framework. Apply dynamic traits within the same file using #[UseIn] attribute. Implement fast dynamic routing using new DynamicRoute class. Generate URLs using new $osm_app->base_url property.