Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 1st August 2013, 15:23
MaddinXx MaddinXx is offline
Senior Member
 
Join Date: Jul 2011
Location: Switzerland
Posts: 200
Thanks: 26
Thanked 65 Times in 48 Posts
Default Development/Workflow improvements

Hiho

Please let me use this topic to share some ideas I have/had that could help improving the ISPConfig development/workflow and the ISPConfig software quality in general.

I'm totally aware of the fact that most of the following tips are rather radical, e.g. you are a fan of this-way or you aren't...that's fine. It might then however still be good to see what could be done (regardless if it's useful in your view).

1. Refactor Releases
Refactor releases are meant to clean up code, e.g. improve the code quality. Refactor releases will never add new functionality or focus on bug fixing - the goal is just to improve existing code and make it easier, more reusable etc.

Since the release cycle of ISPConfig is rather slow (which is good) I would recommend to make every 3th or 4th release a refactor release. This may feel like lost time, but it isn't. In the end it can safe a lot of further work/time when refactoring often and good.

What would be typical refactoring works:
  • complete phpDoc
  • apply global coding standard (e.g. CheckStyle)
  • try to remove duplicate content by better organizing the code
  • write tests for things that don't have any..
  • etc.

Priority: High

2. Testing / CI Builds
As far as I've seen ISPConfig has no tests (unit tests etc.). I know writing tests is pure pain and it does work without - but it would for sure be better to have test integration.

Why are tests so good?
As more and more people work on the code, chances are big that updating one part (e.g. fixing a bug there) may lead to other bugs in other parts of the software. Without tests, it's hard to detect such problems.
But imagine you could run the test suite and see: "Ah, I've destroyed something over there...bad me". That would be great, wouldn't it?

Tests could then be run e.g. nightly on a CI server.

Priority: Low-Medium

3. API focused
A lot software projects (Gitlab to name one) built there web interfaces around the software's API. That way, there is one central "core" (the API) that needs to be updated (and is always the most up-to-data version (where the API gets often forgotten elsewhere)). This allows great flexibility...but please read more about this concept yourself as this one is absolutely a radical one.

Priority: Low

There might of course be more such guides/ideas that could improve ISPConfig - but that are the ones that came to my mind. Please add your's as well if you have any.

PS: This topic is not about critic, telling something is bad or something other negative. It's just about: "Hey, wouldn't this be a good idea to further improve the development process?"

Thanks
& love to hear what you think
Reply With Quote
The Following User Says Thank You to MaddinXx For This Useful Post:
feeninuoumn (10th April 2014)
Sponsored Links
  #2  
Old 1st August 2013, 21:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,769
Thanks: 840
Thanked 5,607 Times in 4,418 Posts
Default

Thanks for your suggestions to improve the ISPConfig development.

1) ISPConfig has already major and minor releases were major releases include the major changes in the api and also the big improvements while the minor release contain mostly bugfixes. And we have coding standards and clean code.

2) If you want to write a test framework for ispconfig, feel free to do that.

3) ISPConfig uses a form centric development approach and has a great api for that, such form centric frameworks are used by many large systems and projects as they allow a secure and rapid development. The remote api gets all it's information form the same form files, so its up date automatically as well.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.

Last edited by till; 1st August 2013 at 21:52.
Reply With Quote
  #3  
Old 2nd August 2013, 09:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,769
Thanks: 840
Thanked 5,607 Times in 4,418 Posts
Default

The more I think about it, the more i like the approach with the test framework. It will get a bit complicated as it will involve automating different clients like ftp, imap, pop3 etc. to test the configurations build by ispconfig but it should be possible to do that.

We started to add phpdoc comments in some files already but there is still a lot of work. So help in this area is always welcome.

And please dont get me wrong, I really appreciate your work on ispconfig and thoughts about improving the ispconfig development. My main focus is to keep this project on track for the ispconfig users, keep ispconfig stable and secure. I'am always working to improve the development enviroment as well but I prefer to do this in small steps.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 14th January 2014, 23:27
MaddinXx MaddinXx is offline
Senior Member
 
Join Date: Jul 2011
Location: Switzerland
Posts: 200
Thanks: 26
Thanked 65 Times in 48 Posts
Default

Hey till

I just wrote down some tools that might be simple enough to use (without rewriting the whole ISPConfig code) but still add revenue:

Code:
## Composer (http://getcomposer.org/)

    > curl -sS https://getcomposer.org/installer | php

## PHP CS Fixer (https://github.com/fabpot/PHP-CS-Fixer)

> php composer.phar create-project fabpot/php-cs-fixer:dev-master

    ./php-cs-fixer/php-cs-fixer fix .

## PHP Analyzer (https://github.com/scrutinizer-ci/php-analyzer)

> php composer.phar create-project scrutinizer/php-analyzer:dev-master

    ./php-analyzer/bin/phpalizer run .

## APIGen (https://github.com/apigen/apigen)

> php composer.phar create-project apigen/apigen:dev-master

    php ./apigen/apigen.php -s helper_scripts -s interface -s server -s install -s remoting_client -d dist/APIGen --title "ISPConfig3 API Documentation" --todo --download --report
php-cs-fixer ensures all source code has the same formatting. It's just a wrapper/addition to phpcs (which has a lot of config options) - but it might already be good if everyone committing would run this tool first.

php-analyzer..not much to say, title says it all.

And finally ApiGen, which generated nice API documentations (like phpDoc, but I like it better).

I suggest you to take the time and try those tools..they are really nice.

PS: I integrated a lot of CI/automation stuff in one of my projects recently (https://github.com/Rackster/ossec-wuicore) (see badges)...if you see a "live version" of how helpful such things can be that might help you with your decision

Regards,
Michel

PS: A happy new year as well.
Reply With Quote
  #5  
Old 15th January 2014, 09:54
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,769
Thanks: 840
Thanked 5,607 Times in 4,418 Posts
Default

Thanks for posting the tools. I will check them out.

The code has been completely reformatted in nov or dec. lst year.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.

Last edited by till; 9th April 2014 at 22:55. Reason: typo
Reply With Quote
  #6  
Old 9th April 2014, 15:06
jan.koprowski jan.koprowski is offline
Junior Member
 
Join Date: May 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Regarding testing framework I believe using selenium + xvfb + classes wrapping cmd line tools like: quota, /etc/passwd will be good start. Is what you are thinking about or you are thinking about something more fancy?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailserver with ISPConfig3 improvements suggestions? blocker Tips/Tricks/Mods 1 18th March 2013 21:26
DNS improvements fireba11 Feature Requests 5 16th October 2011 19:17


All times are GMT +2. The time now is 22:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.