WELCOME

February 10th, 2008

 

This website is about XOODBS assembly to program software for Microsoft and Mono .NET platform.

 

 

New class ObjectContainer

July 13th, 2009

Core Model

ObjectContainer is a generic class to implement the storage of serializable objects in a file system, an archive, a database or anything else.

[Serializable]
public class TestItem : IObjectWithID
{
  public Guid ID { get; private set; }
  public string Name { get; set; }
  public TestItem()
  {
    ID = Guid.NewGuid();
    Name = "Item Name";
  }
}

SQLiteContainer container = new SQLiteContainer("db.bin");
container.Active = true;
Guid id = container.Add(new TestItem(), "GlobalNamespace");
TestItem item = (TestItem)container.Retrieve(id);
item.Name = "New name";
container.Update(item);
container.Delete(item);
container.Active = false;

Print Print      Email Email

 

Composition of the Entity Model

November 26th, 2008

Entity Model

Lockable

  • KeyID : Generic base class for IDs.
  • Lockable : Base class for lockable and editable objects with rights management.
  • Users : System users entity.
  • Params : System parameters entity.

Entity

  • EntityProperty : Base class for entity properties.
  • OrdinalProperty : Base class for ordinal entity properties.
  • EntityItem : Base class for entity that contains properties and processings.
  • EntityCollection : Generic base class for entities collection management.
  • SessionManager : Base class for a database session to access managed collections.

Print Print      Email Email

 

Composition of the Core Model

November 26th, 2008

Core Model

Common

  • Tester : a simple unit testing launcher.
  • Chronometer : time measurement functions.
  • StringTool : strings functions.
  • Localizer : strings localization.
  • AppInfo : system, application and folders information.
  • AppTool : system and application functions.
  • ThreadManager : threads list manager.

Files

  • FolderTool : folders functions.
  • FileTool : files functions.
  • FolderLister : folder entries lister.
  • FileLister : files entries lister.
  • Filer : read, write and serialize functions.

Debugger

  • Debug : a custom debugger.
  • ExceptionInfo : extract details about exceptions.
  • ExceptionForm : a default exception winform.
  • LogManager : a log manager.
  • LogForm : a default log winform.

Remoting

  • RemotingTool : remoting encapsulation.
  • RemoteClient : a generic remote client.
  • RemoteServer : a generic remote server.

Types

  • Tree : a generic tree class.
  • Singleton : a generic singleton factory.
  • EmbeddedValue : a embedded typed value with assign controls and triggers.
  • EmbeddedOrdinal : an embedded ordinal value.

Print Print      Email Email

 

Example preview

November 21st, 2008

Entity Model

Here are drafts of a source code and a class diagram of what it should be about the usage of the database.

Exemple Preview Class Diagram

//-----------------------------------------------------------------------------
[Serializable]
public class AlarmPeriodicity
{
  public int PeriodType { get; set; };
  public DateTime Value { get; set; };
}

//-----------------------------------------------------------------------------
[Serializable]
public class AlarmPeriodicityProperty : EntityProperty < AlarmPeriodicity >
{
  public AlarmPeriodicityProperty(EntityItem owneritem)
    : base(owneritem) { }
  public AlarmPeriodicityProperty(EntityItem owneritem, AlarmPeriodicity value)
    : base(owneritem, value) { }
}

//-----------------------------------------------------------------------------
[Serializable]
public class AlarmItem : EntityItem
{
  public StringEntityProperty Title { get { return _Title; } }
  private StringEntityProperty _Title;

  public AlarmPeriodicityProperty Periodicity { get { return _Periodicity; } }
  private AlarmPeriodicityProperty _Periodicity;

  public AlarmItem(IEntityCollection ownerset, UserItem creator)
    : base(ownerset, creator)
  {
  }
}

//-----------------------------------------------------------------------------
[Serializable]
public class AlarmsCollection : EntityCollection < AlarmItem >
{
  public AlarmsCollection(SessionManager manager)
    : base(manager, "Alarms")
  {
  }
}

//-----------------------------------------------------------------------------
// Methods raise an exception if user have no access right to the element.
//-----------------------------------------------------------------------------
[Serializable]
public class DatabaseConnexion : SessionManager
{
  public AlarmsCollection Alarms { get { return _Alarms; } }
  static private AlarmsCollection _Alarms;

  public DatabaseConnexion(string usercode, string userpwd)
    : base(usercode, userpwd) { }

  static public void RunSample()
  {
    DatabaseConnexion session = new DatabaseConnexion("user", "password");

    AlarmItem item1 = (AlarmItem)session.Alarms.CreateEntity();
    item1.Lock();
    item1.Edit();
    item1.Title.Value = "Title";
    item1.Periodicity.Value.PeriodType = 1;
    item1.Apply();
    item1.Unlock();

    AlarmItem item2 = (AlarmItem)session.Alarms.CreateEntity();
    item2.LockEdit();
    item2.Title.Value = "Title";
    item2.Periodicity.Value.PeriodType = 2;
    item2.ApplyUnlock();

    var list = from AlarmItem item
               in session.Alarms
               where ( item.Title.Value == "Title" )
               select item;

    session.Alarms.Lock();
    session.Alarms.Edit();
    foreach ( var item in list )
    {
      Console.WriteLine(item.Title.Value);
      item.Title.Value = "Another Title";
    }
    session.Alarms.Cancel();
    session.Alarms.Remove(item2);
    session.Alarms.Unlock();
  }
}

Print Print      Email Email

 

Work in progress

November 17th, 2008

Roadmap

Projects have been started on May 2007 and the progress of the developments are:

  • 80% for the Code Model: 1st release is scheduled for late 2009.
  • 20% for the Entity Model: 1st release is scheduled for 2010 to 2012.

Print Print      Email Email