WebServices
Thursday, April 25, 2013
Wednesday, April 24, 2013
Introduction To VB.Net
Visual Basic .NET (VB.NET) is an object-oriented computer programming language implemented on the .NET Framework. Although it is an evolution of classic Visual Basic language, it is not backwards-compatible with VB6, and any code written in the old version does not compile under VB.NET.
Like all other .NET languages, VB.NET has complete support for object-oriented concepts. Everything in VB.NET is an object, including all of the primitive types (Short, Integer, Long, String, Boolean, etc.) and user defined types, events, and even assemblies. All objects inherits from the base class Object.
VB.NET is implemented of Microsoft's .NET framework. Therefore it has full access all the libraries in the .Net Framework. It's also possible to run VB.NET programs on Mono, the open-source alternative to .NET, not only under Windows, but even Linux or Mac OSX.
The following reasons make VB.Net a widely used professional language:
Modern, general purpose.
Object oriented.
Component oriented.
Easy to learn.
Structured language.
It produces efficient programs.
It can be compiled on a variety of computer platforms.
Part of .Net Framework.
Strong Programming Features VB.Net:
VB.Net has numerous strong programming features that make it endearing to multitude of programmers worldwide. Let us mention some of these features:
Boolean Conditions
Automatic Garbage Collection
Standard Library
Assembly Versioning
Properties and Events
Delegates and Events Management
Easy to use Generics
Indexers
Conditional Compilation
Simple Multithreading
Introduction To Asp.net
What is ASP.Net?
ASP.Net is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required to build up robust web application for PC, as well as mobile devices.
ASP.Net works on top of the HTTP protocol and uses the HTTP commands and policies to set a browser-to-server two-way communication and cooperation.
ASP.Net is a part of Microsoft .Net platform. ASP.Net applications are complied codes, written using the extensible and reusable components or objects present in .Net framework. These codes can use the entire hierarchy of classes in .Net framework.
The ASP.Net application codes could be written in either of the following languages:
C#
Visual Basic .Net
Jscript
J#
ASP.Net is used to produce interactive, data-driven web applications over the internet. It consists of a large number of controls like text boxes, buttons and labels for assembling, configuring and manipulating code to create HTML pages.
ASP.Net Web Forms Model:
ASP.Net web forms extend the event-driven model of interaction to the web applications. The browser submits a web form to the web server and the server returns a full markup page or HTML page in response.
All client side user activities are forwarded to the server for stateful processing. The server processes the output of the client actions and triggers the reactions.
Now, HTTP is a stateless protocol. ASP.Net framework helps in storing the information regarding the state of the application, which consists of:
Page state
Session state
The page state is the state of the client, i.e., the content of various input fields in the web form. The session state is the collective obtained from various pages the user visited and worked with, i.e., the overall session state. To clear the concept, let us take up an example of a shopping cart as follows.
User adds items to a shopping cart. Items are selected from a page, say the items page, and the total collected items and price are shown in a different page, say the cart page. Only HTTP cannot keep track of all the information coming from various pages. ASP.Net session state and server side infrastructure keeps track of the information collected globally over a session.
The ASP.Net runtime carries the page state to and from the server across page requests while generating the ASP.Net runtime codes and incorporates the state of the server side components in hidden fields.
This way the server becomes aware of the overall application state and operates in a two-tiered connected way.
ASP.Net Component Model:
The ASP.Net component model provides various building blocks of ASP.Net pages. Basically it is an object model, which describes:
Server side counterparts of almost all HTML elements or tags, like <form> and <input>.
Server controls, which help in developing complex user-interface for example the Calendar control or the Gridview control.
ASP.Net is a technology, which works on the .Net framework that contains all web-related functionalities. The .Net framework is made of an object-oriented hierarchy. An ASP.Net web application is made of pages. When a user requests an ASP.Net page, the IIS delegates the processing of the page to the ASP.Net runtime system.
The ASP.Net runtime transforms the .aspx page into an instance of a class, which inherits from the base class Page of the .Net framework. Therefore, each ASP.Net page is an object and all its components i.e., the server-side controls are also objects.
Dot-net Frame Work Architecture
C# programs run on the .NET Framework, an integral component of Windows that includes a virtual execution system called the common language runtime (CLR) and a unified set of class libraries. The CLR is Microsoft's commercial implementation of the common language infrastructure (CLI), an international standard that is the basis for creating execution and development environments in which languages and libraries work together seamlessly.
.
Source code written in C# is compiled into an intermediate language (IL) that conforms to the CLI specification. The IL code, along with resources such as bitmaps and strings, is stored on disk in an executable file called an assembly, typically with an extension of .exe or .dll. An assembly contains a manifest that provides information on the assembly's types, version, culture, and security requirements
When the C# program is executed, the assembly is loaded into the CLR, which might take various actions based on the information in the manifest. Then, if the security requirements are met, the CLR performs just in time (JIT) compilation to convert the IL code into native machine instructions. The CLR also provides other services related to automatic garbage collection, exception handling, and resource management. Code that is executed by the CLR is sometimes referred to as "managed code," in contrast to "unmanaged code" which is compiled into native machine language that targets a specific system. The following diagram illustrates the compile-time and run time relationships of C# source code files, the base class libraries, assemblies, and the CLR.
Introduction To c sharp Programming
C# syntax is highly expressive, yet with less than 90 keywords, it is also simple and easy to learn. The curly-brace syntax of C# will be instantly recognizable to anyone familiar with C, C++ or Java. Developers who know any of these languages are typically able to begin working productively in C# within a very short time. C# syntax simplifies many of the complexities of C++ while providing powerful features such as nullable value types, enumerations, delegates, anonymous methods and direct memory access, which are not found in Java. C# also supports generic methods and types, which provide increased type safety and performance, and iterators, which enable implementers of collection classes to define custom iteration behaviors that are simple to use by client code.
As an object-oriented language, C# supports the concepts of encapsulation, inheritance and polymorphism. All variables and methods, including the Main method, the application's entry point, are encapsulated within class definitions. A class may inherit directly from one parent class, but it may implement any number of interfaces. Methods that override virtual methods in a parent class require the override keyword as a way to avoid accidental redefinition. In C#, a struct is like a lightweight class; it is a stack-allocated type that can implement interfaces but does not support inheritance.
In addition to these basic object-oriented principles, C# facilitates the development of software components through several innovative language constructs, including:
- Encapsulated method signatures called delegates, which enable type-safe event notifications.
- Properties, which serve as accessors for private member variables.
- Attributes, which provide declarative metadata about types at run time.
- Inline XML documentation comments.
Features of c- sharp
1) Simple and Powerful
If the user already understands the basic concepts of object-oriented programming, learning Java with be much easier, Because Java inherits the C/C++ syntax and many of the object-oriented features of C++.so we can say that Java was designed to be easy to learn and use.
java provides a small number of clear ways to achieve a given task.
Unlike other programming systems that they provide dozens of complicated ways to perform a simple task.
2) Secure
Using Java Compatible Browser, anyone can safely download Java applets without the fear of viral infection or malicious intent because of its key design principle. So anyone can download applets with confidence that no harm will be done and no security will be violated.
Java achieves this protection by confining a Java program to the Java execution environment and by making it inaccessible to other parts of the computer.
3) Portable
Many types of computers and operating systems are in use throughout the world—and many are connected to the Internet. Java makes it possible to have the assurance that any result on one computer with Java can be replicated on another. So the code is run in the different platform has a same result.
4) Object-oriented
Java support the all the features of object oriented programming language such as Abstraction, Encapsulation, Inheritance, Polymorphism and Dynamic binding etc….
So with the help of these features user can reduce the complexity of the program develops in JAVA.
Java gave a clean, usable, realistic approach to objects so we can say that the object model in Java is simple and easy to extend.
5) Robust
Most programs in use today fail for one of the two reasons:
(i) memory management mistakes
For example, in C/C++, the programmer must manually allocate and free all dynamic memory. This sometimes leads to problems, because programmers will either forget to free memory that has been previously allocated or, sometimes try to free some memory that another part of their code is still using. Java virtually eliminates these problems by managing memory allocation (with the help of new operator) and deallocation. (deallocation is completely automatic, because Java provides garbage collection for unused objects.)
(ii) mishandled exceptional conditions
With the help of Exception Handling (try……….catch block), the programmer can easily handle an error or exception so user can prevent the program by automatically stop the execution when an exception found.
Thus, the ability to create robust programs was given a high priority in the design of Java.
6) Multithreaded
Java supports programming, which allows the user to write programs that perform many functions simultaneously.
The two or more part of the program can run concurrently then each part of such a program is called a Thread and this type of programming is called multithreaded programming.
Each thread defines a separate path of execution. Thus, multithreading is a specialized form of multitasking.
7) Architecture-neutral
The Java designers worked hard in achieving their goal “write once; run anywhere, anytime, forever” and as a result the Java Virtual Machine was developed.
Java is Architecture-neutral it generates bytecode that resembles machine code, and are not specific to any processor.
8) Interpreted and High performance
The source code is first compile and generates the code into an intermediate representation called Java byte code which is a highly optimized set of instruction code.
This code can be interpreted on any system that has a Java Virtual Machine and generates the machine code.
Java bytecode was carefully designed by using a just-in-time compiler so that it can be easily translated into native machine code for very high performance.
Most of the earlier cross-platform solutions are run at the expense of performance.
9) Distributed
Java allows the object can access the information across the network with the help of RMI (Remote Method Invocation) means this allowed objects on two different computers to execute procedures remotely. So this feature supports the client/server programming.
10) Dynamic
Java programs carry with them substantial amounts of run-time type information that is used to verify and resolve accesses to objects at run time. This makes it possible to dynamically link code in a safe and perfect manner.
Subscribe to:
Posts (Atom)