<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
 "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">

<channel>
<title>csopf - C# Object Persistence Framework</title>
<link>http://csopf.sourceforge.net/</link>
<description>PostNuke Powered Site</description>
<language>en-us</language>
<image>
 <title>csopf - C# Object Persistence Framework</title>
 <url>http://csopf.sourceforge.net/images/logo.gif</url>
 <link>http://csopf.sourceforge.net/</link>
</image>
<webMaster>yoonki&#116;&#064;&#103;mail.com</webMaster>
<item>
<title>Downtime ... mysql</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=46</link>
<description>Ah, sourceforge decided to change their mysql servers; upgrading, reorganizing and redistributing. I didnt have the time to do the changes, but finally its back online. sorry for the 10 days of downtime...

http://sourceforge.net/docs/E07#mysql

yk.</description>
</item>
<item>
<title>Editable Grids, and OnPopulateCell.. Change of param signature</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=45</link>
<description>Lots of changes on the csopf.UI.ASP namespace. Namely some upgrades to the Grid component. It now allows editable columns, so users can directly edit on the grid. It currently supports Text, checkboxes and comboboxes.

Unrelated to this new feature, Ive changed the OnPopulateCell delegate parameter signature. This is to allow the passing of the Cell Object along, so its easier for  the UI dev to have accesss to the object to display.

So some old code may be broken. Just change:
private string gridQuestions_OnPopulateCell(csopf.Core.PDObject pObj, string pColumnName)

to
private string gridQuestions_OnPopulateCell(csopf.Core.PDObject pObj, string pColumnName, object pCellObj)

Otherwise you will get some compile error which says that it cannot match the delegate, blah blah...

yk.</description>
</item>
<item>
<title>Right hand Column</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=43</link>
<description>csopf has a rather crude Templating mechanism for ASP.NET. All you do to get consistent pages is to inherit from csopf.UI.ASP.BaseForm to define your template for your Web App.

Then inherit from this web form for all your other pages. csopf will insert your designed controls from VS.NET ide into the body area of the page. 

Previously a page would be defined by a Header, a Side Navigator Bar, the Body of the page and finally the Footer. All these can be defined by overriding the Generate[Header/Footer/NavMenu]() function from the BaseForm.

I have since added a GenerateRightColumn() so that if need be, you can have the right hand column filled with other information.

If you dont need this, then just do this:

	protected override void GenerateRightColumn(Control pTag)
	{   // 050902  yky  Dont need the Right Column Bar.
		pTag.Controls.Add( new LiteralControl( &quot;&amp;amp;nbsp;&quot; ));
	}

yk</description>
</item>
<item>
<title>site down....</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=42</link>
<description>csopf.sourceforge.net was down for a few days because I didnt read the advisory from sourceforge. They remounted the project directorys as read only causing postNuke to bork as it needs a temporary directory to dump its stuff...

So all it took was just a redirection to their /tmp/persistent dir to get this up and going again. Sorry for the downtime.

Issue

yk.</description>
</item>
<item>
<title>More Apps with csopf</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=41</link>
<description>Things are going extremely fast, Im porting over a Delphi written Windows app over to c# / ASP.NET for use in the immediate future. Its a very interesting app, and it will sure put csopf's features to good use. It will also allow me to fill in any feature gaps.

Nick is also working on another project which makes use of csopf.UI.ASP, and he is trying out a TreeView component from obout. Quite nice, but we dont like it forgetting the tree structure on return to the page.

All in all, interesting progress. Creating functional pages in csopf for ASP is really a breeze.

yk.</description>
</item>
<item>
<title>Namespace change for ASP</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=40</link>
<description>We have finally changed the namespace for ASP modules. Previously it was csopf.ASP, but since asp is basically a UI item, it should be csopf.UI.ASP, consistent with csopf.UI.Gtk and csopf.UI.Win (System.Windows.Forms)

Converting over is not too bad, just do a project search for &quot;csopf.ASP&quot; and replace it with &quot;csopf.UI.ASP&quot;, Except for the Assembly name, which remails at csopf.asp(.dll)

yk.</description>
</item>
<item>
<title>Searching with subselects</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=39</link>
<description>Nick has been working on some subselects and Im glad to report that progress has been great! Something like this will work:

SearchCriteriaList vCrits = new SearchCriteriaList();
vCrits.Add( true, &quot;Name&quot;, &quot;Nick&quot;, &quot;&quot;, SearchCriteriaOperator.Like, false)
vCrits.Add( true, &quot;Orders.OrderDate&quot;, Date.Parse(&quot;2005-01-01&quot;), null, SearchCriteriaOperator.GreaterThan, false);
CustomerList vCusts = new CustomerList();
vCusts.LoadByCriteria( vCrits )

Should return all the orders of the &quot;Nick&quot; customer made since the new year of 2005.

Note that the only thing the developer has to do is to define the relationship once between the Customer and the Orders as such:

public class Customer: PDObject
{
   ...
  [OneToMany(&quot;ID&quot;, &quot;CustomerFK&quot;)]
  public OrderList Orders {
     get { return (OrderList) PDList.CreateByAttribute( this, &quot;Orders&quot; ) }
   ...
}

The framework will make use of all this information to generate the appropriate subselect statement in SQL.

Fun stuff!

yk.</description>
</item>
<item>
<title>Strange Links.</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=38</link>
<description>I just did a search for 'csopf' on Google, and I found some strange sites linking to here. 

One is GDS or also known as &quot;Goodie Domain Service&quot;. And it looks like they keep a copy of all the released files I submit at sourceforge.net! Its strange!
csopf Package Listing as GDS

Then theres Camelot which seems to scrape off everybody else, and posts up my release news from sourceforge as well.
News Item on csopf at Camelot

I dont know why these guys are doing it, but it seems like a waste of bandwidth to me...

[btw, I havent seen any referals from them yet]

yk.</description>
</item>
<item>
<title>csopf is listed in the UNDP - International Open Source Network</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=37</link>
<description>Hey, just found out that csopf is now listed in the United Nations Development Programme - International Open Source Network (iosn.net) under Malaysian FOSS Contributors

&quot;This is a list of FOSS projects and FOSS contributors whereby the principal developers are Malaysians or where substantial code and community contributions have come from Malaysians. All projects listed below are available for download and fully meet the FSF and OSI definition of FOSS copyright licenses. In addition, there is also a list of active community members of the IRC channel, #myoss on irc.freenode.net.&quot;

How nice! Thanks to Ditesh who maintains that page. Currently there is an impressive list of 13 projects... and growing, we hope!

yk.</description>
</item>
<item>
<title>All about Enums</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=36</link>
<description>I just had a one day crash course on enums in c#. 
The Result? Completed support for enums for persistence in integers.

Problem: Enumerated types are usually values which can be stored as integers, thus saving space but more importantly defined within a certain number of bytes. If we were to store the Enum values as strings, as most people may do, first of all how do we determin the length of the string for something like pnFunctionReturnOK. Secondly, its darn inefficient.

Anyway, just for info, to translated between enum  string, we use these easy functions:

enum enStuff { Food, Computers, Games }

enStuff vStuff = enStuff.Food;
Console.WriteLine( vStuff.ToString() ); // outputs &quot;Food&quot;
vStuff = Enum.Parse( typeof(enStuff), &quot;Games&quot; ); // vStuff = enStuff.Games

That was simple enough.
Now if we need to store these enums as integers, converting enum -&gt; int is easy enough:

int vInt = (int) vStuff;

but converting from int -&gt; enum is NOT obvious.

vStuff = (enStuff) Convert.ChangeType( typeof( enStuff ), vInt );

does not work, but this:

vStuff = (enStuff) Enum.ToObject( typeof( enStuff ), vInt );

strangely works... ToObject??? gimme-a-break! shouldnt it be ToEnum?

Anyway, glad to announce that enums, stored as integers are fully supported by csopf. (The release would be in v0.4.1, or you can grab it from cvs)

yk.</description>
</item>
<item>
<title>Namespace change for UIs.</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=35</link>
<description>Ah. the benefits of having sub-integer version numbers: the right to change fundamental stuff which breaks everything... :)
Ive just changed the namespace for csopf.UI to csopf.UI.Win for the Winforms implementation. This is because it would be good to organise the UIs in their proper namespaces, i.e.:

csopf.UI.Win
csopf.UI.ASP
csopf.UI.Gtk
...

So the next step is to break the bad news to nick to convert csopf.ASP to csopf.UI.ASP.... one time pain for a lifetime of goodness...

yk.</description>
</item>
<item>
<title>csopf-v0.4.0 is finally out!</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=34</link>
<description>After procrastinating for over 6 months, Ive finally gotten round to packaging csopf as the next release. One of the delays was because we were creating a production site which was using csopf as the framework, and there were quite a few features to be implemented and bugs exterminated.

Im glad to say that the production website has been running for over 2 months now without much problem, so I'd say that csopf was quite stable. So its ready for its release. 

Hope you enjoy it!

Please click here for more information, or download here</description>
</item>
<item>
<title>csopf works with mono</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=33</link>
<description>Ive blogged about this at: csopf on mono: It Works!

and am happy to report csopf.Core and csopf.Data compiles on mono on linux, and runs well too...
What Im doing now is creating some baseforms in Gtk# so that we can write apps for linux with this framework. I could use the work they're doing with System.Windows.Forms, but I wouldnt rely on it yet. Gtk is more stable, yet... cryptic.

Anyway, its good to learn.

Get from latest tarballs ... I have yet to release 0.4.0. Whats holding me back is actually compiling the amount of changes there is to this release!

yk.</description>
</item>
<item>
<title>Revamp to the csopf Website</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=32</link>
<description>If you've noticed lately, there has been a huge change in this website. 
Ive taken some time out to upgrade phpNuke 7.1 to postNuke 0.75... 
reason for the change of engine is because phpNuke was getting harder and harder to acquire.. they are getting more commercialised. hopefully postNuke would remain 'free'. 
Also because the 7.1 engine allowed spambots in and my respectable site suddenly became a spamhouse of pornographic material. yux.

Hopefully this portal fares better.

Im slowly migrating previous data over, and hopefully it doesnt break.</description>
</item>
<item>
<title>Wot?! No Updates?!</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=31</link>
<description>The reason why there are no new releases lately is because we're working hard on csopf on ASP.NET. I promise you, there are quite a lot of improvements to the framework.

So, til we wrap up the loose ends, and tidy it up into a nice package for v0.4.0, please use the CVS to preview and test it out.

yk.



</description>
</item>
<item>
<title>Transactions as Well!</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=30</link>
<description>This next version is truly going to be quite a major upgrade. Ive just finished implementing Transactions within the Framework, so you can now safely call .Save() and can ensure that the database will either be commited with data or Rolled back if there was a validation problem.


Im also trying out an experimental feature which Ive never done before: In Memory transactions. i.e. I keep track of the state of the object by making a copy of it and using that copy if i ever need to rollback. Now this seems like some hair brained idea, since it means twice the amount of memory would be needed to keep track of both modified and unmodified objects. However, Ill continue implementing this, and when and IF we see any performance degradations, it will be just a compile switch away ... 


Just to highlight what I mean by In Memory Transactions, check out this NUnit code fragment:



            mObj2.MyString = &quot;Two&quot;;

            mObj2.BeginAtomic();

            mObj2.MyString = &quot;Three&quot;;

            mObj2.BeginAtomic();

            mObj2.MyString = &quot;Four&quot;;

            mObj2.BeginAtomic();

            Assert.AreEqual( &quot;Four&quot;, mObj2.MyString );

            mObj2.RollbackAtomic();

            Assert.AreEqual( &quot;Four&quot;, mObj2.MyString );

            mObj2.RollbackAtomic();

            Assert.AreEqual( &quot;Three&quot;, mObj2.MyString );

            mObj2.RollbackAtomic();

            Assert.AreEqual( &quot;Two&quot;, mObj2.MyString );





yk.</description>
</item>
<item>
<title>ASP.NET.... working on it!</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=29</link>
<description>Im currently learning up ASP.NET because a project calls for it. I guess I prefer its model than the rather complicated MVC which really boggled my mind when I had to maintain a rather simple app. Thanks to nick whos teaching me the ins-and-outs of ASP.NET development.


Ive got ancient knowledge on web development, days of perl and miva, and I know that the model is different. However Id rather have a logical model which can be closely mapped to windows programming.


So what Ive done here with csopf is to create a csopf.ASP.BaseForm which can be used as a base class for inheritence and Templates. I havent a clue on how ASP.NET 2.0 will help me here, so suggestions are welcomed. [I still cant believe that there arent templating features in modern web development languages]


It works with a FormParameter which keeps track of the 'call stack' so that the pages know where to proceed to. This is necessary so that objects are kept in memory so that there are less database hits. Ive noticed that alot of asp websites support that model of hitting the db whenever data is required... 


A new UserControl called csopf.ASP.PDASPGrid to manage the PDLists, is created so that its now easy for developers to display the list, and allow users to click into the lists to drill into the objects within the lists, with Add, Edit and Delete functions.


The Forms which maintain the objects can be designed in the Visual Studio IDE visually, although it doesnt show what the final layout will be, the region for the detail will be WYSIWYG.


Besides this, I maintain the state by managing the Sessions and ViewState objects, so the developer wont need to worry about it too much. Dont worry, stateless modes also will be supported. Its up to you on how to make use of these new 'intelligent' forms.


I will create a sample website to showcase the changes in the very near future. Perhaps for the v0.4.0 release.


Regards!


yk.</description>
</item>
<item>
<title>.Net Reflection and Performance</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=28</link>
<description>Heres an interesting article on Reflection and its performance on apps.


.Net Reflection and Performance


some quotables:

The results here were not surprising: Reflection was roughly 2.5-3.0 times slower than direct assignment and retrieval of the property value. Method Invokation was 3.5 to 4 times slower than direct calling of a method.


But keep in mind that this loop ran 100,000 iterations and the entire test ran in under 900 ms without and under 2.5 to a little over 3 seconds with Reflection. The individual call times of these reflected type methods are minmal in the context of a typical application. Slower yes for sure - but having an impact on a typical application? Not likely...


... In short, it’s a good idea to stay away from Reflection when possible, but don’t be afraid to resort to it when it provides a better or more flexible solution to your problem. The performance hit for anything but tight loop operations is likely to be minimal in the overall scheme of an application or Web Form request.


Good thing I cache my Reflection Information!


Thanks to dudu for announcing that link.


yk.</description>
</item>
<item>
<title>csopf-v0.3.9 - Major Changes</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=27</link>
<description>There are quite a few changes done to csopf for this release, and I was so tempted to jump to 0.4.0 instead of this point release of 0.3.9. However I decided to keep it nice and steady, and went with the slowly incrementing version numbers.


Here are some highlights:




 Parameterized Queries

 No more SQL injection and brittle queries

 Size Attribute works for strings

 varchars &gt; 255 will be blobs for MySql

 LoadByCriteria / LoadObjectByCriteria

 PDObject implements IComparable so PDList can Sort

 major architectural changes in SQL framework to cater for different engines




Parameterized Queries is the highlight, where my evil SQL breaking tests in TestDifficultStrings had to approve of. Setting up the Parameters was a killer because of the different formats of the SQL, the dbTypes etc. I have attempted to write as little code as possible, so please see the SQLConnectionMSSQL/MySql/Firebird files to see the implementation.


Size attribute is also an important addition, so now our classes should be able to save long or short strings. MySql is funny in that after varchar(255) it HAS to go to a blob. So reading off Byte[] to string had to be implemented as well.


LoadByCriteria is my first attempt in abstracting the developer from writing SQL queries. Instead a simple call to these procedures would allow the appropriate SQLs to be generated and objects instantiated.


PDList.Sort also is a new feature, implemented by Nick. This means that the PDObject has to have the IComparable interface and implement CompareTo. This is virtual, so your biz class can then define how to sort themselves.


Of course all these new features meant that I had to clean up alot of SQL object code, from the SQLDatabase, SQLConnection* to the SQLDMObject. It was really exciting.


Hope you enjoy this new release!
csopf-v0.3.9.zip


yk.</description>
</item>
<item>
<title>Work In Progress for v0.3.9</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=25</link>
<description>Im just clearing up all the hacked code for the MySql support, and now its alot more structured.


Ive just finished working on the SizeAttribute, so things like 


  [Size(34)]

  public string MyString;


Will actually create a column MyString of varchar(34).

Also anything smaller than 10 will be defaulted to a char.


This works, but I havent even started thinking of working on an ALTER COLUMN version. 

Also Ive found some slight bugs with the MySql version, as evertime we register an object, any Indexes will get recreated. This is not good.


Another thing which is annoying me at the moment is the fact that my SQL generated for INSERTS and UPDATES are very brittle. So its susceptible to SQL injections and such. Even simple single quotes (') will kill the SQL statement. In my previous framework, I would carefully stringreplace the offending characters. Now Im thinking of using SQL parameters. Will work on that too soon!


yk.</description>
</item>
<item>
<title>csopf-v0.3.8 released - Support for MySql !!</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=24</link>
<description>Finally added MySql support to this OPF.
 
It supports Database and Table creates with the appropriate Primary Keys and Indexes. So during the first run, when the Connection UI appears, select dbMySql.

I have made it such that the Engine type for MySql is InnoDB, so only specially patched MySql servers of 3.23 will work, but if you are using servers which are greater than version 4.0, you shouldnt have any trouble.

Get it here: csopf-v0.3.8.zip

yk</description>
</item>
<item>
<title>csopf-v0.3.7 released! Attribute clearup and Developer friendliness</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=23</link>
<description>Besides the improvements on the TableName Attribute,

the 1-M Attribute has been refactored, 

and its alot easier on the developer. 

We do not need to declare the private field to hold the list, 

nor do we need to declare the ChildClass type, 

since it can be deduced from the type of List.

Similar improvements are available for the 1-1 Relationships.


Get it from sourceforge at: csopf-v0.3.7.zip</description>
</item>
<item>
<title>Table Name Attribute. Skip defining the SQLDMObject altogether!</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=22</link>
<description>Ive just made the modifications in the CVS to allow the TableName of the the persistence to be defined as Attributes attached to the Business Object, and not defined as an override from the TableName function of the DMObject.

e.g. the old manner was to have

public class MyObjDM: SQLDMObject
{
&amp;nbsp;    public override string TableName() { return &quot;MyObj&quot;; }
}

public class MyObj: PDObject
{
&amp;nbsp;    static PDObject()
&amp;nbsp;    {
&amp;nbsp;&amp;nbsp;        RegisterPDObject( typeof(MyObj), typeof(MyObjDM), null );
&amp;nbsp;    }
}

now, we just need to do this:

[TableName(&quot;MyObj&quot;)]
public class MyObj: PDObject
{
&amp;nbsp;      static PDObject()
&amp;nbsp;      {
&amp;nbsp; &amp;nbsp;           RegisterPDObject( typeof(MyObj), typeof(SQLDMObject), null );
&amp;nbsp;     }
}

So we dont really need to define the class MyObjDM! This should reduce your code significantly.

yk.</description>
</item>
<item>
<title>csopf v0.3.6 Released. Auditing information.</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=21</link>
<description>csopf now features an Attribute which triggers Auditing information: Created ID, Created DateTime, Last Updated ID and Last Updated DateTime. 


The Developer just needs to tag the class with an Class Attribute: [Auditing] and these fields will be created in the database for persistence.


The NUnit tests have been written to make sure that the SQL is created and that the LastUpdated DT is reflected. See 'ClassAttributesTest.cs'


This release also reflects the latest changes in directory structure which is organized according to the logical split, csopf.dll, csopf.data.dll, csopf.nunit.dll and the SampleApp.exe.


You can get the file from sourceforge here: csopf-v0.3.6.zip
 
yk</description>
</item>
<item>
<title>Using csopf with Borland Delphi 8 for .NET</title>
<link>http://csopf.sourceforge.net/modules.php?op=modload&amp;name=News&amp;file=article&amp;sid=20</link>
<description>I was trying out Delphi 8 with csopf, and am happy to report that the csopf.*.dlls can be referenced and used as 'advertised'! 


I created a very simple Winforms app which saved a simple PDObject to a MSSQL database. The connection UI appeared, and the database and respective tables were automatically created. 


The whole experience was relatively painless, the only hiccups were the translations of the new keywords from Delphi 7, and the confusions with 'Type' (System.Type)


e.g.

in Delphi, it was easy to declare a type which is a 'class of' another class. In C# this feature does not exist, and therefore, only the base type 'Type' exists.


So for the c# declaration of: 
RegisterPDObject( Type pPD, Type pDM, Type pList )

I just assumed (in Delphi 8) I could call:


RegisterPDObject( TTestObj, TTestDM, TTestList );


as I would with Delphi 7.

unfortunately this caused a compile error, and to correct this, the code should look like this:


RegisterPDObject( typeof(TTestObj), typeof(TTestDM), typeof(TTestList) );


So now it looks very much like c#, and to me, kinda clunky.


yk.</description>
</item>
</channel>
</rss>
