-
Notifications
You must be signed in to change notification settings - Fork 121
Programming Standards
Bhanu edited this page Jan 30, 2019
·
3 revisions
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 [email protected]
- Server Requirement
- Installation with Apache 2.4
- Installation with cPanel
- Cron Job or any Job scheduler
Products
Users
Orders
Invoice
Pages
Settings
- Overview
- Check the Domain
- Download
- Latest Version
- Verify Product
- Renewal URL
-
Cloud APIs and Integration
- Tenant Creation API
- Change Domain API
- View Tenant
- Get Tenants
- Delete Tenant
- Delete Cloud Instance for Client
- Enable Cloud
- Domain Cloud Autofill
- Order Domain Cloud Autofill
- Upgrade Cost Calculator API Documentation
- Agent Alteration API Documentation
- Upgrade/Downgrade Cloud Service API Documentation
- Currency Formatting API Documentation
- Currency Format Processing API Documentation
- Payment Calculation API Documentation
- Update User Session API Documentation