📜 ⬆️ ⬇️

9 rules for a novice Ajax developer

These nine rules are simple, no pieces of code - just general tips for aspiring Ajax developers. Extremely free translation 9 AJAX Tips & Tricks .


1. Simplicity - error protection
A simple script for obtaining new data will allow you to avoid a lot of mistakes from nowhere. Write your own, or ask colleagues to share their experiences. But remember, simple does not mean stupid and full of holes.

2. Use gzip
If the amount of information transmitted is assumed not small - then use compression, this will reduce the time of the script, by reducing the data transfer time. This page will help you.
')
3. Plan your development
It is impossible to write a serious application with a condo. Plan more, draw out and think through everything you can. It is better if you do this not in the head, but on paper, or in any editor. Good planning saves from a huge number of mistakes and from unnecessary work.

4. Use standards
There is absolutely no need to reinvent the wheel. Use what standards give you in developing Ajax applications. Among them, for example, XML , HTML , XHTML , JSON , UED .

5. Check incoming data
In this regard, it is possible to be a maniac, not trusting anyone but himself. It is necessary to check instantly, the benefit of instant check scripts, for example, forms, is now the sea. Check on "place" saves time of the user and yours, as the developer.

6. Check incoming data and server
Remember the maniac? So, do not trust the client-side check - check out the server side as well. Feel free to tell the user that he was wrong there and there.

7. Use SSL for private information.
If you are operating with private information, then you must use SSL in the order that is necessary to preserve privacy and not blush to users in the future.

8. Framework
Do not reinvent the wheel (although if you are just learning - invent, it is extremely useful for developing you - as a specialist) - you have written almost everything that is possible long ago. Use frameworks to save development time. Only without fanaticism.

9. First basic functionality
During application development (especially if you are writing it for yourself), there are often situations when an idea for your application is born on the fly. Do not rush to implement it - carefully write it down, and add what you have planned according to item 3. Later, when everything is ready, put all the ideas together and re-plan how you will implement them.

Source: https://habr.com/ru/post/37926/


All Articles