Jacob Tyler is a Full Service Brand Communications Agency.   Call us toll free at 866.735.3438

Posts Tagged ‘PHP’

AJAX – Combining Technologies to Increase Website Interactivity

Monday, July 28th, 2008

AJAX incorporates several technologies to work. These are XHTML and CSS for a standards-based presentation; Document Object Model for dynamic display and interaction; XML and XSLT for data interchange and manipulation; XMLHttpRequest for asynchronous data retrieval; and JavaScript to bind everything together.

Since AJAX allows for asynchronous action, loading of new small amounts of data does not interfere with normal page loading. AJAX allows for a more responsive web experience as it allows your web page to exchange small amounts of data with the server as you view the page.

With AJAX, your actions send a JavaScript request which trigger an action – usually a data retrieval request – which is answered by the web page in the form of a XML response. The web page changes accordingly; without having to reload the entire page.

In a classic web application model, user actions trigger an HTTP request back to the web server. The server processes the request and answers the request by loading an appropriate HTML page back to the user.

With AJAX, you don’t have to wait for your server to reload the page according to your requests. AJAX allows the page to process your request and make small changes accordingly without having to reload an entire page. AJAX cuts down on waiting time and makes the web experience more dynamic.

When one loads a webpage that utilizes AJAX, the browser also loads an AJAX engine which renders the interface that the user sees and communicates with the server at the same time. The user can interact with the application asynchronously; every action you make generates a JavaScript request, which triggers a response from the AJAX engine.

Since AJAX is capable of asynchronous action, the user’s interaction with the web page does not stall. You are not left staring at a blank browser window while the server processes you request.

The asynchronous element of AJAX is provided by XMLHttpRequest. This technology allows browsers to make data requests without having to reload the page. This eliminates the need for page refreshing.

Web pages are usually loosely coupled. The data they display are not bound to data sources and must first be set out in proper order in a HTML format before they can be presented in a browser window. This means that, in the traditional format, a web page needs to be re-loaded every time you need to view different data sets. With XMLHttpRequest a programmer can by-pass this requirement.

AJAX web pages load quickly since the payload coming down is smaller in size and the rest of the layout does not have to be redrawn when you request a page update. As such the bandwidth usage and requirements for a page utilizing AJAX are minimized.

Another benefit of AJAX is that the use of this platform means that programmers have to clearly separate the methods and formats used for the aspects of information delivery.

Programmers using AJAX can adopt or adapt whatever techniques work for them but the must adopt separation of raw data or content to be delivered; format or structure of the webpage; style elements of the webpage; and functionality of the webpage.

As AJAX is a new application, it is still evolving and as such is vulnerable to some glitches, usually with reference to its interactions with some web applications.

An AJAX created page does not register in a web browser’s history. As such, triggering the back function might not bring back the desired result. Programmers have tried to use invisible IFRAMEs to invoke changes that populate the history used by a browser’s back button, but not every web page has these yet.

It is also difficult to bookmark a page using AJAX. However, a solution to this would be the use of a URL fragment identifier. Many browsers allow JavaScript to update the fragment identifier of a URL dynamically and as such the user changes made to a page using an AJAX application can be maintained.

If you want to use an AJAX application in your website, you have to take into consideration network latency. Network latency is the interval between the user’s request and the server’s response. Some factors can increase the network latency of a webpage and cause delays in the interface of the web application. If the user is unaware of AJAX properties it may result in them assuming that there is something wrong with the page.

Also, when a web page is rendered or changed by a request, there is a brief moment of re-adjustment when the content changes. This too can cause confusion for the viewer. The use of visual clues or warnings to make the user aware of the background activity inherent to an AJAX application is recommended.

While AJAX relies on JavaScript for it’s dynamic interactions; JavaScript can cause its share of problems. JavaScript can be implemented differently by different browsers and as such there may be compatibility issues. If the browser being used by the user is incompatible to JavaScript portions of the website can be distorted or just rendered unreadable.

Search engines as a rule do not execute the JavaScript code needed for AJAX functionality. Websites that use AJAX to load data must provide equivalent Sitemaps data at a public, linked URL that search engines can read.

AJAX can also pose a problem with web analytic systems. Analytics systems which allow for the tracking of events other than a simple page view, such as the click of a button or link, are the ones most likely to be able to accommodate a site which heavily utilizes Ajax.

Sphere: Related Content

PHP in a nutshell

Wednesday, June 4th, 2008

If you have spent the better part of the last few years on the Internet, you may have already chanced upon the term PHP. You may have even encountered the definition: “a server-side scripting language”. But what exactly does it mean? And more importantly, what use can it be to you as an aspiring Web developer or Web designer?

Going back to the definition for a little while, PHP is indeed a server-side scripting language that is typically used in the creation of dynamic Web pages. It is a relatively easy to learn programming language that enables you to feature more dynamic content on your web sites.

PHP is different from other types of programming languages in that it is designed to work in conjunction with HTML. This compatibility is a distinct advantage of PHP and allows you to easily integrate it into web pages that have already been extensively rendered with HTML. This integration is in fact so seamless that you can quite readily switch between the two languages even within the same web document.

How it works is basically like this: web sites are typically designed with a combination of PHP and HTML in varying proportions depending on the designer’s intended purpose. When a visitor points his browser to the web page in question, the server will “read” and subsequently process the PHP instructions and later send the results of the process to the browser of the visitor.

This is pretty much similar to how other languages such as ASP or ColdFusion work. The main difference however is that PHP, unlike the aforementioned ASP or ColdFusion, PHP is both an Open Source and a cross-platform application. What this means is that PHP can be run under the Windows NT platform as well as many versions of the UNIX platform. In addition, PHP can be designed to function as an Apache module and even as a binary that can be run as a CGI.

PHP by its very nature is exceptionally light and fast to run but when designed to run as an Apache module it is even more so. The absence of any process creation overhead allows PHP to return results quickly compared with other programming languages plus it has the added benefit of not requiring the tuning of mod_perl in order to limit your server’s memory image to a manageably small size.

Beyond its usage as a means to control and alter the contents of your web pages, PHP can also serve to function as an HTTP header sender. It is typically used in this function to set cookies in web browsers, manage the site authentication processes, and to redirect users to other sites. PHP also works well with other programs and applications, enabling unparalleled connectivity with many different databases as well as ODBC, as well as offering seamless integration with many different external libraries; libraries that allow you to accomplish tasks such as publishing PDF documents and even parsing XML.

The way PHP fits within your web pages is extremely elegant in its simplicity; so simple in fact you will not need a special development environment or IDE at all. You merely have to place a at the end. PHP can also be configured to utilize ASP type <% %> tags as well as .). The PHP engine is charged with the task of processing everything that is contained within those tags.

If you have had an extensive or even only a little background in programming languages, you may have already noticed that PHP has a lot in common with the languages C and Perl, especially in its language syntax. Just like in C and Perl, you do not have to declare variables prior to you using them, and it is also quite easy to create arrays and hashes (associative arrays).

So much for its characteristics; now how can you use PHP?

One of the most often mentioned and widely used applications of PHP is for server side scripting. This has traditionally been the area in which PHP has been focused. The three components of PHP in this particular application are: a PHP parser (which can take the form of a CGI or server module), a web browser and a web server. The web server is run with a PHP installation connected and the program output of the PHP program is accessed with a web browser. The PHP page can then be viewed through the web server.

Command line scripting is another area where PHP is utilized and for this application you only need a PHP parser. Typical uses include rudimentary text processing and running scripts such as Cron or Task Scheduler.

Finally, although not the ideal solution for this particular scenario, PHP is also used in writing desktop applications that feature a graphical user interface.

Clearly the uses for PHP are both varied and endless and you should explore it in depth to find out how it can be of service to you.

Sphere: Related Content

Click here to request more information via email

Visit: 1501 Front Street, Suite 107, San Diego, CA 92101

Call us today! (866) 735.3438

Click here for BBB Business Review

Jacob Tyler Creative Group is a tightly knit group of talented experienced marketing, media, and software development professionals. We are a full-service, boutique design firm specializing in printed collateral, Web design and Web development, product design, and online marketing. At the heart of the Jacob Tyler team is the simple belief that results speak for themselves. Beauty and style can and should be elements of any marketing campaign, but regardless of how trendy or sophisticated an ad or a datasheet may be, what counts is whether or not you get the new sales leads as a result. Our team prides itself in finding the best approach for your campaign-one that creates an eye-catching product, that fits your budget, and meets your marketing goals. Our ultimate goal is to work with you and your company not once, but again and again, learn from each campaign and continue to apply the tried-and-true principles of marketing to your next effort.