Friday, December 22, 2006

N-Tier and Globalization Issues

Initially, I was facing a minor globalization issue. A glitch, I thought, and nothing more. Someone from Turkey (or somebody with a tr-TR culture installed in his or her machine or set in his or her web browser’s language setting) must have tried to visit www.covalentia.net but to no avail. The person was probably feeling frustrated and forwarded me the errors (you don’t actually have to do that because all errors are automatically logged and sent to me at errorlog@covalentia.net). After a careful inspection, I found out that it’s not really a minor issue, but a major one. I had everything wrong. The culture configuration in the web.config file is not supposed to be set to auto:en-US. This will cause everything – I mean everything – from the database connection string to date and time to follow the CultureInfo.CurrentCulture information. If your database, MySQL database for example, is an English version (mine is), it will give the following error (note the date is Turkish as well as the word "uid"):

The following error/exception has occured in the Covalentia.Net Portal - FREE C#.Net Code Generator on 16 Aralık 2006 Cumartesi 23:33:32. Please response immediately. Thank you.
GUID: 11c2ae5b-8c14-4bb3-80e5-ee837f263e27
Type: Unhandled Exception
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Keyword not supported.
Parameter name: uıd
Source: MySql.Data
Stack Trace: at MySql.Data.MySqlClient.MySqlConnectionString.ConnectionParameterParsed(Hashtable hash, String key, String value)
at MySql.Data.Common.DBConnectionString.Parse(String newConnectString)
at MySql.Data.MySqlClient.MySqlConnection.set_ConnectionString(String value)
at MySql.Data.MySqlClient.MySqlConnection..ctor(String connectionString)
at Covalentia.Core.Data.SqlDataProvider.ExecuteReader(String connectionString, Int32 databaseTypeId, String query)
at Covalentia.Core.Data.SqlDataProvider.ExecuteReader(String connectionString, Int32 databaseTypeId, String tableName, String queryExpression, Boolean executeScalar)
at Covalentia.Core.Objects.GetObject(String connectionString, Int32 databaseTypeId, Type type, String queryExpression)
at Covalentia.Core.Objects.GetObject(Type type, String queryExpression)
at Covalentia.CRUD.Read(Type type, String queryExpression)
at Covalentia.Controls.Portal.Default.InitializeSkin(Control skin)
at Covalentia.Controls.SkinControl.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
IP Address: 85.105.17.21
Raw Url: /Default.aspx
Date: 16 Aralık 2006 Cumartesi 23:33:32

And so, I have to fix a lot of things. I can’t use the CultureInfo.CurrentCulture to display data according to the user’s culture installed (or web browser’s language setting). Instead, I have to use the following:

CultureInfo ci = CultureInfo.CreateSpecificCulture(Request.UserLanguages[0]);

For the rest, I have to use the third type of culture that is culture-insensitive – CultureInfo.InvariantCulture. So, my bad. My deepest apology goes to the Turkish person or whoever he or she might be. I had replaced the auto:en-US value with just en-US. Feel free to browse the portal. We're the FOC bunch. Covalentia is for charity ;)

That’s not all.

After the recent launch of Windows Foundation, I realized that I couldn’t create a Windows Application (WPF) using Covalentia. Covalentia is very much focusing on generating web applications on the fly – and my plan is to make Covalentia a robust platform or code generator that can support other types of applications as well, not just web application.

My mistake is just like any other programmers’ mistakes. We tend to follow examples on the net every now and then, and those examples do not necessarily follow the supposedly correct rules of programming N-Tier or enterprise level applications. And so, I have Windows.Web.UI and Windows.Web.UI.WebControls in the Business Object or Logic Layer. Oooops :|

As a result, the new release of RC 2 mentioned earlier will not happen so soon. I’m working 24/7 to restructure both the presentation and business layers. Perhaps, next year? In the meantime, enjoy your holidays ;)

Tuesday, December 19, 2006

Microsoft AJAX RC

It took me 3 to 4 hours to migrate the old Atlas codes to AJAX RC. There were some issues with the Menu and Tabs, but I managed to fix them. The CollapsiblePanel doesn’t seem to work properly with FireFox if the direction property is set to horizontal. I’ve posted this problem at the CodePlex’s issue tracker. A few other important things to note:
  • AjaxToolkit extender and its target control must be located under the same update panel
  • JavaScript: Type.registerSealedClass is no longer supported and has been changed to Type.registerClass
  • JavaScript: Sys.TypeDescriptor.addType is no longer needed
  • Timer.tick has been changed to Timer.Tick
  • JavaScript: $(‘’) has been changed to $get(‘’)
  • Web Service: The following attribute must be added to any web service class so that it can be called by AJAX:
    [System.Web.Script.Services.ScriptService()]
  • For the rest, follow this guide
I hope I’ve not missed anything. I should have jotted down everything.

After migrating the codes, I did some changes to the Sub-Tabs to make use of the AJAX DropDownList. I will upload a new Release Candidate soon (RC 2). It will include supports for the PostgreSQL database as well. So stay tuned ;)

Friday, December 1, 2006

Covalentia Version 2.1 Release Candidate 1

As promised, I’ve uploaded a new release candidate, Covalentia Version 2.1 RC 1 to both Covalentia Community Portal and CodePlex site. This release includes:
  • Covalentia.Core project source codes
  • Removal of un-used methods and classes in both Covalentia and Covalentia.Core projects
  • Upgrading Table and TableColumn Attributes and Attribute Handler classes, and Table Schema generation especially for foreign key support, maximum data length, default value and supports for all possible data type
  • New database support for PostgreSQL 8.1 and Oracle 10g (Partial)
  • Optimizing and bug-fixing Query Generator class
  • Microsoft SQL/MySQL database structure optimizations which include the following:
    • Making data as small as possible for example using smallint and mediumint integer types
    • Declaring columns to be not null
    • Declaring Foreign Keys, Constraints and Indexes
      It is important to note here that since the InnoDB in MySQL database rejects any INSERT or UPDATE operation that attempts to create a foreign key value in a child table without a matching candidate key value in the parent table, only non-zero (or not null) columns may be declared as Foreign Keys.
  • Renaming classes and methods to follow Microsoft’s Naming Covention
  • Placing C# codes in separate files (for Web Form & Web User Control files) to increase readability
  • Using UpdateProgress (Microsoft AJAX) to avoid pages from freezing upon post-back, especially during switching Tabs and Sub-Tabs back and forth
  • Applying styles, themes and skins – small changes in the GUI
  • Upgrading Tabs and Sub-Tabs for better performance and look
  • Better documentations for codes, tooltips and help (partial – this is a lot of work)
  • Discontinuation of Covalentia Template files (Covalentia.vsi) – with the release of Covalentia.Core project, it’s easier to copy and paste the whole solution folder when creating a new application
If you encounter any problems, don’t hesitate to e-mail me.
Enjoy ;)

Thursday, November 30, 2006

Covalentia Community Portal Goes Online

Finally! It’s up and running, and I’d really like to apologize to my fellow programmers for any inconvenience caused.

On another note, I’m going to upload a new release candidate, Covalentia Version 2.1 RC 1 by today or tomorrow. This release will have a slightly new look and contain the source codes for the Covalentia.Core project. I shall discuss the details later. So, stay tuned ;)

Thursday, November 23, 2006

DRAGON

That's the name of our server :)

Perhaps, LAME is more appropriate. I'm thinking of adding more RAM to it, say another 256 or 512 MB, if I can find one in the unused Red Hat machine.


Wednesday, November 22, 2006

Server Reinstallation

The Covalentia community portal will be offline for a few more days because the lame server is currently with me, and not at the data center. I’m backing-up all the files and reinstalling everything from scratch. Take a look at the specs (and try not to laugh):

  • Clone PC – not a 1U Rack Server
  • Some ASUS main board
  • Pentium 4 1.7GHz
  • Normal 40GB Hard Disk (Neither SCSI nor SATA and forget about Hot-swap & RAID)
  • 512 MB of RAM
  • Some 10/100 MB Ethernet PCI Card

So, now you know why we need fund :)

And the CodePlex site is down as well. Keep it comin'.

Friday, November 17, 2006

Next Release

There are quite a number of minor changes in the upcoming release of Covalentia Version 2.1. In the last few days, I’ve been working on code and database optimizations, naming convention, fixing bugs and GUIs. The new release will also include the source codes of Covalentia.Core project which contains the Data Access Layer and other core components. With the availability of these source codes, developers can see what’s really going on (or nothing’s going on) behind the curtains and perhaps learn a few things (or teach me if I did wrong) about System.Reflection which is heavily being used and how to avoid multiple expensive calls to this class using cache. And more importantly, it should give those greedy hackers less reason to get into our community server. I’ve given everything for FREE. I left nothing. I have nothing left ;)

Updates
  • Removal of un-used methods and classes in both Covalentia and Covalentia.Core projects
  • Upgrading Table and TableColumn Attributes and Attribute Handler classes, and Table Schema generation especially foreign key support, maximum data length, default value and supports for all possible data type
  • New database support for PostgreSQL 8.1 and Oracle 10g (Partial)
  • Optimizing and bug-fixing Query Generator class
  • Microsoft SQL/MySQL database structure optimizations which include the following:
    • Making data as small as possible for example using smallint and mediumint integer types
    • Declaring columns to be not null
    • Declaring Foreign Keys, Constraints and Indexes
      It is important to note here that since the InnoDB in MySQL database rejects any INSERT or UPDATE operation that attempts to create a foreign key value in a child table without a matching candidate key value in the parent table, only non-zero (or not null) columns may be declared as Foreign Keys.
  • Renaming classes and methods to follow Microsoft’s Naming Covention
  • Placing C# codes in separate files (for Web Form & Web User Control files) to increase readability
  • Using UpdateProgress (Microsoft AJAX) to avoid pages from freezing upon post-back, especially during switching Tabs and Sub-Tabs back and forth
  • Applying styles, themes and skins
  • Upgrading Tabs and Sub-Tabs for better performance and look
  • Better documentations for codes, tooltips and help (partial – this is a lot of work)
To Dos
  • Database supports for PostgreSQL 8.1 and Oracle 10g
  • Microsoft AJAX 1.0
  • A new release for Microsoft Visual Web Developer 2005 Express Edition
As for our community server, our hope to bring it online last week was dashed. The server is infected with all kinds of spy-wares and ad-wares. We’re in the process of removing them and we’ll let you know once it’s stable. Somebody actually unplugged the firewall and chaos reigned for a while. It's a war. We eventually managed to put a stop to it but not without casualty on our side. But, we’ll continue to survive ;)

Tuesday, November 7, 2006

Upgrading Work

We are currently upgrading our server at Covalent Technology. Hence, the Covalentia community portal and other sites that we’re hosting will remain offline for a few days. We hope to bring it up as soon as we can. I suspect some virus attack and network card problem. In the past few weeks, we’re experiencing malicious hacking attempts, and perhaps one (or more) of these attempts had been successful. I really don’t see the reason why people would do such things to us. But, I do know a few why people would not. First of all, we’re not a multimillion company, and thus, these hackers will not profit from us because we won’t be able to hire them to boost up our server security. Second, we’re giving Covalentia for FREE along with the source codes. And finally, if these hackers would just ask us which part of Covalentia (or us) that they want, we’d be more than willing to give them so ;)

Just ask, you greedy bastards.

Thursday, November 2, 2006

Lost Connection when Running MyISAM and InnoDB Databases Silmultaneously

A few weeks ago I posted this error I'm experiencing when running my .NET applications on Windows Server 2000 or XP on MySQL Forum. I’ve totally forgotten about it until today, and realize that someone from MySQL has actually replied to my posting. He suggested that I report a bug which I just did. If you encounter the same problem, perhaps you may want to keep track the bug here.

If you don't believe me, try out some of my previous applications running MyISAM databases. After a while, you'll get the error. And there's nothing wrong with my applications, trust me. It's a MySQL bug :)

Tuesday, October 31, 2006

Microsoft Certified Partner

Covalentia Version 2.0.1 has been tested and passed the criteria for the Microsoft Platform Test for ISV (Independent Software Vendor) Solutions program done by VeriTest. This enables Covalent Technology to obtain the Microsoft Certified Partner status for ISV competency (pending payment of USD 1,605).

The next step will be, well, to pay Microsoft, of course ;)

And a new version will be released soon as well. So stay tuned.

Covalentia Community Portal Goes Offline

The Covalentia community portal at www.covalentia.net cannot be accessed at the moment due to an unknown network problem. The hosting provider has been contacted and we hope to resolve this as soon as possible. In the mean time, you can download the Covalentia.vsi Project Templates file at www.codeplex.com/Wiki/View.aspx?ProjectName=Covalentia. We apologize for any inconvenience caused. Thanks for your support.

Friday, October 20, 2006

Covalentia Version 2.0.1.29713

Despite my tight schedule trying to complete a proposal asking for a fund to support Covalentia, I still managed to upload a new release of Covalentia on its community portal at www.covalentia.net. This release includes all – the Visual Studio 2005 Solution File, Project Templates (Visual Studio Community Content Installer File – .vsi file) and Help files. I’ll upload the Covalentia.2.0.1.vsi file to CodePlex since it’s only about ~5 MB. The problem with CodePlex is that it times out whenever I try to upload more than 10 MB file, and the Covalentia file is about ~23 MB. So, feel free to visit and register at www.covalentia.net to download the whole thing.

This new update includes the following:

  • Uses ClientScriptManager.RegisterClientScriptBlock to register all client scripts
  • Registers a new Copyright in the Html source – Covalentia BSD License
  • Fixes spelling and grammatical errors
  • Replaces ‘Technology Review’ caption with ‘Powered by Covalentia’
  • New web.config file to include Microsoft SQL Server Express Edition connection string
  • AtlasControlToolkit Version 1.0.60731.0
  • Microsoft.Web.Atlas Version 2.0.50727.0
  • Microsoft.AtlasControlExtender Version 1.0.60726.0
  • Covalentia.Core Version 2.0.1.28546 – fixes duplicate entry error for primary key
  • Updated Help files
  • Updated Documented Class Library

It was announced earlier in the Forum that there was a version error. Please take note that this version is newer than the previous one. We are yet to determine what is causing the revision number to err (to become larger all of a sudden). I suspect that my notebook was in a state of agony due to numerous compilations and it started to generate random numbers ;)

Or it could be that one of my biggest clients, DAPAT (http://mibp.dapat.com), is delaying payments and this notebook feels my pain. In any event, if you happen to encounter or plan to offer any service to this company, I say DON’T. They are heartless, and they make you wait for months before you can actually buy some food to feed yourself. And so I’m looking for a new job. Anybody?

Wednesday, October 18, 2006

Covalentia Version 2 Unleashed

I finally managed to launch Covalentia new portal and product, Covalentia Rapid Web Application Development Tool Version 2.0.1, in early September 2006.

COVALENTIA Version 2, unlike its predecessor, is absolutely FREE of charge. It is licensed under a standard BSD license, which allows developers to do whatever they wish, both commercially and non-commercially, with one simple restriction of acknowledging Covalent Technology as the original author.

Thursday, July 20, 2006

Valuation Management System V2.0

The new VMS is finally up and running and all critical bugs have been successfully fixed. To see the demo, click on the following link:


I shall now work on upgrading the Covalentia.Net portal and its back-end engine.

Tuesday, June 20, 2006

Toilet Money


I ought to be a contractor and make some millions from toilets and their wonderful gadgets. What was I thinkin'? ;)

Wednesday, June 7, 2006

MySql Stored Procedure & query_cache

I was running some benchmarking and testing on MySql MyISAM and InnoDB database engines when I suddenly realized that the queries executed by MySql weren't cached, ie. the qcache_hits variable wasn't hit or get incremented. Apparently, if a stored procedure has one or more parameters (for example, sp_query_not_cache (int i)), the queries are not cached. Hmm.

So that means, not one of Covalentia's many queries to the database will be cached. Oh well.

666

I've been terribly busy in the past few days trying to fix critical bugs that suddenly appeared out of no where in Covalentia. I've also added a few more caching features in the View page to make user experience friendlier which includes caching of the Search Criteria and Search Result during switching of tabs, provided that the cache dependencies for the data being viewed (cached) are still valid.

The Edit Sub-Module is taking a long time to load if a table has too many fields or columns. I happen to have a table with 186 or so columns and the page size goes up to 7 freakin' MB. So, rule of thumb, do not put too many fields in one table.

I have a long list of tasks or bugs for Covalentia in my outlook, and if somehow I could automatically export those tasks here, it'd definitely make my life easier. Hmm.

Saturday, June 3, 2006

Covalentia

I've finally decided to make Covalentia freely available/downloadable. The 2nd version of Covalentia, ie. Covalentia V.2.0.1 shall be released hopefully at the end of this month, if not, early next month (July). Anybody who's interested can download and try it out at http://www.covalentia.net (which will be upgraded soon, not now), help me fix the bugs, make it better by all means ;)

The requirements are as follows:
  • You must be a C# .Net programmer, preferrably intermediate level
  • You must posses an original or a licensed Microsoft Visual Studio 2005
  • .Net Framework 2.0
  • IIS 5++
  • Microsoft SQL Server 2000/MSDE or MySql Server 5.0
  • You must be a girl, preferrably single (or single mother) - I'm just kiddin' :)
Okay, now, where was I? Currently, I'm finalizing the Core Module and Features and fixing some of the critical bugs. More updates afterwards. Heh.

Thursday, June 1, 2006

Late Bloomer

I hope this time it'll work. I have much to write but so lil time to do so.