Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Rajendra
Sample Code
1 Answer(s)      5 years and 9 months ago
Posted in : Development process



Advertisement
View Answers

January 31, 2009 at 5:07 AM


Hi friend,

DTO Implementation:

One way to improve the performance of this user request is to package all the required data into a data transfer object (DTO) that can be sent with a single call to the Web service. This reduces the overhead associated with two separate calls and allows you to use a single connection with the database to retrieve both the recording and the track information. For a detailed description of how this improves performance, see the Data Transfer Object pattern.

Implementation Strategy

There are a number of possible implementations for Data Transfer Object in the .NET Framework. To use a DTO, you have to complete the following four steps. The good news is that the DataSet class that is built into the .NET Framework already takes care of three of the following steps:

1.Design the DTO class. One step in this process is to decide what data types and structures to support. The DataSet is generic enough to use for any DTO purpose; therefore, you do not need to design a new class for each DTO.

2.Write or generate the code for the data transfer class. DataSet is part of the .NET library, so you do not have to code it.

3.Create an instance of the DTO, and fill it with data. This is the only step that you have to program. DataSet provides convenient functions to load the DTO with data from a database or Extensible Markup Language (XML) document, greatly simplifying this task.

4.Serialize the DTO into a byte or character stream so that the content of the object can be sent over the network. The DTO has built-in serialization functions.

A DataSet holds a collection of DataTable objects. Each DataTable object represents the data that was retrieved using a SELECT statement or stored procedure execution. The data in a DataSet can be written out or read as XML. A DataSet also stores schema information, constraints, and relationships among multiple DataTable objects. Through a DataSet, you can add, edit, and delete data; therefore, a DataSet makes an ideal data transfer object in the .NET Framework, especially when you add the requirement to display the DataSet in controls on a form.

Because the .NET Framework already implements the DataSet, the remainder of this implementation strategy focuses on how to fill a DataSet from a data source and how to use the resulting DataSet in the Web Form.


-------------------------------------

Thanks.


Related Tutorials/Questions & Answers:
sample code - WebSevices
sample code  Hi Guys, can any body tell me use of webservices ? I want a sample code using xml with one application server bea weblogic and webserver tomcat   Hi Friend, Please visit the following link
Need sample code
Need sample code  Need code for graph which shows the performance comparission of aprior algorithm and coherent rule algorithm.plz can any one help me i need in a week
Advertisements
Sample Ajax Code
Sample Ajax Code  Sample Ajax Code for getting values from another JSP   The below code is helpful to access another Action class //In Main JSP file var xmlHttpObj,xmlHttpObj1; function getXmlHttpObject() { var
Sample Code - Development process
Sample Code   Hi Friend, Give sample code DTO... a new class for each DTO. 2.Write or generate the code for the data transfer class. DataSet is part of the .NET library, so you do not have to code
Sample Code For ArrayLlist - Java Beginners
Sample Code For ArrayLlist   Hi Friend, I want sample code for adding single records and multiple records using ArrayList.Give sample code for Arraylist with realtime application.  Hi I
need a Sample code - Development process
need a Sample code  i want run the python script in java code by using Runtime class and output should be formed like XML format.please help me. Advanced Thanks, Krishna
java sample code - Java Beginners
java sample code  hai...... i need a full sample program fo inheritance.........  Hi Friend, Please visit the following link: http://www.roseindia.net/java/language/inheritance.shtml Thanks
Sample Code for DTO in WebApplication - Development process
Sample Code for DTO in WebApplication   Hi Friends, Can u explain DTO in webapplication with sample code
Hibernate sample code - Hibernate Interview Questions
Hibernate sample code  Hi Can any body tell me how to persist inner class,abstract class,final class,and interface in hibernate. From... Hibernet.org.The Hibernate 3.0 core is 68,549 lines of Java code together with 27,948 lines
Sample code for An ASCII Encryption and Decryption code in C-language only.
Sample code for An ASCII Encryption and Decryption code in C-language only.  In an environment where security is paramount, the messages stored... code for this project including both the encryption and decryption aspects
How to use Bean Area in Oracle Forms 9i with Sample code ?
How to use Bean Area in Oracle Forms 9i with Sample code ?  Hi friend.I posted a query,but I didn't get the answer for it.Help me to resolve including a bean area in oracle forms 9i and using it in forms.Thanks in advance.Help me
hibernate sample code
This section contains a simple Hibernate 4 example using Annotation with source code. The eclipse id and Apache Tomcat is used in this example
HQL Sample
HQL Sample In this site there are many tutorials and example of HQL. These examples comes with HQL sample code that you can download and run on your computer and learn the HQL by modifying and executing these examples. The HQL Sample
sir, how to convert excel file to csv file using java? please send me sample code.
sir, how to convert excel file to csv file using java? please send me sample code.  please send me sample code for converting excel file into csv file uisng java
Need Sample code To check the Windows services status is up or down in Linux mechine
Need Sample code To check the Windows services status is up or down in Linux mechine  Hi, I did code to check the windows services are up or down... application please provide any sample code. below code can work in only windows box
sample Applet program
sample Applet program  I need Source Code for sample Applet program.   Hi Friend, Please visit the following link: Applet Tutorials Thanks
JSF Sample Programs
JSF Sample Programs  I need a JSF sample programs
Sample java program
Sample java program  I want a sample program: to produce summary information on sales report. The program will input Data of Salesman Id, Item code, and number of cuestomer. Sales id is 5digit long, and items code range from
error in sample example
error in sample example  hi can u please help me XmlBeanFactory class is deprecation in java 6.0 so, pls send advance version class   Use XmlBeanFactory(Resource) with an InputStreamResource parameter
GLImageProcessing iphone sample
GLImageProcessing iphone sample  Hi, From where I can download the GLImageProcessing example for iPhone? Thanks   Hi, The GLImageProcessing sample for iPhone shows how to use OpenGL ES libraries to bright, sharp
code
code  code for android sample program
Sample program of JSP
Sample program of JSP  <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org
Axis2 sample program
Axis2 sample program  Hi.. I have tried the HelloWorldServie example in axis2. While running which showing as a faulty service. The error showned as follows This Web axisService has deployment faults Error
mca entrance sample papers - SQL
mca entrance sample papers  please send me sample papers of MCA entrance exam.. thanks in advance
java sample program - Java Beginners
java sample program  hai i need a sample program for polymorphism  Hi Friend, Try the following code: class Shape { int x,y; void area(){ } } class Square extends Shape { int l=2; void area
Sample JMS Project is NEEDED - JMS
Sample JMS Project is NEEDED  hi friends Priya here, currently i'm doing R & D on JMS to expertise in JMS. but i didn't get any Project specification or any projects on JMS... So plz tell me the urls of the JMS
Java sample using - for loop, if then else etc etc
Java sample using - for loop, if then else etc etc  sample program... of Salesman Id, Item code, and number of cuestomer. Sales id is 5digit long, and items code range from 100-300 if Item code is 100-150, display " aim high" if item
sample e-commerce project desc& screens
sample e-commerce project desc& screens  Hi, I want Sample e-commerce project description and screens and registration, cataloge module...............plz send me
GPS Device Tracking Sample Web Application - Framework
GPS Device Tracking Sample Web Application  How and by what can i develop a sample web application which can track a GPS device? Kindly help in this context
Iterator Java Sample
Java Sample Iterator interface makes the traversing of the elements easy...() Java Sample Iterator Example import java.util.ArrayList; import... sample { public static void main(String[] args) { List list = new ArrayList
Advertisements
 

 

 

DMCA.com