|
just another regularban.info web blog |
| MEMBERS: | Reusing Code in Web Sites and Applications Part 1 - Using Include() and Require()
Reusing pieces of HTML code is a common way of making web sites (or web applications) more consistent, reliable, and more manageable. Even a small web site consisting of perhaps 20 or 30 web pages can benefit from reusing code for header and footer sections, for example. If the same header or footer is used across all the pages on the site, it makes sense to put the header and footer code in separate files, and then call those files to insert their contents where required. PHP offers two statements that can be used for inserted the contents of one file inside another: include() and require(). These two statements are virtually identical, with the only real difference being that if require() fails, it gives a fatal error, whereas if include() fails it just gives a warning. For this reason I tend to use the include() statement as it just seems slightly more friendly. So, to include the contents of a file called header.inc inside a web page called index.php, you would just need to insert the following line of code (wrapped in PHP opening and closing tags) inside index.php. Include 'header.inc'; As PHP takes no notice of the extension used for the included file, you can use whatever extension you want to. Be careful though, if you put passwords inside an include file with a .inc extension, they will be visible. You can get around this by putting include files that contain sensitive information outside the document tree to prevent people from browsing to them. In Part 2 we'll look at the use of functions when developing web sites and applications.
Preserving the Integrity of Your Flash Templates Before Use
If you have decided to use website templates to create your ideal website you have taken a step in the right direction. This is especially so if you don't want to spend thousands of dollars on custom templates and do not have the ability to create them on your own. Many people think that once they have the templates they are ready to roll, and you are in a certain sense. But, there are some things that you should do to make sure that you preserve the integrity of the template so you can use it again and again if needed. After You Purchase Your Flash Templates There are many sources for web templates and whether you buy them to install on your computer or you download them the very first thing that you should do is save them in their original format. So many people open the template and they are ready to jump right in and start designing their website right away that they don't take a moment to save the template the way it is. The reason that you want to save the template "as is" is because many who are new to working with templates end up hitting enter one too many times or they end up changing the font or changing the format of the page and they cannot get it back. It does take some practice to work with templates without disturbing their original integrity and if you know that you have the original template saved you don't have to stress out every time you distort the template somehow. The great thing is that a lot of the templates out there come with some basic directions. If this is the first time you will be using templates you should take a look at the instructions and see what you can learn from them. Many times simply glancing at the instructions before you dive right in will allow you to decipher between the different layers of the template so you are able to add text and images with ease. Slow Down and Then Begin Many people get their templates and they want to rush into building their website. Whether this is your first time using templates or building a website or the 10th you need to take a deep breath and then begin. If you rush into building your website you won't give it the attention that it needs and the quality will therefore be less than you had always imagined that it would be. If you slow down you will be able to give attention to the small details that really make a webpage functional and aesthetically pleasing. It doesn't matter what sort of webpage you are building, slowing down and preserving the integrity of the template is important so you can return to it again and again or avoid the frustration of trying to fix what has been distorted through the trial and error of using a website template in a rush.
AJAX - An Overview Of One Of The Most Used Web Development Languages
AJAX is a cross-platform technique that can be use on different operating system and web application based on JavaScript and DOM. It is a powerful approach of web application technique using client-side scripting to exchange data with the web server. This means that with AJAX, web pages increases interactivity and faster responsiveness of user interface by having an independent communication with the server. Gone are the traditional ways of web browsing whereby a new page communicates with each user's request. This creates dynamic web application user interface that renders effective usability of every desktop applications. AJAX primary purpose is to increase the web page's interactivity, speed, functionality, and usability. Ajax, by definition, is not technology. In fact, it is an application of several technologies. Ajax incorporates several existing web application like XHTML and CSS for standard-based presentation; the Document Object Model for dynamic display and interaction; XML and XSLT for data interchange between the server and the client; the XMLHttpRequest to exchange asynchronous data with the web server; and the use of JavaScript as the core code for running AJAX application. To understand AJAX, first we must know how the traditional web application works. The classic web interface trigger an HTTP request back to web server. The server then process and retrieve data before returning an HTML page to the users. This process as a model for hypertext medium makes technical sense. But as web application evolves this process does not make the user interface more interactive and practical. AJAX, on the other hand, eliminates this problem. AJAX speed up the loading of any web application with the use of intermediary between the user and the server called AJAX engine. This adding of another layer application of eliminates the start-stop-start-stop nature on the web. The browser loads an AJAX engine at the start of session. The AJAX engine allows the user interface and the application to interchange data asynchronously-independent of the communication to the server. So the interaction between the user and the web never slows down, no point of waiting for the server to do something. AJAX is a powerful technique that grows exceedingly as web application. That is, AJAX is now part of the guiding principle as web 2.0 flourishes and become a practical reality. With the power of AJAX, many of the business and marketing web site are integrated with AJAX application server platform now. Most of the major products of Google such as Gmail, Google Maps, and Google Suggest are employing AJAX application. Other web services like the photo-sharing application Flickr, Amazon's A9.com, and the new Yahoo! maps depends on AJAX. The application of AJAX comes from simple function to the most complex program like Google Maps.
|
* About Archives
Categories:
Last Updated: |
| regularban.info
is proudly powered by WordPress MU running
on regularban.info.
Create a new blog and join in the fun! Entries (RSS) and Comments (RSS). |