Difference between revisions of "Custom development requirements"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 79: Line 79:
=== Permissions ===
=== Permissions ===
====Accountant/Reseller permissions====
====Accountant/Reseller permissions====
Accountant/Reseller permissions are checked at the beginning of controller code. You do not need to write additional code for this in each action.


====Internal permissions system====
====Internal permissions system====

Revision as of 14:01, 5 April 2013

This page is under development!

About

These are the requirements in order your custom developed features would be integrated into main code base.

Legal requirements

In order we would add your custom developed features or bugfixes into our main code base - you must sign an agreement and send it us via email: b2bsales@kolmisoft.com. Agreement can be downloaded here.


Other requirements

  • The code must be working and must not generate any crashes.
  • The code must follow ruby styling defined here.
  • The code must follow best practices defined here.
  • The code must be well documented - every method must contain documentation what is does.
  • If you need to make some database changes - store the changes in /home/mor/custom_sql_changes.sql. Be sure that if the same SQL file is imported twice - it would not insert duplicate elements. You can check for SQL examples here:
/usr/src/mor/db/12/beta_data.sql

and

/usr/src/mor/db/12/beta_structure.sql

Kolmisoft does not provide any support regarding internal MOR DB structure. If it helps can you check old MOR 8 DB scheme.

  • The code (the whole directory /home/mor) must be compressed into archive:
tar czf mor_custom.tar.gz /home/mor
  • The code must come with documentation in Microsoft Word/OpenOffice ir PDF format what developed feature does.
  • All code and documentation has to be compresses into 1 archive, *.zip or *.tar.gz are preferred.
  • When you have your feature developed - create a ticket for it in our support system and attach your compressed archive with all information there as attachment.

Custom development branches

Kolmisoft does not provide SVN/Git branches for your development. Please consider using Git to version your changes locally.


Custom development tips

Updating MOR code

MOR usually receives updates for GUI every 1-2 weeks, usually on Monday.

In order to update your code during development - issue these commands (remember to backup your changes!):

svn update /home/mor

MOR GUI update usually needs changes in DB structure or data. Be sure to run DB update according to your MOR version.

For MOR X3 use this command:

/usr/src/mor/db/12/import_changes.sh


Assets

Starting from MOR X3 - Rails assets are used to serve static content faster. This benefit comes with greater complexity.

Images

When you add static images, let's say icons - put them in this directory:

/home/mor/app/assets/images/

Dynamic images (those that can be upload by user from MOR GUI, for example company logo, calling cards image, etc..):

/home/mor/public/images/

JavaScript

If you include minified JavaScript files - be sure to include original HUMAN READABLE version of file in the same directory - someone will have to fix something one day.

All new JavaScript files must be put here:

/home/mor/vendor/assets/javascripts/

All new JavaScript files must be included in:

/home/mor/app/assets/javascripts/application.js

but 1 line upper than the last line.

CSS

New CSS files must be saved in:

/home/mor/vendor/assets/stylesheets

New CSS files must be included in:

/home/mor/app/assets/stylesheets/application.css


Permissions

Accountant/Reseller permissions

Accountant/Reseller permissions are checked at the beginning of controller code. You do not need to write additional code for this in each action.

Internal permissions system