-
Notifications
You must be signed in to change notification settings - Fork 564
Programming Standards
Bhanu edited this page Jan 30, 2019
·
1 revision
While programming we need to follow guidelines, here are some guidelines.
These guidelines are in general for PHP, HTML and Android development.
"Give me six hours to chop down a tree and i will spend the first four sharpening the axe" - Abraham Lincoln
Planning, organisation and teamwork are key to success.Before starting any project following should be done
- Requirement manual: A detailed requirement manual needs to be prepared explaining the project/module, flow and all the screens/modules, Screenshots should be put in this manual
- Wireframes: Make wireframes of all the screens using some tools like Pencil Project
- HTML Prototype: HTML Prototype needs to be build with dummy content which will give us the idea how the project will look like
- Database design: Database needs to be designed and put on paper with explanation
- Try Catch Block: User try catch block in all the pages in the program, Pass the system default error message to the notification block on the user panel. If you can imagine the cases for exceptions, change the error message being passed to user so the user can understand where i the mistake
- Default error pages: 404, 500 error custom pages to be created according to theme style
- Disable debugging: In live environment debugging should always be disabled
- Setting page: Administrator should be able to choose
- if error should be logged or not
- If error should be logged in database or file system
- Should error log of e.g 30 days before should get cleared automatically
- Button to clear error log
- Email Error log: Admin can choose if error log can be emailed on daily basis or as and when it occurs, Admin can also define email address where the error log should be emailed
- Default error pages: 404, 500 error custom pages to be created. If for any reason bug/exception occurs in the code client should see custom error pages and at the same time bug should be reported to Bugsnag.
- Disable debugging: In live environment debugging should always be disabled
- Setting page: Administrator should be able to choose
- if audit log should be logged or not
- If audit log should be logged in database or file system
- Should audit log of e.g 30 days before should get cleared automatically
- Button to clear audit log
Testers will not test the code which doesn't have Unit test cases.
Use Codeception wherever you can. Details https://codeception.com/for/laravelThis is something currently we are not using but would like to test and use in the future
Details: https://github.com/phpstan/phpstanThis is something currently we are not using but would like to test and use in the future
Write Dusk cases in Laravel Manual testing to be done by tester after unit testing is complete. It's the duty of developer to get his code tested by tester Test cases to be written before starting development. Developer/testers needs to write these cases in consultation with each other We use Codacy for all code reviewed https://www.codacy.com/ Every single line of code written has to be reviewed by another team members, no code should be committed and made part of release without review at any cost. It is duty of developer to get his code reviewed. Use PSR/FIG Standards All HTML/CSS should be W3C validated- Daily code needs to be pushed to Git.
- We use Github
- Primary Key: Primary key to be set for every table
- Foreign Key: Wherever required foreign key relationship should be set
- Database design: Database design to be completed before starting programming/development
- Database ER Diagram: ER diagram to be made once Database design is complete
- SQL Tuning or SQL Optimization: Optimise the query, avoid using select * statements
- Laravel supported DB: The code should work on all Laravel supported databases. Always use Eloquent in the code, don't write mysql or database specific query in the code
- Human Understandable: Comment Should be human understandable
- PHP/Android/Java Standards: Code commenting standards/keywords should be followed
- Documentation: After the project is completed a developer documentation should be generated using various IDE plugins from these comments.
- www.codeception.com
- www.php-fig.org
- http://plugins.netbeans.org/plugin/34676/php-apigen-api-documentation-generator
- https://netbeans.org/kb/docs/php/screencast-phpdoc.html
- https://validator.w3.org/
- https://jigsaw.w3.org/css-validator/
- https://github.com/squizlabs/PHP_CodeSniffer
- https://github.com/FriendsOfPHP/PHP-CS-Fixer
- http://beginner-sql-tutorial.com/sql-query-tuning.htm
- http://travis-ci.org/
- http://scrutinizer-ci.com/
- http://styleci.io/
- http://www.squizlabs.com/
- https://try.crashlytics.com
- https://firebase.google.com/docs/cloud-messaging/
- https://source.android.com/source/code-style.html
- https://google.github.io/styleguide/javaguide.html
- http://geosoft.no/development/javastyle.html
- https://github.com/phpstan/phpstan
- Netbeans IDE
- Wamp/AMPPS
- Adobe Dreamweaver or Brackets
- SQLYog
- MySQL Workbench
- Composer
- Adobe Photoshop
- Filezilla
- Github Desktop or Source Tree desktop GUI client
- Android Studio
Did you find it helpful? If not email us on support@faveohelpdesk.com
Installation and Upgrade Guide
- GUI Install Wizard
- Manual Install
- CLI Install
- Server Requirements
- Installation with Apache
- Installation with cPanel
- Cron Job or any Job scheduler
- Faveo Helpdesk Installation on CentOS 7 with Apache on PHP 7.1
- Faveo Helpdesk Installation on CentOS 7 with Nginx on PHP 7.1
- Faveo Helpdesk Installation on Ubuntu 18.04 LTS with Apache on PHP 7.1
- Faveo Helpdesk Installation on Ubuntu 18.04 LTS with Nginx on PHP 7.1
- Faveo Helpdesk Installation on Debian 9 with Nginx on PHP 7.1
- Faveo Helpdesk Installation on Debian 9 with Apache on PHP 7.1
- Migrating Faveo from one server to another
- Configuration of Redis with Faveo
- Install and configure Redis, Supervisor and Worker for Faveo on Ubuntu 16.04
- Install Let’s Encrypt SSL on CentOS 7 Running Apache Web Server
- Install and configure a simple mail server for sending mails using PHP mail function in Faveo on Ubuntu 16.04 server
- Install and configure Redis, Supervisor and Worker for Faveo on Centos 7
- Install and configure a simple mail server for sending mails using PHP mail function in Faveo on Centos 7 server
- Faveo Helpdesk Pro Installation on Windows Server 2012 R2
- Install Active Directory Domain Services in Windows Server 2012 R2
- Install Faveo Helpdesk Community on Centos, Ubuntu or Debian Using Script
- Set up automatic backup for Faveo-Helpdesk
Administrator's Guide
- Faveo File Storage
- Change client side theme color
- How to edit or change the footer in faveo
- How to change agent and admin panel Faveo logo link and logo
- Agents
- Departments
- Team
- Priority
- SLA
- Workflow
- Helptopic
- Default Ticket Settings
- Status
- Rating
- Close Ticket Workflow
- Company Settings
- Social Login
- Language
- Security
- Debugging/Logs
- Ban Emails
- Widgets
Agent's Guide
Email Integration
Release & Upgrade Notes
- General Faveo Upgrade Guide Manual
- General Faveo Upgrade Guide Auto
- Upgrade guide to v1.9.2
- Upgrade guide to v1.9.0
- How to update v1.0.7.9 to v1.0.8.0
- Manual Upgrade from v1.0.7.8 to v1.0.7.9
- Faveo Release notes & upgrade guide for V1.0.7.7
- Faveo Release notes & upgrade guide for V1.0.7.5
- Faveo Release notes & upgrade guide for V1.0.7
Known Issues
- The open_basedir restriction in effect
- 404 Not Found
- 500 Internal Server Error
- Bug after update from 1.0.7.4 to 1.0.7.5 or higher version
- Syntax error, unexpected ‘var’(T_VAR), expecting ‘;’
Contribute & Feedback
- Support the community edition
- Contribution Guide
- Faveo Feedback & Customisation
- Help in language translate
Knowledge Base
Third Party Integration
Plugins
API