Search

UDP – User Datagram Protocol

0 comments

The User Datagram Protocol (UDP) is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, sometimes known as datagrams, to other hosts on an Internet Protocol (IP) network without requiring prior communications to set up special transmission channels or data paths.

User Datagram Protocol is a process-to-process protocol that adds only port addresses and checksum error control. It provides the mechanism (like TCP) by which the datagram can be delivered to the destination process within the destination system. UDP uses a simple transmission model without implicit hand-shaking dialogues for guaranteeing reliability, ordering, or data integrity. Thus, UDP provides an unreliable service and datagrams may arrive out of order, appear duplicated, or go missing without notice.

UDP assumes that error checking and correction is either not necessary or performed in the application, avoiding the overhead of such processing at the network interface level.

UDP provides process-to-process communication instead of host-to-host communication.

UDP is a connectionless, unreliable transport protocol. Establishing a connection with the destination process is fast, and if reliability is not an important criteria then the transfer of data is faster for bulk transfer.

This is because reliability requires, implementing the acknowledgements, resending the lost or corrupted datagrams and many more overheads. This definitely decreases rate at which datagrams can be sent. Some of the application as in the case of multimedia, which requires bulk transfer of data, needs no fool-proof reliability.

Multimedia applications, such as VoIP (Voice over IP - using which one can even talk to another person, who has telephone, by making the telephone call through this protocol), and Video conferencing applications uses a protocol known as RTP (Real Time Protocol) for data transfer at the application layer. This RTP protocol uses the services of UDP. If it uses the services of TCP, which provides the reliability, connection oriented and stream service, the quality of the service suffers!

Uses of UDP

The following lists some uses of the UDP protocol:-
  • UDP is suitable for a process that requires simple request – response communication and with little concern for flow and error control. It is not usually used for a process that needs to send bulk data needing error and flow control, such as FTP.
  • UDP is suitable for a process with internal flow and error-control mechanisms. For example,the Trivial File Transfer Protocol (TFTP) process includes flow and error control. It can easily use UDP.
  • UDP is suitable transport protocol for transport protocol for multicasting and broadcasting. Multicasting and broadcasting capabilities are embedded in the UDP software but not in the TCP software.
  • UDP is used for management processes such as SNMP.
  • UDP is used for some route updating protocols such as Routing Information protocol (RIP)
Why UDP Over TCP?
  • No connection establishment. TCP uses a three-way handshake before it starts to transfer data. UDP just blasts away without any formal preliminaries. Thus UDP does not introduce any delay to establish a connection. This is probably the principle reason why DNS runs over UDP rather than TCP -- DNS would be much slower if it ran over TCP. HTTP uses TCP rather than UDP, since reliability is critical for Web pages with text. The TCP connection establishment delay in HTTP is an important contributor to the "world wide wait".
  • No connection state. TCP maintains connection state in the end systems. This connection state includes receive and send buffers, congestion control parameters, and sequence and acknowledgment number parameters. UDP, on the other hand, does not maintain connection state and does not track any of these parameters. For this reason, a server devoted to a particular application can typically support many more active clients when the application runs over UDP rather than TCP.
  • Small segment header overhead. The TCP segment has 20 bytes of header overhead in every segment, whereas UDP only has 8 bytes of overhead.
  • Unregulated send rate. TCP has a congestion control mechanism that throttles the sender when one or more links between sender and receiver becomes excessively congested. This throttling can have a severe impact on real-time applications, which can tolerate some packet loss but require a minimum send rate. On the other hand, the speed at which UDP sends data is only constrained by the rate at which the application generates data, the capabilities of the source (CPU, clock rate, etc.) and the access bandwidth to the Internet. We should keep in mind, however, that the receiving host does not necessarily receive all the data - when the network is congested, a significant fraction of the UDP-transmitted data could be lost due to router buffer overflow. Thus, the receive rate is limited by network congestion even if the sending rate is not constrained.


References: Wikipedia - User Datagram Protocol

Courtesy - TechnoFreak

What is Java?

0 comments


Java technology is both a programming language and a platform.

Java allows you to play online games, chat with people around the world, calculate your mortgage interest, and view images in 3D, just to name a few. It's also integral to the intranet applications and other e-business solutions that are the foundation of corporate computing.

The Java programming language is a high-level language that can be characterized by all of the following buzzwords:

  • Simple
  • Architecture neutral
  • Object Oriented
  • Portable
  • Distributed
  • High Performance
  • Multithreaded
  • Robust
  • Dynamic
  • Secure
A platform is the hardware or software environment in which a program runs.
Eg: Microsoft Windows, Linux, Solaris OS & Mac OS.

The Java platform has two components:
  • The Java Virtual Machine
  • The Java Application Programming Interface (API)
The Java virtual machine includes an optional just-in-time compiler (JIT) that dynamically compiles bytecode into executable code as an alternative to interpreting one bytecode instruction at a time. In many cases, the dynamic JIT compilation is faster than the virtual machine interpretation.

The API is a large collection of ready-made software components that provide many useful capabilities. It is grouped into libraries of related classes and interfaces; these libraries are known as packages.


What Can Java Technology Do?
The general-purpose, high-level Java programming language is a powerful software platform. Every full implementation of the Java platform gives you the following features:
  • Development Tools: The development tools provide everything you'll need for compiling, running, monitoring, debugging, and documenting your applications. You'll be using tools like javac compiler, the java launcher, and the javadoc documentation tool.
  • Application Programming Interface (API): The API provides the core functionality of the Java programming language. It offers a wide array of useful classes ready for use in your own applications.
  • Deployment Technologies: The JDK software provides standard mechanisms such as the Java Web Start software and Java Plug-In software for deploying your applications to end users.
  • User Interface Toolkits: The Swing and Java 2D toolkits make it possible to create sophisticated Graphical User Interfaces (GUIs).
  • Integration Libraries: Integration libraries such as the Java IDL API, JDBCTM API, Java Naming and Directory InterfaceTM ("J.N.D.I.") API, Java RMI, and Java Remote Method Invocation over Internet Inter-ORB Protocol Technology (Java RMI-IIOP Technology) enable database access and manipulation of remote objects.

Java can be used on PCs for both applets (interactive features inside web pages) and stand-alone applications (non-web programs like Notepad or Excel— these are not written in Java, they are just examples of
applications).

Application

Java application is a Java program that is run stand alone. You run the application using JDK runtime "java".

In the Java programming language,
  1. All source code is first written in plain text files ending with the .java extension.
  2. Those source files are then compiled into .class files by the javac compiler. A .class file does not contain code that is native to your processor; it instead contains bytecodes — the machine language of the Java Virtual Machine(Java VM).
  3. The java launcher tool then runs your application with an instance of the Java Virtual Machine.
Applet

An applet is a Java program, which can be downloaded from a remote server and executes inside the web browser of the local machine. Most web browsers (such as Internet Explorer and Firefox) have a built-in Java Runtime (JRE) for executing applets.

You CANNOT run the applet using JDK runtime "java". Applet is a GUI program that runs inside a web browser, using the web browser's built-in JRE. Applet is embedded in an HTML page (in much the same way as images, audios, and videos are embedded in an HTML page). To run an applet, you need to create a HTML file, which embeds the applet.

*
* The HelloWorldApp class implements an application that
* simply prints "Hello World!" to standard output.
*/
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}
}


References:

  1. Sun.com -Java Tutorials

  2. WWW FAQs - What is Java?

Asp .Net FAQ's

0 comments

Q : Differentiate between execute query and execute nonquery.?
A :

  • Execute Query is the method of which is used to return the result of the command like select Query. Execute is Update Query.
  • Execute NonQuery method is used to return the Query OS the statement like the update Delete Insert which returns No data.

Q: What do you mean by the authentication and authorization?
A :
  • Authentication is validating user rights
  • Authorization is validating credentials

Q : What are the types of memory management?
A : Memory management is many types such as:
  • Storage memory Management.
  • I/O Memory Management
Q : Explain the serialization in ASP.NET?
A : Serialization is a process of converting an object into a stream of bytes. .Net has 2 serializers namely XMLSerializer and SOAP/BINARY Serializer. Serialization is mainly used in the concept of .Net Remoting.

Q : what are the components of web form in ASP.NET explain it?
A:
  1. Server controls : The server controls are Hypertext Markup Language (HTML) elements that include a runat=server attribute. They are used to provide the automatic state management and server-side events and respond to the user events by executing event handler on the server.
  2. Data controls : Data controls allow the connection to the database, execute command and retrieve data from database.
  3. HTML controls :These controls also respond to the user events but the events processing happen on the client machine.
  4. System components : System components provide access to system-level events that occur on the server.
Q : Explain the different parts that constitute ASP.NET application?
A : ASP.NET Applications are three parts of constitute there are:
  1. Content files: Content files include static text, images and can be include elements from database.
  2. Program logic files: Program logic files exist as DLL file on the server that responds to the user actions.
  3. Configuration file: Configuration file to is used to make various settings that determine how is the application runs on the server.

Q : Describe the sequence of action takes place on the server when ASP.NET application starts first time?
A : Following are the sequences:
  1. IIS starts ASP.NET worker process>>
  2. Worker process loads assembly in the memory>>
  3. IIS sends the request to the assembly>>
  4. The assembly composes a response using the program logic>>
  5. IIS returns the response to the user in the form of HTML.
Q : What’s the main difference between FormLayout and GridLayout ?
A :
  • Form Layout is used by Web Developers because it is helpful for many browsers. If there is any absolute positioning we can notice that there are number of DIV tags. But in FormLayout whole work are done through the tables.
  • Grid Layout helps in providing absolute positioning of every control placed on the page. It is easier to develop page with absolute positioning because control can be placed any where according to our requirement.

Q :Differentiate between WebCustomControl and in WebUserControl?
A:
  • Web custom controls: Web Custom Control is good for the dynamic layout and it has full tool support for user and a single copy of control is required because it is placed in Global Assembly cache (GAC).
  • Web user controls : Web User Control is easier to create and its support is limited for users who use a visual design tool. It contains static layout & a seperate copy is required for each application.
References:

Interview Easy - Recent ASP.Net Interview Questions & Answers

Tips to build a career in IT - For beginners

2 comments

Things to consider before getting into IT field:

1. Do not let money be the only reason.

Financial situations are always considered when one thinks over his or her career, it shouldn’t be the sole determining factor. You have to be practical. Money will come, but look at it as an eventuality rather than an immediacy.

2. Don't move just because “everyone else is doing it”.

You have to be careful because often, you are not guided correctly, or a bunch of people you know rush into a particular career direction, as it seems the easy way out.

3. Don’t get into IT simply because it is the “in thing”.

When you talk about the scope of IT, you will find it to be pretty wide. The monumental growth of the Internet, technology and increasing global dependence on IT, has expanded the scope of IT furthermore.

4. What are your skills and do they fit into the IT industry?

  • What is it that interests you?
  • What are your abilities?
  • What do you aspire to be?
Self -awareness is key to making wise career choices. Knowing yourself and what you thrive on is half the battle won.

5. Specifically pertaining to the IT industry, what is it that interests you?
  • Do you wish to be more of a creator, provider or user of IT products?
  • Are you the sort of person who wants to know how IT itself works, i.e. the inner workings and how you can be an creator?
  • Are you more interested in how to get results using IT?
  • How much do you know about the different IT career options, such as Networking, Database Administration, etc?
6. IT is fun.

What may be fun to you may be boring to another. Maybe the idea of an IT career excites you? You think it is ‘fun’. This has more to do with the nature of work and the professionals. What kind of a profile in IT excites you? What does the job require? What is your background? What are the skills required? Is it managerial or team oriented? Answers to these questions should indicate the area that suits you. There are several IT professionals who have spent days together at work, without minimum rest and sleep, to get a project over with.

7. IT is a respected and much adopted profession.
  • But can you handle the challenges and of IT?
  • Does working with advanced technology interest you?
  • Are you fascinated by the very idea or concepts of Internet or technology and similar trends? You may like being on the cutting edge of technology.
8. IT is different.

The nature of IT offers professionals the opportunity to work in diverse areas over time, and sometimes even on an ongoing basis. It is not unusual to find IT professionals carrying out Tech support, Computer Networking, Training and Troubleshooting all in one job.

9. IT is knowledge driven field.

Does knowledge or the will to learn more drive you? Aspiring professionals must learn as much as possible about IT (or any career direction they plan to move towards) and its sections. A good way to acquire knowledge would be via the Internet (Google and Wikipedia), books and practice. Read IT magazines such as CHIP, Digit and Computers @ home and the IT sections of most newspapers and magazines.



10. Passion is what should be the most important reason.

You need to have passion for IT and how it works. All areas of IT have opportunities and challenges.

References:
  1. Interview Easy - Tips to Develop Confidence and Get IT Jobs

  2. Wikihow - How to get a job in computers

  3. Computer Majors - 10 Hot Computer Driven Careers

WEB 3.0

2 comments

Web 3.0 describes the next evolution of the World Wide Web. The term "Web 3.0" has been floating around for quite a while now, but what does it exactly mean? The true definition of Web 3.0 has been unclear ever since it has been created. When trying to get a hold of the concept it is important to keep in mind that Web 3.0 is rather a buzzword and doesn't clearly define anything.

The term Web 3.0 is very often mentioned together with "the semantic web". Some people refer to the semantic web as an equal to Web 3.0, others consider the semantic web part of Web 3.0. What does 'the semantic web' mean though?

The word semantic here refers to the idea that stuff on the web will have meaning whether a person looks at it or not. Instead of just a web of human-readable pages of text, imagine if the info on the web could also be easily parsed for meaningful data. The data could be both human and machine readable, with meaningful relationships easy to discern.

Web 3.0 is much more than just semantics.


It will be a Web where everything will be smart. User will not have to visit several websites to search for information. In this New Generation Web what we call Web 3.0 users will just have to send out their software agent to search for their relevant information. And for this we will have to get very good at specifying the exact meanings of things and we will have to improve our research area so that various pieces of software can make sense of our requests. It's a lot easier than repeatedly trying to find the right phrase to type into Search engines like Google, Yahoo, Windows Live etc.,!

Technologies Web 3.0 will comprise of:
  • Cloud computing - Open peer-to-peer grid storage, and computing capabilities on the Web.
  • Mobile Web - Higher bandwidth, more storage, and more powerful processors empowering mobile devices.
  • Personalization - Increase in the power of personalization tools and personal assistant tools.
  • Search - Smarter search engines that not only answer questions, but will accept commands.
  • Data integration and portability - Improvements in account portability, integration, and data between different Web applications.
  • Databases - Fundamental change, moving away from the relational model and object model towards the associative model of data (graph databases and triple stores).
One of the main organization tools in Web 3.0 that we will use is widgets and a host of data management technologies. Many of these technologies are here today, in one form or another.

  • RSS. A Web 3.0 Driver
We know that the entire business models are being created around aggregating meta-data. Netvibes allows you to create your own personal homepage, drawing much of its content from RSS feeds that you select. iGoogle does the exact same thing.
In Web 3.0 RSS will be extended to include a host of data-points it currently does not. Each blog post, every picture, every video clip will have searchable, taggable, XML based syndication around it.
  • Software Agents And Expert Systems
Web 3.0 will have Software Agents and Expert systems as an off line access point. A knowledge based system i.e. a computer program that contains some of the subject-specific knowledge and a piece of software that acts for a user or other program in a relationship of agency.
  • The Secrecy Caution
Reputation management, Data privacy will be some major issues of Web 2.0. When users are given a provision of RSS feed (in one form or another), the ability to protect the feed can be crucial.
Web 3.0 gets in the improvement in privacy features. The ability to block certain actions from being indexed, or limit the access to your profile by third party sources will be the next big push in internet security and privacy.

Wikipedia says - Web 3.0 is one of the terms used to describe the evolutionary stage of the Web that follows Web 3.0. Given that technical and social possibilities identified in this latter term are yet to be fully realized the nature of defining Web 3.0 is highly speculative. In general it refers to aspects of the Internet which, though potentially possible, are not technically or practically feasible at this time.

Related Links: WEB 2.0

References:
  1. Bhopu.com, 2007 - So we are finally heading to a more revolutionary web

  2. July 4, 2008 – by Geoff Soumokil - Web 3.0

  3. LifeCapture Interactive, RIASpot.com, June 9, 2008 - What the Heck is Web 3.0

Are Programmers Recession Proof?

0 comments



By now almost everyone around the globe is familiar with the idea of a recession. In the US the economy is being hit especially hard with layoffs and the potential fall of the major banking institutions. With all this downsizing and layoffs, where does the average programmer or software engineer find themselves?

Back before this whole mess started analysts were making their predictions for the fastest growing job sectors in the economy. Among them was the IT field and in that the programmer. They predicted that IT would continue to have strong growth through the year 2016. Since the financial crisis, these same analysts have not changed their tune, and for very good reason…. Business, whether doing well or poor, needs information and needs it now to stay competitive. I am here to argue that programmers have a bright future for many reasons.

  • First, our world is based on computers and hence run software. Unlike the great depression, where people were not big dealers in information, our world has changed into an instant answer society. Business needs to know what their competitors know and that requires accurate and timely information.
  • Second, businesses need to be able to do more and do it cheaply. Computer software can do tasks in a fraction of the time that humans can do it and they do not ask for a paycheck to feed their family of 5. Sure there is an up front cost of developing and maintaining the software, but overall a great software product is going to increase productivity and reduce costs.
  • Third, companies are going to consider open source software more as a cost cutting measure and demand more out of what they get for free. A business will be making sacrifices in features if it means they can still do the basics without taking a financial hit. Why pay $800-900 dollars for Adobe when you could download Paint.Net for free? I mean does every design company really need a waxy image filter?
  • Lastly, who is going to keep the answers flowing in? Software code breaks down after a period of time. It is inevitable. As business needs change, they need their software to change as well. In this aspect programmers are facilitators of change and help provide solutions. A company needs to keep the answers rolling in and being provided with the latest information to keep any market advantages they may have. Ever wonder how analysts track what the market is doing to begin with? They use computers and software to watch every market blip, for better or for worse, written and maintained by programmers.
Because of this need for software, the need to do things more cheaply, and the need for instant answers companies are not going to ditch the need for people to create and maintain software. However, they will need software that is made more efficient and more cheaply so as programmers, expect to work harder. Even if you do get laid off of your job you may find yourself working for another company as a consultant. You may find yourself going into business for yourself as a software developer. You may even take contracts. You will just need to look around a little bit. The market, and the world for that matter, are always going to need answers and thus will always need a programmer to help fill that need.

Writer : Martyr2 - Dream.In.Code Mentor

What is ASP.NET?

2 comments


ASP.NET is a unified Web platform that provides all the services necessary for you to build enterprise-class apps.

ASP.NET is one of the most exciting web development technologies on offer today. When Microsoft released the first version ASP.NET 1.0 in January 2002, many web developers thought all their dreams had come true. Here was a powerful platform with lots of built-in functionality, astonishing performance levels, and one of the best IDEs round: Visual Studio. What more could anyone want? Indeed, ASP.NET showed the way for the faster, easier, and more disciplined development of dynamic web sites, and the results were impressive.

Why ASP.NET?

To shift it's focus from Windows-based platforms to the Internet, Microsoft introduced ASP version 1.0 (distributed with IIS 3.0) in December 1996, which is a server side scripting language. ASP script was an interpreted script and consisted unstructured code and was difficult to debug and maintain. Web consists of various technologies, so software integration for Web development was complicated. Also, as applications grew bigger in size and became more complex, the number of lines of source code in ASP applications also increased. Therefore, an architecture was needed that would allow development of Web applications in a structured and consistent way.

The .NET Framework was introduced with a vision to create globally distributed software with Internet functionality and interoperability. The .NET Framework consists of many class libraries, includes multiple language support and a common execution platform. ASP.NET is built into this framework, so ASP.NET Framework features are available to ASP.NET applications. We can create ASP.NET applications using any of the built-in languages like Visual Basic, C#, and JScript.

ASP.NET uses the Common Language Runtime (CLR) provided by the .NET Framework that manages execution of the code we write. ASP.NET code is a compiled CLR code. CLR also allows objects written in different languages to interact with each other thus making development of Web applications simple.

Advantages ASP.NET offers over other Web development models:

1. ASP.NET drastically reduces the amount of code required to build large applications.

2. With built-in Windows authentication and per-application configuration, your applications are safe and secured.

3. It provides better performance by taking advantage of early binding, just-in-time compilation, native optimization, and caching services right out of the box.

4. The ASP.NET framework is complemented by a rich toolbox and designer in the Visual Studio integrated development environment. WYSIWYG editing, drag-and-drop server controls, and automatic deployment are just a few of the features this powerful tool provides.

5. The source code and HTML are together therefore ASP.NET pages are easy to maintain and write. Also the source code is executed on the server. This provides a lot of power and flexibility to the web pages.

6. All the processes are closely monitored and managed by the ASP.NET runtime, so that if process is dead, a new process can be created in its place, which helps keep your application constantly available to handle requests.

7. It is purely server-side technology so, ASP.NET code executes on the server before it is sent to the browser.

8. Being language-independent, it allows you to choose the language that best applies to your application or partition your application across many languages.

9. ASP.NET makes for easy deployment. There is no need to register components because the configuration information is built-in.

10. Easily works with ADO.NET using data-binding and page formatting features. It is an application which runs faster and counters large volumes of users without having performance problems

Differences between ASP.NET and Client-Side Technologies

Client-side refers to the browser and the machine running the browser. Server-side on the other hand refers to a Web server.

Client-Side Scripting

Javascript and VBScript and generally used for Client-side scripting. Client-side scripting executes in the browser after the page is loaded. Using client-side scripting you can add some cool features to your page. Both, HTML and the script are together in the same file and the script is download as part of the page which anyone can view. A client-side script runs only on a browser that supports scripting and specifically the scripting language that is used. Since the script is in the same file as the HTML and as it executes on the machine you use, the page may take longer time to download.

Server-Side Scripting

ASP.NET is purely server-side technology. ASP.NET code executes on the server before it is sent to the browser. The code that is sent back to the browser is pure HTML and not ASP.NET code. Like client-side scripting, ASP.NET code is similar in a way that it allows you to write your code alongside HTML. Unlike client-side scripting, ASP.NET code is executed on the server and not in the browser. The script that you write alongside your HTML is not sent back to the browser and that prevents others from stealing the code you developed.



Life Cycle of Asp .Net web-page


References

Star VB.Net - What is ASP .Net

Steve Kozyk - What is ASP.NET? -Top 12 Advantages of ASP.NET

MSDN - ASP.NET Web Applications (.NET 3.0)

Dynamic Future of C# 4.0

0 comments

C# 4.0 will offer support for dynamically typed objects and "vastly improved" COM interoperability, among other features.



Chief Language Strategist in the Developer Division at Microsoft Corporation 'Anders Hejlsberg' (pic at right) drew a big and enthusiastic crowd as he provided a look at the future of the C# programming language in a session at the company's Professional Developers Conference in Los Angeles in October 2008.

Hejlsberg offered a rundown of what developers can expect from the next version of C#, with a heavy emphasis on the increasingly dynamic nature of the language. If the response of developers attending the presentation was any indication, there will be a lot to like about the next version of C#.

Hejlsberg provided insight into four key enhancements in C# 4.0:

  • Support for dynamically typed objects
  • Support for optional and named parameters
  • "Vastly improved" COM interoperability
  • Support for both co-variance and contra-variance
The issue of COM interoperability is a particularly raw one for .NET developers, who find themselves going through contortions to manage the mismatch between statically typed C# and COM objects. Hejlsberg drew hearty applause when he showed the thoroughly cleaned code that's possible with C# 4.0.

"Isn't it amazing? It took us 10 years to get back to where we were," Hejlsberg joked. "The code actually looks like it was intended to look."

Hejlsberg's presentation provided a great look at what's possible with dynamic type support in C# 4.0. The Dynamic Language Runtime (DLR) that C# 4.0 will work with provides binders to .NET, Silverlight, Python, Ruby and COM. "With these binders we can get a single programming experience for talking to all these different environments that are not statically typed .NET classes," Hejlsberg explained.

Behind C# 4.0's dynamic typing is a delicious irony. Explained Hejlsberg to appreciative laughter: "In C# 4.0 we simply declare a variable whose static type is dynamic."

Reference: Michael Desmond 2008 - PDC: Anders Gets Dynamic on Future of C#

J2ME overview

0 comments

What is Java 2 Micro Edition?

Java is known primarily as a server-side programming environment, centered around the technologies that make up the Java 2 Enterprise Edition (J2EE), such as

  • Enterprise JavaBeans (EJBs)
  • Servlets
  • JavaServer pages (JSPs)
Early adopters of Java, however, will recall that it was originally promoted as a client-side application environment. In fact, Java was originally designed as a programming language for consumer appliances. Now Java is returning to its roots with Java 2 Micro Edition, or J2ME for short.

The Java 2 Platform
What we commonly refer to as "Java" is more formally known as the Java 2 Platform. The Java 2 Platform is split into three editions:
  • Java 2 Standard Edition (J2SE)
  • Java 2 Enterprise Edition (J2EE),
  • Java 2 Micro Edition (J2ME).
Each edition of the platform provides a complete environment for running Java-based applications, including the Java virtual machine (VM) and runtime classes.

The three editions all target different kinds of applications running on different kinds of devices. Desktop-based applications are developed using J2SE, which provides the necessary user interface classes. Server-based applications are developed using J2EE, which emphasizes component-based programming and deployment. Handheld and embedded devices are targeted by J2ME.

Java 2 Micro Edition
In J2ME, the Java runtime environment is adapted for constrained devices - devices that have limitations on what they can do when compared to standard desktop or server computers. For low-end devices, the constraints are fairly obvious: extremely limited memory, small screen sizes, alternative input methods, and slow processors. High-end devices have few, if any, of these constraints, but they can still benefit from the optimized environments and new programming interfaces that J2ME defines.

Learning about J2ME is not hard: Once you understand the new terminology, it's mostly about learning new APIs (application programming interfaces) and learning how to work in constrained environments. (If you think writing an applet is challenging, wait until you try to fit an application into the 30K of memory some cellphones provide!) You can use most of the same tools you already use in your code development, and with careful coding you can develop libraries of classes that are portable to any device or computer with a Java virtual machine

J2ME Core Concepts
At the heart of Java 2 Micro Edition (J2ME) are three core concepts: configurations, profiles, and optional packages. You can't write a J2ME application without understanding these concepts, because they determine the features of Java that you can use, which application programming interfaces (APIs) are available, and how your applications are packaged.

Configurations
A configuration is a complete Java runtime environment, consisting of three things:
  • A Java virtual machine (VM) to execute Java bytecode.
  • Native code to interface to the underlying system.
  • A set of core Java runtime classes.
To use a configuration, a device must meet certain minimum requirements as defined in the configuration's formal specification. Although a configuration does provide a complete Java environment, the set of core classes is normally quite small and must be enhanced with additional classes supplied by J2ME profiles or by configuration implementor. In particular, configurations do not define any user interface classes.

J2ME defines two configurations, the Connected Limited Device Configuration (CLDC) and the Connected Device Configuration (CDC). The CLDC is for very constrained (limited) devices -- devices with small amounts of memory and/or slow processors. The CDC uses a full Java VM and a much larger set of core classes, so it requires more memory than the CLDC and a faster processor. The CDC is in fact a superset of the CLDC.

Optional Packages
An optional package is a set of APIs in support of additional, common behaviors that don't really belong in one specific configuration or profile. Bluetooth support, for example, is defined as an optional package.

There are many optional packages in development, including the following:
  • RMI Optional Package, which adds RMI support to CDC/FP-based profiles
  • Java APIs for Bluetooth, which adds Bluetooth support to CLDC-based profiles
  • JDBC Optional Package for CDC/Foundation Profile, which defines a subset of JDBC (database access APIs) for use with CDC/FP-based profiles.

What It All Means
"J2ME application" is an ambiguous term. Below are the questions you must ask yourself before you start application development, because they determine which language features and which classes your application can use.
  • For what profile is the application intended?
  • Which optional packages does it require?
  • How much memory does it take?
If you limit your application to CDC-based profiles, for example, you make development simpler of the many familiar J2SE APIs, but you cut out the low-end devices from your potential install base.

Targeting CLDC-based profiles makes your development task harder, especially when trying to shrink the size of your application to run on as many of the smaller devices as possible.

These are the kinds of tradeoffs you'll have to make as you begin to work with J2ME.


Related Links: J2SE J2EE

References:
Developer.com - Eriq Gigueri - What is J2ME, J2ME Core Concepts

What is WEB 2.0?

0 comments

The bursting of the dot-com bubble in the fall of 2001 marked a turning point for the web. The concept of "Web 2.0" began with a conference brainstorming session between O'Reilly and MediaLive International. Dale Dougherty, web pioneer and O'Reilly VP, noted that far from having "crashed", the web was more important than ever, with exciting new applications and sites popping up with surprising regularity. What's more, the companies that had survived the collapse seemed to have some things in common. Could it be that the dot-com collapse marked some kind of turning point for the web, such that a call to action such as "Web 2.0" might make sense? We agreed that it did, and so the Web 2.0 Conference was born.

According to Tim O'Reilly: "Web 2.0 is the business revolution in the computer industry caused by the move to the Internet as a platform, and an attempt to understand the rules for success on that new platform."



Web 2.0 is an enhancement of the existing Internet. It is a system in which online users become participants rather than mere viewers. Web 2.0 demonstrated the technology to assemble and manage large global crowds with a common interest in social interaction. Web 2.0 is characterised by information of little inherent value and revenue was derived from third parties wanting to show advertising to eyeballs (Eg: Google Adsense). Organizations are getting aware of the potential of Web 2.0 enterprise innovation or industry model innovation with single point solutions such as wikis and forums.

With Web 2.0, information can be pulled from a number of different places, and it can be personalized to meet the needs of a single user. Applications can be built on the existing applications that comprise the Web 2.0 interface. Web 2.0 allows the mass population to communicate with each other and spread ideas rather than receiving their information from a single authority.



Web 2.0 is often spoken of as a future goal, but the truth is that the change from Web 1.0 to Web 2.0 is in many ways indefinable. Web 2.0 is the “read-write” web whereas Web 1.0 was “read-only”. The change is a gradual growth and we have been witnessing is the transition from one to the other, with new business models and companies showing what can be done, with the most fruitful area being Software as a Service (SAAS).

10 key differences between Web 1.0 and Web 2.0:

1. Open standards Base: Ensure service connectivity is reliable
2. Ubiquitious Broadband: The infrastructure is now available to support web 2.0 models.
3. Less investment required: Companies can get far without a massive investment meaning companies can quickly be incubated to spread the risk.
4. Better Browsers: New format support, RSS etc enriches the user experience.
5. Powerful development environments: AJAX is powerful and is easier to use compared to J2EE.
6. Device convergence: Ability to access the web from a multitude of devices means on-demand services are more functional for real everyday use.
7. More Innovation: The de-skilling of the technological requirements mean more people get involved in trying to create, often from a more creative user-base.
8. Change in Use: The focus of the web and web 2.0 is firmly on usefulness and in many cases commercial basis.
9. Maturity: Resilience and Scalability are easier to provide with cheaper hardware and better understanding of how to achieve this.
10. History: Lessons from the dot com crash are not easily forgotten.



Disadvantages:
1. Dependence: If internet connection goes down, how will you access the information that you come to depend on? Because many web services will be offered for free, they won't be secure, and they could easily be targeted by hackers.

2. "Paperless" office: It is important for some things to be kept in a hard copy form. If your hard drive crashes, and you didn't back up your information, you could lose important data.

3. Sharing: When users begin sharing information that is copyrighted, people don't get their due for the work they do. If videos, music, movies, and other information can be shared freely, how can profit be generated?

Related links : WEB 1.0 WEB 3.0

References:

  1. O’Reilly 2005 - What Is Web 2.0? Design Patterns and Business Models for the Next Generation of Software

  2. Exforsys Inc - Advantages and Disadvantages of Web 2.0

  3. JANA technology services blog 2006 - 10 differences between WEB 1.0 and WEB 2.0