Tuesday, August 28, 2007

Three Tier Architecture in ASP.NET

The main characteristic of a Host Architecture is that the application and databases reside on the same host computer and the user interacts with the host using an unfriendly and dump terminal. This architecture does not support distributed computing (the host applications are not able to connect a database of a strategically allied partner). Some managers found that developing a host application take too long and it is expensive. Consequently led these disadvantages to Client-Server architecture.

Client-Server architecture is 2-Tier architecture because the client does not distinguish between Presentation layer and business layer. The increasing demands on GUI controls caused difficulty to manage the mixture of source code from GUI and Business Logic (Spaghetti Code). Further, Client Server Architecture does not support enough the Change Management. Let suppose that the government increases the Entertainment tax rate from 4% to 8 %, then in the Client-Server case, we have to send an update to each clients and they must update synchronously on a specific time otherwise we may store invalid or wrong information. The Client-Server Architecture is also a burden to network traffic and resources. Let us assume that about five hundred clients are working on a data server then we will have five hundred ODBC connections and several ruffian record sets, which must be transported from the server to the clients (because the Business layer is stayed in the client side). The fact that Client-Server does not have any caching facilities like in ASP.NET, caused additional traffic in the network. Normally, a server has a better hardware than client therefore it is able compute algorithms faster than a client, so this fact is also an additional pro argument for the 3.Tier Architecture. This categorization of the application makes the function more reusable easily and it becomes too easy to find the functions which have been written previously. If programmer wants to make further update in the application then he easily can understand the previous written code and can update easily.

Application layer or Presentation layer

Application layer is the form which provides the user interface to either programmer of end user. Programmer uses this laye

r for designing purpose and to get or set the data back and forth.

Business layer

This layer is a class which we use to write the function which works as a mediator to transfer the data from Application or presentation layer data layer. In the three tier architecture we never let the data access layer to interact with the presentation layer.

a. Property Layer

This layer is also a class where we declare the variable corresponding to the fields of the database which can be required for the application and make the properties so that we can get or set the data using these properties into t

he variables. These properties are public so that we can access its values.

Data Access Layer

This layer is also a class which we use to g

et or set the data to the database back and forth. This layer only interacts with the database. We write the database queries or use stored procedures to access the data from the database or to perform any operation to the database.


  • Application layer is the form where we design using the controls like textbox, labels, command buttons etc.

  • Business layer is the class where we write the functions which get the data from the application layer and passes through the data access layer.

  • Data layer is also the class which gets the data from the business layer and sends it to the database or gets the data from the database and sends it to the business layer.

  • Property layer is the sub layer of the business layer in which we make the properties to sent or get the values from the application layer. These properties help to sustain the value in a object so that we can get these values till the object destroy.

Data flow from application layer to data layer

You can download sample three tier project, used for this tutorial. Here we are passing the code of the student to the business layer and on the behalf of that getting the data from the database which is being displayed on the application layer.

Presentation Layer:

private void DataGrid1_SelectedIndexChanged(object sender, System.EventArgs e)
// Object of the Property layer
clsStudent objproperty=new clsStudent();

// Object of the business layer
clsStudentInfo objbs=new clsStudentInfo();

// Object of the dataset in which we receive the data sent by the business layer
DataSet ds=new DataSet();

// here we are placing the value in the property “ID” using the object of the
property layer

// In ths following code we are calling a function from the business layer and passing the object of the property layer which will carry the ID till the

// What ever the data has been returned by the above function into the dataset is
being populate through the presentation laye.

Property Layer

// These are the properties has been defined in the property layer. Using the object of the property layer we can set or get the data to or from these properties.
public class clsStudent // Class for Student Table
private int _id;
private string _Name;
private string _Address;
private string _Email;
private string _Picture;

public int id // Property to set or get the value into _id variable
get{return _id;}

public string Name
get{return _Name;}

public string Address
get{return _Address;}

public string Email
get{return _Email;}

public string Picture
get{return _Picture;}
set{ _Picture=value;}

Business Layer:

"Obj" is the object of the clsStudent class has been defined in the property layer. This function is receiving the property object and passing it to the datalayer class

// this is the function of the business layer which accepts the data from the application layer and passes it to the data layer.

public class clsStudentInfo
public DataSet GetAllStudentBsIDWise(clsStudent obj)
DataSet ds=new DataSet();
ds=objdt.getdata_dtIDWise(obj);// Calling of Data layer function
return ds;

Datalayer Layer

// this is the datalayer function which is receiving the data from the business layer and
performing the required operation into the database

public class clsStudentData // Data layer class
public DataSet getdata_dtIDWise(clsStudent obj) // object of property layer class
DataSet ds;
string sql;
sql="select * from student where StudentId="+obj.id+" order by StudentId";
ds=new DataSet();
// this is the datalayer function which accepts trhe sql query and performs the
corresponding operation
return ds;

Original Post

:) Yahoo Activ8s Txt on Ur E-Mail

Yahoo unveiled a new Web-based mail service Monday that offers the capability to send text messages or instant messages through the mail client. The service had been in beta testing for several months before being released on Monday. Although Google also offers instant messaging through its Gmail service, Yahoo is the first major Web mail service to carry text-messaging functionality, the company said.

Yahoo (Nasdaq: YHOO) launched a new version of its Web-based mail service Monday, incorporating advanced communication functions it says have not been offered before.

The new version of Yahoo Mail includes "real-time communication" in the form of instant messaging and SMS (short message service) text messaging as well as several other performance enhancements that will mainly benefit those with up-to-date computers.

Users of Yahoo Mail, a Web-based mail service first launched a decade ago, can now send free text messages to cell phones in the United States, Canada, India and the Philippines, said Yahoo. They are also capable of firing off instant messages (IMs) to people who use the Yahoo Messenger and Windows Live Messenger IM services.

Get Out of Beta
Yahoo tested the features in a beta period during which the company sought and received suggestions from users, said Yahoo Mail Vice President John Kremer. "We have always been focused on making it easy for people to connect to those who matter most to them, and during the beta testing period of the new Yahoo Mail, we were able to incorporate a number of enhancements based on valuable feedback from our users."

The company recognized the popularity of social networking and, in crafting the new mail product, tried to make "a more social e-mail experience," said Kremer. Because some of the Ajax (Asynchronous JavaScript and XML)-enhanced functions now sprinkled throughout Yahoo Mail are not going to work on older computers, Yahoo is continuing to offer its "trusted Yahoo Mail Classic interface," said Kremer.

Both versions now include unlimited e-mail storage and accessibility from any computer or mobile device without the need for a software download.

Souped Up
Yahoo promises the new Yahoo Mail is faster and more user-friendly. The company said it refined the system's search capabilities so that users can narrowly focus their e-mail searches using filters for sender, folder, date, attachment type and message status

Right-click functionality is now available for Yahoo mail subscribers in the United States, enabling them to take additional action with underlined dates, names and keywords within messages. For example, users can right-click to add events directly to their Yahoo Calendars, add friends to their contacts, instantly view a Yahoo Map of an address or conduct a Web search.

Other enhanced features include tabbed navigation, a reading pane, an integrated calendar and an RSS reader. The new interface includes some personalization functions too. Users can choose one of six color themes.

The Web 2.0 Way to E-Mail
Yahoo said the service's text-messaging feature is built on its IM platform. It says the "sleek, easy-to-use interface" that's as fast and responsive as a desktop application offers "a more dynamic, Web 2.0 experience" for Web mail users. Yahoo said sending a text message is accomplished by simply entering a mobile phone number, typing the message and hitting send.

Using the instant messaging function is similarly painless, said Yahoo. "People can also easily convert their e-mail messages into IM chats or switch to a text message dialog with the click of a button, when friends come online or go mobile, and vice versa," promised the company.

Yahoo said it partnered with AT&T (NYSE: T) , Verizon (NYSE: VZ) and the Canada-based Rogers Yahoo Hi-Speed Internet to offer "co-branded" versions of the new Yahoo Mail that will become available later this year. Also scheduled to come soon is a new Yahoo Mail version for Yahoo Small Business Mail users, said the company.

One-Stop Communication Shop
Yahoo has come a long way from its initial role as a search engine. The company is now a communications hub, said Yankee Group analyst Jen Simpson.

"Yahoo, among others, offers a pretty wide range of communication services now," Simpson told TechNewsWorld. "It's looking like a communication company as much as an Internet or software company. They are recognizing that, when people are communicating with one another through these services, there is a variety of ways they can do it."

Simpson noted Yahoo has "a fairly large e-mail base, in the U.S. at least," and she said the new features "do a nice job of tying people using that e-mail to one of the other additional services such as SMS texting."

However, Yahoo is not alone in the field. Google (Nasdaq: GOOG) , with its Gmail service, allows users to chat from the mail client.

Sometimes, all the bells and whistles can actually get to be too much, said tech analyst Alan Chapell of Alan Chapell Associates.

"The functionality, particularly the IM aspect, seems very cool, although I think it's an open question regarding how many folks will use it given the myriad of alternatives," he told TechNewsWorld.

Weekend WGA Failure Locked Out Legit Windows Vista Users

Many users of Microsoft's Windows Genuine Advantage were agitated by a server problem over the weekend that falsely accused them of running pirated software. "I was and still am quite mad at Microsoft," wrote michaelosity. "I'm pretty sure I'm going to switch to a Mac because of it. I certainly don't feel like I've been rewarded for being a good citizen and actually buying my copy of Windows."

A server problem at Microsoft (Nasdaq: MSFT) over the weekend caused the company's Windows Genuine Advantage (WGA) validation system to falsely accuse legitimate users of Windows Vista and XP of running pirated software, resulting in the disbanding of some features for those users until the problem was fixed.

The problem began around 8 p.m. Friday, causing users to begin posting messages about it on Microsoft's forums. Vista's Aero graphical interface was among the features disabled for users accused of running pirated software, and user frustration reached significant levels before the problem was fixed.

At one point, Phil Liu, a Microsoft program manager in the Windows Genuine Advantage group, had to remind posters of the language policy that is part of the forums' terms of use.

"Please use acceptable language," Liu said. "While many of these forum posts are cross-linked throughout many several news/blogs/etc. I would prefer not to remove posts for inappropriate content at this time as it is very important for me to ensure everyone knows that we are working to resolve this issue."

Cause Unknown
By about 3 p.m. EDT on Saturday, the problem was fixed and affected users were instructed to revalidate at www.microsoft.com/genuine. The cause, however, is still not entirely clear. "I know you all are looking for an explanation/root-cause," Liu wrote. "We are aware it is a server-side issue -- the cause is unknown at this current time."

Though the problems lasted only some 19 hours on a weekend, users did not seem inclined to forgive Microsoft for the inconvenience.

"I was and still am quite mad at Microsoft," wrote michaelosity. "I'm pretty sure I'm going to switch to a Mac because of it. I certainly don't feel like I've been rewarded for being a good citizen and actually buying my copy of Windows.

"Microsoft just doesn't understand how WGA affects real customers that are legally trying to use their software," michaelosity added. "I appreciate that this happens rarely and that they need to make money, but that money doesn't have to come from me anymore."

Pirates' Advantage
Other users pointed out the irony that the validation software actually gave users of pirated software an advantage during the outage.

"You really ought to work on making WGA actually an advantage," wrote a user named mhornyak. "Right now, users of pirate copies of Windows had an extra couple days of use."

WGA has been controversial since Microsoft implemented it roughly two years ago in the hopes of stemming the widespread piracy of its applications. It checks users' PCs and sends data back to Microsoft to ensure licenses are valid.

Users have vociferously protested the technology, with some even filing class action lawsuits against Microsoft last year for what they claimed is essentially a form of spyware that violates consumer protection laws.

Bad Timing
"It's very unfortunate," Yankee Group analyst Laura DiDio told TechNewsWorld. "There's no doubt Microsoft has the right to protect its intellectual property, but they can't have it causing problems for customers. Microsoft is so ubiquitous, this will bite a lot of people."

The timing of the problem is particularly unfortunate given the recent host of widely publicized glitches that have been plaguing Vista, DiDio added.

Indeed, "Vista has been pulling bad news like a magnet pulls iron," Rob Enderle, principal analyst with Enderle Group, told TechNewsWorld. "This is just one more thing on top of what has been string of bad news for that product. They clearly will fix it as fast as they can, but this doesn't help move more product."

Reverse Effect
Beyond the negative publicity, the problem could have a reverse, and unintended, effect, DiDio noted, echoing the comments of several users.

"Honest people could ask why they're bothering to be honest," DiDio explained. "This could have the unintended consequence of turning people to the dark side, as they throw up their hands and say, 'I tried.'"

In the future, Microsoft will have to be more vigilant, DiDio concluded. "There's no doubt the people working on WGA are doing their best, but now people are asking if their best is good enough," she said. "When you're Microsoft, the bar is higher."

Intel Ramps Up Security in New vPro for Desktops

Intel's upgrade of its vPro processor technology adds Intel Trusted Execution Technology, formerly code-named "LaGrande," to protect data within virtualized computing environments. The version's updated system defense filters can identify more threats in the network traffic flow.

Intel (Nasdaq: INTC) has upgraded its vPro processor technology for desktop PCs with a host of new security features that protect against viruses, hacker attacks and other threats, the company announced Monday.

The upgraded vPro, formerly code-named "Weybridge," combines an Intel Core 2 Duo processor with an Intel Q35 Express chipset and several technology innovations. One new feature added, for example, is the ability to "wake and repair" a computer with an inoperative operating system or hard drive -- something that previously couldn't be done, Intel said.

"Today, the business desktop PC just got more secure," said Robert Crooke, vice president and general manager of Intel's business client group. "This generation of Intel vPro processor technology arrives with new security and management capabilities along with support from every leading PC manufacturer and software solution vendor in the world."

Reduced Vulnerability
Computer makers including Dell (Nasdaq: DELL) , HP (NYSE: HPQ) and Lenovo are using Intel's vPro technology, which originally debuted last year, in their machines.

This new generation of the technology adds Intel Trusted Execution Technology (TXT), formerly code-named "LaGrande," to protect data within virtualized computing environments. When used with Intel's Virtualization Technology for Directed I/O, the hardware-based protection isolates assigned memory to make virtual machine monitors less vulnerable to attacks that most software-based solutions can't detect.

The vPro's improved system defense filters can identify more threats in the network traffic flow. An embedded trust agent certified by Cisco (Nasdaq: CSCO) , meanwhile, provides "the industry's only 802.1x-compatible manageability solution" not dependent on operating system availability, Intel says.

DASH Compatibility
PCs that have crashed or been turned off can be repaired using the newest generation of Intel Active Management Technology, which includes remote configuration tools and compliance with the latest industry standards.

In fact, PCs with this vPro version will be among the first to comply with the Distributed Management Task Force's DASH 1.0 draft interoperability specification and Web Services Management (WS-MAN), Intel said.

Finally, by increasing performance by 30 percent over the previous generation while reducing power consumption, the new vPro technology will also deliver improvements in energy efficiency, Intel said.

"Security and client management are top concerns for our customers' business," said Kevin Frost, worldwide vice president of HP Business PCs. "To address these customer demands, HP remains committed to supporting Intel vPro processor technology."

Behavior Analysis
By searching for behavior patterns rather than signatures, the vPro's new security features improve on those commonly found in many other offerings, Roger Kay, president of Endpoint Technologies, told TechNewsWorld.

"This lets you prevent zero-day attacks for which there is no known signature because they have never been seen," he explained. "Signature analysis doesn't help you when you're attacked by something that's never been seen before."

Instead, the technology watches for behaviors like a program that suddenly starts probing all the ports in a system, or that bombards a port with thousands of inquiries in rapid succession. "No legitimate program would behave that way," Kay explained.

A Gradual Evolution
Intel's incorporation of industry standards is also encouraging, as is the fact that it's continuing to enhance the features it began with rather than starting from scratch in the new generation, Jim McGregor, research director and principal analyst with In-Stat, told TechNewsWorld.

Early adopters of the technology will likely be IT outsourcers such as IBM (NYSE: IBM) and EDS, McGregor said, which will probably be able to integrate on a large scale faster than most enterprises can.

Given that much of the industry "hasn't really woken up to the huge issue of security," however, the vPro's biggest benefits likely won't be realized for a few years, McGregor said. "Will this mean a huge short-term gain for Intel or its customers?" he asked. "No -- it's an evolutionary thing that will become more important as we go along."

Broadcom Reaps Patent Suit Benefits

The seemingly sudden interest in basebands from Broadcom may go a long way toward helping Broadcom reach a goal of commanding 10 percent to 15 percent of the baseband market by the end of 2009. "We are still very much on target," says Yossi Cohen, senior vice president and general manager of Broadcom's mobile platform group.

Broadcom (Nasdaq: BRCM) has long provided a range of chips for cell phones, such as those that ensure handsets are compatible with wireless Bluetooth headsets. However, for years Broadcom has had only a tiny fraction of a more desirable corner of the handset market: so-called baseband chips, the de facto brain of the mobile phone -- an area dominated by bigger rivals Texas Instruments (NYSE: TXN) and Qualcomm (Nasdaq: QCOM) .

That may be set to change, thanks in part to a rancorous legal dispute with Qualcomm that may be luring customers to Broadcom even before the matter is settled in courts.

A recent sign of Broadcom's newfound footing in basebands came May 31, when Broadcom said it and Microsoft (Nasdaq: MSFT) , the world's largest software company, had jointly created a design center in Taiwan where the companies will develop basebands that run Microsoft's Windows Mobile software.

"Several [manufacturers] have been pushing Broadcom and Microsoft to build this development center," says John Starkweather, general manager of mobile communications at Microsoft. He adds that, later this year, a major manufacturer will release a Windows Mobile device based on a Broadcom baseband chip. Neither company would identify the handset maker or say how much they're spending on the design center.

However, Starkweather says Korea's LG Electronics asked Broadcom and Microsoft to work together and that Microsoft is spending as much on the center with Broadcom as it has on comparable efforts with TI and Qualcomm.

Baseband Push
LG isn't alone in wanting basebands from Broadcom. Nokia (NYSE: NOK) , the world's largest cell phone maker, in August said it will place some baseband chip orders with Broadcom. Samsung , Palm (Nasdaq: PALM) and Panasonic already use Broadcom's baseband chips, and analysts believe Samsung may soon increase its orders.

The seemingly sudden interest in basebands from Broadcom may go a long way toward helping Broadcom reach a goal of commanding 10 percent to 15 percent of the baseband market by the end of 2009. "We are still very much on target," says Yossi Cohen, senior vice president and general manager of Broadcom's mobile platform group.

What makes Broadcom, with its puny 1 percent share, so cocksure? For starters, Broadcom has used acquisitions to expand in baseband chips, often the highest-priced component in a phone. Currently, more than 1,000 engineers representing at least 23 percent of its engineering staff are working specifically on baseband research and development. That's a sizable commitment from a company that makes less than 10 percent of sales from cell phone chips, with a small fraction of that coming from basebands.

The efforts are starting to pay off. One new Broadcom baseband, based on the so-called EDGE (Enhanced Data rates for Global system for mobile communications Evolution) technology used in AT&T's (NYSE: T) network and others, was demonstrated earlier this year. It's the smallest single-chip product with all major features integrated on the market, says Cohen. Another new chip, running on a different kind of network known as HSPA, or high-speed packet access, integrates many features and can help cell phone makers shave costs by as much as US$15 per handset, Cohen says.

Legal Leg Up
Another big contributor to Broadcom's traction is the company's legal successes against Qualcomm. Over the years, several companies, including Nokia and Texas Instruments, have alleged in courts that Qualcomm overcharges on patent royalties, but Broadcom in recent months has gained the most ground.

On June 7, the International Trade Commission ruled that Qualcomm is infringing on a Broadcom patent, and banned importation in the U.S. of offending Qualcomm chips and phones containing them. That sent carriers and handset makers scrambling, worried the decision would impact their U.S. sales. Qualcomm is appealing the verdict.

There have been other victories as well. On Aug. 13, a U.S. District Court judge in Santa Ana, Calif., ordered Qualcomm to pay double damages of $39.3 million for past infringement of three Broadcom patents. In mid-September, the judge will decide whether to also impose an injunction on production and testing of offending chips and derivative products.

On Aug. 29, a U.S. District Court judge in San Diego will announce sanctions in a different case where Qualcomm was found to have engaged in "aggravated litigation misconduct" and "intentional abuse of industry-standards bodies." Broadcom also has filed claims and complaints against Qualcomm in Europe and South Korea.

Handset makers are looking around for second and third sources of baseband chips amid concern their ability to supply handsets to the U.S. and other nations could be impaired because of the ITC decision.

Meanwhile, carriers are fretting over the possible disruption of handset supply. So Verizon (NYSE: VZ) Wireless has struck an unprecedented, multiyear licensing deal directly with Broadcom to circumvent the ITC ban. Analysts believe that, as other carriers follow suit, they will encourage their handset suppliers to use Broadcom's chips.

Seal of Approval
To be sure, Qualcomm and TI aren't betraying worry. "We've had eight consecutive quarters of record shipments, so if our customers are shying away from us, they can't be shying away from us that much," says Terry Yen, vice president of marketing for Qualcomm CDMA (code division multiple access) technologies.

Still, Broadcom is gaining a loyal base of customers of its own. On Aug. 8, Nokia named Broadcom as a supplier for its EDGE baseband chips, the largest Nokia business by volume. Orders could be expanded to include other baseband chip technologies.

"This has been an extensive technical evaluation done by our teams on relative performance, size, availability, commercial terms," Niklas Savander, Nokia's executive vice president for technology platforms, said during a call discussing the arrangement. "In that process that we have been running for quite some time, Broadcom came out as the best supplier."

The Nokia seal of approval could help Broadcom win business elsewhere. "All of a sudden, they've got a credible customer, the top wireless handset company," says Will Strauss, founder of Forward Concepts , an electronics market researcher. "That customer said that [Broadcom's chips] were the best. This is going to give them tremendous credibility."

China Promises Germany to Crack Down on Alleged Cyber-Spying

German Chancellor Angela Merkel told Chinese Premier Wen Jiabao that solid ties between the nations required mutual respect over "game rules" following a report that high-level government computer systems had been infected with spyware traceable to China's People's Liberation Army. Wen offered to increase cooperation with Germany on the issue.

China's Premier Wen Jiabao expressed "grave concern" over reports that Chinese army hackers had penetrated German government computer systems, and he vowed to crack down on such activity.

"We in the government took [the reports] as a matter of grave concern. Hackers breaking into and sabotaging computers is a problem faced by the entire world," Wen said after meeting visiting German Chancellor Angela Merkel.

Real Spyware
German weekly Der Spiegel reported earlier that espionage programs traced to China's People's Liberation Army had been detected in computer systems at Merkel's office, the foreign ministry and other government agencies in Berlin.

While not directly confirming the reports, Merkel said she told Wen during their talks that solid ties depended on "mutual respect."

"I saw those reports and expressed that in order to move relations forward ... we must together respect a set of game rules," she told reporters at a joint press conference with Wen.

Wen offered to increase cooperation with Germany on the issue.

"We are willing to maintain cooperation with the German government and take firm and effective action to prevent all hacking acts that threaten computer systems," he said.

'China Threat Theory'
Foreign critics have voiced concern in recent years over China's rise, including the activities of its fast-expanding armed forces.

However, Wen told Merkel that China's emergence was "an opportunity, not a threat.

"China will always take the peaceful road. China is very happy to cooperate with all nations but will never threaten... so it's clear, everyone please be at ease, there is no such thing as the 'China Threat Theory,'" he said.