Tuesday, August 26, 2008

iPhone

Apple iPhone: Beyond the hype



Next on the cards

What's there in the iPhone

· The iPhone App Store, a drop-dead simple online catalogue of new programmes and updates. Around 1,700 applications are available to browse, download and install directly on the iPhone; they don't have to be transferred from a computer. Most applications are listed free or are priced at as low as Rs 40.

· The new iPhone has a true global positioning system. Ingenious sensors show your location on a map by analysing nearby cell-towers and WiFi hot spots.

· The iPhone is the best handheld gaming machine. The games, listed on App Store, feature excellent 3-D graphics and tilt control. For instance, in one driving simulator you turn the iPhone itself like a steering wheel.

· Web browsing on the iPhone 3G will blow you away. The pokey EDGE network might not be as great an experience but pull out the handset when in a WiFi range and you will realise Apple's genius.

· The camera application ?Geotags? photos with the user's GPS location (with prior permission, of course!)

What's not there in the iPhone

· Key features that are commonplace on other devices such as multimedia messaging and copy-paste functionality in the SMS.

· There's no voice-dialing, memory-card slot, Bluetooth stereo audio or phone-to-phone photos.

· Apple also missed out on enabling video camera support, another commonplace feature on even low-end mobile phones.

· Apple's infamous software keyboard rotates with websites when used with Safari (Apple's Internet browser), but the company did not expand that functionality to any other aspect of the device.

· Higher end phones are capable of tethering ? acting as a modem for a computer through USB or Bluetooth ? but Apple has overlooked this feature.

Wednesday, May 9, 2007

TAXES

A tax is a financial charge or other levy imposed on an individual or a legal entity by a state or a functional equivalent of a state (for example, tribes, secessionist movements or revolutionary movements). Taxes could also be imposed by a subnational entity. Taxes consist of direct tax or indirect tax, and may be paid in money or as corvée labor. A tax may be defined as a "pecuniary burden laid upon individuals or property to support the government [ . . .] a payment exacted by legislative authority."A tax "is not a voluntary payment or donation, but an enforced contribution, exacted pursuant to legislative authority" and is "any contribution imposed by government [ . . .] whether under the name of toll, tribute, tallage, gabel, impost, duty, custom, excise, subsidy, aid, supply, or other name."

In modern capitalist taxation systems, taxes are levied in money, but in-kind and corvée taxation are characteristic of traditional or pre-capitalist states and their functional equivalents. The method of taxation and the government expenditure of taxes raised is often highly debated in politics and economics. Tax collection is performed by a government agency such as Revenue Canada, the Internal Revenue Service (IRS) in the United States, or Her Majesty's Revenue and Customs (HMRC) in the UK. When taxes are not fully paid, civil penalties (such as fines or forfeiture) or criminal penalties (such as incarceration)[3] may be imposed on the non-paying entity or individual.


Taxation levels

The first known system of taxation was in Ancient Egypt around 3000 BC - 2800 BC in the first dynasty of the Old Kingdom.[7] Records from the time document that the pharaoh would conduct a biennial tour of the kingdom, collecting tax revenues from the people. Early taxation is also described in the Bible. In Genesis (chapter 47, verse 24 - the New International Version), it states "But when the crop comes in, give a fifth of it to Pharaoh. The other four-fifths you may keep as seed for the fields and as food for yourselves and your households and your children." Joseph was telling the people of Egypt how to divide their crop, providing a portion to the Pharaoh. A share (20%) of the crop was the tax. While not money, the idea is the same.

Quite a few records of the government tax collection in Europe since at least the 17th century are still available today. But the taxation levels are hard to compare to the size and flow of the economy since production numbers are not as readily available. The government expenditures and revenue in France during the 17th century went from about 24.30 million livres in 1600-10 to about 126.86 million livres in 1650-59 to about 117.99 million livres in 1700-10 when the government debt had reached 1.6 billion livres. In 1780-89 it reached 421.50 million livres. [8] The taxation as a percentage of production of final goods may have reached 15% - 20% during the 17th century in places like France, the Netherlands, and Scandinavia. During the war-filled years of the eighteenth and early nineteenth century, tax rates in Europe increased dramatically as war became more expensive and governments became more centralized and adept at gathering taxes. This increase was greatest in England, Peter Mathias and Patrick O'Brien found that the tax burden increased by 85% over this period. Another study confirmed this number, finding that per capita tax revenues had grown almost six-fold over the eighteenth century, but that steady economic growth had made the real burden on each individual only double over this period before the industrial revolution. Average tax rates were higher in Britain than France the years before the French Revolution, twice in per capita income comparison, but they were mostly placed on international trade. In France, the taxes were lower but the burden was mainly on landowners, individuals, and internal trade and thus created far more resentment.

Taxation as a percentage of GDP in 2003 was 56.1% in Denmark, 54.5% in France, 49.0% in the Euro area, 42.6% in the United Kingdom, 35.7% in the United States, 35.2% in The Republic of Ireland, and among all OECD members an average of 40.7%.[10][11]


Wednesday, April 25, 2007

iPod

iPOD is a brand of portable media players designed and marketed by Apple and launched in 2001. Devices in the iPod range are primarily digital audio players, designed around a central click wheel — although the iPod shuffle has buttons also. As of October 2005, the line-up consists of the video-capable fifth generation iPod, the smaller iPod nano, and the display-less iPod shuffle. The full-sized model stores media on an internal hard drive, while the smaller iPod nano and iPod shuffle use flash memory. Like many digital music players, iPods can also serve as external data storage devices. In January 2007, Apple announced the iPhone, a device that combined the features of the video-capable iPod with mobile phone and mobile Internet capabilities.

Apple's iTunes software is used to transfer music to the devices. As a free jukebox application, iTunes stores an entire music library on the user's computer and can play, burn, and rip music from a CD. It can also transfer photos, videos, games, and calendars to the models that support them.

Apple focused its development on the iPod's unique user interface and its ease of use, rather than on technical capability. As of October 2004, the iPod is the world's best-selling range of digital audio players and its worldwide mainstream adoption made it one of the most popular consumer brands. Some of Apple's design choices and proprietary actions have, however, led to criticism and legal battles.

On Monday, April 9, 2007, Apple announced that over 100 million iPods had been sold worldwide. This makes the iPod the best-selling music player in history and one of the most successful (best selling) electronic devices in history.


History and design

iPod came from Apple's digital hub strategy,when the company began creating software for the growing market of digital devices being purchased by consumers. Digital cameras, camcorders and organizers had well-established mainstream markets, but the company found existing digital music players "big and clunky or small and useless" with user interfaces that were "unbelievably awful", so Apple decided to develop its own. Apple's hardware engineering chief, Jon Rubinstein, assembled a team of engineers to design it, including Tony Fadell, hardware engineer Michael Dhuey, and design engineer Jonathan Ive, with Stan Ng as the marketing manager. The product was developed in less than a year and unveiled on 23 October 2001. CEO Steve Jobs announced it as a Mac-compatible product with a 5 GB hard drive that put "1000 songs in your pocket."

Uncharacteristically, Apple did not develop iPod's software entirely in-house. Apple instead used PortalPlayer's reference platform which was based on 2 ARM cores. The platform had rudimentary software running on a commercial microkernel embedded operating system. PortalPlayer had previously been working on an IBM-branded MP3 player with Bluetooth headphones.Apple contracted another company, Pixo, to help design and implement the user interface, under the direct supervision of Steve Jobs.Once established, Apple continued to refine the software's look and feel. Starting with the iPod mini, the Chicago font was replaced with Espy Sans. Later iPods switched fonts again to Podium Sans — a font similar to Apple's corporate font Myriad. iPods with color displays then adopted some Mac OS X themes like Aqua progress bars, and brushed metal in the lock interface.

The name iPod was proposed by Vinnie Chieco, a freelance copywriter, who (with others) was called by Apple to figure out how to introduce the new player to the public. After Chieco saw a prototype, he thought of the movie 2001: A Space Odyssey and the phrase "Open the pod bay door, Hal!", which refers to the white EVA Pods of the Discovery One spaceship. Apple had previously registered the name "iPod" for Internet kiosks, but never put it to use.

Software

iPod can play MP3, AAC/M4A, Protected AAC, AIFF, WAV, Audible audiobook, and Apple Lossless audio file formats. iPod photo introduced the ability to display JPEG, BMP, GIF, TIFF, and PNG image file formats. Fifth generation iPods can additionally play MPEG-4 (H.264/MPEG-4 AVC) and QuickTime video formats, with restrictions on video dimensions, encoding techniques and data-rates. Unlike most other media players, Apple does not support Microsoft's WMA audio format — but a converter for non-Digital Rights Management (DRM) WMA files is provided with the Windows version of iTunes. MIDI files also cannot be played, but can be converted to audio files using the "Advanced" menu in iTunes. Alternative open-source audio formats such as Ogg Vorbis and FLAC are not supported. Each time iPod connects to its host computer, iTunes will synchronize entire music libraries or music playlists and the user can choose for automatic or manual synchronization. Song ratings can be set on iPod and synchronized later to the iTunes library, however only one host computer is allowed.

User interface

iPods with color displays use anti-aliased graphics and text, with sliding animations. These iPods have five buttons and the later generations have the buttons integrated into the click wheel — an innovation which gives an uncluttered, minimalist interface. The buttons are:

  • Menu: to traverse backwards through the menus, and toggle the backlight on older iPods
  • Center: to select a menu item
  • Play / Pause: this doubles as an off switch when held
  • Skip Forward / Fast Forward
  • Skip Backwards / Fast Reverse

Other operations such as scrolling through menu items and controlling the volume are performed by using the click wheel in a rotational manner, while an additional Hold switch helps prevent accidental button presses. iPod shuffle does not have a click wheel and instead has five buttons positioned differently to the larger models: It has a Play / Pause button in the center, surrounded by four buttons: Volume Up / Down and Skip Forward / Backwards. The later models automatically pause playback when the headphones are unplugged from the headphone jack, but playback does not resume upon re-insertion. An iPod that has crashed or frozen can be reset by switching Hold on then off, then pressing Menu and Center (Menu and Play on the third generation iPod) for 6 seconds.

Operating system and firmware

iPod's operating system is stored on its dedicated storage medium. An additional NOR flash ROM chip (either 1 MB or 512 KB) contains a bootloader program that tells the device to load its OS from the storage medium. Each iPod also has 32 MB of RAM, although the 60 and 80 GB fifth generation have 64 MB. A portion of the RAM is used to hold the iPod OS loaded from firmware, but the majority of it serves to cache songs from the storage medium. For example, iPod could spin its hard disk up once and copy approximately 30 MB of upcoming songs into RAM, thus save power by not requiring the drive to spin up for each song. Rockbox and iPodLinux offer open-source alternatives to the standard firmware and operating system, respectively.

iTunes Store

Main articles: iTunes and iTunes Store

The iTunes Store is an online media store run by Apple and accessed via iTunes. It was introduced on 29 April 2003 and it sells individual songs, with typical prices being US$0.99, AU$1.69 (inc. GST), NZ$1.79 (inc. GST), EU€0.99, or GB£0.79 per song. iPods are the only portable music players that can play the purchased music. The store became the market leader soon after its launch[5] and Apple announced the sale of videos through the store on 12 October 2005. Full-length movies became available on 12 September 2006.[6]

Purchased audio files use the AAC format with added encryption. The encryption is based on the FairPlay DRM system. Up to five authorized computers and an unlimited number of iPods can play the files. Burning the files onto an audio CD, then re-compressing to a different lossy format can create music files without the DRM, although this results in reduced quality. The DRM can also be removed using third-party software. In March, 2007, Steve Jobs announced in colaboration with EMI that the iTunes Store would begin to sell DRM-free song begining in June 2007 at US$ 1.29.

iPods cannot play music files from competing music stores that use rival-DRM technologies like Microsoft's protected WMA or RealNetworks' Helix DRM. Example stores include Napster and MSN Music. RealNetworks claims that Apple is creating problems for itself,[7] by using FairPlay to lock users into using the iTunes Store. Steve Jobs stated that Apple makes little profit from song sales, although Apple uses the store to promote iPod sales.[8] iPods can however play music files from online stores that do not use DRM, such as eMusic or Amie Street.

Additional features

In March 2002, Apple added limited PDA-like functionality: Text files can be displayed, while contacts and schedules can be viewed and synchronized with the host computer.[9] Some built-in games are available, including Brick (a clone of Breakout), Parachute, Solitaire, and Music Quiz. A firmware update released in September 2006 brought some extra features to fifth generation iPods including adjustable screen brightness, gapless playback, and downloadable games (available for purchase from the iTunes Store).

File storage

All iPods can function as mass storage devices to store data files; this function is controlled by the "Enable Disk Use" option in iTunes. If the iPod is formatted on a Mac OS X computer it uses the HFS+ file system format, which allows it to serve as a boot disk for a Mac computer.[citation needed] If it is formatted on Windows, the FAT32 format is used. With the advent of the Windows-compatible iPod, iPod's default file system switched from HFS+ to FAT32, although it can be reformatted to either filesystem (excluding the iPod shuffle which is strictly FAT32). Generally, if a new iPod (excluding the iPod shuffle) is initially plugged into a computer running Windows, it will be formatted with FAT32, and if initially plugged into a Mac running Mac OS X it will be formatted with HFS+.

Unlike most other MP3 players (including PlaysForSure devices), simply copying files to the drive with a file management application will not allow iPod to properly access them. The user must use software that has been specifically designed to transfer media files to iPods, so that the files are playable and viewable. Aside from iTunes, several alternative third-party applications are available on a number of different platforms.

iTunes cannot transfer songs or videos from iPod to computer,[citation needed] although iTunes 7 allows it for music purchased through the iTunes Music Store. Media files are stored on the iPod in a hidden folder, together with a proprietary database file. The hidden content can be accessed on the host operating system however, by enabling hidden files to be shown.[citation needed] The audio can then be recovered manually by dragging the files or folders onto the iTunes Library or by using third-party software.

Hardware

Chipsets and electronics

Microcontroller
  • iPod first to third generations — Two ARM 7TDMI-derived CPUs running at 90 MHz.
  • iPod fourth and fifth generations, iPod mini, iPod nano first generation — Variable-speed ARM 7TDMI CPUs, running at a peak of 80 MHz to save battery life.
  • iPod nano second generation — Samsung System-On-Chip, based around an ARM processor.[10]
  • iPod shuffle first generation — SigmaTel STMP3550 chip that handles both the music decoding and the audio circuitry.[11]

Audio chip

  • All iPods (except the shuffle) use audio codecs manufactured by Wolfson Microelectronics.
Storage medium
  • iPod first to fifth generation — 1.8 inch hard drives (ATA, 4200 rpm with proprietary connectors) made by Toshiba
  • iPod mini — 1 inch Microdrives manufactured by Hitachi and Seagate
  • iPod nano — Flash memory from Samsung, Toshiba, and others.
  • iPod shuffle — Flash memory

Batteries

Connectivity

Two iPod wall chargers, with FireWire (left) and USB (right) connectors, which allow iPods to charge without a computer.
Two iPod wall chargers, with FireWire (left) and USB (right) connectors, which allow iPods to charge without a computer.

Originally, a FireWire connection to the host computer was used to update songs or recharge the battery. The battery could also be charged with a power adapter that was included with the first 4 generations. The third generation began including a dock connector, allowing for FireWire or USB connectivity. This provided better compatibility with PCs, as most of them did not have FireWire ports at the time. However, the device could not be charged over USB, so the FireWire cables were nonetheless needed to connect to the AC adapter. The dock connector also brought opportunities to exchange data, sound and power with an iPod, which ultimately created a large market of accessories, manufactured by third parties such as Belkin and Griffin. The second generation iPod shuffle uses a single 3.5 mm jack which acts as both a headphone jack and a data port for the dock.

The iPod mini and the fourth generation iPod allowed recharging via USB and eventually Apple began shipping iPods with USB cables instead of FireWire, although the latter was available separately. As of the fifth generation iPod, Apple discontinued using FireWire for data transfer and made a full transition to USB 2.0, due to its widespread adoption. FireWire was then usable for recharging only.

New iPods have the ability to connect a Mini-TosLink to them. This includes first gen iPod Nano, second gen iPod Nano, and fifth gen iPod.

Accessories

Many companies, including Apple, produce accessories designed for iPods. This market is sometimes described as the iPod ecosystem.Some accessories add extra features that other music players have, such as sound recorders, FM radio tuners, wired remote controls, and audio/visual cables for TV connections. Other accessories offer more unique features like the Nike+iPod pedometer and the iPod Camera Connector. Other notable accessories include external speakers, wireless remote controls, protective cases/films and wireless earphones. Among the first accessory manufacturers were Griffin Technology, Belkin, JBL, Bose, Monster Cable, and SendStation.

Two designs of iPod earbuds. The revised version is shown on the right.
Two designs of iPod earbuds. The revised version is shown on the right.

The white earphones (or "earbuds") that ship with all iPods have become symbolic of the brand. Advertisements feature them prominently, often contrasting the white earphones (and cords) with people shown as dark silhouettes. The earphones have been revised twice: The first type came with the first and second generations, and the second type appeared on all iPods up to the second generation nanos.

In 2005, New York's Metropolitan Transportation Authority placed adverts on the subways warning passengers that "Earphones are a giveaway. Protect your device", after iPod thefts on the subway rose from zero in 2004 to 50 in the first three months of 2005.[

BMW released the first iPod automobile interface,allowing drivers of newer BMW vehicles to control their iPod using either the built-in steering wheel controls or the radio head-unit buttons. Apple announced in 2005 that similar systems would be available for other vehicle brands, including Mercedes-Benz,volvo Nissan, Alfa Romeo, Ferrari,[19] Acura, Audi, Honda,Renault and Volkswagen. Scion offers standard iPod connectivity on all their cars.

Some independent stereo manufacturers including JVC, Pioneer, Kenwood, Alpine, and Harman Kardon also have iPod-specific integration solutions. Alternative connection methods include adaptor kits (that use the cassette deck or the CD changer port), audio input jacks, and FM transmitters such as the iTrip — although personal FM transmitters are illegal in some countries. Many car manufacturers have added audio input jacks as standard.[22]

Beginning in mid-2007, four major airlines, United, Continental, Delta, and Emirates reached agreements to install iPod seat connections. The free service will allow passengers to power and charge their iPod, and view their video and music libraries on individual seat-back displays. Originally KLM and Air France were reported to be part of the deal with Apple, but they later released statements explaining that they were only contemplating the possibility of incorporating such systems.


Industry impact

iPods have won several awards ranging from engineering excellence,to most innovative audio product,to fourth best computer product of 2006. iPods often receive favorable reviews; scoring on looks, clean design and ease of use. PC World says that iPods have "altered the landscape for portable audio players".

Several industries are modifying their products to work better with both the iPod and the AAC audio format. Examples include CD copy-protection schemes,and mobile phones from Sony Ericsson and Nokia that play AAC files rather than WMA. Microsoft's Zune device also supports AAC and it has adopted a similar closed DRM model used by iPods and the iTunes Store, despite Microsoft previously marketing the benefits of choice with their PlaysForSure initiative. Podcasts and download charts have also had mainstream adoption.



Enterprise जावा beans

EJB) is a managed, server-sided component for modular construction of enterprise applications.

The EJB specification is one of the several Java APIs in the Java Platform, Enterprise Edition. EJB is a server-side component that encapsulates the business logic of an application. The EJB specification was originally developed in 1997 by IBM and later adopted by Sun Microsystems (EJB 1.0 and 1.1) and enhanced under the Java Community Process as JSR 19 (EJB 2.0), JSR 153 (EJB 2.1) and JSR 220 (EJB 3.0).


The EJB specification intends to provide a standard way to implement the back-end 'business' code typically found in enterprise applications (as opposed to 'front-end' user-interface code). Such code was frequently found to reproduce the same types of problems, and it was found that solutions to these problems are often repeatedly re-implemented by programmers. Enterprise Java Beans were intended to handle such common concerns as persistence, transactional integrity, and security in a standard way, leaving programmers free to concentrate on the particular program at hand.

Accordingly, the EJB specification details how an application server provides:

Additionally, the Enterprise JavaBean specification defines the roles played by the EJB container and the EJBs as well as how to deploy the EJBs in a container।


History

Rapid adoption followed by criticism

This vision was persuasively presented by EJB advocates such as IBM and Sun Microsystems, and Enterprise JavaBeans were quickly adopted by large companies. Problems were quick to appear, however, and the reputation of EJBs began to suffer as a result. For starters, the APIs of the standard were far more complex than developers are typically used to. An abundance of checked exceptions required interfaces, and the implementation of the bean class as an abstract class were all unusual and counter-intuitive for many programmers. Granted, the problems that the EJB standard was attempting to address, such as object-relational mapping and transactional integrity, are complex. However many programmers found the APIs to be just as difficult if not more so, leading to a widespread perception that EJBs introduced complexity without delivering real benefits.

In addition, businesses found that using EJBs to encapsulate business logic brought a performance penalty. This is because the original specification only allowed for remote method invocation through CORBA (and optionally other protocols), even though the large majority of business applications actually do not require this distributed computing functionality. The EJB 2.0 specification addressed this concern by adding the concept of Local interfaces which could be called directly without performance penalties by applications that were not distributed over multiple servers.

The complexity issue, however, continued to hinder EJB's acceptance. Although high-quality developer tools made it easy to create and use EJBs by automating most of the repetitive tasks, these tools did not make it any easier to learn how to use the technology. Moreover, a counter-movement had grown up on the grass-roots level among programmers. The main products of this movement were the so-called 'lightweight' (i.e. in comparison to EJB) technologies of Hibernate (for persistence and object-relational mapping) and Spring Framework (which provided an alternate and far less verbose way to encode business logic). Despite their lacking the backing of big businesses that EJBs had, these technologies grew in popularity and were adopted more and more by businesses who had become disillusioned with EJBs.

Reinventing EJBs

Gradually an industry consensus emerged that the original EJB specification's primary virtue — enabling transactional integrity over distributed applications — was of limited use to most enterprise applications. The functionality delivered by simpler frameworks like Spring and Hibernate was more useful to enterprise applications. Accordingly, the EJB 3.0 specification (JSR 220) was a radical departure from its predecessors, following this new paradigm. It shows a clear influence from Spring in its use of POJOs, and its support for dependency injection to simplify configuration and integration of heterogeneous systems. Gavin King, the creator of Hibernate, participated in the EJB 3.0 process and is an outspoken advocate of the technology. Many features originally in Hibernate were incorporated in the Java Persistence API, the replacement for entity beans in EJB 3.0. The EJB 3.0 specification relies heavily on the use of annotations, a feature added to the Java language with its 5.0 release, to enable a much less verbose coding style.

Accordingly, in practical terms EJB 3.0 is very nearly a completely new API, bearing little resemblance to the previous EJB specifications.

EJB types

An EJB container can hold three major categories of beans:

  • Session Beans
    • Stateless Session Beans
    • Stateful Session Beans
  • Entity Beans
  • Message Driven Beans (MDBs or Message Beans)

Stateless Session Beans are distributed objects that do not have state associated with them thus allowing concurrent access to the bean. The contents of instance variables are not guaranteed to be preserved across method calls. The lack of overhead to maintain a conversation with the calling program makes them less resource-intensive than stateful beans.

Stateful Session Beans are distributed objects having state, that is, they keep track of which calling program they are dealing with throughout a session. For example, checking out in a web store might be handled by a stateful session bean, which would use its state to keep track of where the customer is in the checkout process. On the other hand, sending an e-mail to customer support might be handled by a stateless bean, since this is a one-off operation and not part of a multi-step process. Stateful session bean's state may be persisted, but access to the bean instance is limited to only one client.

Entity Beans are distributed objects having persistent state. The persistent state may or may not be managed by the bean itself. Beans in which their container manages the persistent state are said to be using Container-Managed Persistence (CMP), whereas beans that manage their own state are said to be using Bean-Managed Persistence (BMP).

Message Driven Beans are distributed objects that behave asynchronously. That is, they handle operations that do not require an immediate response. For example, a user of a website clicking on a "keep me informed of future updates" box may trigger a call to a Message Driven Bean to add the user to a list in the company's database. (This call is asynchronous because the user does not need to wait to be informed of its success or failure.) These beans subscribe to JMS (Java Message Service) message queues or message topics. They were added in the EJB 2.0 specification to allow event-driven processing inside EJB Container. Unlike other types of beans, MDB does not have a client view (Remote/Home interfaces), i.e. clients can not look-up an MDB instance. It just listens for any incoming message on a JMS queue (or topic) and processes them automatically.

Other types of Enterprise Beans have been proposed. For instance, Enterprise Media Beans (JSR 86) address the integration of multimedia objects in Java EE applications.

Execution of EJBs

EJBs are deployed in an EJB container within the application server. The specification describes how an EJB interacts with its container and how client code interacts with the container/EJB combination. The EJB classes used by applications are included in the javax.ejb package. (The javax.ejb.spi package is a service provider interface used only by EJB container implementations.)

With EJB 2.1 and earlier, each EJB had to provide a Java implementation class and two Java interfaces. The EJB container created instances of the Java implementation class to provide the EJB implementation. The Java interfaces were used by client code of the EJB.

The two interfaces, referred to as the Home and the Component interface, specified the signatures of the EJB's remote methods. The methods were split into two groups:

  • class methods - not tied to a specific instance, such as those used to create an EJB instance (factory method) or to find an existing entity EJB (see EJB Types, below). These were declared by the Home interface.
  • instance methods, i.e. methods tied to a specific instance. These are placed in the Component interface.

Because these are merely Java interfaces and not concrete classes, the EJB container must generate classes for these interfaces that will act as a proxy in the client. Client code invokes a method on the generated proxies, which in turn places the method arguments into a message and sends the message to the EJB server.

Remote Communication

The EJB specification requires that EJB containers support accessing the EJBs using RMI-IIOP. EJBs may be accessed from any CORBA application or provide Web Services.

transactions

EJB containers must support both container managed ACID transactions and bean managed transactions. Container-managed transactions use a declarative syntax for specifying transactions in the deployment descriptor.

Events

JMS is used to send messages from the beans to client objects, to let clients receive asynchronous messages from these beans. MDB can be used to receive messages from client applications asynchronously using either a JMS Queue or a Topic.

Naming and Directory Services

Clients of the EJB locate the Home Interface implementation object using JNDI. The Home interface may also be found using the CORBA name service. From the home interface, client code can find entity beans, as well as create and delete existing EJBs.

Security

The EJB Container is responsible for ensuring the client code has sufficient access rights to an EJB।


Version History

EJB 3.0, final release (2006-05-02)

JSR 220 - Major changes:

  • Annotations, alternative to deployment descriptors

EJB 2.1, final release (2003-11-24)

JSR 153 - Major changes:

  • Web service support (new): stateless session beans can be invoked over SOAP/HTTP. Also, an EJB can easily access a Web service using the new service reference.
  • EJB timer service (new): Event-based mechanism for invoking EJBs at specific times.
  • Message-driven beans accepts messages from sources other than JMS.
  • Message destinations (the same idea as EJB references, resource references, etc.) has been added.
  • EJB query language (EJB-QL) additions: ORDER BY, AVG, MIN, MAX, SUM, COUNT, and MOD.
  • XML schema is used to specify deployment descriptors, replaces DTDs

EJB 2.0, final release (2001-08-22)

JSR 19 - Major changes: Overall goals:

  • The standard component architecture for building distributed object-oriented business applications in Java.
  • Make it possible to build distributed applications by combining components developed using tools from different vendors.
  • Make it easy to write (enterprise) applications: Application developers will not have to understand low-level transaction and state management details, multi-threading, connection pooling, and other complex low-level APIs.
  • Will follow the Write Once, Run Anywhere - philosophy of Java. An enterprise Bean can be developed once, and then deployed on multiple platforms without recompilation or source code modification.
  • Address the development, deployment, and runtime aspects of an enterprise application’s life cycle.
  • Define the contracts that enable tools from multiple vendors to develop and deploy components that can interoperate at runtime.
  • Be compatible with existing server platforms. Vendors will be able to extend their existing products to support EJBs.
  • Be compatible with other Java APIs.
  • Provide interoperability between enterprise Beans and Java 2 Platform Enterprise Edition (J2EE) components as well as non-Java programming language applications.
  • Be compatible with the CORBA protocols (RMI-IIOP).

EJB 1.1, final release (1999-12-17)

Major changes: '* XML deployment descriptors'* Default JNDI contexts * RMIoverIIOP

  • Security - role driven, not method driven
  • Entity Bean support - mandatory, not optional

Goals for Release 1.1:

  • Provide better support for application assembly and deployment.
  • Specify in greater detail the responsibilities of the individual EJB roles.

EJB 1.0 (1998-03-24)

Announced at JavaOne 1998, Sun's third Java developers conference (March 24 through 27) Goals for Release 1.0:

  • Defined the distinct “EJB Roles” that are assumed by the component architecture.
  • Defined the client view of enterprise Beans.
  • Defined the enterprise Bean developer’s view.
  • Defined the responsibilities of an EJB Container provider and server provider; together these make up a system that supports the deployment and execution of enterprise Beans.

Tuesday, April 24, 2007

CORBA


CORBA “wraps” program code into a bundle containing information about the capabilities of the code and how to invoke it। The wrapped objects can then be invoked from other programs or CORBA objects across a network.

CORBA uses an interface definition language (IDL) to specify the interfaces that objects will present to the world. CORBA then specifies a “mapping” from IDL to a specific implementation language like C++ or Java. Standard mappings exist for Ada, C, C++, Lisp, Smalltalk, Java, COBOL, PL/I and Python. There are also non-standard mappings for Perl, Visual Basic, Ruby, and Tcl implemented by ORBs written for those languages.

This diagram illustrates how the generated code is used within the CORBA infrastructure:

This picture does not reflect all typically used possibilities. Normally the server side has the Portable Object Adapter (POA) that redirects calls either to the local servants or (to balance the load) to the other servers. Also, both server and client parts often have interceptors that are described below.

In addition to providing users with a language and a platform-neutral remote procedure call specification, CORBA defines commonly needed services such as transactions and security.

Key फ़ीचर्स


Objects by Value (OBV)

Apart from remote objects, the CORBA and RMI-IIOP define the concept of the OBV. The code inside the methods of these objects is executed locally by default. If the OBV has been received from the remote side, the needed code must be either a priori known for both sides or dynamically downloaded from the sender. To make this possible, the record, defining OBV, contains the Code Base that is a space separated list of URLs from where this code should be downloaded. The OBV can also have the remote methods.

The OBV's may have fields that are transferred when the OBV is transferred. These fields can be OBV's themselves, forming lists, trees or arbitrary graphs. The OBV's have a class hierarchy, including multiple inheritance and abstract classes.

CORBA Component Model (CCM)

CORBA Component Model (CCM) is an addition to the family of CORBA definitions. It was introduced with CORBA 3, and it describes standard application framework for CORBA components. It is an extension of "language independent Enterprise Java Beans (EJB)". It provides an abstraction of entities that can provide and accept services through well-defined named interfaces called ports.

The CCM has a component container, where software components can be deployed. The container offers a set of services that the components can use. These services include (but are not limited to) notification, authentication, persistence and transaction management. These are the most-used services any distributed system requires, and, by moving the implementation of these services from the software components to the component container, the complexity of the components is dramatically reduced.

External links

Portable interceptors

Portable interceptors are the "hooks", used by CORBA and RMI-IIOP to mediate the most important functions of the CORBA system. CORBA standard defines the following types of interceptors:

  1. IOR interceptors mediate the creation of the new references to the remote objects, presented by the current server.
  2. Client interceptors usually mediate the remote method calls on the client (caller) side. If the object Servant (CORBA) exists on the same server where the method is invoked, they also mediate the local calls.
  3. Server interceptors mediate the handling of the remote method calls on the server (handler) side.

The interceptors can attach the specific information to the messages being sent and IORs being created. This information can be later read by the corresponding interceptor on the remote side. Interceptors can also throw forwarding exceptions, redirecting request to another target.

General InterORB Protocol (GIOP)

The GIOP is an abstract protocol by which Object request brokers (ORBs) communicate. Standards associated with the protocol are maintained by the Object Management Group (OMG.). The GIOP architecture provides several concrete protocols:

  1. Internet InterORB Protocol (IIOP) - The Internet Inter-Orb Protocol, is a protocol for communication between CORBA ORBs that has been published by the Object Management Group. IIOP is an implementation of the GIOP for use over an internet, and provides a mapping between GIOP messages and the TCP/IP layer.
  2. SSL InterORB Protocol (SSLIOP) - SSLIOP is IIOP over SSL, providing encryption and authentication.
  3. HyperText InterORB Protocol (HTIOP) - HTIOP is IIOP over HTTP, providing transparent proxy bypassing.
  4. and many more...

Data Distribution Service (DDS)

The Object Management Group (OMG) has a related standard known as the Data Distribution Service (DDS) standard. DDS is a publish-subscribe data distribution model, in contrast to the CORBA remotely-invoked object model.

VMCID (Vendor Minor Codeset ID)

Each standard CORBA exception includes a minor code to designate the subcategory of the exception. Minor exception codes are of type unsigned long and consist of a 20-bit “Vendor Minor Codeset ID” (VMCID), which occupies the high order 20 bits, and the minor code which occupies the low order 12 bits.

Minor codes for the standard exceptions are prefaced by the VMCID assigned to OMG, defined as the unsigned long constant CORBA::OMGVMCID, which has the VMCID allocated to OMG occupying the high order 20 bits. The minor exception codes associated with the standard exceptions that are found in Table 3-13 on page 3-58 are or-ed with OMGVMCID to get the minor code value that is returned in the ex_body structure (see Section 3.17.1, “Standard Exception Definitions,” on page 3-52 and Section 3.17.2, “Standard Minor Exception Codes,” on page 3-58).

Within a vendor assigned space, the assignment of values to minor codes is left to the vendor. Vendors may request allocation of VMCIDs by sending email to tagrequest@omg.org.

The VMCID 0 and 0xfffff are reserved for experimental use. The VMCID OMGVMCID (Section 3.17.1, “Standard Exception Definitions,” on page 3-52) and 1 through 0xf are reserved for OMG use.


Corba Location

CorbaLoc means Corba Location and refers to a stringified object reference for a Corba object that looks similar to a URL.

All CORBA products must support two OMG-defined URLs: "corbaloc:" and "corbaname:". The purpose of these is to provide a human readable/editable way to specify a location where an IOR can be obtained.

An example of corbaloc is shown below:

corbaloc::160.45.110.41:38693/StandardNS/NameServer-POA/_root

A CORBA product may optionally support the "http:", "ftp:" and "file:" formats. The semantics of these is that they provide details of how to download a stringified IOR (or, recursively, download another URL that will eventually provide a stringified IOR).

References

External links

Monday, April 23, 2007

ASP.NET

ASP.NET is a set of web application development technologies marketed by Microsoft. Programmers can use it to build dynamic web sites, web applications and XML web services. It is part of Microsoft's .NET platform and is the successor to Microsoft's Active Server Pages (ASP) technology.

ASP.NET is built on the Common Language Runtime, meaning programmers can write ASP.NET code using any Microsoft .NET language.

ASPX file format

ASPX is a text file format used to create Webform pages; in programming jargon, the ASPX file typically contains static HTML or XHTML markup, as well as markup defining Web Controls and Web User Controls where the developer places all the required static and dynamic content for the web page. Additionally, dynamic code which runs on the server can be placed in a page within a block <% -- dynamic code -- %> which is similar to other web development technologies such as PHP, JSP, and ASP, but this practice is generally discouraged except for Databinding.

The recommended method for dealing with dynamic program code is to use the code-behind model, which places this code in a separate file or in a specially designated script tag. Code-behind files are typically named something to the effect of MyPage.aspx.cs or MyPage.aspx.vb based on the ASPX file name (this practice is automatic in Microsoft Visual Studio and other IDEs). When using this style of programming, the developer writes code to respond to different events, like the page being loaded, or a control being clicked, rather than a procedural walk through the document.

Performance

ASP.NET aims for performance benefits over other script-based technologies ( including ASP Classic ) by compiling the server-side code to one or a few DLL files on the web server. This compilation happens automatically the first time a page is requested (which means the developer need not perform a separate compilation step for pages). This feature provides the ease of development offered by scripting languages with the performance benefits of a compiled binary. However, the compilation might cause a noticeable delay to the web user when the newly-edited page is first requested from the web server.

The ASPX and other resource files are placed in a virtual host on an Internet Information Services (or other compatible ASP.NET servers; see Other Implementations, below). The first time a client requests a page, the .NET framework parses and compiles the file(s) into a .NET assembly and sends the response; subsequent requests are served from the dll files.

Developers can also choose to pre-compile their code before deployment, eliminating the need for just-in-time compilation in a production environment.

ASP.NET compared to ASP classic

ASP.NET attempts to simplify developers' transition from Windows application development to web development by offering the ability to build pages composed of controls similar to a Windows user interface. A web control, such as a button or label, functions in very much the same way as its Windows counterpart: code can assign it properties and respond to its events. Controls know how to render themselves: whereas Windows controls draw themselves to the screen, web controls produce segments of HTML and JavaScript which form part of the resulting page sent to the end-user's browser.

ASP.NET encourages the programmer to develop applications using an event-driven GUI paradigm (event-driven GUI model), rather than in conventional web-scripting environments like ASP and PHP. The framework attempts to combine existing technologies such as JavaScript with internal components like "ViewState" to bring persistent (inter-request) state to the inherently stateless web environment.

Other differences compared to ASP classic are:

  • Compiled code means applications run faster with more design-time errors trapped at the development stage.
  • Significantly improved run-time error handling, making use of exception handling using try-catch blocks.
  • Similar metaphors to Windows applications such as controls and events, which make development of rich user interfaces, previously only found on the desktop, possible.
  • An extensive set of controls and class libraries allows the rapid building of applications, plus user-defined controls allow commonly used templates, such as menus. Layout of these controls on a page is easier because most of it can be done visually in most editors.
  • ASP.NET leverages the multi-language capabilities of the .NET CLR, allowing web pages to be coded in VB.NET, C#, J#, etc.
  • Ability to cache the whole page or just parts of it to improve performance.
  • Ability to use the code-behind development model to separate business logic from presentation.
  • If an ASP.NET application leaks memory, the ASP.NET runtime unloads the AppDomain hosting the erring application and reloads the application in a new AppDomain.
  • Session state in ASP.NET can be saved in a SQL Server database or in a separate process running on the same machine as the web server or on a different machine. That way session values are not lost when the web server is reset or the ASP.NET worker process is recycled.
  • Previous versions of ASP.NET (1.0 and 1.1) were criticized for their lack of standards compliance. The generated HTML and JavaScript sent to the client browser would not always validate against W3C/ECMA standards. In addition, the framework's browser detection feature sometimes incorrectly identified web browsers other than Microsoft's own Internet Explorer as "downlevel" and returned HTML/JavaScript to these clients that was crippled or broken. However, in version 2.0, all controls generate valid HTML 4.0, XHTML 1.0 (the default) or XHTML 1.1 output, depending on the site configuration. Detection of standards-compliant web browsers is more robust and support for Cascading Style Sheets is more extensive.

Criticisms of ASP.NET

Active Server Pages Classic (ASP) and ASP.NET can be run side-by-side in the same web application. This approach allows developers to migrate applications slowly instead of all at once. On IIS 6.0 and lower, pages written using different versions of the ASP framework can't share Session State without the use of third-party libraries. This criticism does not apply to ASP.NET and ASP applications running side by side on IIS 7. With IIS 7, modules may be run in an integrated pipeline that allows modules written in any language to be executed for any request.[2]

In some circumstances, unhandled exceptions can force the ASP.NET worker processes to shut down. In this instance a fresh worker process is loaded, the application is restarted and application and session state can be lost depending on the configuration. Also, if the application relies on session state to store authentication information and the application is configured to use in-process sessions, the user may be logged out. ASP.NET 2.0 produces markup that passes W3C validation, but it is debatable as to whether this increases accessibility; one of the benefits of a semantic XHTML page + CSS representation. Several controls, such as the Login controls and the Wizard control, use HTML tables for layout by default. (Microsoft has now gone some way to solve this problem by releasing the ASP.NET 2.0 CSS Control Adapters, a free add-on that produces compliant accessible XHTML+CSS markup.) However, some controls still rely on JavaScript. The CSS Control Adapters do help override output, even if it is to improve HTML, not CSS.

Development tools

Several available software packages exist for developing ASP.NET applications:


ASP.NET team members

Various ASP.NET team members maintain blogs. Here are some of them: