Write a “good” application? Why not “excellent”?
Well for me there is no perfect application. Even a perfect an excellent application need to be at par with latest technology. Now days hackers do not have to concentrate on layer 1 till layer 6, as layer 7 itself were too vulnerable for them to play with. Last month attacks on many Malaysian’s Government website/portal can testify everything. Most of the website/portal was developed using open source scripts such as Joomla and WordPress which is heavily customized without concerning on application securities issues and I do not think every official released patches was applied to the website/portal. |ROLF|
Okey back to what we were supposed to discuss, what is written here was based on my own experiences and discussion with my fellow script geeks.
- No ‘adhoc’ Script Please
Your boss/client came and ask you to develop what they called simple functions. They said that they used to see the functions on the net and ask you to download and just used the functions in order to speed up everything. Seems like they know better than you isn’t it? Things like these look very simple and doable. But haven’t you/they thought that by applying these scripts can either expose your vulnerabilities or bring out data leakage? You can say, “don’t worry, we have proper analysis and planning”. If that’s the case than if suddenly the script release patches? Can it easily applied to your customized functions?
- Create and Maintain Your Own Library
You are experienced programmer and can write any scripts with one eye open. Two thumbs up for you (applause). From this point I am sure you are facing with redundant codes, repetitive scripts, functions that almost similar like previous projects and any look alike codes. Save your time save your lines <– (I love this quote). Look back at all your scripts and look at similarities of it and create a universal library. Make it as functions or to make it much awesome, build classes (which I will elaborate in next point). It will reduce your line of codes, centralize control.
- OOPs – Our Own Peeps
Most of the programmers that I met reluctant to use OOP (Object Oriented Programming) as the can’t see the beauty of it. To me, writing codes without OOP just like “makan nasi kerabu tanpa budu” or “riding a maserati at 40k/h”. My lecturer once told me to memorize four main things about OPP – ENCAPSULATION, INHERITANCE, AGGREGATION and POLYMORPHISM. Only two years later I figured out what those four is. Basically once you jumped into OOP, you’ll getting lazy and lazier. Why? Because you managed to construct and organize classes and ready to reuse it anytime that you want. Any enhancement or new additional functionality can save you many-many-many hours. Before I forgot, if you can use Method Chaining, other normal people will worship you if they saw your code.
- Use MVC – Model via Catwalk
Now we are getting to proper development (hoping there will be proper documentation). Since I jumped into this shit ship, programmer designer not get along things always happen. Programmer will blaming designer for not following required functionality and designed layout which what they said impossible to implement. While the designers will pointing fingers to programmer for not using users/client approved mockup. Some more programmer vs programmer might happen when there is redundant functions, classes or namespaces. Well said, if this team understand how to use Model View Controller (MVC) approach, most of the cats and dogs argument can be solve. But please be sure the MVC’s guideline is properĀ documented for reference, or else nothing is change.
It might be true or not, depends to individual. I am hoping this write up can at least assist some of you on developing any projects.