|
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.
ABC's of Web Development
Here are the simple ABC's of web development. A. Graphics Graphics is very essential in web development because this is what visitors gauze your site if it is worthy of their time. So what really makes a graphic to be effective? First, the graphic should be small. Consider using images that are 10 to 12 KB per image because if you will use larger images, it will slow down your site. Visitors to your site will likely to leave if your site takes too long to display so it is better that you use images that are attractive and easy to load. Second, when it comes to graphics, you have to use images that have direct relation to your site. You would not display an image of Hollywood artist to promote the product you are selling, as this will cause confusion to your visitors. Lastly, blinking graphics are not ideal in web development because blinking objects are really annoying and distract readers. More often readers leave web sites with excessive flash or blinking objects most especially when these objects hinder them from reading the whole web page. B. Advertising Advertising is lifeline of web sites and you have to handle them effectively to ensure success of your site. When in comes to advertising, you have to remember two things, the number of ads and how related it is to your site. The number of ads should be just enough to give room to other contents of your site. If they are overlapping contents of your site, then maybe that is why your site lags behind in web searches. Next, you should only post ads that related to products or services offered. If they are related, your readers will likely to open the links to your ads but if they are not related the ads might not be opened. In the end ads generate income but if they are driving your visitors away, then maybe its time to remove some of your ads and just stick the ones that are related to the content of your site. C. Web Content Content is also another essential factor in success of your site. It will be better if you have articles that your visitors can read on a daily or almost weekly basis. Informative content will likely to increase your visitors as they will bookmark your site and then send your links to other friends and family members to invite them to visit your site as well. But for others to recommend your site, you really have to offer not just ads or graphics but rich and informative content. For example, you are selling a product, it will be better if the site not just offer the products but also give tips on "how to-" like how to choose, how to use and where to buy. Meanwhile, if you are maintaining a web blog, make sure that the site is readable and the topics being discussed are really interesting.
Learn How To Design and Build Websites With Dreamweaver
If you are considering building your own website and do not know anything about building or designing websites the fast way to learn is getting involved with a tutorial of some kind. Learn from somebody that already knows how things are done and just follow their examples as you start building your website. There are two way to go, you can find a e-book Dreamweaver course or a Video course where Dreamweaver is explained. Both ways will work it all up to you to find the best way that will help you get started the fastest, I have included a few mistakes that you want to avoid when building your first website with dreamweaver. 1) Splash pages Splash pages are the first pages you see when you arrive at a website, normally with a big image or something like this. These pages does not make much sense when building your site as you always have to keep in mind how does navigation works for my visitors and how does search engines like Google see my page. So if you can avoid it do not make a splash page as your index.htm page. 2) Banner advertisements If you want to make money with your website, then AdSense will make the most sense for your users, banner ads takes up a lot of space and history tells us that people do no click on them. So don't waist your space on banner ads. 3) Clear navigation Navigation on your website is very important for your customers but even more important for your search engine ranking. By making easy 1-click navigation is a must on all pages. If your customers do not know how to navigate your site people will not see what you want them to see. So forget flash and drop down menus 4) Clear indication of where the user is When visitors are deeply engrossed in browsing your site, you will want to make sure they know which part of the site they are in at that moment. That way, they will be able to browse relevant information or navigate to any section of the site easily. Don't confuse your visitors because confusion means "abandon ship"! 5) Avoid using audio on your site People will leave your site if they get loud audio from your site and they have to jump to turn down their speakers so avoid audio on your site. So use the Dreamweaver tutorial to learn website building and saves alot of money by doing it yourself. Even if you don't know HTML or anything about building your own website you can learn it really fast by using an online tutorial.
|
* 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). |