Skipper - The ORM Designer Blog
  • Skipper - The ORM Designer
  • VsBuilds - Parallel building
  • Pulpo - Free Skipper CLI

Tag: #MongoDB

New namespace support in Skipper

Our latest release 3.2.0 brings to Skipper new way how namespaces are handled by our application.

Few words about history

Long time ago when the first version of our application was created (originally called ORM Designer), there hadn’t been things like namespaces in ORM frameworks. But as ORM frameworks have been developed in time, each framework came with some way how entity namespaces are being handled.

Because ORM Designer / Skipper needed to handle it too, we added support for namespaces in form of ORM attributes. This had been a functional and sufficient solution until Doctrine 2 has introduced new way how to handle namespaces and allowed several entities with the same name but in different namespaces.

For some time it wasn’t possible to create such models in Skipper because of internal limitations (each entity was represented by it’s local name only). But today with our latest release this limitation is over. We have reworked Skipper core and a way how unique names are handled and now it’s possible to create also these models.

New age of namespaces

Starting with version 3.2.0 each Module, Region, Entity and Collection can have defined its own namespace

Skipper region namespace settings

Namespace of each object is calculated from all its parents:

\Module\Region\SubRegion\Entity

Each of these objects can have defined own relative or absolute namespace. This means that in case of need sub-region can override namespace via absolute path. In such way, the final entity namespace will be:

\SubRegion\Entity

The same thing is possible also for Entity. In case you need to define one of your entities in different namespace than the rest of entities in the module, simply define absolute namespace directly for the entity.

New namespace system in Skipper

All this features are available to all ORM frameworks which support namespace. Namespace support is available for all import and export scripts as same as for visual editing.

Project file changes

Because of these changes it was necessary to update Skipper project files a little. There are two most important changes which caused that projects from 3.2.0 aren’t fully backward compatible with older versions.

The first change of XML format are new attributes @local-name, @name, @local-namespace and @namespace. Attributes starting with @local- are values defined on specified object. On the other hand attributes @name and @namespaces are calculated values depending on its parents.

The second change in XML format is deprecated <entity-ref> and <collection-ref> elements in project file. Instead of __ elements entities are stored in owner regions to keep the same hierarchy like in visual model.

For example, this means following. This is how looked original project file with entity in one region like:

<module name="module">
  <region caption="test">
     <entity-ref name="e1"/>
  </region>
  <entity name="e1"/>
</module>

And this is how project file looks like now:

<module name="module">
  <region caption="test">
     <entity name="e1"/>
  </region>
</module>

Conclusion

Although it might not be visible on the first sight, new namespace support was a very complex task. Because of that we had this feature for more than month in beta mode before releasing it to public. Thanks to all our testers we successfully localized and fixed several bugs caused by this new feature.

Now, when no more issues are reported we decided to publish it for all our users. We will be glad for any feedback.

Let us know how you like it!

Support for MongoDB ODM finally here!

Last few months we have been working hard on support for a new framework. It wasn’t an easy task, because MongoDB ODM has some specific features, for which we need to adjust graphic part of the application and also add quite a lot of logic inside. But we succeeded and new version 3.0.2 is now out!

New features for MongoDB ODM

New tools are available in application toolbar. They allows to create objects specific for MongoDB framework. It is Collection and Embedded.

Collection

Collection has its own visual element in a model for its simple identification. It is represented by rounded rectangle and it is connected with entities belonging to it with special dotted line.

If you want to add new entity to collection, you can add it in collection editor or you can use CollectionEntity tool from the application menu and click on chosen entity and collection.

Embedded

Embedded is a special type of association specific for MongoDB ODM framework. It has also its own visual representation, so in a model you can recognize it by double full line as displayed in the image.

Other changes in new version

Besides the MongoDB support contains also a lot of bugfixes and some small enhancements based on request of Skipper users. Here is the short summary of the most important changes:

  • Implementation of Universal objects (feature for expert usage)
  • New ORM properties for Doctrine 2 framework
  • Enhanced skipper configuration options
  • Fixes for occasional crashes of the application

Visit the version changelog and check all changes for V3.0.2.

05 Mar 2015