Thursday, May 24, 2007

Covalentia Version 2.3: Powered by Oracle

Covalentia may not be as good as other code generators such as Iron Speed etc to have version compatibility, but at least, it’s FREE of charge (since I’ve consumed a lot of other FREE stuffs from the internet, I’d say it’s time to give back to the community). I realize that this is a big issue - whenever Covalentia gets upgraded, migration from the previous version to the latest one is going to be a pain in the ass. But, worry not – we’ll address this issue later on when we come to that stage ;)

I’ve spent tremendous hours trying to include Oracle Database as one of the databases supported by Covalentia. And it ain’t an easy job. Oracle Database has got some limitations compared to other databases such as Microsoft SQL, MySQL and PostgreSQL. Perhaps, this is the reason why it’s faster? No? I have no experience in using Oracle and so I can’t say much about its real performance compared to others. Now, let’s talk about these limitations, and you’ll soon find out why I had to do the changes that I did in the latest release.
  • Renaming SystemTbl table to ConfigurationTbl
    Oracle doesn’t seem to like that name, anything ‘SYSTEM’ is probably a reserved word. So, we have to rename the table to ConfigurationTbl. And while we’re at it, why not remove and add the following items:
    • Remove SystemPath column – put this variable in the web.config file instead and rename it to ApplicationPath.
    • Add a new column – ErrorLogEmail to store the Error Log E-mail address.

  • Renaming of the following tables (and their corresponding primary keys) and stored procedures because Oracle limits the length of identifiers (table name, column name etc) to only 30 characters.
    • UserGroupSubModuleFunctionTypeTbl table to UserGroupSmftTbl
    • UserSubModuleFunctionTypeTbl table to UserSmftTbl
    • DeleteUserGroupSubModuleFunctionTypesByUserGroup stored procedure to DeleteUgsmftByUg
    • DeleteUserSubModuleFunctionTypesByUser stored procedure to DeleteUsmftByU
    • DeleteUserSubModuleFunctionTypesByUserGroup stored procedure to DeleteUsmftByUg

  • Naming convention
    Covalentia uses the following naming convention for tables and columns respectively: TableName and ColumnName
    Oracle (and PostgreSQL), however, doesn’t allow this. Well, not really, you could preserve the case but this will cause some major problems when coding Covalentia as I have to add “TableName”.“ColumnName” here and there (with “) in the SQL queries. So, we have to stick with TABLENAME and COLUMNNAME (all capital case) for Oracle and tablename and columnname (all lower case) for PostgreSQL. As you may already realize that this may cause problems when generating Business Objects, Component and Control classes and User Controls (classes names, variables names and web controls IDs etc).

    MySQL, on the other hand, strictly sets the table names to be lower cases. This, however, doesn’t hurt much as we can manually change them before we generate the Business Objects. The rest, ie. the column names, are fine and work like a charm. If you’re deploying your database server on a Linux machine, don’t forget to set the lower_case_table_names=1 in the my.cnf file under the [mysqld] section.

    We’re going to come up with a solution to this problem in the next release (Covalentia Version 2.3 Reloaded).

So, stay tuned ;)

Friday, May 11, 2007

Moving Forward

Covalent Technology has just secured a grant (fund) under the Enterprise Innovation Fund Scheme from the Government of Malaysia (Ministry of Science & Technology). We've returned the draft agreement and signed the acceptance letter on May 03, 2007. Now, we're waiting for the official agreement to be released and signed by both parties (that'll take some time or a lot I suppose). The fund which amounts to RM 177,020 (~USD 50k) will help to sustain FREE Covalentia for another year. We've outlined a few things that we want to do:

Objectives
  • To further develop Covalentia to become an open source cross-platform Rapid Application Development Tool for .NET that supports not only web-based application development, but also windows and console applications, and windows and web services
  • To help beginners or junior programmers of local companies and government agencies to quickly produce .NET applications faster and more efficiently to lower development costs and risks
  • To develop Covalentia E-Learning & Certification Program and online interactive support to help ICT students and unemployed graduates to learn and use Covalentia, polish their skills in .NET programming and be market-ready – to produce more highly skilled human capital
Milestones
  • Multi-database Version
    • To redevelop and test Data Access Layer and Object Relational Mapping component to support other major database servers such as PostgreSQL and Oracle servers
    • Target Completion Date: 01 June 2007
  • Cross-platform Version
    • To tweak, compile and run Covalentia on Linux operating system using Mono and Grasshopper Frameworks
    • Target Completion Date: 01 September 2007
  • Multi-project-type Version
    • To develop and test multi-project-type components to support:
      • Web Application (Done)
      • Console Application Template (Done)
      • Windows Service Template (Done)
      • Web Service Template (Done)
      • Windows Application
    • Target Completion Date: 01 December 2007
  • Covalentia E-Learning & Certification Program
    • To finalize contents, release and market Covalentia E-Learning & Certification Program and online interactive support/help
    • Target Completion Date: 01 March 2008
  • Product Documentation, Testing and Benchmarking
    • To finalize product documentation and tutorials, and to run final test and benchmarking on Covalentia
    • Target Completion Date: 01 April 2008

When there's money, there'll be a lot of possibilites. A lot of things could happen. We might end up buying a beamer instead. Just kiddin' :) But, definitely, we're going to require more resources to reach these objectives and milestones. So, if you're interested to join us, do contact us, and we'll see what we can do together ;)


Oh, and preferrably women and married :)

Saturday, April 21, 2007

Setting Up a Linux Box

I spent numerous hours last week trying to recuperate my skills on setting up a Linux machine properly to run a dedicated MySQL Database for our Showcase - list of applications powered by Covalentia. The Mirror Site is now running two separate machines - one application (web server) and one MySQL Database server.

Please refer to my previous entry on how to install MySQL on a Fedora Core 4. After doing all that, I had to tweak a few things to make it work:
  • Configuring MySQL database
    • gedit /etc/my.cnf
  • Add the following line under the [mysqld] section:
    • lower_case_table_names = 1
  • Configure the Replication Slave Section, please refer to my previous entry
  • Save the file
  • Restart the MySQL Server
  • Next, configure the VNC Server so that I can access the server remotely
    • gedit /etc/sysconfig/vncservers
    • Uncomment VNCSERVERS:"1:cozta"
    • Uncomment VNCSERVERARGS:"-geometry 1280x800 -depth 16
    • Save the file
    • gedit /home/cozta/.vnc/xstartup
    • Uncomment unset SESSION_MANAGER
    • Uncomment exec /etc/X11/xinit/xinitrc
    • Save the file
  • Restart VNC Server
    • service vncserver restart

I think that's about it ;)

And NO, we don't host gold or moolah on any of our server. So, if you're a hacker, DO NOT try to hack them because you're not gonna get anythin'. Go play someplace else (or with somethin' else or with yourself) :)

Saturday, April 14, 2007

Installing Firefox 2 on Fedora Core 4

Well, before I forget, I better jot down everythin' that I did today for future reference :)

Fedora Core 4 comes with Firefox 1.0.5 or lesser, I can't remember. You could upgrade this to Firefox 1.0.8 using yum install firefox, but apparently, this version doesn't support my new Covalentia Showcase page which I just uploaded. It just hanged and so I decided to install the latest version of Firefox Version 2.0.0.3. Unfortunately, it doesn't have an RPM which would definitely make my life easier. And the installation instruction at Firefox totally sucks, ie. there is NO instruction. Well, I couldn't find any.
  • Download firefox-2.0.0.3.tar.gz from www.firefox.com
  • Execute the followings:
    • mv firefox-2.0.0.3.tar.gz /usr/local
    • cd /usr/local
    • tar xzf firefox-2.0.0.3.tar.gz
    • mv /usr/bin/firefox /usr/bin/firefox1
    • ln -s /usr/local/firefox/firefox /usr/bin/firefox
  • Download compat-libstdc++-33-3.2.3-47.fc4.i386.rpm
  • Execute the followings:
    • rpm -i compat-libstdc++-33-3.2.3-47.fc4.i386.rpm
  • Finally, close all your Firefox browsers and start a new one

And we're done!

Saturday, April 7, 2007

Installing MySQL 5.0 on Fedora Core 4

By default, I’m a Windows user. The last time I used Linux or Unix platform heavily was back then in Cornell, around 10 years or so ago. I have lost my touch and limited skills, and I think it’s time to hone them.

The goal is to run MySQL 5.0 and PostgreSQL on Fedora Core 4 so that I can do various testing and development works, such as replication (I don’t have enough machines to do clustering and so that has to wait) and perhaps start on my Mono project.

The first thing to do was to Google on ‘how to install fedora core 4’ and ‘how to install mysql 5 on fedora core 4’. Well, I didn’t really like what I saw – a lot of people complained about plenty of problems. But, surprisingly, it didn’t take me too long to successfully get the box up and running. Or may be I was just lucky, heh.

  • Pentium 4 1.4GHz
  • 256MB of RAM
  • 40G Hard Drive
  • Boot to Fedora Core 4 DVD and install using the graphical interface
  • Skip the Media Check
  • Select the Server installation
  • Disable the Firewall and SELinux
  • Add the followings in the Packages:
    • Gnome – IMHO Gnome is much better than KDE, but some other people think otherwise. It’s totally up to you
    • Graphical Internet
    • FTP
    • MySQL Database
    • Development Tools
  • Click through to complete the installation
  • Create a default user
  • Login to the box using root
  • Open up Firefox and download the followings:
  • Remove the existing MySQL 4.1:
    • yum remove '*mysql*'
  • Install MySQL 5.0 Server & Client:
    • rpm –i MySQL-server-community-5.0.37-0.rhel4.i386.rpm
    • rpm –i MySQL-client-community-5.0.37-0.rhel4.i386.rpm
  • Start, Stop & Restart MySQL Server, and create a root password:
    • /etc/init.d/mysql start | stop | restart
    • mysqladmin –u root password ‘’
  • Login to MySQL Client:
    • mysql –u root –p
    • Enter your root password
    • mysql> drop database test;
    • mysql> quit;
  • Install MySQL GUI Tools (Administrator & Browser):
    • rpm –i ptt-beta2.i386.rpm
    • rpm –i j2re-1.4.2-11.2.el4.rf.i586.rpm
    • rpm -i MySQL-shared-compat-5.0.37-0.rhel4.i386.rpm
    • tar –zxf mysql-gui-tools-5.0r11-rhel4-i386.tar.gz
    • rpm –ivh mysql-gui-tools-5.0r11-1rhel4.i386.rpm
    • rpm –ivh mysql-administrator-5.0r11-1rhel4.i386.rpm
    • rpm –ivh mysql-query-browser-5.0r11-1rhel4.i386.rpm
  • Finally, run your MySQL Administrator (from Start Menu -> Programming -> MySQL Administrator) and enter your login information:
    • Server hostname: localhost
    • Username: root
    • Password:

And we're DONE!

At the moment, I have this box running as a Slave server (READ only) for the Covalentia.2.2 (Enterprise Edition) Live Demo at our Mirror Site at covalentia.dyndns.org. Feel free to check it out ;)

Thursday, April 5, 2007

Covalentia Version 2.2 Enterprise Edition

One my clients complained the other day that their application using Covalentia with MySQL database has become a lil bit slower than usual as the data grows in size. So, I thought I should come up with a version that supports Master & Slaves (MySQL Replication) servers. The idea is to execute the CREATE, UPDATE and DELETE functions on the Master database server, and READ on one of the Slave machines. In addition, I will have to move the Reporting Service to another machine which will Read from another Slave machine. This way I can minimize the load on the current application and database servers.

And apparently, it didn't take me too long to do this:

  • Changed the web.config file to add the following connection string for the Slave database server:
    <add key="SlaveConnectionString" value="server=localhost; UID=<slave_user>; Password=<slave_password>; Database=covalentia_v22; Max Pool Size=500"/>
  • Opened up the /DataAccess/Objects.cs file
  • Looked for GetObject & GetObjects regions
  • Looked for methods under these two regions that do not have "string connectionString" parameter - these methods load the connection string from the web.config file
  • Added the following codes:
    if (System.Configuration.ConfigurationManager.AppSettings["SlaveConnectionString"] != null)
    {
    return whatever - edited to System.Configuration.ConfigurationManager.AppSettings["SlaveConnectionString"]
    }
    else
    {
    return whatever - no change
    }

    There should be 4 methods in total.
  • Compiled

However, before I could proceed with the testing, I needed a Slave database server. Luckily, I still have my old-and-underutilized iASUS notebook which I primarily use to back-up my files. And so, I installed MySQL Server 5.0 on this machine and set it up as a Slave as follows:

Slave (old notebook - Windows XP Professional):

  • Opened up the my.ini file
  • Added the following:
    log-error
    master-host=
    master-user=
    master-password=
    server-id=2
    replicate-do-db=covalentia_v22
    relay-log=-relay-bin

Master (my current notebook - Windows XP Professional):

  • Opened up the my.ini file
  • Added the following:
    log-error
    log-bin=
    server-id=1
  • Opened up MySQL Command Line, entered and executed the following command:
    mysql>grant all privileges on *.* to ''@'%' identified by '' with grant option;

  • Restarted the MySQL Master database server
  • Restarted the MySQL Slave database server

And that should be it. Done! Oh not quite. I needed to test it to see that this setup's really working. And the simplest test was to logon to Covalentia and browse to Administration Module --> Log Management --> User Log, and hit the Search button. I could see the latest log entry and, thus, the READing from my Slave server was successful.

I shall be a good slave and upload this latest version ASAP ;)

Saturday, March 31, 2007

Back in Business

Covalent Technology is back in business. My goal is to turn this company around – solve the financial crisis that has long haunted my Excel spread sheet – before the end of this year, before I move on to another venture.

Our Covalentia Community Portal is back, newly hosted at VPSLand.com. Like I mentioned previously, the price that they’re charging is relatively cheap and they provide excellent support and fast response. I’d recommend this company to anyone who wants to try out Virtual Private Server. But if you just need a simple ASP.NET hosting, well, you can come to us. It’s not FREE, but it’s so cheap that it becomes negligible or relatively FREE ;) Contact us at support@covalentia.net (we have a new e-mail now, it's no longer support@covalent-tech.com).

On the MOCCIS Trading project, I managed to sort all the problems out. In fact, I’ve learned a lot about IBM DB2 and I might consider putting it in the next release of Covalentia. NOT!

And finally, my Enterprise Innovation Fund (EIF) from the Ministry of Science, Technology & Innovative Malaysia, has been approved. It took them 5 months to evaluate and I don’t know how long they’ll take to disburse the money. 6 months perhaps? I asked for RM 250K (~USD 71K) but the total amount approved is only RM 177,020.00 (~USD 50K). I’m not sure how they came up with that figure, on what basis etc. But why not just round it to, say, RM 177K or 178K? Oh well, in any event, I’m just glad and I hope that the fund WILL be disbursed. This money will be used to buy me a lot of lunches and dinners that I’ve skipped. And the rest will be used to further develop FREE Covalentia. I’d say, may be, 10% of the total amount. Hmm that should be more than enough eh?

Oh, and if you guys would like to donate, to add up to this amount (help me fill my belly with food and more food), DO NOT hesitate :)