Support for ibm informix-database

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
2/28/2018 5:11:32 AM
Gravatar
Total Posts 2

Support for ibm informix-database

Good day dear people of mojoportal,

despite having read on these forums that implementing support for other databases is neither being planned by you, nor easy to implement by others, I wanted to ask if by any chance you see yourself supporting IBM informix in the future? I tried to delve into that task myself but quickly started to feel overwhelmed by the sheer amount of classes and dependencies I would have to touch. How would you go about it, if you were to implement support for a new db?

 

Greetings Ben

2/28/2018 12:25:35 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Support for ibm informix-database

I had briefly considered creating an Oracle data layer for mojoPortal, since that is the primary database we use at our organization.

To get started, you'd have to duplicate each mojoPortal data layer assembly and update the SQL calls for your target database syntax. I'd recommend basing your new data layers on the MySQL versions for ease of conversion. The MS SQL data layers rely on creating and maintaining a separate procedure for each database call, whereas MySQL builds up and uses raw SQL statements. MS SQL may have the security edge in a large environment where SQL access is locked down and only granted at the procedure level, but that's a lot of extra development overhead for a typical site.

Second, you'd have to copy and update all of the SQL scripts under Setup/applications/[application name]/SchemaInstallScripts/[dbname] and Setup/applications/[application name]/SchemaUpdateScripts/[dbname]. There are a very large number of these.

Finally, for every single release of mojoPortal going forward, you would be responsible for duplicating any functionality changes made in the data layers and in the upgrade scripts into your own code. This is the primary reason I gave up on the idea of building my own and using MySQL instead.

I hope this helps,
Jamie

 

2/28/2018 12:54:56 PM
Gravatar
Total Posts 2239

Re: Support for ibm informix-database

Hi Ben,

You're correct that we aren't planning on implementing support for other database platforms. We have entertained implementing Entity Framework but we haven't gone very far with exploring this possibility.

It's not necessarily hard to implement another database platform, it's just very time consuming. If we were to implement support for a new database platform, we would probably do the following:

  1. Compare the new platform to existing supported platforms with regard to similarity of SQL and supported datatypes.
  2. Evaluate which features we need to support and when they need to be supported. Some features don't care about the type of database in use because they use mojoPortal core methods for the Module Settings and they don't store any other data. Some features may not be of any use to those who will be using the new database platform.
  3. Begin to eat the elephant... one bite at a time.
    1. Using a complete release of mojoPortal for the existing database platform chosen in Step 1:
      1. Remove all folders in \setup\applications except mojoportal-core, bingmap, comments, foldergallery, googlemap, googletranslate, htmlinclude, iframe, xmlmodule
      2. Install mojoPortal to a clean database.
      3. Using the management tools for the existing database platform, create scripts for the "core" of mojoPortal.
      4. Save the scripts in \setup\applications\mojoportal-core\SchemaInstallScripts\informix\2.6.0.0.config (or whatever version of mojoPortal you installed above).
    2. Make a copy of the database layer project (mojoPortal.Data.???) which most closely resembles the new platform. 
      1. Modify each class to support the new database layer.
    3. Test everything included in the core. 
    4. Repeat 3A-C for each feature of mojoPortal.

If you decide to use these steps and have any feedback, please share with everyone.

Thanks,
Joe

3/1/2018 9:53:25 AM
Gravatar
Total Posts 2

Re: Support for ibm informix-database

Thank you for the fast reply. You confirmed my initial thoughts on how I would have to tackle this problem. Starting with the MySQL datalayer as a template for a new db is a good hint though. I will let you know, if I have any significant breakthroughs.

You must sign in to post in the forums. This thread is closed to new posts.