Thursday, June 25, 2009

Smooks a Java framework for processing XML and few non XML data

Smooks is a Java Framework/Engine for processing XML and non XML data (CSV, EDI etc).
Smooks can be used to:
  • Perform a wide range of Data Transforms - XML to XML, CSV to XML, EDI to XML, XML to EDI, XML to CSV, Java to XML, Java to EDI, Java to CSV, Java to Java, XML to Java, EDI to Java etc.
  • Populate a Java Object Model from a data source (CSV, EDI, XML, Java etc). Populated object models can be used as a transformation result itself, or can be used by (e.g.) Templating resources for generating XML or other character based results. Also supports Virtual Object Models (Maps and Lists of typed data), which can be used by EL and Templating functionality.
  • Process huge messages (GBs) - Split, Transform and Route message fragments to JMS, File, Database etc destinations.
  • Enrich a message with data from a Database, or other Datasources.
  • Perform Extract Transform Load (ETL) operations by leveraging Smooks' Transformation, Routing and Persistence functionality.

Smooks supports both DOM and SAX processing models, but adds a more "code friendly" layer on top of them. It allows you to plug in your own "ContentHandler" implementations (written in Java or Groovy), or reuse the many existing handlers.

Smooks is an ideal fit as part of an overall Integration Solution

Open source CRM and ERP

The back office for any company requires many different layers of software. Essentials like e-mail and a basic Web site are relatively simple commodities to run. The hardest job is delivering the kind of software that acts as the spinal cord for the business, that cares for all of the most essential details, big and small, that keep the customers paying the invoices and ensure the bank accounts hold enough money to make the payroll.

These systems go by names like customer relationship management (CRM) and enterprise resource planning (ERP), but they're really just a carefully crafted collection of database tables with a set of routines that keep the employees from messing up the information. They are usually so essential to a business that thedatabase administrators can puff up their chests and make credible statements like, "Our company is really just a big database with a sales force and a warehouse that do its bidding." They're not far from the truth.

Over the last decade, a number of open source solutions appeared that make it simpler for a company to digitize all of its operations by just downloading some code, firing up the compiler, and hooking up a database. These open source competitors began as very low-cost competitors to the giant enterprise packages from the likes of Oracle, SAP, and others.

Loss leaders
The space is now much more mature than a few programmers trading code. Companies like Openbravo, and Compiere are billing themselves as professional open source companies that deliver at least two grades of products: a community edition and a professional one with support and often additional features. They are also starting to offer SaaS editions, hosting the entire stack for you in what may or may not be a "cloud" of servers.

These choices offer a fascinating glimpse of how open source development is adapting to commercialization, at least when it involves projects that are mirrored in some way by proprietary tools. You can pay nothing and enjoy many of the features of the open source version or you can become a paying client and receive better features and more hand-holding.

This isn't an easy decision because the companies have become very adept at figuring out what the world needs and what it is willing to pay for. After all, if they can't figure this out, they'll go out of business and set the open source version adrift. And such a market failure wouldn't be as catastrophic as it can be with a proprietary company because the open source code is still out there and you're still welcome to maintain it with your own budget. The companies like to brag that they don't lock you in.

The so-called community versions also serve as advertising. The companies want you to adopt them easily because a happy user is much more likely to upgrade to a professional version later. But they've also arranged things so that it's easy to outgrow the basic systems. Some may see this as a cynical ploy, but I've come to view these trial mechanisms as one of the gentlest and kindest forms of marketing around. It may not be as much fun as getting the sales rep to take you on a boondoggle to Las Vegas, but it's much better than sitting through PowerPoint slides filled with buzzwords and promises. Negotiating the decision between an open source or the professional version is full of nuances and choices, but everything is out in the open.

For this piece, we concentrated on Openbravo, and Compiere, although many similar tools might do the job. For instance, many e-commerce front ends offer so many features that they might be considered ERP platforms themselves. Companies like Magento are offering e-commerce solutions that provide nice storefronts with many back-office tools.

The stores tools are also appearing in unexpected places. Projects like Drupal and Joomla are supposed to be CMSes, but programmers are building shopping carts and other tools that are turning them into storefronts that offer enough features to be ERPs for small businesses.

Other acronyms are also growing into the ERP space. Business intelligence (BI), the newest buzzword for the reporting tools, is sophisticated enough to handle many of the ERP and CRM chores. Jasper and Pentaho are much more than just tools for dumping SQL queries into nice-looking tables. It doesn't take long to build your own CRM or ERP solutions from tools like this.

Business process management (BPM or BPMS), the art of turning flowcharts for how the employees interact into software that keeps everything running smoothly, might also be a good fit for some CRM or ERP instances. Intalio pulls together a BPM solution from open source parts.

But Openbravo, and Compiere tackle the essential CRM and ERP functions head-on. Taking a close look at these three offerings gave us a chance to see how easy it is to build up a functioning back end and to understand just what the term "open source" means to someone with a boss who just wants the warehouse to talk with the sales force. All of the philosophical debates aren't as important when the database connection is being overwhelmed just before the Christmas rush.

Openbravo ERP: Templating to tables and forms

Many businesses want to automate more than just their sales force and customer service. Openbravo includes some rudimentary CRM capabilities and a big collection of routines for tracking goods through the warehouse to delivery -- a set of features that gives Openbravo claim to the acronym ERP. It's probably fair to say that it offers CRM too, although only the most basic kind.

The system mixes the job of herding the sales force with the order fulfillment processes. There are sections for managing the banking, procurement, production, and warehousing operations as well.

Openbravo is also mainly a collection of database tables with a pretty front end. It is written in Java with many of the classic Java libraries like Hibernate and JasperReports. The front end is built out of a custom templating engine that takes XML files and renders them in HTML. If you want to create custom forms and data structures, you'll work directly with the templating engine.

The Web pages are pretty straightforward, but they're not particularly AJAX-like. There's a good reason for that: Openbravo aims to make it possible to navigate with the keyboard alone, a capability that's pretty popular at offices where people need to work through form after form. This feature isn't perfect; there was one glitchy moment when I found one form wouldn't work because I wasn't logged in with sufficient permissions.

The Openbravo app is not as polished as many Web sites, but I don't think anyone will notice after spending 15 minutes getting oriented. The designers have done a good job producing something as efficient as the old "green screen" VT100-grade tools that dominated the back offices in the era of mainframes and mini computers.

The big version of Openbravo, the one that wears the ERP acronym, only works with Oracle and Postgres. They're said to be working on supporting DB2 and MySQL, but a number of custom hacks in the code apparently make it difficult to convert directly to MySQL. This professional version is also available as an "appliance" kit that offers one big, fat, licensed bundle with Tomcat, Oracle, and Apache. A lighter-weight version offers a point of sale (POS) application that can work with MySQL today.

There's a fair amount of flexibility for developing new modules -- more of a necessity for an ERP installation. Every business is different, and while the standard framework is pretty flexible, there's always room for more tables and modified control logic. The development documentation is pretty thick with a fair number of examples. Most of the time is devoted to picking up the structure of the system and the way that the XML files and Java code are turned into tables and forms.

Openbravo doesn't have the same kind of extensive plug-in system as SugarCRM(PHP), which limits the way that developers can bundle their features and toss them around. This doesn't mean that the system can't be extended -- it can very easily -- but there's no simple way to pull together a number of enhancements. On the other hand, I've found that plug-in architectures can be a real headache for developers because the plug-ins will eventually find a way to step on each other's toes.

Openbravo's open source community is not as robust as SugarCRM's. There are only 57 projects listed at the company's forge, and many of them are aimed at localizing the language. The wiki, which is much more extensive, is the preferred way to get documentation. They've also done a nice job producing a number of videos, an increasingly common way to tell developers how to get something done.

Openbravo's form system allows you to add new rows to the tables holding data about the clients. The forms can automatically enforce standard rules to prevent important data from being left out.

There are no differences in software features between the community edition and the two commercial editions, but you do get "unlimited bug support" and "installation support" with the paid versions. Openbravo will also sell a hosted version that comes with an Oracle license and a server. I'm guessing that many customers will also look at hiring some of the Openbravo developers to help customize the code. This kind of in-house knowledge is often worth the price.

Compiere ERP and CRM: Form-ed for customization
The Compiere package takes its name from the Italian verb for "accomplish" or "fulfill." It comes with both acronyms, ERP and CRM, indicating that it handles the two jobs pretty well. Like Openbravo, it is a set of database tables built to track customers, products, and the transactions between them. It offers a fairly sophisticated set of routines for juggling your customers and reaching out to them.

The Compiere system is built in Java and uses either Oracle or Postgres. Support for any JDBC database is said to be coming eventually. Ports to MySQL, Sybase, and Firebird are said to be in beta now.

The Compiere Web interface is similar to those of Openbravo and Sugar. There's a menu of options for tables, and you can drill down to add new lines to the tables or search for old ones. I floundered for a few minutes before I discovered that it was possible to drill down into subforms, something that's necessary when the database is forcing you to make sure that the client name you put down on an invoice matches a real client in the client table. There are a fair number of AJAX-like features for completing the forms and searching the table, although the tools for filling out the forms seemed easier to use for me. In general, it's a pretty modern interface.

I discovered the biggest gap between the community version and the professional version when testing Compiere's tools. The community version took a morning to install, and I found myself flummoxed by the client that would constantly keep resetting the Postgres port to 5444. The professional version, on the other hand, started up in about 15 minutes once I added the newer EnterpriseDB version of Postgres.

The basic community version of Compiere dates from the era when the browser wasn't as sophisticated and AJAX was just a kitchen cleanser. The community version interacts with the central database using a custom Java client. You need to buy the newer professional version to get the modern and more convenient Web-based interface.

More features start appearing once you start paying. Documentation is not free unless you sign up for the standard version ($25 per seat per month). Reporting tools are also tossed in. To get the Web-based interface you must spring for the professional edition ($50 per seat per month), a level of service that also includes unlimited support requests and other assorted bug fixes. There's also a "cloud edition" ($66 per seat per month) that wraps the professional edition into a pre-built image for Amazon's EC2.

There's not as much openness with Compiere as with SugarCRM and Openbravo. There's no open bazaar of plug-ins, nor is there much obvious energy devoted to modifying the code. Most of the threads on the forum hosted at SourceForge seem focused on installation problems. I'm not sure why. It isn't because the system is closed. In fact Compiere includes a pretty nice set of APIs and tools for calling external pieces of code.

The AJAX-enabled collection of forms for Compiere includes a number of pop-up divs that handle adding newdata entries on the fly. This enforces the constraints on the tables by forcing users to fill in the entries for the sub table before adding the main rows.

Most of the customization energy is built into the tools now. Compiere calls its customization process "model driven," which means that you just start adding the columns to the tables in the data modelsand Compiere does most of the rest. Adding a field to a form means filling out several additional forms, an act that left me wondering whether forms begetting more forms meant that they were a life force all of their own.

One piece of Compiere documentation promised that the customization process required no "error-prone procedural programming," which I thought was a pretty accurate description. Adding new lines to the forms and building new rules for them is programming, it's just not at the grungy Java level. The developers took their ERP mechanism and applied it to managing the source code itself.

Turns in the open road

Which should you choose? The most important criteria is one that can't be answered in a general review like this one. Each business has different needs, and it's hard to assess whether any of these even match the general workflow. The best tool with the most features can be a horrible fit for an organization if its internal architecture depends upon some structure to the workflow that doesn't work with your business. Sometimes it may be more expensive to shoehorn a large operation into a standard product like these than it would be to write custom software from scratch.

While it's doubly foolish to mix stereotypes of people with generalizations about software, I think that Openbravo is like guys in the warehouse: They want to fill orders and deliver the goods. Compiere is a bit of a mixture of both, but is dominated by the spirit of moving material through the warehouse.

But just as humans can move between roles, software can too. These systems are all open collections of database tables and rules for editing them. If something is done with one of them, it can be rewritten for any of the others.

In all three cases, customization is simple enough that it is becoming harder and harder to choose to build your own. It would be pretty silly to write your own back office in Java or C++ today, not only because so much functionality is already there for the taking, but because these systems are close to being languages themselves. The combination of the open source development and the rise of a plug-in architecture means that it's easier and easier to modify what exists. These apps were designed to accept the contributions of everyone, and this flexibility is baked into the entire development cycle.

Still, these three projects are a far cry from the image of a programmer-led commune where everything is shared equally. These are professional companies first and foremost, and they sell a product that they also happen to give away. Will the free, open source edition meet your needs? It may not be simple, but a skillful programmer should be able to install all of them and get them storing data in a reasonable amount of time.

Whether the community edition is the most cost-effective solution depends largely upon the nature of your business and the need for customization. If your customers and products map directly onto the simple table structure, then it's possible to do quite well with the community editions. After all, you can even build replacements for some of the commercial features that aren't included in the free edition. Simple reporting features, for instance, can be whipped together with JasperReportsbecause it's always possible to tie into the database without going through the main application.

Doing all of the work yourself, though, may be much more trouble than it's worth. I've found that it often doesn't take much time to do the programming work itself, but it can take a long time understanding the architecture and deciding how to implement the changes. It takes time to build up the expertise. While $50 per seat per month adds up pretty quickly, it's much less expensive than hiring a full-time programmer for a big part of the year.

The professional versions do include more support and -- in the case of Compiere -- access to the documentation. This is often pretty valuable, but it still requires you to do the actual customization work. None of the professional versions include this work -- that's your responsibility -- but the companies all support a network of programmers who are versed in the idiosyncrasies of each version. Even companies with a deep collection of programmers will want to consider hiring some help when installing these packages.

It's also important to take note of the amount of openness built into the products themselves. Customizing Openbravo, for instance, involves creating XML and Java classes. The results need to be compiled.

Clouds and cloud connections

Compiere uses the word "cloud" to describe a version of its Professional edition that's been tuned for Amazon's EC2 cloud. It offers a disk image that can be started quickly without much installation work. You'll still have to do all of the customization, but the version includes some extra help. The bills from Amazon, though, are yours to pay. Openbravo doesn't offer this directly, but some partners have built their own Amazon Machine Images.

These aren't the only options either. The software is open source, after all, and the companies have found partnerships with groups of consultants. There are dozens if not hundreds of groups that will install these tools and customize them for you. Some bundle this with hosting and some specialize in coming into your office. Some of the consultants contribute actively to the project. Working with these insiders can be a good path to getting the features you need, and the extra code they write for your installation could find its way into the next generation.

The SugarCRM, Openbravo, and Compiere open source toolkits -- and many others like them -- are evolving quickly and efficiently to supply what the market really needs. The community editions are all quite useful and usually relatively easy to handle, but the companies are ready to customize and support the work. It's a convenient model delivering a robust community of suppliers that compete to create a very fertile ecology for the users, whether they're writing checks to the vendors or not.

Open source CRM and ERP in a nutshell
Current version5.22.53.1
Editions and costsCommunity (free), Express ($7 per user per month), Professional ($30 per user per month), Enterprise ($50 per user per month)Community (free), SMB ($2,100 plus $700 to $560 per user per year), Enterprise ($1,050 to $560 per user per year)Community (free), Standard ($25 per user per month), Professional ($50 per user per month), Cloud ($66 per user per month)
CodingPHPXML and JavaJava
PlatformsWindows, Linux,Mac OS X, Solaris (Sparc orIntel); MySQL,SQL Server, or Oracle databaseWindows or Linux; Postgres or Oracle database; Tomcat application serverWindows or Linux; Postgres or Oracle database
Pros and cons+ Beginning integration with social networks + Broad support for community edition + Customer portal + Module builder allows everyone to change fields and tables + Many choices for commercial support - Many of the best features are only available in the professional edition+ Same extensive functionality in the community and professional editions + Documentation wiki is wide open + Web GUI is a nice, updated version of the old green screens - Development means writing XML+ Extensive CRM and ERP integration + Large collection of partners available for customization and integration help + Pre-built images for cloud installations + Makes adding form fields as easy as filling out another form - Documentation isn’t freely available - Community edition doesn't include Web-based interface
Bottom lineA big table for storing information about customers, managing campaigns, and producing reports, backed by a fertile ecosystem of open source and commercial add-ons.Smooths every stage of order fulfillment from the warehouse to delivery, with basic customer management and a flexibleopen source framework for developing new modules.A sophisticated application that links the sales force, the warehouses, and the customers and allows easy customization without programming.

Wednesday, June 24, 2009

Hackers invade Oregon computers

Hackers defaced the home page of the Oregon University System, posting a caustic message telling President Barack Obama to mind his own business and stop talking about the disputed Iranian election.

Attempts to access the university system's Web site were automatically redirected to another page, where readers viewed a message said to be from Iran that asserted there was no cheating in the election. That message was up for 90 minutes before university system technicians intervened Wednesday morning.

The hackers apparently took advantage of third-party software that had not been properly updated, university system spokeswoman Diane Saunders said. Hackers frequently attack the system's computers, but technicians usually beat back their efforts, she said.

"They are able to stomp on most of them," Saunders said.

She said nobody's personal computers were attacked. Also, no malicious software — which could give hackers remote access to computer hard drives — was introduced.

There was no immediate indication why the hackers targeted the system, which oversees Oregon's seven public universities.

The message that was posted on the Web site, made available to The Associated Press by the university system, addressed Obama and said it was being posted from Iran. The text, in red on a black background, calls on Obama to focus on the economic crisis instead of commenting on the Iranian election.

The message also makes derogatory comments about Iranian opposition leader Mir Hossein Mousavi, who has contended the June 12 vote was rigged.

How to make your websites run faster

Installing a fast browser is not always enough to have a good experience when you browse the web: many web pages aren't optimized for performance. To help webmasters improve their sites, Google launched a new section as part of Google Code: "Let's make the web faster", which includes useful articles, videos and downloadable tools.

You'll learn how to optimize CSS declarations, how to optimize JavaScript code and avoid memory leaks, how to use the best image format and prefetch resources.

Google also released a Firebug plug-in for Firefox that evaluates web pages and provides suggestions to improve them. Here are the suggestions provided for this blog's homepage:

* There is 58.8kB worth of JavaScript. Minifying could save 15.7kB (26.7% reduction). Google provides the minified versions of all the inline blocks and external files.

* The following cacheable resources have a short freshness lifetime. Specify an expiration at least one month in the future for the following resources: [list of resources].

* The following domains only serve one resource each. If possible, avoid the extra DNS lookups by serving these resources from existing domains.

* An inline script block was found in the head between an external CSS file and another resource. To allow parallel downloading, move the inline script before the external CSS file, or after the next resource.

* A width and height should be specified for all images in order to speed up page display.

* Serve the following static resources from a domain that doesn't set cookies: [list of resources].

I use pagespeed and it helped me a lot to improve my web pages performance. Worth to give a try.

Tuesday, June 23, 2009

How to use header or footer in all pages of your HTML website

With Javascript Includes

A javascript include is exactly the same as using an external javascript file. However, typically, when using javascript as an include, you would be using the javascript to actually output something into the browser rather than just storing and running various functions.

If you are planning to use javascript includes for any reason, remember that the code in your javascript file has to be javascript. In other words, rather than simply using:

you will need to create that HTML using javascript, similar to:

var navmenu = document.createElement('ul'); = "navmenu"; for(var i=1;i<=4;i++) { var navitem = document.createElement('li'); var navlink = document.createElement('a'); navlink.href = "page"+i+".html"; navlink.appendChild(document.createTextNode("Menu Item "+i)); navitem.appendChild(navlink); } document.body.appendChild(navmenu);

Using javascript includes can be helpful in a number of ways, but should be avoided for any heavy lifting, simply because it is completely dependent on your visitors.

Twitter hacks spreads porn trojon

Former Apple Macintosh evangelist Guy Kawasaki [cq] posts Twitter messages about a lot of different thing, but the message he put up on Tuesday afternoon was really out of character.

"Leighton Meester sex tape video free download!"

His message included a link that, after some further clicking, landed Kawasaki's followers on a fake porn site where online criminals try to install a nasty Trojan horse program on victim's computers. And in an interesting twist, the program attacks both Mac and Windows users.

Kawasaki, a well known entrepreneur who is now a a managing director of Garage Technology Ventures, isn't the only person whose account was misused during a new round of Twitter hacking Tuesday, but with nearly 140,000 followers he's the most high-profile. Meester, the star of the TV Show GossipGirl is also said to be the subject of a homemade sex tape that is reportedly in circulation.

It's not clear how hackers managed to gain access to Kawasaki's account -- security experts say that he and others may have fallen victim to earlier Twitter phishing attacks, where attackers tried to trick victims into logging into fake Twitter sits in hopes of stealing their login credentials.

Other hacked accounts are being used to to promote pornographic Web sites. Victims include an Arizona political blogger, an up-and-coming Canadian musician, and a Gay news site. (note, some of these Twitter pages still include pornographic and possibly malicious links)

Twitter has had its share of security problems over the past months. Earlier this year someone gained access to the Twitter accounts of U.S. President Barack Obama, Britney Spears, and others.

Recently scammers have become more aggressive on the site. They will set up new accounts and post spam messages on hot topics in hopes of gaining clicks when people search through Twitter.

And while hacked Twitter accounts are still rare, they're a much more effective way to reach victims, according to Rik Ferguson, a researcher with Trend Micro. "If you can take over an account that has a couple of thousand follower then you can get a much better return on your investment"

The Trojan link posted by Guy Kawasaki has been followed by more than 1,600 people, according to Gary Warner, director of research incomputer forensics with the University of Alabama at Birmingham.

If a Windows user actually falls for the scam and downloads the Trojan linked by Kawasaki, the software will change his DNS (domain name system) server to one that is controlled by the hackers. That gives them away to steal more information, such as Twitter passwords or even online banking credentials, Warner said. "You're going to be using a DNS server that's controlled by criminals who can point you to whatever Web site you want and you'll believe it's the site you typed into your browser."

Mac users download a similar program, which also points them to a malicious DNS server, a McAfee spokesman said.

Kawasaki didn't respond to messages left by the IDG News Service asking him about the incident, but he did leave a Twitter messagelate Tuesday afternoon, "Don't know how that Leighton Meester sex tape tweet got into my stream here. Sorry all. Sad thing is that I don't even know who she is!" he wrote. Although Kawasaki admitted he hadn't posted the link, he also did not remove it from his Twitter page.

Courtsey: Yahoo Tech News

Eclipse galileo release plan

The following links refer to the plan of individual components for the 3.5 (aka Galileo) release of the Eclipse platform. This represents work in progress.

Thursday, June 18, 2009

Free anti virus software by Microsoft

Microsoft has announced it will soon release free anti-virus software so people on tight budgets won't skimp on protecting their computers from hackers.

A beta, or test, version of Microsoft Security Essentials (MSE) will be publicly available for download beginning June 23 in Brazil, Israel and the United States. It is to be rolled out in other countries later in the year.

"Cost and performance barriers prevent many consumers from using up-to-date security software to protect their PCs," Microsoft said in a statement.

The US software giant described MSE as "a no-cost anti-malware solution that provides consumers with quality protection from threats including viruses, spyware, rootkits and trojans."

The technology firm said that effective anti-virus protection is a "must-have" for computer users given increases in the number and severity of attacks by cyber criminals using malicious software to infect machines.

Paying to buy and routinely update computer security software"does not meet the needs of many consumers," including those inemerging markets where money and resources are scarce, according to Microsoft.

The Redmond, Washington-based company said it will automatically update MSE for users.

Hadoop and Distributed Computing at Yahoo!

Apache Hadoop* is an open source Java software framework for running data-intensive applications on large clusters of commodity hardware. Hadoop, which was invented by Doug Cutting (now a Yahoo! employee), is a top level Apache project. It relies on an active community of contributors from all over the world for its success.

Hadoop implements two important elements. The first is a computational paradigm called Map/Reduce, which takes an application and divides it into multiple fragments of work, each of which can be executed on any node in the cluster. The second is a distributed file system called HDFS. HDFS stores data on nodes in the cluster with the goal of providing greater bandwidth across the cluster.

Firefinder For Firebug

An Extension To Quickly Find Elements Matching Your CSS Selectors Or XPath Expressions

Firefinder is an extension to Firebug (in Firefox) and offers the functionality to, in a quick way, find HTML elements matching chosen CSS selector(s) or XPath expression. It allows you to instantly test your CSS selectors in the page while seeing the content at the same time, and matching elements will be highlighted.

A picture of Firefinder for Firebug with its result list

It also offers you a count of how many matches there are - good for checking, for instance, the number of heading elements - and it also lists all the matching in a collapsible list in the Firefinder panel in Firebug. When you hover each item in that list, the corresponding element in the web page will be highlighted so you see which one it is.

If you are in a web page and want to quickly use Firefinder, just press Ctrl + Shift + V on PC/Linux,Command + Shift + V on Macs, and the Firefinder panel will become visible and you can type away immediately.


Download Firefinder for Firebug and get started!

Wednesday, June 17, 2009

Portlet Development Guidelines

Drew Varner, Sr. Pricipal Consultant at BEA, has written a good post on JSR 168 portlet development guidelines. These are some basic guidelines that a portlet developers must aware of. He has also given examples to support his views. Here are the guidelines -

1. Always Utilize the URL Rewriting APIs for Content in Your Portlet
2. Do Not Append Paths to a Rewritten URL
3. Qualify Client-side Script Variables and Methods with Namespaces
4. Ensure Inline Client-side Scripts that Refer to Portlet Resources Follow the Spec
5. Always Declare a Content Type for Portlet Responses
6. Do Not Send Cookies from Portlets
7. Separate Business Logic from Presentation

Please check his post for details.

Friday, June 12, 2009

Will JavaOne be wrapped up next year?

There’s one question that has lingered on everyone’s mind: Will there be a JavaOne next year? In case you’ve been living in a cave (or a basement coding), Oracle has purchased Sun, the creators and maintainers of the Java programming language, and Oracle has a history of rebranding and reorganizing companies it has acquired.

Despite Larry Ellison, the CEO of Oracle, appearing on stage at the key note address, I and other attendees such as Tim Bray, can’t help get the feeling this will be the last JavaOne. Let me state right now I do not have any solid facts either way; Sun and Oracle have been purposely tight-lipped about it. This article is more about the current climate of the conference from a developer perspective and some wrap up thoughts.

For starters, the most consistent comments I’ve heard all week from alumni that have attended the conference for years, is that the conference is significantly diminished in size this year. Perhaps its the state of the economy or perhaps its the state of trade shows in the industry as a whole, but one way or another, attendance and vendor presence feels trickled down at best, deserted at worst. In fact, as one attendee pointed out this morning, Sun filled many of the Pavilion booths with its own company products. Whether it was the Sun Cloud, Sun Open Solaris, the Sun Java Store, Sun’s Duke awards, Sun’s Drizzle, etc, it felt like nearly half the booths were populated with Sun employees. That’s not to say there weren’t some good vendors and demos (JBoss, Intel, Microsoft, BlackBerry … Apple still missing in action), but it definitely felt like many vendors chose to skip the show. Given Java’s open community roots, its quite possible Oracle will keep the JavaOne showing going, if only to keep the community pleased, but its hard to say for sure. I guess we’ll have to all wait and see.

The alt attribute is NOT for tooltips

I’m am so tired of the never-ending misunderstanding of the alt attribute versus the title attribute.

IE’s harm on the world

Internet Explorer up to version 7 incorrectly displays the value of the alt attribute as a tooltip when you hover an image. This has led to numerous web developers thinking that alt is supposed to be used for tooltips, and has in turn led to customers, managers et al believing so too, hence incorrectly using the term for when they want a tooltip displayed.

There are still hundreds of thousands of web pages out there built on that the alt attribute will act as the tooltip. These will only work in Internet Explorer, not in Firefox, Safari, Opera or any other web browser.

The alt attribute - how it should be

Start by reading the W3C specification:

Several non-textual elements (IMG, AREA, APPLET, and INPUT) let authors specify alternate text to serve as content when the element cannot be rendered normally.

The name of the attribute, alt, is short for alternate. That means it should be display if the image fails to load, not otherwise.

The true tooltip attribute - title

If you want do display a tooltip, you should instead use the title attribute. That will work for basically any element in a web page, too, not just image elements.

Microsoft has backed down

With Internet Explorer 8, Microsoft has finally backed down, acknowledged this as a bug, and fixed it. So for anyone depending on the alt attribute, you need to reconsider, since that will not even work in IE 8.

The difference, once again

The alt attribute is there as an alternative to the image.

Tooltips, via the title attribute, is there to complement what you see.

Got it? Please, please say yes!