Programming
Does Real Developers Need Designers?
Whether a developer could be mutually work a desktop developer and a Web developer?
“Desktop Developers do not have designers! Inquire anybody that who designed the application and we will scrape our heads and mumble….”
It is very fascinating to imagine about the distinction between desktop and web applications and the level of design each acquires. There is some fact that Desktop applications do not need designers to the level that Web applications do. Actually, the majority of desktop applications have released without the involvement of designers.
While you sense about it, nearly all consistent desktop applications make use of standard windows colors, margins, and controls. That is the beauty with an operating system like Windows. Each and every O.S has its place. But Windows facilitate us with its style. There have built-in Ok and Cancel buttons, and they are normally positioned on the bottom of the page. If you go after the standards for design that have been developed by Microsoft and other operating systems for constructing Windows applications, you hastily understood that there is not that much scope for design. Relatively, you land at creating quite colorless, tedious applications.
Obviously, the monotonous design comes at the benefit of usability. While the application might look dull in general, it will be alike and thus well-known to people. Such resemblance formulates an application much easier to use.
Web applications are not restricted to the equivalent standards as desktop applications. While they are commonly restrained to browsers, the set of laws pertain to desktop applications are not being useful to the web. Actually, with the development of RIAs that use technologies such as AJAX, Flash, and Silver light, there is a bit of a deviation from the standards set for Windows applications.
Without having a designer, Developers have gotten away with building desktop applications. With Web applications, abruptly having a designer is much more essential. By just following the desktop design standards, would not give you a very good looking Web application. In fact, many times it is likely to be seen as gory.
While you can escape with creating desktop applications with the absence of a designer, you cannot do the same, when it comes to Web applications. That’s why, most of the developers who got away with “designing” desktop applications, really require to think twice before believing they are Web application designers.
Rss Feed ColdFusion
ColdFusion is an application server and scripting language used for Internet application development such as for dynamically-generated web sites. ColdFusion is like Microsoft Active Server Pages, Java Server Pages and PHP. Similar to other server-side scripting languages, ColdFusion permits developers to build active WebPages driven by database back-ends.
We can also create Rss feeds using ColdFusion.We can customize the code as per our wish. We can list all the titles of the postings or we can list a posting title with some content.
Here is a sample coldfusion code for listing the blog titles.
To get the rss feed xml file
Then parse the xmlfile by using the code given below.
Search for the “item” tag in the xml file.Assign it to a variable.
Then in a loop display all the titles.It will display 5 titles.To display all the titles, give #ArrayLen(items)# instead of “5”
Print all the titles in an anchor tag.
Loop ends here.
After using the above code, Output will be as given below.
What is the difference between cgi and perl?
Most of the programmers were having confusion with .cgi and .pl.
Since the file with .cgi extension is using the perl code and it is running fine.
But the file with .pl extension which contains the perl code does not run.
Here is the answer for you
File extensions are generally meaningless. Windows preserves a map between programs and the file extensions which should be accustomed to open them. Apache, a web server which performs something similar like windows. CGI is an interface approved upon by rfc 3875 which is mainly used for passing information from web requests to executables. CGI has capable of bypassing data to several types of executable which can recognize it. Your .cgi files are possibly parsed for #! line which is responsible for mapping your exact .cgi file to be executed by Perl. Briefly, file extensions are virtually meaningless.
The extension simply notifies the server about how to handle it. cgi extensions tell it to run the script with whatsoever program is programmed at the top #! line. If the server is not notified to do the same with .pl files in that case it will not know what to do with it.
If you are lying on an apache server, adding up this line to the .htaccess file will make it parse .pl files through CGI
AddHandler cgi-script .pl
How to handle errors using Boolean flags
This error handling method may be the most ancient. Boolean flags were used by many programming languages, and PHP will not be an exception. Even though they are very simple to apply, the main negative aspect is that they were not very informative about the mistake that happened and its perspective. Here is an unsophisticated implementation of the FileReader class, which make use of Boolean flags:
[php]
class FileReader{
var $file;
var $fileDir=’fileDir/’;
function FileReader($file){
if(!@file_exists("{$this->fileDir}{$file}.php")){
return false;
}
$this->file=$file;
}
function getContent(){
if(!@$content=file_get_contents("{$this->fileDir}{$this->file}.php")){
return false;
}
return $content;
}
}
[/php]
Bearing in mind about the explanation for the above example, class errors might be handled as follows:
[php]
$fr=new FileReader(‘inexistent_file’);
if(!$fr->getContent()){
die(‘Unable to read file contents’);
}
else{
echo $fr->getContent();
}
[/php]
In the example, @ error suppression operator is intentionally used, so as to stay away from the complaints of the PHP interpreter and return a false value (or 0 or -1) when a failure happens. At first look, you can observe the incompetence of this method, plus its restricted flexibility. On the other hand, this approach has established to be quite victorious in procedural applications, or when client code is able to handle straightforward errors without corrupting the entire application.
Nowadays, we have investigated the pros and cons of common error handling approaches in PHP 4. Certainly, in huge web applications, a set of error controlling classes is preferred, so you are able to handle errors through a centralized point. Conversely, the trigger_error () / set_error_handler () combination may suit the requirements of small projects, so it is worth considering.
Copy to Clipboard with Javascript on Mozilla or Netscape Browsers
Hope all may know that by using Javascript select() and execCommand(“Copy”)
function we may able to select all the contents and copy those selected contents into our clipboard.
However, this function will work only in Internet Explorer (all version) by default, but not in Mozilla or Netscape browsers. To enable these Javascript Copy to Clipboard function in the Mozilla and Netscape Browsers, please follow the steps to provided below
1) Type about:config in the browser address bar.
2) Now, in the Filter window search for the following:
signed.applets.codebase_principal_support
3) Set the Boolean value to true for Firefox or enter true or 1 for Mozilla browsers.
Keep in mind that Preference names are case-sensitive.
Once you have made this simple settings on your Mozilla or netscape browsers you may use the copy to clipboard function on your browsers.
Cannot able to close Form?
It is a fascinating bug that forces a Windows Form to go into a condition where it cannot be closed. Are you using the initial version of the .NET framework with SP1 installed?
Want to check this?
- Build a new form, F1.
- Set a user control U1 on top of it.
- Locate one more user control, U2, onto the control U1.
- To end with, put a button onto U2.
- Write down an event handle for the button click that causes the user control U2 to be detached from its parent, U1.
- Run the application.
- Click on the button.
- You should wind up with a form.
- Now make an attempt to close the form by clicking on the close button.
- It does not work. Am I right?
Reason:
The form is saying NO to close because its Close method is trying to authenticate the control first. The validation should fail because its unvalidatedControl private member still points to the button which has been detached from the hierarchy.How to overcome:
After get rid of the user control U2, call a.OnControlRemoved (c) that clear the unvalidatedControl variable.
Yahoo! India Local (beta)
Yahoo India has recently launched Yahoo! India Local (beta), a new local information destination. This new launch provides a convincing user experience with appropriate local information that blows the users daily needs. This Yahoo! India Local is presently available only across Delhi, Chennai, Mumbai and Bangalore.
Yahoo! India Local gives you relevant local information like Business listings, Maps, Directions, Local events, and Current movies. Users may also get listings from a wide range of categories such as restaurants, pubs, shopping malls, hospitals, schools, tailors, banks, health and fitness, and 24 hour pharmacies. This Yahoo! India Local is available at local.yahoo.in.
Users can write their own reviews, and also they leave footprints, mark businesses on the map, and add listings or events on Yahoo! India Local. Contributions shared by the community provide users with real insights into their experiences, thereby making them better informed. Local businesses across categories can now get listed for free on Yahoo! India Local. When users search for those categories, the businesses can get discovered.
Gopal Krishna, Head of Audience-Yahoo! India, said that: “Yahoo! India Local (Beta) exemplifies our strategy to be the leading starting point on the web, by providing the most relevant and compelling experience for local needs. He added that, “With this innovative product, we are trying to make the web more useful, engaging, and interesting and localized to our users”.
About curl
cURL is the name of the project. The name is a play on ‘Client for URLs’, originally with URL spelled in uppercase, it obvious it deals with URLs. The fact it can also be called ‘see URL’ also helped, it works as an abbreviation for “Client URL Request Library” or why not the recursive version: “Curl URL Request Library”.
The cURL project produces two products:
libcurl
A free and easy to use the Client-side URL transfer library, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE and LDAP. Libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP form based upload, proxies, cookies, user+password authentication, file transfer resume, http proxy tunneling and more!
libcurl is highly portable, it builds and works identically on numerous platforms, including DOS ,Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, AIX, HPUX, IRIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare and more.
libcurl is free, thread-safe, IPv6 compatible, feature rich, well supported and fast.
curl
curl is a command line tool for getting or sending files using URL syntax.
Since curl uses libcurl, it supports a range of common Internet protocols, currently including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, LDAP, DICT, TELNET and FILE.
We pronounce curl and cURL with an initial k sound: [kurl].
Test with the following PHP code:
[php]
$url = "http://www.searchenginegenie.com";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$returned = curl_exec($ch);
curl_close ($ch);
echo $returned;
[/php]
ASP.NET
ASP.NET is a web application framework developed by Microsoft, that programmers can use to build dynamic web sites, web applications and web services. First released in January 2002 with version 1.0 of the .NET Framework, and is the successor to ASP technology. ASP.NET is built on the Common Language Runtime, allow the programmers to write ASP.NET code using any supported .NET language.
Pages
ASP.NET pages, called as “web forms”, are the main structure block for application development. Web forms are enclosed in files with an ASPX extension, these files contain static HTML or XHTML markup, as well as markup defining server-side Web Controls and User Controls where the programmers place all the required static and dynamic content for the web page. Dynamic code which runs on the server can be located in a page within a block which is similar to other web progress technologies such as PHP, JSP, and ASP.
Code-behind model
It is suggested by Microsoft for dealing with dynamic program code to use the code-behind model, which seats this code in a separate file or in a specially designated script tag. Code-behind files typically have names MyPage.aspx.cs or MyPage.aspx.vb based on the ASPX file name. When using this style of programming, the developer write code to reply to different events, like the page being loaded, or a control being clicked.
ASP.NET’s code-behind model marks a departure from Classic ASP in that it encourage the programmers to build application with separation of presentation and content. In theory, this would allow a web designer, to focus on the design markup with less possible for disturbing the programming code that drives it.