|
March 13, 2010
Filed Under (Programming) by admin
PHP and ASP are two very popular languages in existence today. They are used by programmers who have a particular affinity to the features available in each language. It is easy to ramble on about each language but choosing between them is a much tougher job. Hypertext Preprocessor or as it is better known as PHP, is a server side language. Its widespread use in web forms is due to its ability to capture data and process it on the server before returning feedback to the user. PHP is not restricted only to the web; it can also be installed as an extension to your operating system enabling it to function in command line processing. PHP is also very strong in handling databases, which makes it a popular choice in online work. Active Server Pages (ASP) is also a server side language. It is not a language that is limited to IIS (Internet Information Services) servers as most people think. However, this perception is somewhat justified as ASP’s full potential can only be realized on an IIS server. Cost wise, PHP is free while ASP is not. But those who do buy IIS do it for integration purposes which more than justifies the cost. Resource wise, it is difficult to make a call on either language, as they handle memory in very different ways. PHP allocates and reserves a certain amount of space whether it is being used or not, whereas ASP is similar to a normal application loading and using memory. The only clear advantage that PHP has, other than its cost, is its compatibility. Unlike ASP, PHP can run on any operating system and is an open source programming language. This means that it has much bigger resources to draw from, in terms of development. However, even with all these factors in mind, it is still a difficult call to make on which language is better. It really boils down to the individual user or team and the requirements. To offer an analogy, it is similar to choosing between a Sedan and a 4WD jeep - it depends on what you want to use it for. So if you are torn between the two, take a look again at your requirements and choose the one that best fits your needs.
March 06, 2010
Filed Under (Programming) by admin
The popularity of PHP is unquestionable, but what operating system is most conducive for developers to hammer out code? There have been a few studies in the past and the latest one from Zend gives us some interesting news. In a study involving 2,000 developers conducted at the end of last year, Zend discovered that in terms of a production environment, 85 % of those surveyed preferred Linux. Windows was far behind with a measly 11 % and Mac OS X was almost non-existent with just 2 %. However, these results change when the preferred development OS comes in to play. Windows leads these rankings with 42 %, Linux comes in second place with 38.5 % and Mac OS X still comes last but this time with a respectable 19.1 %. Although the Microsoft OS is in the lead, this may not be for long. Three years ago, it was reported that almost 85 % of developers preferred Windows; it appears that that lead is being worn down by the other OS’, Linux in particular. The FOSS aspect of Linux and PHP seems to be the driving force behind this trend. The FOSS movement has been gathering momentum in the last few years, with Linux being one of the oldest heralds. The rising cost of successive OS versions of Windows has also made it unaffordable for many individual developers as well as offices and companies. Currently, Windows 7 retails for over $300 making it the most expensive OS on the market.
February 28, 2010
Filed Under (Programming) by admin
The dynamic, scalable and user friendly features of PHP are direct contributors to the language’s popularity. However a common problem that developers face is Search Engine Optimization. If the scripts are not optimally constructed, search engines will not pick them up. There are numerous reasons as to why this happens and some of them, along with solutions are described below. Latency - PHP code takes time to execute, so there is a possibility that search engine spiders could give up waiting for the page and move on. You can reduce the wait time by being frugal with SELECT * calls. For example, avoid using this command on table that has ten fields. Name the columns and (assuming you use MySQL) use EXPLAIN to test queries. If you use loops, reduce the repetition of duplicated code. Session ID - When the “enable-trans-sid” option is set to ON, the links that are created with session ID numbers become longer and longer. This is not good when it comes to search engine indexing. In your “php.ini”, disable this feature by setting “session.use_trans_sid” to false. Friendly URLs - There are two ways in which you can achieve a static page effect which will help with search engines. Apache can be used to fake static page URLs. You can also reduce the number of GET variables. These variables produce URLs which are almost incoherent to spiders. If you really need to use many variables then you should combine them by using delimiters or even unused characters. You can eventually split them in the target page. In addition to this, you can also use the mod_rewrite rule, but this should be done with careful consideration and only after understanding its function thoroughly.
February 21, 2010
Filed Under (Programming) by admin
PHP is a versatile language that is used widely in web development. This versatility means that when it comes to hosting, things get a little complicated if the server cannot handle everything the code wants it to do. So it is in your best interests to investigate and find out exactly what features the host is offering you. Bandwidth - Users have a very short attention span. If your website does not possess enough bandwidth to function smoothly, you will lose traffic. So the first thing to do is to identify and secure enough bandwidth from the host. Storage - Requirements are never a permanent thing. As your website grows, you will require more and more storage or hard disk space. Conversely, as you streamline your processes you might require less space as well. Whichever way your requirements swing, you must ensure that your host can accommodate it. Add-ons - Usually, when you begin it is always with one domain. But eventually you might find yourself wanting to include more domains under the same package. So finding a host who will accommodate multiple domains under the single account is well worth the effort. Databases - While it is not common, some hosts do place a limit on the number of databases that are available to you. Avoid this if you can and also ascertain what level of support they offer for these databases. Uptime - If your website does not appear when a user wants it, it represents a lost opportunity. To avoid this you must look for a host that guarantees 99 % uptime. Cost - While it is tempting to use a free PHP hosting service, there are many disadvantages to this option. Look for a good package that is within your means. Do not grab the first thing that looks good. Do a little digging and compare costs. There are plenty of competitive packages being offered in the market today.
February 13, 2010
Filed Under (Programming) by admin
PHP is widely used in today’s web development. This means that programmers need to have PHP skills in their arsenal to be competitive. The problem with PHP code or rather with any code is that repetitive writing can be tedious and brain sapping. This is where frameworks come in to help PHP programmers. PHP frameworks help to streamline development as they contain basic structures that enable easy construction of web applications. The development process can progress at a faster rate due to the pre-built modules, reused code, etc. In short, frameworks reduce the time taken to complete a task. While there are many frameworks available in today’s market, some more than others have gained immense popularity. 1. The Zend Framework - is immensely popular among developers. It is Web 2.0 oriented and is extensively supported by the company. However, it is more suited for developers who have a thorough understanding of PHP and is more in line with corporate level development. 2. Cake PHP - has a good balance between being beginner and advanced friendly. Its focus is on rapid development and is very similar to Ruby on Rails. It is simple and scalable and this makes it a popular choice for many. 3. Symfony - is more oriented towards enterprise level development and therefore more suited for advanced users. It is an open source framework, which is a little slower than others are but has many great features that make up for this shortcoming. 4. CodeIgniter - is an excellent framework for beginners as it is easy to use and comes with a host of tutorials. It has a very small footprint and offers simple solutions, which result in great performance and speed. 5. Seagull - is also a good framework for beginners as it is well established and has a great package of sample applications that can be quickly modified for your purposes. |
|