Hello Friends Check out this site about Mercedes Benz.. The power of Adobe Flash at its zenith..
An awesome work by the people who designed this link.. Do take a look at it and try all the links from "A" to "S"..and of course – needless to mention about the features of “Mercedes Benz”
Listen with ur speakers ON
Check this out A-to-s.co.uk
I really enjoyed this website functionality which is completely developed in Adobe Flash.
|
---|
|
---|
Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts
How to Send Emails with the Zend Framework
Introduction
Many PHP applications require the ability to send emails nowadays from simple plain-text emails confirming a registration to advanced HTML newsletters.
PHP allows us to send emails using the mail() function but this can quickly get complex when you begin to add HTML, attachments and different character encoding.
Luckily for us developers, the Zend_Mail component from the Zend Framework greatly simplifies the process by providing easy-to-use methods for creating and sending emails.
This article will walk you through creating and sending plain-text and HTML emails, adding attachments, multiple recipients and much more.
Requirements
To use the Zend_Mail component you will first need to download the Zend Framework.
Visit the Zend Framework download page and download the newest version of the Zend Framework (1.5RC1 at the time of writing).
Once downloaded, unzip the Zend Framework archive to your Desktop or Home folder. The folder we are interested in is the library folder. Copy the library folder and its contents to your web folder so that your PHP scripts can access it.
Sending Plain Text Emails
Sending plain text emails with the Zend Framework couldn't be easier. All you need it a sender, a recipient, a subject, and the email body itself.
Lets get started with our PHP script by setting up our include path to help our script find the Zend_Mail component:
This has told PHP that our Zend Framework classes are in the library folder in the current folder.
The next step is to include the Zend_Mail class:
The Zend_Mail class has now been included into your script and is available for use.
Now we need to write the email that we wish to send. The example email below is a typical email that may be sent from any Helpdesk application to the user when they create a new Helpdesk ticket.
This email could have been created from a template stored in a file or database and you could also process it to include the recipients name, change the reference number and so on.
Now that we have our email body ready we need to create the email itself complete with subject and recipients.
We start by creating a mail object from the Zend_Mail class:
Now we have our mail object we can use it to add the sender, recipients, subject and body to our email:
This PHP code should be fairly self-explanatory. First we use the setFrom()method to set the sender of the email. setFrom() takes two arguments, the email address and a descriptive name. The email address is required where as the descriptive name is optional so you can leave that our if you wish.
Next we use the addTo() method to add a recipient to our email. Like setFrom(), this takes two arguments, the email address and a descriptive name for the recipient. Again, only the email address argument is required here.
Now we set our email subject using the setSubject() method, and finally we set our plain-text email body using the setBodyText() method.
Now that our email is ready to go all we need to do is send it. As you might expect, the Zend_Mail class makes this simple by providing the send() method:
And that's all there is to it! You should now see an email appear in your inbox that looks something like the following:
Screenshot: Plain-Text Email Example
Below is the full code for sending plain-text emails with Zend_Mail:
Sending HTML Emails
Sending HTML emails with the built-in PHP mail() function used to be a chore. You would have to set the MIME-Version header, the Content-type header, and more.
The Zend_Mail component makes sending HTML emails as simple as sending plain-text emails. In fact, it's so simple, we only need to change two items from our previous example.
The first thing we need to change is the email body text. We are going to change it to the following to include some HTML:
As you can see we have included various HTML tags in the email so we can see our HTML email in action.
The next change we need to make to our previous code is to use the setBodyHtml method instead of the setBodyText() method:
And that's all there is too it.
If you make these two changes to our original code and run it you will receive a HTML email that looks something like the following:
Screenshot: HTML Email Example
Below is the full code for our HTML email example:
Adding Attachments
You will often find that you need to add one of more attachments to your emails. As you might expect, Zend_Mail makes this process simple.
First we need to setup our include path and include the Zend_Mail class as we did in the previous examples:
The next step is to create the body of our email then add the sender, recipients, subject and body. For more details please see the plain-text email example above:
Now that we have our email ready to go we need to add the attachment. In this example we are going to add a zip file called test_file.zip so the first step is to get the contents of this file and store it in a variable:
Now that $fileContents contains the contents of our zip file we use the createAttachment method to add it to our email:
And finally, we need to give our new attachment a filename:
Now we have our email with attachments ready we need to send it:
Check your inbox and you should find an email that looks something like:
Screenshot: Email with Attachment Example
You can use the createAttachment() method multiple times if you wish to add multiple attachments to an email.
Below is the full code to add attachments to your emails:
Adding Multiple Recipients
Zend_Mail provides full support for adding CC and BCC recipients to your emails allowing you to send the mail to many people at once.
To add CC recipients to your email, you need to use the addCc() method:
In this example, we have added two additional recipients. As you can see, addCc() takes the same arguments as the addTo() method, a recipients email address and a descriptive name for the recipient. The descriptive name is an optional argument so you can leave that out if you wish.
To add BCC recipients we use the addBcc() method:
This should be fairly straight-forward by now as it uses the same syntax as addTo() and addCc(), a required email address and an optional descriptive name.
Now use the send() method and you will receive an email that looks something like:
Screenshot: Multiple Recipients Email Example
Below is a full example of using Zend_Mail to send the same email to multiple recipients:
Adding Extra Headers
Occasionally you may find the you need to add extra email headers to your emails. Zend_Mail provides the addHeader() method for this purpose:
If you then sent an email with this additional header then viewed the original / source of the email that you received you would see something like:
Screenshot: Mail with Extra Headers
Below is an example script that sends an email with an additional header:
Conclusion
Hopefully this tutorial has shown you just how easy it is to send emails in PHP using the Zend_Mail component and the Zend Framework. The Zend_Mail component allows you to do many other advanced features such as changing character sets and even reading emails. Take a look at some of the links below to learn more about the Zend_Mail component.
Many PHP applications require the ability to send emails nowadays from simple plain-text emails confirming a registration to advanced HTML newsletters.
PHP allows us to send emails using the mail() function but this can quickly get complex when you begin to add HTML, attachments and different character encoding.
Luckily for us developers, the Zend_Mail component from the Zend Framework greatly simplifies the process by providing easy-to-use methods for creating and sending emails.
This article will walk you through creating and sending plain-text and HTML emails, adding attachments, multiple recipients and much more.
Requirements
To use the Zend_Mail component you will first need to download the Zend Framework.
Visit the Zend Framework download page and download the newest version of the Zend Framework (1.5RC1 at the time of writing).
Once downloaded, unzip the Zend Framework archive to your Desktop or Home folder. The folder we are interested in is the library folder. Copy the library folder and its contents to your web folder so that your PHP scripts can access it.
Sending Plain Text Emails
Sending plain text emails with the Zend Framework couldn't be easier. All you need it a sender, a recipient, a subject, and the email body itself.
Lets get started with our PHP script by setting up our include path to help our script find the Zend_Mail component:
PHP Code:
set_include_path('.'
. PATH_SEPARATOR . './library'
. PATH_SEPARATOR . get_include_path()
);
The next step is to include the Zend_Mail class:
PHP Code:
include_once 'Zend/Mail.php';
Now we need to write the email that we wish to send. The example email below is a typical email that may be sent from any Helpdesk application to the user when they create a new Helpdesk ticket.
PHP Code:
$body = 'Hi,
Thank you for submitting a ticket to our Helpdesk.
Your ticket reference number is 12345 and it will be investigated shortly.
Kind regards,
My Site Helpdesk';
Now that we have our email body ready we need to create the email itself complete with subject and recipients.
We start by creating a mail object from the Zend_Mail class:
PHP Code:
$mail = new Zend_Mail();
PHP Code:
$mail->setFrom('support@example.com', 'My Site Helpdesk'); $mail->addTo('awagstaff@gmail.com', 'Alan Wagstaff'); $mail->setSubject('Your helpdesk ticket #12345'); $mail->setBodyText($body);
Next we use the addTo() method to add a recipient to our email. Like setFrom(), this takes two arguments, the email address and a descriptive name for the recipient. Again, only the email address argument is required here.
Now we set our email subject using the setSubject() method, and finally we set our plain-text email body using the setBodyText() method.
Now that our email is ready to go all we need to do is send it. As you might expect, the Zend_Mail class makes this simple by providing the send() method:
PHP Code:
$mail->send();
Screenshot: Plain-Text Email Example
Below is the full code for sending plain-text emails with Zend_Mail:
PHP Code:
set_include_path('.'
. PATH_SEPARATOR . './library'
. PATH_SEPARATOR . get_include_path()
);
include_once 'Zend/Mail.php';
$body = 'Hi,
Thank you for submitting a ticket to our Helpdesk.
Your ticket reference number is 12345 and it will be investigated shortly.
Kind regards,
My Site Helpdesk';
$mail = new Zend_Mail(); $mail->setFrom('support@example.com', 'My Site Helpdesk'); $mail->addTo('awagstaff@gmail.com', 'Alan Wagstaff'); $mail->setSubject('Your helpdesk ticket #12345'); $mail->setBodyText($body);
$mail->send();
Sending HTML emails with the built-in PHP mail() function used to be a chore. You would have to set the MIME-Version header, the Content-type header, and more.
The Zend_Mail component makes sending HTML emails as simple as sending plain-text emails. In fact, it's so simple, we only need to change two items from our previous example.
The first thing we need to change is the email body text. We are going to change it to the following to include some HTML:
PHP Code:
$body = 'Hi!
Thank you for submitting a ticket to our Helpdesk.
Your ticket reference number is 12345 and it will be investigated shortly.
Kind regards,
My Site Helpdesk
';
The next change we need to make to our previous code is to use the setBodyHtml method instead of the setBodyText() method:
PHP Code:
$mail->setBodyHtml($body);
If you make these two changes to our original code and run it you will receive a HTML email that looks something like the following:
Screenshot: HTML Email Example
Below is the full code for our HTML email example:
PHP Code:
set_include_path('.'
. PATH_SEPARATOR . './library'
. PATH_SEPARATOR . get_include_path()
);
include_once 'Zend/Mail.php';
$body = 'Hi!
Thank you for submitting a ticket to our Helpdesk.
Your ticket reference number is 12345 and it will be investigated shortly.
Kind regards,
My Site Helpdesk
';
$mail = new Zend_Mail(); $mail->setFrom('support@example.com', 'My Site Helpdesk'); $mail->addTo('awagstaff@gmail.com', 'Alan Wagstaff'); $mail->setSubject('Your helpdesk ticket #54321'); $mail->setBodyHtml($body);
$mail->send();
Adding Attachments
You will often find that you need to add one of more attachments to your emails. As you might expect, Zend_Mail makes this process simple.
First we need to setup our include path and include the Zend_Mail class as we did in the previous examples:
PHP Code:
set_include_path('.'
. PATH_SEPARATOR . './library'
. PATH_SEPARATOR . get_include_path()
);
include_once 'Zend/Mail.php';
PHP Code:
$body = 'Please find the zip file attached';
$mail = new Zend_Mail(); $mail->setFrom('support@example.com', 'My Site Helpdesk'); $mail->addTo('awagstaff@gmail.com', 'Alan Wagstaff'); $mail->setSubject('File attachment Test'); $mail->setBodyText($body);
PHP Code:
$fileContents = file_get_contents('test_file.zip');
PHP Code:
$attachment = $mail->createAttachment($fileContents);
PHP Code:
$attachment->filename = 'test_file.zip';
PHP Code:
$mail->send();
Screenshot: Email with Attachment Example
You can use the createAttachment() method multiple times if you wish to add multiple attachments to an email.
Below is the full code to add attachments to your emails:
PHP Code:
set_include_path('.'
. PATH_SEPARATOR . './library'
. PATH_SEPARATOR . get_include_path()
);
include_once 'Zend/Mail.php';
$body = 'Please find the zip file attached';
$mail = new Zend_Mail(); $mail->setFrom('support@example.com', 'My Site Helpdesk'); $mail->addTo('awagstaff@gmail.com', 'Alan Wagstaff'); $mail->setSubject('File attachment Test'); $mail->setBodyText($body);
$fileContents = file_get_contents('test_file.zip'); $attachment = $mail->createAttachment($fileContents); $attachment->filename = 'test_file.zip';
$mail->send();
Adding Multiple Recipients
Zend_Mail provides full support for adding CC and BCC recipients to your emails allowing you to send the mail to many people at once.
To add CC recipients to your email, you need to use the addCc() method:
PHP Code:
$mail->addCc('someone@example.com', 'Someone Else'); $mail->addCc('another@example.com', 'Another Recipient');
To add BCC recipients we use the addBcc() method:
PHP Code:
$mail->addBcc('topsecret@example.com', 'Top Secret Recipient');
Now use the send() method and you will receive an email that looks something like:
Screenshot: Multiple Recipients Email Example
Below is a full example of using Zend_Mail to send the same email to multiple recipients:
PHP Code:
set_include_path('.'
. PATH_SEPARATOR . './library'
. PATH_SEPARATOR . get_include_path()
);
include_once 'Zend/Mail.php';
$body = 'Hi all,
Don\'t forget that basketball training has been moved
from Tuesday to Wednesday.
See you all then!
Alan';
$mail = new Zend_Mail(); $mail->setFrom('alan@citconsultants.co.uk', 'Alan @ CIT'); $mail->addTo('awagstaff@gmail.com', 'Alan Wagstaff'); $mail->addCc('someone@example.com', 'Someone Else'); $mail->addCc('another@example.com', 'Another Recipient'); $mail->addBcc('topsecret@example.com', 'Top Secret Recipient'); $mail->setSubject('Basketball practice this week'); $mail->setBodyText($body);
$mail->send();
Adding Extra Headers
Occasionally you may find the you need to add extra email headers to your emails. Zend_Mail provides the addHeader() method for this purpose:
PHP Code:
$mail->addHeader('X-MailGenerator', 'MyPHPApplication v1.0');
Screenshot: Mail with Extra Headers
Below is an example script that sends an email with an additional header:
PHP Code:
set_include_path('.'
. PATH_SEPARATOR . './library'
. PATH_SEPARATOR . get_include_path()
);
include_once 'Zend/Mail.php';
$body = 'Look at this cool email sent from MyPHPApplication v1.0!';
$mail = new Zend_Mail(); $mail->setFrom('support@example.com', 'My Site Helpdesk'); $mail->addTo('awagstaff@gmail.com', 'Alan Wagstaff'); $mail->setSubject('Read me!'); $mail->setBodyText($body); $mail->addHeader('X-MailGenerator', 'MyPHPApplication v1.0');
$mail->send();
Conclusion
Hopefully this tutorial has shown you just how easy it is to send emails in PHP using the Zend_Mail component and the Zend Framework. The Zend_Mail component allows you to do many other advanced features such as changing character sets and even reading emails. Take a look at some of the links below to learn more about the Zend_Mail component.
101 Great Computer Programming Quotes
“People always fear change. People feared electricity when it was invented, didn’t they? People feared coal, they feared gas-powered engines. There will always be ignorance, and ignorance leads to fear. But with time, people will come to accept their silicon masters.”
As Bill Gates once warned, computers have indeed become our silicon masters, pervading nearly every aspect of our modern lives. As a result, some of the greatest minds of our time have pondered the significance of computers and software on the human condition. Following are 101 great quotes about computers, with an emphasis on programming, since after all this is a software development site.
Computers
Computer Intelligence
Trust
Hardware
Software
Operating Systems
Internet
Software Industry
Software Demos
Software Patents
Complexity
Ease of Use
Users
Programmers
Programming Languages
C/C++
Java
Open Source
Code
Software Development
Debugging
Quality
Predictions
As Bill Gates once warned, computers have indeed become our silicon masters, pervading nearly every aspect of our modern lives. As a result, some of the greatest minds of our time have pondered the significance of computers and software on the human condition. Following are 101 great quotes about computers, with an emphasis on programming, since after all this is a software development site.
Computers
- “Computers are useless. They can only give you answers.”
(Pablo Picasso)
- “Computers are like bikinis. They save people a lot of guesswork.”
(Sam Ewing)
- “They have computers, and they may have other weapons of mass destruction.”
(Janet Reno)
- “That’s what’s cool about working with computers. They don’t argue, they remember everything, and they don’t drink all your beer.”
(Paul Leary)
- “If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside.”
(Robert X. Cringely)
Computer Intelligence
- “Computers are getting smarter all the time. Scientists tell us that soon they will be able to talk to us. (And by ‘they’, I mean ‘computers’. I doubt scientists will ever be able to talk to us.)”
(Dave Barry)
- “I’ve noticed lately that the paranoid fear of computers becoming intelligent and taking over the world has almost entirely disappeared from the common culture. Near as I can tell, this coincides with the release of MS-DOS.”
(Larry DeLuca)
- “The question of whether computers can think is like the question of whether submarines can swim.”
(Edsger W. Dijkstra)
- “It’s ridiculous to live 100 years and only be able to remember 30 million bytes. You know, less than a compact disc. The human condition is really becoming more obsolete every minute.”
(Marvin Minsky)
Trust
- “The city’s central computer told you? R2D2, you know better than to trust a strange computer!”
(C3PO)
- “Never trust a computer you can’t throw out a window.”
(Steve Wozniak)
Hardware
- “Hardware: The parts of a computer system that can be kicked.”
(Jeff Pesis)
Software
- “Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves.”
(Alan Kay)
- “I’ve finally learned what ‘upward compatible’ means. It means we get to keep all our old mistakes.”
(Dennie van Tassel)
Operating Systems
- “There are two major products that come out of Berkeley: LSD and UNIX. We don’t believe this to be a coincidence.”
(Jeremy S. Anderson)
- “19 Jan 2038 at 3:14:07 AM”
(End of the word according to Unix–2^32 seconds after January 1, 1970)
- “Every operating system out there is about equal… We all suck.”
(Microsoft senior vice president Brian Valentine describing the state of the art in OS security, 2003)
- “Microsoft has a new version out, Windows XP, which according to everybody is the ‘most reliable Windows ever.‘ To me, this is like saying that asparagus is ‘the most articulate vegetable ever.‘ “
(Dave Barry)
Internet
- “The Internet? Is that thing still around?”
(Homer Simpson)
- “The Web is like a dominatrix. Everywhere I turn, I see little buttons ordering me to Submit.”
(Nytwind)
- “Come to think of it, there are already a million monkeys on a million typewriters, and Usenet is nothing like Shakespeare.”
(Blair Houghton)
Software Industry
- “The most amazing achievement of the computer software industry is its continuing cancellation of the steady and staggering gains made by the computer hardware industry.”
(Henry Petroski)
- “True innovation often comes from the small startup who is lean enough to launch a market but lacks the heft to own it.”
(Timm Martin)
- “It has been said that the great scientific disciplines are examples of giants standing on the shoulders of other giants. It has also been said that the software industry is an example of midgets standing on the toes of other midgets.”
(Alan Cooper)
- “It is not about bits, bytes and protocols, but profits, losses and margins.”
(Lou Gerstner)
- “We are Microsoft. Resistance Is Futile. You Will Be Assimilated.”
(Bumper sticker)
Software Demos
- “No matter how slick the demo is in rehearsal, when you do it in front of a live audience, the probability of a flawless presentation is inversely proportional to the number of people watching, raised to the power of the amount of money involved.”
(Mark Gibbs)
Software Patents
- “The bulk of all patents are crap. Spending time reading them is stupid. It’s up to the patent owner to do so, and to enforce them.”
(Linus Torvalds)
Complexity
- “Controlling complexity is the essence of computer programming.”
(Brian Kernigan)
- “Complexity kills. It sucks the life out of developers, it makes products difficult to plan, build and test, it introduces security challenges, and it causes end-user and administrator frustration.”
(Ray Ozzie)
- “There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.”
(C.A.R. Hoare)
- “The function of good software is to make the complex appear to be simple.”
(Grady Booch)
Ease of Use
- “Just remember: you’re not a ‘dummy,’ no matter what those computer books claim. The real dummies are the people who–though technically expert–couldn’t design hardware and software that’s usable by normal consumers if their lives depended upon it.”
(Walter Mossberg)
- “Software suppliers are trying to make their software packages more ‘user-friendly’… Their best approach so far has been to take all the old brochures and stamp the words ‘user-friendly’ on the cover.”
(Bill Gates)
- “There’s an old story about the person who wished his computer were as easy to use as his telephone. That wish has come true, since I no longer know how to use my telephone.”
(Bjarne Stroustrup)
Users
- “Any fool can use a computer. Many do.”
(Ted Nelson)
- “There are only two industries that refer to their customers as ‘users’.”
(Edward Tufte)
Programmers
- “Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.”
(Rich Cook)
- “Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris.”
(Larry Wall)
- “The trouble with programmers is that you can never tell what a programmer is doing until it’s too late.”
(Seymour Cray)
- “That’s the thing about people who think they hate computers. What they really hate is lousy programmers.”
(Larry Niven)
- “For a long time it puzzled me how something so expensive, so leading edge, could be so useless. And then it occurred to me that a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match.”
(Bill Bryson)
- “Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter.”
(Eric Raymond)
- “A programmer is a person who passes as an exacting expert on the basis of being able to turn out, after innumerable punching, an infinite series of incomprehensive answers calculated with micrometric precisions from vague assumptions based on debatable figures taken from inconclusive documents and carried out on instruments of problematical accuracy by persons of dubious reliability and questionable mentality for the avowed purpose of annoying and confounding a hopelessly defenseless department that was unfortunate enough to ask for the information in the first place.”
(IEEE Grid newsmagazine)
- “A hacker on a roll may be able to produce–in a period of a few months–something that a small development group (say, 7-8 people) would have a hard time getting together over a year. IBM used to report that certain programmers might be as much as 100 times as productive as other workers, or more.”
(Peter Seebach)
- “The best programmers are not marginally better than merely good ones. They are an order-of-magnitude better, measured by whatever standard: conceptual creativity, speed, ingenuity of design, or problem-solving ability.”
(Randall E. Stross)
- “A great lathe operator commands several times the wage of an average lathe operator, but a great writer of software code is worth 10,000 times the price of an average software writer.”
(Bill Gates)
Programming
- “Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.”
(Mosher’s Law of Software Engineering)
- “Measuring programming progress by lines of code is like measuring aircraft building progress by weight.”
(Bill Gates)
- “Writing code has a place in the human hierarchy worth somewhere above grave robbing and beneath managing.”
(Gerald Weinberg)
- “First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack.”
(George Carrette)
- “First, solve the problem. Then, write the code.”
(John Johnson)
- “Optimism is an occupational hazard of programming; feedback is the treatment.”
(Kent Beck)
- “To iterate is human, to recurse divine.”
(L. Peter Deutsch)
- “The best thing about a boolean is even if you are wrong, you are only off by a bit.”
(Anonymous)
- “Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration.”
(Stan Kelly-Bootle)
Programming Languages
- “There are only two kinds of programming languages: those people always bitch about and those nobody uses.”
(Bjarne Stroustrup)
- “PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil perpetrated by skilled but perverted professionals.”
(Jon Ribbens)
- “The use of COBOL cripples the mind; its teaching should therefore be regarded as a criminal offense.”
(E.W. Dijkstra)
- “It is practically impossible to teach good programming style to students that have had prior exposure to BASIC. As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)
- “I think Microsoft named .Net so it wouldn’t show up in a Unix directory listing.”
(Oktal)
- “There is no programming language–no matter how structured–that will prevent programmers from making bad programs.”
(Larry Flon)
- “Computer language design is just like a stroll in the park. Jurassic Park, that is.”
(Larry Wall)
C/C++
- “Fifty years of programming language research, and we end up with C++?”
(Richard A. O’Keefe)
- “Writing in C or C++ is like running a chain saw with all the safety guards removed.”
(Bob Gray)
- “In C++ it’s harder to shoot yourself in the foot, but when you do, you blow off your whole leg.”
(Bjarne Stroustrup)
- “C++ : Where friends have access to your private members.”
(Gavin Russell Baker)
- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.”
(Robert Firth)
Java
- “Java is, in many ways, C++–.”
(Michael Feldman)
- “Saying that Java is nice because it works on all OSes is like saying that anal sex is nice because it works on all genders.”
(Alanna)
- “Fine, Java MIGHT be a good example of what a programming language should be like. But Java applications are good examples of what applications SHOULDN’T be like.”
(pixadel)
- “If Java had true garbage collection, most programs would delete themselves upon execution.”
(Robert Sewell)
Open Source
- “Software is like sex: It’s better when it’s free.”
(Linus Torvalds)
- “The only people who have anything to fear from free software are those whose products are worth even less.”
(David Emery)
Code
- “Good code is its own best documentation.”
(Steve McConnell)
- “Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
(Eagleson’s Law)
- “The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.”
(Tom Cargill)
Software Development
- “Good programmers use their brains, but good guidelines save us having to think out every case.”
(Francis Glassborow)
- “In software, we rarely have meaningful requirements. Even if we do, the only measure of success that matters is whether our solution solves the customer’s shifting idea of what their problem is.”
(Jeff Atwood)
- “Considering the current sad state of our computer programs, software development is clearly still a black art, and cannot yet be called an engineering discipline.”
(Bill Clinton)
- “You can’t have great software without a great team, and most software teams behave like dysfunctional families.”
(Jim McCarthy)
Debugging
- “As soon as we started programming, we found to our surprise that it wasn’t as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.”
(Maurice Wilkes discovers debugging, 1949)
- “Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are–by definition–not smart enough to debug it.”
(Brian Kernighan)
- “If debugging is the process of removing bugs, then programming must be the process of putting them in.”
(Edsger W. Dijkstra)
Quality
- “I don’t care if it works on your machine! We are not shipping your machine!”
(Vidiu Platon)
- “Programming is like sex: one mistake and you’re providing support for a lifetime.”
(Michael Sinz)
- “There are two ways to write error-free programs; only the third one works.”
(Alan J. Perlis)
- “You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time.”
(Bertrand Meyer)
- “If McDonalds were run like a software company, one out of every hundred Big Macs would give you food poisoning, and the response would be, ‘We’re sorry, here’s a coupon for two more.’ “
(Mark Minasi)
- “Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.”
(Martin Golding)
- “To err is human, but to really foul things up you need a computer.”
(Paul Ehrlich)
- “A computer lets you make more mistakes faster than any invention in human history–with the possible exceptions of handguns and tequila.”
(Mitch Radcliffe)
Predictions
- “Everything that can be invented has been invented.”
(Charles H. Duell, Commissioner, U.S. Office of Patents, 1899)
- “I think there’s a world market for about 5 computers.”
(Thomas J. Watson, Chairman of the Board, IBM, circa 1948)
- “It would appear that we have reached the limits of what it is possible to achieve with computer technology, although one should be careful with such statements, as they tend to sound pretty silly in 5 years.”
(John Von Neumann, circa 1949)
- “But what is it good for?”
(Engineer at the Advanced Computing Systems Division of IBM, commenting on the microchip, 1968)
- “There is no reason for any individual to have a computer in his home.”
(Ken Olson, President, Digital Equipment Corporation, 1977)
- “640K ought to be enough for anybody.”
(Bill Gates, 1981)
- “Windows NT addresses 2 Gigabytes of RAM, which is more than any application will ever need.”
(Microsoft, on the development of Windows NT, 1992)
- “We will never become a truly paper-less society until the Palm Pilot folks come out with WipeMe 1.0.”
(Andy Pierson)
- “If it keeps up, man will atrophy all his limbs but the push-button finger.”
(Frank Lloyd Wright)
What is Microsoft .NET?
I was having lunch recently with a colleague when he asked, “Are you still messing around with that .NET stuff?” I could tell by the tone of his voice that he—like many computer users—still viewed .NET with suspicion.
And perhaps with good reason. Purposefully kept separate from the Windows operating system, the 22MB Microsoft .NET Framework is an hour download on dialup and four minutes on broadband. For .NET developers, this extra step adds one more hurdle for a potential customer to overcome when purchasing our software.
So in this article I attempt to demystify .NET, encourage you to download the latest version of the .NET Framework so you can run the latest and greatest .NET software, and help convince Microsoft that it needs to ensure every PC user has the newest .NET.
This is how Microsoft describes it: “.NET is the Microsoft Web services strategy to connect information, people, systems, and devices through software. Integrated across the Microsoft platform, .NET technology provides the ability to quickly build, deploy, manage, and use connected, security-enhanced solutions with Web services. .NET-connected solutions enable businesses to integrate their systems more rapidly and in a more agile manner and help them realize the promise of information anytime, anywhere, on any device.” See Microsoft for more information.
.NET includes new object-oriented programming languages such as C#, Visual Basic .NET, J# (a Java clone) and Managed C++. These languages, plus other experimental languages like F#, all compile to the Common Language Specification and can work together in the same application.
In addition, there are many .NET Framework tools designed to help developers create, configure, deploy, manage and secure .NET applications and components.
Microsoft started building .NET in the late 90s under the name “Next Generation Windows Services” (NGWS). Bill Gates described .NET as Microsoft’s answer to the “Phase 3 Internet environment, where the Internet becomes a platform in its own right, much like the PC has traditionally been… Instead of a world where Internet users are limited to reading information, largely one screen at a time, the Phase 3 Internet will unite multiple Web sites running on any device, and allow users to read, write and annotate them via speech, handwriting recognition and the like,” Gates said. We are certainly approaching that vision.
Microsoft announced .NET to the world in June 2000 and released version 1.0 of the .NET framework in January 2002. Microsoft also labeled everything .NET including briefly Office to demonstrate its commitment and dominance on this new thing called the Web. But out of that grand FUD campaign emerged the very capable and useful .NET development environment and framework for both the Web and Windows desktop.
For developers, .NET provides an integrated set of tools for building Web software and services and Windows desktop applications. .NET supports multiple programming languages and Service Oriented Architectures (SOA).
For companies, .NET provides a stable, scalable and secure environment for software development. .NET can lower costs by speeding development and connecting systems, increase sales by giving employees access to the tools and information they need, and connect your business to customers, suppliers and partners.
For end-users, .NET results in software that’s more reliable and secure and works on multiple devices including laptops, Smartphones and Pocket PCs.
Although .NET v3.0 is now available, Windows Update is not automatically installing it, hence few people have it. People who purchase new PCs with Windows Vista pre-installed will receive the latest .NET v3.0 but there may be some versioning issues. Microsoft released a beta version of .NET v3.5 in April 2007.
Following are the production versions of .NET:
And perhaps with good reason. Purposefully kept separate from the Windows operating system, the 22MB Microsoft .NET Framework is an hour download on dialup and four minutes on broadband. For .NET developers, this extra step adds one more hurdle for a potential customer to overcome when purchasing our software.
So in this article I attempt to demystify .NET, encourage you to download the latest version of the .NET Framework so you can run the latest and greatest .NET software, and help convince Microsoft that it needs to ensure every PC user has the newest .NET.
What is Microsoft .NET?
Microsoft .NET is simply something you need on your Windows PC to run our software.OK, really, what is .NET?
Microsoft .NET (pronounced “dot net”) is a software component that runs on the Windows operating system. .NET provides tools and libraries that enable developers to create Windows software much faster and easier. .NET benefits end-users by providing applications of higher capability, quality and security. The .NET Framework must be installed on a user’s PC to run .NET applications.This is how Microsoft describes it: “.NET is the Microsoft Web services strategy to connect information, people, systems, and devices through software. Integrated across the Microsoft platform, .NET technology provides the ability to quickly build, deploy, manage, and use connected, security-enhanced solutions with Web services. .NET-connected solutions enable businesses to integrate their systems more rapidly and in a more agile manner and help them realize the promise of information anytime, anywhere, on any device.” See Microsoft for more information.
What is the .NET architecture?
Microsoft .NET consists of four major components:- Common Language Specification (CLS) – blue in the diagram below
- Framework Class Library (FCL) – red
- Common Language Runtime (CLR) – green
- .NET Tools – yellow
At the base of the diagram in gray is the operating system, which technically can be any platform but typically is Microsoft Windows 2000 or greater, accessed through the Win32 API (Application Programming Interface).
Common Language Specification (CLS)
The CLS is a common platform that integrates code and components from multiple .NET programming languages. In other words, a .NET application can be written in multiple programming languages with no extra work by the developer (though converting code between languages can be tricky)..NET includes new object-oriented programming languages such as C#, Visual Basic .NET, J# (a Java clone) and Managed C++. These languages, plus other experimental languages like F#, all compile to the Common Language Specification and can work together in the same application.
Framework Class Library (FCL)
The FCL is a collection of over 7000 classes and data types that enable .NET applications to read and write files, access databases, process XML, display a graphical user interface, draw graphics, use Web services, etc. The FCL wraps much of the massive, complex Win32 API into more simple .NET objects that can be used by C# and other .NET programming languages.Common Language Runtime (CLR)
The CLR is the execution engine for .NET applications and serves as the interface between .NET applications and the operating system. The CLR provides many services such as:- Loads and executes code
- Converts intermediate language to native machine code
- Separates processes and memory
- Manages memory and objects
- Enforces code and access security
- Handles exceptions
- Interfaces between managed code, COM objects, and DLLs
- Provides type-checking
- Provides code meta data (Reflection)
- Provides profiling, debugging, etc.
.NET Tools
Visual Studio .NET is Microsoft’s flagship tool for developing Windows software. Visual Studio provides an integrated development environment (IDE) for developers to create standalone Windows applications, interactive Web sites, Web applications, and Web services running on any platform that supports .NET.In addition, there are many .NET Framework tools designed to help developers create, configure, deploy, manage and secure .NET applications and components.
What is the history of .NET?
.NET started as a classic Microsoft FUD operation. In the late 1990s, Microsoft had just successfully fought off a frontal assault on its market dominance by killing the Netscape Web browser with its free Internet Explorer. But Microsoft was facing a host of new challenges, including serious problems with COM, C++, DLL hell, the Web as a platform, security, and strong competition from Java, which was emerging as the go-to language for Web development.Microsoft started building .NET in the late 90s under the name “Next Generation Windows Services” (NGWS). Bill Gates described .NET as Microsoft’s answer to the “Phase 3 Internet environment, where the Internet becomes a platform in its own right, much like the PC has traditionally been… Instead of a world where Internet users are limited to reading information, largely one screen at a time, the Phase 3 Internet will unite multiple Web sites running on any device, and allow users to read, write and annotate them via speech, handwriting recognition and the like,” Gates said. We are certainly approaching that vision.
Microsoft announced .NET to the world in June 2000 and released version 1.0 of the .NET framework in January 2002. Microsoft also labeled everything .NET including briefly Office to demonstrate its commitment and dominance on this new thing called the Web. But out of that grand FUD campaign emerged the very capable and useful .NET development environment and framework for both the Web and Windows desktop.
What are the benefits of .NET?
.NET provides the best platform available today for delivering Windows software. .NET helps make software better, faster, cheaper, and more secure. .NET is not the only solution for developing Web software—Java on Linux is a serious alternative. But on the Windows desktop, .NET rules.For developers, .NET provides an integrated set of tools for building Web software and services and Windows desktop applications. .NET supports multiple programming languages and Service Oriented Architectures (SOA).
For companies, .NET provides a stable, scalable and secure environment for software development. .NET can lower costs by speeding development and connecting systems, increase sales by giving employees access to the tools and information they need, and connect your business to customers, suppliers and partners.
For end-users, .NET results in software that’s more reliable and secure and works on multiple devices including laptops, Smartphones and Pocket PCs.
Why are you (this blog author) developing in .NET?
The Mini-Tools developers were impressed with the Microsoft .NET technology and development platform and felt it provided the best environment with which to build and deliver innovative desktop and Web software for Windows. All of our software is written in C# for .NET on Windows.Why should I install .NET on my computer?
Because many new software applications require .NET. Having the latest version already installed on your computer enables you run new .NET applications immediately as they become available.Which versions of .NET are available?
The newest version available today is NET v3.0, but most PC users have v2.0 installed.Although .NET v3.0 is now available, Windows Update is not automatically installing it, hence few people have it. People who purchase new PCs with Windows Vista pre-installed will receive the latest .NET v3.0 but there may be some versioning issues. Microsoft released a beta version of .NET v3.5 in April 2007.
Following are the production versions of .NET:
Version Name Version Number Release Date 1.0 1.0.3705.0 2002-01-05 1.0 SP1 1.0.3705.209 2002-03-19 1.0 SP2 1.0.3705.288 2002-08-07 1.0 SP3 1.0.3705.6018 2004-08-31 1.1 1.1.4322.573 2003-04-01 1.1 SP1 1.1.4322.2032 2004-08-30 2.0 2.0.50727.42 2005-11-07 3.0 3.0.4506.30 2006-11-06
How do I know if I already have .NET?
We have queried your Web browser, and it tells us that you have the following .NET versions installed on your PC (note this only works for Internet Explorer):Another way to check if you have .NET:
- Click Start on your Windows desktop.
- Select Control Panel.
- Double-click Add or Remove Programs.
- When the Add/Remove window appears, scroll through the list of applications and try to find Microsoft .NET Framework. There you will see which versions of .NET are installed on your PC.
Where can I get .NET?
Microsoft .NET is available as a FREE download from Microsoft.Why is .NET separate from the Windows operating system?
Another way to ask this question is, "Why doesn't Microsoft ensureevery Windows PC has the latest version of .NET installed?" Since .NETis so important to Windows, and Microsoft delivers both .NET andWindows, why doesn't Microsoft simply make .NET part of Windows?Just my theory, but it probably stems from the Sun vs. Microsoft bad blood over Java.Sun and Microsoft got into a legal spat, Microsoft stopped shippingJava with Windows, and so now Java is a separate download for Windowsusers. As a result, perhaps Microsoft is wary of appearingmonopolistic, hence they maintain the .NET Framework as a separatedownload too.Why is this a problem? Because it is a large file that must bedownloaded and installed separately, naturally many people view .NETwith suspicion or at least hesitation. And this provides aninconvenience and yet another barrier for a potential customerpurchasing our .NET software. So here's my plea:Microsoft, please include the latest version of .NET as anautomatic download to every Windows PC as part of the normal WindowsUpdate process. Thank you.Will .NET cause problems on my computer?
No. Once .NET is installed, you do not have to do anything to manageit, and .NET should not adversely affect the operation of your computer.What should I do now?
Download and install the latest version of .NET! :-)10 Edit In-Place Ajax Scripts
In an Era of Ajax and an increase use of Edit in place, I decided to put together a list of edit in place scripts. I hope this list will help you in your quest to make your web application or website more user friendly. This list is in no particular order.
- tEditable – In place editing for tables using the jQuery Framework. It works by allowing you to that edit cells in a table and posted to a server using Ajax.
- Ajax.InPlaceSelect – This script allows you to change the certain text with a drop down list. It is written with the scriptaculous framework and is very similar to Ajax.In Place Editor.
- Ajax.In Place Editor – Allows you to edit text either in a single line or multi line format. It is written with the scriptaculous framework.
- Flicker-Like edit in place – This script removes the use of outdated form interfaces. It will allow you to edit the date in place in real time. It is written with no framework just Ajax. Since its name is Flicker-like you can image that it is very similar to flicker.
- Jeditable – Edit In Place Plugin For jQuery. This is different from tEditable because it works by allowing you to edit a block of text.
- inlineEdit2 – Is a lightweight, easy solution at 2KB uncompressed. It is written with mooTools. It allows you to edit the text very easily just by clicking on the text and hit enter when done. This Script doesn’t show a text box when editing.
- Seamless inline text editing -Written for ASP.Net. It works like the rest of them by clicking on the text and it will become editable.
- Yahoo UI Edit in Place – This edit in place uses the Yahoo UI Library. The effect is very similar to Flicker. But also allows you to edit lists.
- Edit in place – Is written without any framework and written by Tool-Man.org. This script allows you to edit HTML on the page. This script also allows you to sort, edit lists, and has a slide show sorter.
- EditInPlace.org – Is written with the Prototype Framework and allows you to edit text and even have an empty text field that you can edit and save. It also has edit in place drop down list.
Subscribe to:
Posts (Atom)