Reversing Model View Controller

Reversing Model View Controller

One of the most interesting things I ever witnessed in the realm of computer programming was a your programmer woman with a beautiful Scottish accent renaming the solution pattern Model View Controller to Model, View, Arse Banana.

“Clearly” - I though to myself, “This is not a subject I should ever investigate.”

But I did recognize something here, a technological mismatch, that why the three things didn’t seem equally important.

Over the last decade or so, I would revisit MVC now and then and try to match it to a technology that created more than the sum of the parts.

This morning I folds the technology, MVC is so powerful here, that this was probably where it comes from.

To call the Control Component a Banana anything here, Is actually heartbreaking, because of how precious the controller is.

Better sit down for this one, because MVC is not a solution pattern, it is a Computer Program Machine, with a strong future.

Perhaps the idea was forgotten, perhaps it is closely guarded secret, maybe it wasn’t reveled out of spite towards a heartless corporation - that would be my bet.

—

Model, means data model. Usually objects, often nested which is always founds to be a mistake because flat things are easier to manage. Today, we often refer to the model as state.

Well, in fact, it must be a nested tree of data, because it is a model of the application. It has to be so close to what the application looks like that it reads like a concept map, diagram, blueprint.

I would never call this a model, if I invented this idea. I would call it a blueprint.

Today, in my research I often use XML to communicate to strong AI how I need to structure my program. This works beautifully. And is actually the model. It is a blueprint of an application, head to toe, icon in the corner to debug pane.

Just ask your favorite AI to map out a popular application you like, and it will return a proper model.

Most of you who have dedicated your lives to battling infinite complexity, have already figured it out. But you are still slow pokes compared to me.

The view, is the view of the model. We decorate the model with user interface components. We decorate the XML with Bootstrap HTML/CSS components. We create a view of the model. A debug view is also a wonderful idea. Consider an administrator view as well, you are editing a tree.

Which takes us back to the precious banana, The Controller, the bundle of confusion that started this reverse engineering challenge.

The controller edits the model, but it is actually two layer, and this is the precious part. Layer one, names actions, like Open Window, or Send Email.

Inside each action, are commands, and it is a finite number of commands, as few as copy, create, read, rename update, delete.

XML is a filesystem like tree, and you just need tree management commands, and then some application specific extras like in cold fusion.

I know you still feel doubt. It will take a while.

Your precious commands, create actions, that alter the model tree, that the model view presents to the user as user interface.

Listen carefullyt: to save application state, you just save the model.

And now grab to your head. To save Large language model context space, you pamper the commands one by one, and then stop AI from reading their code just tell it to make actions, and then to just use the actions in your application, and only to manage the model.

The AI will easily translate the model into UI, because the model is the blueprint of the application.

But please, to do this right, create a UI-Kit, or a set of user interface components, that you wan toto see in the application, then AI will have even an easier job.

I want to underline that for AI to understand your user interface needs, you need an XML blueprint, otherwise AI will be getting confused about UI.

And if you already have a blueprint, keep moving forward, and add the MVC.

I encourage you to experiment by creating a desktop environment, with a menu and windows, maybe frames that can display some website.