Let's Get Social:
Subscribe to read
Get Macronimous Web Design, Development and Internet Marketing discussions delivered by email, Sign Up

Recent Tweets
RT : Shared Hosting Showdown
Follow & Get Tweets

|
March 31st, 2010 Macronimous Posted in General, PHP Programming, web programming, Web standards 1 Comment »
Months back, I made a post similar to this, But I believe another post emphasizing on the best practices is not considered bad.
Working with PHP is something you enjoy everyday!. You always wanted to do your best to your clients. But when the deadlines are pressing and when the clients are on your shoulders people start doing messy codings, and the standards got ignored. But you practice the best ways of programming everyday, it becomes your style and you have no alternate choice of doing quick and dirty work. Here are some simple best practices discussed by Matthew Weier of Zend technologies. Use them when you get an opportunity, and they will become your style of programming.
If you are hiring freshers they need to know or learn PHP programming, learn your own standard way of programming which should be derived from the best practices. Its good to introduce the best practices from the day one, and not after you loosing clients because of the messy procedures and codings you follow. It would be easy to adapt them before you start doing serious coding.
Now, some mistakes you make and how to avoid the:
Learn this serious mistakes and do not DO them!
http://www.codinghorror.com/blog/2009/01/top-25-most-dangerous-programming-mistakes.html
Learn this general programming mistakes which you should not repeat
http://www.infoq.com/news/2010/03/Top-25-Programming-Errors

December 9th, 2009 Macronimous Posted in Opensource, PHP Programming, web programming, Web tools 2 Comments »
Netbeans Integrated Development Environment (IDE) is an open source integrated development for software developers. You can run the Netbeans IDE on various platforms which include Linux, Windows, Solaris and MacOs. It is aimed at providing a comfortable environment for the developer during each stage of development. This is accomplished by integrating precise features required for PHP development into the Netbeans IDE.
As most PHP projects characteristically connect to MySQL databases, Netbeans has made a concentrated effort to offer to this configuration. By means of the Netbeans IDE 6.5 Beta, web developers can now benefit from the standard features like the syntax highlighting, refactoring, code templates, pop-up documentation, easy code navigation, debugger and lots more.
I have been currently using Netbeans IDE and I have penned down few features and positives that I came across in writing PHP based web application.
- It comes free.
- Netbeans will go along with PHP, JavaScript, CSS, HTML, Java and lots more.
- Indentation format is out of the top draw in Netbeans. You select a block of code which contains css, html or php code, Netbeans will make sure it formats the code evidently and placed indentation adequately.
- Common functions of PHP are shown automatically or you can use ctrl + space.
- While writing HTML, Netbeans ensures it checks the div id properly and it indicates if there is any hitch so that you can easily fix the bug.
I can stiff my neck out and say it’s the most popular IDE and also the most popular. So I would give an overall score of 8 out of 10 for Netbeans IDE.

July 23rd, 2009 Macronimous Posted in 4 series, web programming, Web tools, wordpress 1 Comment »
1. Ajax powered WordPress Themes:
Alisha provides a list of Ajax powered WordPress themes. You may want to try one or more.Some of them are good, Some are limted with one or two features like search. Some not found. But worth a look if you plan to use Ajax in your templates.
http://www.softtechreviews.com/web-design/ajax-enabled-wordpress-themes/
2. Ajaxed WordPress
This is a WordPress plugin which addes power, usability and the beauty of AJAX to WordPress based blogs and WordPress based websites. The plugin improves the user experience, the administration capabilities and the design potential or the blog/site.
http://ajaxedwp.com/#awp::
3. Ajax for WordPress plugin developers
So how about writing your own WordPress plugins with Ajax? WordPress codex helps you to begin: http://codex.wordpress.org/AJAX_in_Plugins
4. Four Ajax WordPress plugins
Finally, here are four plugins discussed. http://www.linuxjournal.com/article/9574 This should help you to get more ideas to start.
1. Ajax powered WordPress Themes:
Alisha provides a list of Ajax powered WordPress themes. You may want to try one or more.Some of them are good, Some are limted with one or two features like search. Some not found. But worth a look if you plan to use Ajax in your templates.
http://www.softtechreviews.com/web-design/ajax-enabled-wordpress-themes/
2. Ajaxed WordPress
This is a WordPress plugin which adds power, usability and the beauty of AJAX to WordPress based blogs and WordPress based websites. The plugin improves the user experience, the administration capabilities and the design potential or the blog/site.
http://ajaxedwp.com/#awp::
3. Ajax for WordPress plugin developers
So how about writing your own WordPress plugins with Ajax? WordPress codex helps you to begin: http://codex.wordpress.org/AJAX_in_Plugins
4. Four Ajax WordPress plugins
Finally, here are four plugins discussed. http://www.linuxjournal.com/article/9574 This should help you to get more ideas to start.

May 23rd, 2009 Macronimous Posted in Databases, web programming 1 Comment »
Index on multiple columns for SQL performance
Since clustered index reorders the table and arranges the data according to the index key, SQL Server allows only one clustered index per table. This results in amazing performance, when you only have to worry about one particular column. If you are in need to order the data by more than one column. Since we can’t use clustered index for multiple columns, unclustered index are used to gain a performance increase. We can specify a key value for every unclusterd index, plus the value obtained from cluster index; which acts as a pointer to the actual values when we need their data. If unclustered index is keyed on the values needed for a given task then query engine will never be in need of visiting the actual rows. After learning everything it needs from the index and scope then it will visit the qualifying rows.
May 19th, 2009 Macronimous Posted in Databases, web programming No Comments »
1) Increase SQL Server stored procedure performance with following three tips:
       Stored procedures plays a vital role in enhancing the performance of the database. The following three tips will help us to maximize database performance, when stored procedures are used.
Use NOCOUNT:
          If NOCOUNT option is turned off, on each operation: stored procedures returns information concerning the number of rows affected and it increases network overhead. By default the Option NOCOUNT will be turned off. If we turn on NOCOUNT option, stored procedures will block row count information so that it will reduce the network overhead occupied with information communication to the user.
Use return values:
          Queries are used to validate information or to return a single value. The return value of stored procedure can be used to retrieve a single value from a query and mainly useful when inserting a new record. The information necessary for retrieval is the primary key value. Place the statement “RETURN <value>†at the end of the query to utilize the return value in stored procedure.                Â
       Â
Optimize table access with NOLOCK:
         Transaction safety is not mandatory for most of the database access. This is apparent in MySQL database product that it does not contribute any record locking capability. Any access to a database table or a stored procedure in SQL will make tremendous performance gains when a table hint is used, which lets the SQL engine ignore and not perform locks for a given function.

February 24th, 2009 Macronimous Posted in CMS, Content Management Systems, Opensource, PHP Programming, Search Engine Optimization, Web business, web programming, Web tools, Web2.0 1 Comment »
Many of our customers who look for Ecommerce solutions find Opensource solutions to build it cost effectively and they like what we recommended, Cubecart!There are reasons:1. Easy to customize (skin based), and this keeps the cost low.
2. You can bring great look and feel with skins, you can make the site like complete custom design. No footsteps of Cubecart would be visible.
3. PHP programmers likes it. – Clean code structure, easy to manage. Our PHP programmers have a great feel about it.
4. Designers like it. Clean XHTML interface and CSS driven.
5. SEO guys like it. Search Engine Friendly URLs, Custom URLs, Meta Tags, Robots.txt & PHP Session Killer etc
6. Good support from Cubecart team apart from forum support (Like http://www.cubecartforums.org/)
7. Low cost, $180 only.
8. Good number of alternate payment solutions, Shipping modules (http://www.cubecart.com/modules)
9. Web2.0 interface, But I am yet to see any Mashups.We strongly recommend and teach the importance of SEO for customers who wants us to build Ecommerce sites, as any online business should consider SEO as their primary marketing channel – Not just news paper ads, for long term business through online. Cubecart is one good choice to build SEO friendly Ecommerce sites that supports online marketing.

February 2nd, 2009 Macronimous Posted in 4 series, Databases, PHP Programming, web programming 1 Comment »
The Problem with all the codes is that the value is not sanitized before it will be sent as a query. All we need to make sure is that we passing the secure data into database. We can send secure data and prevent the data hacking by following the four prime SQL injection methods
Function mysql_real_escape_string()Â :
In php, we have a function to deal with strings in MYSQL. (Modified Content)
Function:
mysql_real_escape_string()
Above function seize the string that will be used in the MYSQL query and return the same string with all SQL Injection attempts securely escaped. Above functions will assist to replace each troublesome quotes in SQL Injection query with “backslash \”
Magic Quotes:
Magic quotes will helps to escape from risky form data that is used in SQL Injection. It will automatically include “backslash \†for each special characters in SQL Injection query submitted.
Function to check whether Magic quotes are enabled on server is
“get_magic_quotes_gpc function”
Example:
After adding magic quotes
The  \ becomes \\
The  ‘ becomes \’
The  “ becomes \”
HTML Entities:
HTML Entities function translates all applicable characters to HTML Entities and returns the encoded string.
Function used to translate is,
string htmlentities ( string $string [, int $quote_style=ENT_COMPAT [, string $charset [, bool $double_encode=true ]]] )
Example:Â
 <?php $str = “A ‘quote’ is <b>bold</b>”;
// Outputs: A ‘quote’ is <b>bold</b>
echo htmlentities($str);
Validation:
Length Validation: Hamper of all the input fields in the application to the absolute minimum (7 to 15 characters). This will helps to block long queries input.
Input Validation: Validate the data entered in the input field. For eg. Age field should accept only number and only 2 digits are allowed.
User Privileges: Create “Admin user†for each database and provide “create, drop and edit †tables privileges only to the “admin user “

January 30th, 2009 Macronimous Posted in 4 series, Databases, web programming, Web tools 1 Comment »
Briefed below are four MySQL tools that are really interesting, and you would like to review them and test them for better DB management experience. They do fairly good job with the database admin management, and good alternates to phpMyadmin.Â
Â
1. SQL Buddy: A tool that allows you to get more work done for less, the SQL Buddy tool though not very colorful and flashy, is very easy to navigate and fast loading as well. This saves a lot of time, and also allows using it the moment it is saved in the system. Also transferring of data between servers and .csv file export is also possible here.
Â
2. Sidu: Another database admin tool with some wonderful features in it, including filtering and segregating of table list of a database. Also free controlling of table grouping, depending upon first few characters of the table name is made possible. This tool also assists in table access using the GUI feature. Data import is also possible to be done easily here.
Â
3. My DB Studio: One of the best features that MyDB possesses is that it assists in SSH tunneling that helps in securing one’s connections, along with backup and restore database options. The tool also provides functionalities like creating, altering and deleting tables using WYSIWYG. The tool also aids in creating complete PHP scripts. This tool can be downloaded here.
Â
4. MySQL Front: Another GUI for MySQL, this tool has complete control over the graphic display giving us more options to present the information clearly. One of the highlights of this tool is that it can make direct contacts with the database, thereby storing login ids and passwords, in your hard disk. This saves you from losing time spent to login at various web interfaces. Basically, this tool is helpful for those designers who are not very lettered about databases and only have a basic idea about it.

January 10th, 2009 Macronimous Posted in Frameworks, Opensource, web programming, Web tools 1 Comment »
Cost cutting! – This is something everyone always appreciates, particularly during this slowdown. People want to spend small or no money, however things need to keep going! You need to cut down the development time, so you can save money, execute more projects and manage to reduce the cost of development. This is the time to indentify the ways to reach low cost solutions to customers.
Web development framework to open source developers are not new. There are many Frameworks are available for PHP, Python, Ruby and Java developers. With Frameworks, you get a project skleton, a structure and Libraries which you need to start. Moreover the structure forces you to keep the design and development seperated with MVC. MVC Stands for Model View Controller.
Choossing a Framework is based on the requirments, and the customer. There are simple to complex. I beleive every web development firm should invest time on evaluating few Frameworks in various technology (or atleast in PHP) to provide quick and low cost solutions to the customer. A single Framework may not allow you to fullfil all the features of various web development projects.
There are few popular frameworks widely adopted by developers, for Python there is Django and Pylons, Struts and Cocoon for Java, Ruby on Rails for Ruby, Several for PHP (Zend, Codeigniter, CakePHP etc) – See a very good comparions here.
While we use and recommed few like Codeigniter, CakePHP and Struts, Its better you try, evaluate and get insight on more than one Framework. This will help you/your developers to recommed the right framwork for the requirments and quick completion of the project. Please note reuablity and MVC are the prime factors for using Framworks, But indentifying the right framework which will meet your specification is even more important.
As a developer, you should be able to accomodate more projects if you reduce the development time. My team says you can save around 30%-40% of development time, this should be real good news to you and your clients, right?

April 28th, 2008 Macronimous Posted in 4 series, Web collaboration, web programming, Web tools No Comments »
If you are developing websites collaboratively, say your development teams are working jointly in a project (design or programming) and using CVS or Concurrent Versioning Systems is one good practice to save everyone’s life before they mess up others code.
Assume John uploads his code using FTP at the at 6PM, and Dave overwrites it by 7PM with his version from USA, Raj downloads the files uploaded by John using FTP from and Kumar downloads a Dave’s version, The next day is going to be the miserable day to everyone after all the hard work from the past day – Kumar has clearly overwritten everyone else’s code.
But CVS can solve this issue. A version control system is client/server software to keep track of the work done, allows several developers to makes changes on a set of files on different versions which is finally integrated – with a server having the current updated version of a project and the client can log in, work on the copy of the project, and sends the updation to the server. I would like to brief out the 4 most commonly used tools in CVS:
WinCVS (CVSGUI)
The general interface of a CVS is command line client but instead a GUI client can be used as a point and click interface to talk to the server. GUI interface allows easy automation, customization of common tasks and gives up a native lookup and feel on Windows, Mac and Unix/Linux due to its frameworks.WinCVS differs from CVS only in the terminology being used. The initial process of a version system is importing the files to CVS terminology where the import operation involves a “clean†directory structure means the files that doesn’t need versioning are removed. Every file is not versioned for certain reasons, in that case it can be removed during importing and moved after the versioning process is over.
I prefer WinCVS, as I was using it while I was programming in a collaborative projects.
SmartCVS
SmartCVS, a multi-platform client with powerful features is easy and productive to use. While working on a project, each person makes a change on the files; a SmartCVS organizes and groups the files of related changes referred through a change report file which helps to easily identify the newly added and modified files. SmartCVS also sets file permissions to specific users inorder to protect the files from unauthorized users.
CVSup
CVSup, a tool used to transfer files across the network has the ability to understand the CVS files & tags and updates the files on the server supporting all types of file. The CVS files are recognized easily and synchronized to balances the data transfer that occurs between the client and the server through algorithms, in turn compressing the number of data bits for easy data transfer.
jCVS
This is a Java based client (written in Swings), I never installed it before or tested, But its a poulataly know CVS, your team may want to try. Try any one or more of them; you need to read the installation manual carefully, as sometimes it may be tricky.
At Macronimous we encourage our clients to use CVS (it need little learning though) if they too are allowing their team to work on the code we produce from India. Start practicing a CVS will need little time, but you will certainly appreciate your decision of using a CVS with your client or team.

|
Popular Tags
Sites we Like

|
|