NIMTReport

wrackbaaΚινητά – Ασύρματες Τεχνολογίες

10 Δεκ 2013 (πριν από 3 χρόνια και 4 μήνες)

59 εμφανίσεις















CSE 333

Fall 2002


Hardik Davé

Keith Bessette

Jaladhi Mehta

Initiative

with

1
Overview


Microsoft has generated great deal of interest in its newly developed “.NET”
products. The .NET initiative is Microsoft’s way of providing developers with the abi
lity
to capture the power of the Internet. .NET is a general purpose Platform that allows users
to design, develop, deploy and use web based applications in a uniform and efficient
manner. According to Microsoft, .NET will “transcend device boundaries an
d fully
harness the connectivity of the Internet”. The obvious competitor to .NET is Sun
Microsystems’s J2EE development platform. There are some obvious similarities
between the two platforms as well as incredible differences in some areas. Our objecti
ve
here is to research and analyze a few functionality and modules of .NET and J2EE. The
areas we will specifically discuss include programming language capabilities and
interactions, middleware connectivity and interoperability, data access abilities and

security issues. We will demonstrate the Pros and Cons of Java and DOTNET in each
area with sample application/s.


2 Introduction to Microsoft .NET

Microsoft .NET is a set of Microsoft software technologies that connect people,
systems, devices, and d
ata all across the Internet. .NET integrates software across
networks and the Internet by using XML Web services. XML Web services provide the
ability to build, host, deploy, and use secure and connected solutions. Along with XML
Web services, developer

tools, client applications, and servers are all provided by the
Microsoft platform, and .NET is built into all of these. .NET includes language
agnosticism, a managed execution environment, JIT compilation, and rich library
support. The mission of .NET
quoted from Microsoft is to: “transcend device boundaries
and fully harness the connectivity of the Internet”.

The .NET Framework is the programming model for developing, deploying, and
running XML Web services and applications that all underlies .NET.
XML Web services
are units of code that allow developers to write programs in different languages and use
different platforms to communicate through standard Internet protocols like XML,
SOAP, WSDL, and UDDI. The center of the .NET Framework is the common

language
runtime (CLR) and the class libraries. The CLR manages memory, security, and
language integration. Other features of the CLR are strong type naming, cross
-
language
exception handling, lifetime management, and dynamic binding. The class librari
es are
the resources used to build applications with XML support, networking, and data
-
access
abilities.


3 NET Languages and JAVA

J2EE offers only JAVA as the only language for the platform, while .NET
platfor
m offers a number of languages for programmers to write code in, namely, C#,
VB.NET, Jscript and Managed C++. To put in their own words, it is a Language
-
Agnostic Model. Though the environments take radically different views considering the
languages in ge
neral, they coalesce nicely when it comes to C# and JAVA.

The C# language is an object
-
oriented language that lets the programmers to
quickly build a wide range of applications for the Microsoft .NET platform. The goal of
C# and the .NET platform is to sho
rten development time by freeing the developer from
worrying about several low level plumbing issues such as memory management, type
safety issues, building low level libraries, array bounds checking, etc. thus allowing
developers to actually spend their t
ime and energy working on their application and
business logic instead. As a Java developer the previous sentence could be described as
"a short description of the Java language and platform" if the words C# and the .NET
platform were replaced with words J
ava and the Java platform.

3.1

Differences and Similarities(C# vs. JAVA)

Much of the progress so far that we have made in this areas includes an intensive
research about the C# language, a study about its various features and comparing it to
java with fallac
ies and benefits. JAVA and C# are two big languages, and though
programmers from both camps will find understanding the other easy, there are some
subtle differences here, which can be divided into 3 parts informally; similarities,
differences, extensions.

There are some features, which are
exactly

similar in both languages like Runtime
environments, Garbage Collection, Interfaces, Strings and Unextendable classes. While
some features
differ only

in small ways or a
syntax

like Inheritance, Excess Modifiers
,
Reflection. Some features have some major conceptual differences like Nested Classes,
Threads, Operator Overloading, Serialization, and Documentation generation. A few
features of C# with no counterparts in JAVA like Deterministic Object Cleanup,
Delega
tes, Boxing, Pointers and Unsafe Code, Pass by Reference. While there are
certain JAVA features having no look
-
alikes in C#, like Extensions, Checked Exceptions,
Dynamic Class Loading, Anonymous Inner Classes and above all Cross Platform
Portability.

We

have tried to look into a few areas out of those cited above, and analyzed how
C# shape up in those areas, and compare the approaches of both languages when they
both provide those features, and analyze the reasons why certain features don’t have their
co
unterparts. As a part of
future work
we may look into a couple of more interesting
features as well as we will provide
Code Snippets

to better illustrate the facts that we are
citing here.

3.1.1

Class hierarchy

3.1.2

Execution environment

3.1.3

Object creation

3.1.4

Namespaces

3.1.5

Ac
cess modifiers

3.1.6

Reflection

3.1.7

Serialization and documentation

3.1.8

Deterministic object cleanup

3.1.9

Delegates

3.1.10

Boxing


3.2

C# and Interoperability

This is a part of our future work in which we would like to evaluate how much does
C# scores in terms of interoperability with
JAVA. Particularly, the areas which we will
concentrate on include Cross
-
Platform compatibility of C# (as currently C# is only
available for windows) as against the portability of JAVA on various platforms.
Interoperability in terms of various Standards is

also something we will look into as
Microsoft has submitted C# to ECMA to arrive at a common language infrastructure. The
Open Standards approach vs. Sun Java policies has opened up some interesting choices
for the developer for the future.


4 Database

Connectivity using .NET and JAVA


Database connectivity has been a prime area of competition among the two major
developers of integrated development environments. Sun Microsystems and Microsoft
both have spent great deal of resources in researching idea
l way to let developers connect
to databases. Today, almost all applications have database backend. These backend are
not necessarily compatible with the platform that the application is developed for. It is
important for users to get applications that
work across various platforms in a unified and
flawless manner. In order to achieve this kind of connectivity, Java came up with JDBC
and Microsoft has developed ODBC and ADO/ADO.NET. Both, JDBC and
ODBC/ADO has a great and long (in terms of Software yea
rs) history. Java does not
have one extensive system to do perform all data related tasks. It performs different tasks
using different modules. Relational database connectivity is done using JDBC, Offline
data access and Persistent objects are provided
by EJB Entity Beans and there is no
support provided for Hierarchical data access. On the other hand, Microsoft has included
all of the above usage in
one single API called ADO.NET.

4.1 Differences and Similarities


There are many Differences and Simi
larities between Database access using J2EE
or .NET. Our focus in this project is going to concentrate on three major issues relating
to database access. Architecture issues are mostly related to the original design of Java
Vs. Microsoft’s ability to tie

.NET platform with its operating systems closely.
Optimization is something that the SQL code writer has to focus on more than ADO.NET
and JDBC users. In promoting .NET, Microsoft has given a lot of focus to its new offline
database utility called DataS
ets. DataSets are smaller version of a relational database that
lie in developer’s local machine and can be easily manipulated. Java does not provide a
similar functionality through JDBC. This point is going to be beneficial to Microsoft and
going to ap
peal to a lot of developers.

4.1.1

Architecture

ADO.NET has streamlined database connectivity issues by putting a middle tier
of XML to interact with Web, Windows Apps or B2B applications. XML layer can in
turn easily interact with Datasets and Data Ada
pter to gather data from the actual
database
. Appendix A contains a diagram for ADO.NET architecture.
JDBC
architecture is a little more complicated than that of ADO.NET. JDBC architecture does
not deal with XML for its tier connections. Because of thi
s reason, a special Connection
and DriverManger objects have to be involved in making a connection.

Appendix B
contains a diagram for JDBC architecture.

4.1.2

Optimization

4.1.3

Offline Database Access using ResultSets and DataSets

4.2 Example and co
de discussion

4.3
Interoperability using XML w/ADO.NET


ADO.NET provides great interoperability using XML. XML has become a
standard of choice for Microsoft product. .NET also provides great support for DataSets
using XML. DataSets can be created fro
m XML document as well as XML documents
can be generated easily from Datasets. It is also possible to interact with Microsoft SQL
Server using XML.


5

Security issues concerning .NET and JAVA

This section will discuss the security issues of .NET and J2EE.

There will be
detailed discussions of how each platform supports and maintains secure development
and execution environments. The main components of these platforms that keep code,
data, and systems safe from inadvertent or malicious errors are code bas
ed access control,
role based access control, code verification and execution, secure communication, and
code and data integrity.

Code based access control is giving permissions to code to access resources based
on application or protection domain the c
ode is assigned to, and evidences of the code.
Role based access control is giving permissions to a user to access resources based on the
user’s role in the system. Code verification and execution means to check the semantics,
analyze bytecode, and to ke
ep code execution within a domain. Secure communication is
being able to pass data and messages locally or remotely in a secure manner, as to
avoiding data modification or other such hacks. Code and data integrity is making sure
code hasn’t been modified

without authorization by using cryptographic solutions and
signed distribution files.

5.1

Differences and Similarities

The differences and similarities of the security aspects outline below will be the
focus of this section. Both .NET and J2EE have ways of d
ealing with these issues,
sometimes they are implemented the same way, and sometimes they have totally different
architectures. An example being .NET uses the Windows SSPI and IIS for secure
communications, Java provides JSSE for a more flexible solution.

5.1.1 Code Based Access Control

5.1.2 Role Based Access Control

5.1.3 Secure Code Verification and Execution

5.1.4 Secure Communication

5.1.5 Secure Code and Data Protection

5.2

Example and code discussion


6

Interoperability

This is a se
ction on which we will be concentrating the most from now on till the
final report. In our future work in this section, we will look at interoperability of
the .NET architecture as a whole in various aspects.

6.1

Languages interoperability

A detailed study abo
ut Language Independence in .NET, interoperability among its
own languages as well as the support for other languages like Eiffel, VB.NET, as well as
interaction with scripting languages, in a contrast to JAVA architecture. We will after
sufficient analyse
s present Pros and Cons of both architectures.

6.2

Middleware Interoperability

We would further investigate middleware interoperability of .NET components.
Particularly how .NET components interact with COM components, and its contrasting
technologies in JAVA,

Remoting in .NET vs. RMI/RPC, .NET components’ interactions
with non
-
. NET components via SOAP/XML, and possibly .NET components
interactions with CORBA/JINI.


7 Progress so far

A major part of our effort until now was concentrated on doing research

on
various aspects of .NET technologies, primarily because this topic is new for us. As
indicated in the timeline below, much of our time between then and now was spent
understanding the various areas of .NET technologies, particularly the ones outlined o
n
sections 3, 4, 5. The effort was distributed between the three
-
team members with Jaladhi
in charge of Languages, Hardik in charge of Database aspects, and Keith undertaking
Security. The demarcation is more clearly presented in different sections underta
ken by
each of us namely sections 3, 4 and 5. Most of the effort by each of us was concentrated
on gathering information through various websites, onsite tutorials, and books. While
each of us was working in different areas, those areas were not totally i
solated or
demarcated, thus resulting in continuous communication and cooperation of each team
member. Meetings were scheduled twice a week for formal discussions and exchange of
ideas and information. We have added another section to our report covering

interoperability. We had planned on going over interoperability in each individual
section, languages, databases, and security, but decided to research interoperability more
broadly, creating a new section, and making sections on interoperability in on C
# and
ADO.NET very specific.



Timeline (so far and future)













8

Future work



Our research is 95% done, and now e
ach team member will continue to concentrate
on their individual sections, analyzing code primarily, and will also help
out with the new
interoperability section (6). The last bit of research will be in general areas of
interoperability that we feel we should cover. We’ve each researched .NET from a
different aspect, and a unified effort in the interoperability section sh
ould benefit from
that.

September

October

November

December


Research DOTNET
and JAVA
functionality and their
differences.


Research code
examples to clearly
show the idea.


Analyze and draw
conclusions based
upon previous research

Mid
-
Semester Report


9
References

General

Comparing Microsoft.NET and the Java Environment



http://www
-
wi.fh
-
reutlingen.de/dbtech/lectures/dotNET_Chappell.pdf


Dotne
tguru
-

http://www.dotnetguru.org


J2EE vs. The .NET Platform
-


www.objectwatch.com/FinalJ2EEandDotNet.doc


J2EE vs. Microsoft.NET
-

www.theserverside.com/resources/pdf/J2EE
-
vs
-
DotNET.pdf


Microsoft Developer’s Network
-

http://msdn.microsoft.com/


Language Comparison

C#:
http://www.ehhco.com/csharp/cintro.htm


C# vs. Java
-

http://www.thetestplace.com/talks/csharpVsjava.ppt


Genamics developer
-

http://genamics.com/developer/csharp_comparative.htm


Gunnerson, Eric.
A Programmer's Introduction To C#.

Apress, 2001.


Mono Project
-

http://www.go
-
mono.com/index.html


J2EE/. NET
-

http://www.machrotech.com/DotNet/FinalJ2EEandDotNet.htm


JAVA/C#
-

http:/
/www.csharp
-
station.com/Articles/JavaVsCSharp.aspx


JAVA/C#
-

www.thetestplace.com/accu2002/slides


.NET Framework SDK Documentation
-

http://msdn.microsoft.com/library/default.asp?url=/library/en
-
us/nfstart/html/sdkstart.asp



Database Connectivity


JDBC Architecture
-

http://octopus.cdut.edu.cn/~yf17/javaent/jenut/ch02_01.htm


JDBC Specifications


http://java.sun.com/j2se/1.4/docs/guide/jdbc


XML Interoperability


http://www.devx.com/upload/free/Features/vbpj/2002/04apr02/da0402p.asp

ADO to XML


http://msdn.microsoft.com/msdnmag/issues/01
/08/data/print.asp


Introduction to ADO.NET
-

http://msdn.microsoft.com/vstudio/techinfo/articles/upgrade/adoplus.asp


ADO.NET DataSet for Multitiered Apps


http://msdn.microsoft.com/msdnmag/issues/02/01/data/print.asp


ADO.NET VS. JDBC in French
-

http://www.dotnetguru.org/articl
e.php?sid=51




Security

CLR Security


http://msdn.microsoft.com/library/default.asp?= url=/library/en
-
us/dnmag01/html/CAS.asp




Gotdotnet


http://gotdotnet.com


J2EE and .NET security
-

http://www.owasp.org/downloads/J2EEandDotNetsecurityByGerMulcahy.pdf

Jdance
-

www.jdance.com


Java
TM

2, Enterprise Edition (J2EE
TM
) and .Net: Can We Live Tog
ether?
-
http://java.sun.com/features/2002/04/j2eenms.html

.NET Application Domain FAQ
-

http://www.gotdotnet.com/team/clr
/AppdomainFAQ.aspx


.NET architecture and security
-

http://home.att.net/~s
-
prasad/MS.net.PPT

Java access control mechanisms
-

research.sun.com/techrep/2002/smli_tr
-
2002
-
108.pdf

Security in the .NE
T framework
-

http://www.microsoft.com/technet/treeview/default.asp?url=/technet/itsolutions/net/evalu
ate/fsnetsec.asp

Security in Jav
a
-

http://java.sun.com/docs/white/langenv/Security.doc.html

Software Engineers Put .NET and Enterprise Java Security to the Test

-

http://www.devx.com/enterprise/articles/d
otnetvsjava/GK0202
-
1.asp









Appendix A



ADO.NET Architecture



Appendix B



B
B
u
u
s
s
i
i
n
n
e
e
s
s
s
s


T
T
i
i
e
e
r
r


D
D
a
a
t
t
a
a


T
T
i
i
e
e
r
r


P
P
r
r
e
e
s
s
e
e
n
n
t
t
a
a
t
t
i
i
o
o
n
n


T
T
i
i
e
e
r
r


Windows
Forms

Web
Forms

Business to
Business

Data Object
(Class)

DataSe
t

DataSe
t

DataSe
t

I
I
n
n
t
t
e
e
r
r
n
n
e
e
t
t


I
I
n
n
t
t
r
r
a
a
n
n
e
e
t
t


D
D
a
a
t
t
a
a


A
A
d
d
a
a
p
p
t
t
e
e
r
r


D
D
a
a
t
t
a
a


A
A
d
d
a
a
p
p
t
t
e
e
r
r


(BizTalk, for
examp
le)

XM
L

MyApp.Ex
e

I
E

JDBC Architecture