SomaCore update AS3 MVC Minimal Framework

| 2 min read

Hi everyone,

In case you didn't notice that I released an new minimal AS3 MVC Framework some time ago: SomaCore.

I call it minimal because it is very lightweight, yet powerful and non-intrusive. You don't have much to learn if you're used to MVC framework of any sort.

I made an update today, the second one in months because it won't change a lot, the structure is there.

You can also replace any kind of previous use of the framework, the only feature added is a dispose method that will remove everything that has been created in the framework. Mostly useful in case you're creating several instance of the framework, it will now be correctly garbage collected.

Once you've created a instance of the framework:

var app:ISoma = new Application(stage);

The only things you need to do is

app.dispose(); app = null;

Here is what it is doing to the components that have been added to the frameworks:

  • all wires will be removed. On each wire, the dispose method will be called. You can overwrite this dispose method in your wires subclasses.
  • all models will be removed. On each model, the dispose method will be called. You can overwrite this dispose method in your models subclasses.
  • all commands will be removed
  • all views will be removed but not removed from the display list, that's your job. On each view, a dispose method will be called if it exists. You can create this dispose method in your views:
public function dispose():void {
// dispose objects, graphics and events listeners

It important to say that all the components will be removed from the framework, but that's your matter to properly destroyed what you're creating in order to be garbage collected.

A quick info for my plans because I've silent lately (busy).

I'll make a BaseUI release in the next weeks, a completely rebuilt and optimized version 4. It is ready but I need to finish the documentation.

After that I plan to make more examples and screen cast about the SomaCore Framework.

I just wanted to say that I'm rarely happy about what I'm producing, because I like things to be... perfect. Of course, perfection can't be reached, but that is pushing me to create the better code I can, at my level.

I'm now using SomaCore in some projects. One is a relatively complicated AIR Modular Application for children. And for once, I'm very happy with what I've done with SomaCore. It has been a great help really, I should say that it saves me a lot of troubles when changes happened because I built the application how I wanted it, without "framework-fight" and as much flexible as I could. It just made me more responsive to any kind of changes in the project.

For this reason, I'll try to push SomaCore further by making more demos, videos, examples, documentation, wires concept and so on.

I still have plans to create a new version of the first automated framework Soma MVC, and its source generator, based on SomaCore.

Happy development!