|
just another regularban.info web blog |
| MEMBERS: | Using Functions
Functions are used to perform a well defined task that is normally repeated at various places within a web site, web application, or other software application. The function sometimes needs certain information before performing its task, and sometimes returns a value to the calling page or program. An example of how to use a simple function in PHP: function showMessage() {The above example shows a very simple function that displays the contents of a session variable called 'message'. The idea being that while a user is using a web site, etc, various messages are generated and stored in the 'message' session variable. Whenever the showMessage function is called, the contents of the session variable are displayed. So, for example, when the user logs on, you could display a message saying that they have done so. Likewise, when they log off, a different message could be displayed. Calling a function To call the showMessage function, you would just need to include the line: showMessage() in the web page (wrapped in php tags to distinguish it from normall HTML). Passing values to a function Often, a function requires one or more input values in order to perform its task. For example, take the following example that takes two numbers as input, and adds them together. The result is then returned to the calling web page or program. function addNumbers($number1,$number2) {In the calling program we would have something similar to the following: $number1 = "5"; Obviously, in a real program you would not have the numbers hardcoded like this, but they would be obtained from user input or by some other means. Notice also that although the name of the returned variable is $answer, the calling program makes no reference to that. We could, if we wanted to, change the calling program to: $answer = addNumbers($number1,$number2); which might make things slightly easier to understand.
Importance of Website Development for a Company
You can definitely generate more business with a quality website. This may be the first line of communication between you and potential guests. A user friendly, well designed website is one of the greatest assets imaginable today for any business, organization or community group. The great advantage of website development for a company is that the website will be available 24 hours a day, 7 days a week and can be viewed from anywhere in the world. So anyone can collect suitable information from the website at any time. In today's business environment and to beat the competition large companies definitely need to develop a website. Many business owners use the excuse that their business is "word-of-mouth" and they do not need a website. But a great way to reinforce the personal recommendations of other clients is through professional website development. Website development helps your company to increase product knowledge, maintain communication between you and potential clients, sell your products or services, generate leads for the business, increase the popularity of your company and much more. Website development could provide all the information about their business, their products and also have provisions to sell their products online. Customers could be kept informed of up and coming promotions and product developments. In the world today, not having a website is like not being listed in the telephone book. A website provides added visibility and credibility among consumers. When searching for a web designing company you will want to make sure they are able to provide everything you need. If your website is e-commerce based, you will want to make sure your web design company offers more advanced features such as search engine optimization (SEO). If your business is still lacking a website it is not too late to get started. Building and marketing a website can be done at a very affordable rate. Invest in your business today.
Lex Parsimoniae
Lex Parsimoniae is Latin for "Law of Parsimony", which pulled out into its simplest form is the The Law of what can be spared, should. This is a theory that I have been studying for the past year and through observation believe that this can be applied to all situations that require a more efficient, functional solution. This paradigm has many names, but is best know as Occam's Razor. His razor suggests that when resources are limited or when speed of function is essential, design / complexity trade-offs should be based on what does the least harm to the probability of success, however that is defined. Form is Function There is a school of thought that beauty in design results in good function, but I prefer to subscribe the fact that just concentration on the functionality will by its very nature, create its own aura of design. Sometimes, the focus on functional efficiency inspires a feeling that goes beyond aesthetics and ultimately give us the sense that its form is of a higher echelon. Barrier To Entry The brain is an amazing piece of kit. One of its most amazing functions is its ability to optimise when processing data. Each brain has been trained over many years (or maybe it inherently has the ability) to simplify individual objects into groups. Instead of seeing each individual blade of grass, the mind sees a field. Millions of pieces of data grouped into one object because it knows, to comprehend millions of pieces of grass would take and enormous amount of effect. Effect that could be focused elsewhere. So it generalises to make life easier. This sort of information overload can happen in design as well; Too much will distract from your likely objective. Remember that 7 Second Rule? If your web app or website has 7 seconds to impress then wouldn't you prefer showing off your functional muscles? How useful your app is? and not long it takes to load the really cool (bandwidth crunching) design? Remember how it easy it is to make your mind up about someone when you them for the first time. Same rules apply. Just Do It! What are your objectives and goals? Hopefully, when developing a web app or website, to make your (or your users) life easier! And let's remember, this 'thing' we call the Internet is broken. So don't break any further with dodgy CSS and bloated javascript. Functional Turn Around is the most impressive aspect for me these days. Spend time developing how the app works, refine it, refine it again, then again. Then when it works, design around the edges. If you like Latin phrase then try this one: "entia non sunt multiplicanda praeter necessitatem", or "entities should not be multiplied beyond necessity"or just remember, K.I.S.S - Keep it Simple, Stupid! For more information about Occam's Razor and various other development theories, read this Design and Development Blog at www.gammatan.co.uk
|
* 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). |