26
Fri, Apr
1 New Articles

Java Journal: Project Rave--Sun Java Studio Creator

Java
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Sun Microsystems has been busy working on its next-generation Integrated Development Environment (IDE) for Java-based applications for some time now. Scott McNealy first publicly announced Project Rave last year at JavaOne. Rave is the cornerstone of Sun's strategy to reach 10 million developers worldwide. Sun's current estimates put the Java developer community at 3 million. So the primary function of Project Rave is to make Java more attractive to 7 million non-Java developers and particularly to Microsoft Visual Basic (VB) developers. Project Rave aims to accomplish this by making development faster and easier. Its emphasis is on application assembly and visual programming.

With its first Technology Preview release of Project Rave, which was unleashed in December of 2003, Sun changed the name for Project Rave to Sun Java Studio Creator. The focus of this first release is two-tier Web applications that either talk to databases directly or consume Web services. Sun is also quick to point out that Java Studio Creator is targeted not at the enterprise market (note the two-tier vs. n-tier distinction) but rather at the corporate developers. For the enterprise market, Sun will offer the Sun Java Enterprise System, which I will cover in a future column.

A Standards-Based Foundation

Even from the early whitepapers on Java Studio Creator, Sun had the right idea to build this new tool on existing standards. To that end, Java Studio Creator relies heavily on NetBeans, JDBC RowSets, Web Services, and JavaServer Faces (JSF). If you think of an application as being built out of bricks, mortar, and plaster, then NetBeans are the bricks, the basic structure that everything else is built upon. JDBC RowSets and Web Services are the mortar that holds the bricks together. JavaServer Faces is the plaster that makes it all look nice to the end user. Web Services are the most critical piece of the building. For applications to be truly assembled from pieces, we must decouple the tiers of implementation as much as possible, keeping the database and business rules safely tucked behind formalized interfaces such as Web Services.

Java for the Masses

Although Java Studio Creator has gotten much of the focus of Sun's goal of 10 million Java developers, there are other key technologies to Sun's initiative. For example, the Scripting Java Specification Request (JSR 223) is aimed at luring in developers who are currently using popular scripting languages such as PHP. Another critical part of the initiative is Sun's creation of the Java community and developer Web site portal java.net, which was the focus of a previous "Java Journal" column.

Making Development Faster and Easier

Was there ever a tool that wasn't supposed to make development faster and easier? The key here is to look at the obstacles that slow developers down and remove them. As mentioned previously, the current Technology Preview release of Java Studio Creator is all about two-tier Web applications, specifically either those that connect directly to a database or those that consume Web Services. These two flavors of applications are suitable solutions for most corporate application needs. So let's look at what common tools, frameworks, and tasks are utilized when developing applications like these and then see how Java Studio Creator addresses each of these needs.

Let's start with the user interface. I'm a big fan of the visual editors, especially those with good drag-and-drop capabilities and synchronization between source code and diagram. If I make a change to the visual representation of the code, the code itself should change and look no different than if I had edited it manually. Most Java IDEs have a mechanism for doing this, but all seem to have their quirks when dealing with the intricacies of Swing. However, since Java Studio Creator is currently all about Web-based applications and uses JSF, it gets to avoid all the Swing issues for now. Instead, we are provided with a simple, familiar-feeling Web canvas onto which we can drag and drop our favorite JSF components.

Most applications are structured around some form of Model-View-Controller (MVC) design pattern. So for the user interface, we are clearly talking about the View aspect of the pattern. Views need to able to do three things: validate, convert, and display. Let's look at each of these.

Although some would argue that data validation should take place in the Control, I find that for pragmatic reasons it usually migrates its way closer to the user; if somebody inputs something incorrectly, we want to do as little processing as possible on it. Apparently, the creators of Java Studio Creator agree, and they provide some simplistic validators for length and range checking on user input. I would definitely say this clears an obstacle. Developing your own validation mechanisms can consume significant resources, and since validation is always part of the application's user interface, the tools for building the interface should support validators.

Next, we need adapters. Take any significant-sized application and look at how much data type conversion goes on. For example, consider the theoretically simplest of all basic data types, the Boolean. To the user, it may simply be a check box, but to the developer, it may be represented as an instance of a Boolean primitive type, a char primitive type, a Boolean Class, or even a String Class. It can get even more complicated when you talk about chars and Strings because then you have to account for the domains. Is true represented as "t" or "T" or even "Y"? In the case of Strings, it could even be "true," "True," "TRUE," "yes," "Yes," or "YES." Worst of all, we are still talking about the simplest data type there is, so once we get into dates and times, everything gets exponentially more complicated. In general, the best way to combat this type of entropy is to isolate it. In the case of MVC architecture, we isolate it to the View layer and keep the Model and Control layers to a single representation. In the case of dates and times, this means that all representations in the Model and Control layers are consistent. However, in the View layer, the user may interact with a date as a text string or even a visual calendar GUI component, time may or may not be included, and you might even have to deal with time zone issues. So in design pattern terms, what we need is an "Adapter pattern," which is simply a class that sits between two interfaces and allows them to interoperate. The perfect analogy is electrical plug adapters for foreign outlets. By inserting an adapter between the known interface of my shaver and the known (although often scary-looking) foreign power outlet plug interface, I can still use my shaver. For Java Studio Creator, Sun has implemented a Converter, a lightweight version of the Adapter pattern.

Finally, the View layer needs to be able to display data and take user input. This is where JavaServer Faces (JSF) comes in. JSF itself is built upon JavaServer Pages (JSPs), which were also covered in a previous "Java Journal" column. In addition, JSF incorporates a standard API for handling component state, validation (as discussed above), page navigation, and internationalization. Again, Sun is leveraging its existing tools and APIs to create a reusable application framework.

Using Java Studio Creator

The overall look and feel of Java Studio Creator is crisp, much more so than I would expect from a Technology Preview release. As can be seen in Figure 1, the interface is broken down into six main windows as well as a standard menu and a toolbar. Most of the windows have multiple tabs, so each window can be docked or undocked at will. I think this is important because I like to spread things out over a couple of monitors when I develop.

http://www.mcpressonline.com/articles/images/2002/JavaJournal-RaveV4-02230400.jpg

Figure 1: Welcome to Java Studio Creator. (Click images to enlarge.)

Let's briefly talk about each of the windows.

Server Navigator: You use the server navigator to add or browse database servers and/or add Web Services to your projects. In addition, you use this window to manage and configure your deployment servers.

Palette: The Palette manages your JSF Standard Components, Validators, Converters, and Clips, which are code snippets.

Properties and Dynamic Help: This is your stand IDE properties panel, which displays data on the currently selected component. The Properties window also has a tab called Dynamic Help, which links you to a number of help sources based on the currently selected component. I found this to be one of the more innovative features of the whole application. I'm rather tired of the typical contextual help systems that rarely if ever actually provide you with an answer.

Portfolio Navigator: This is where all of your project-level resources are organized. It contains a tree-like structure that manages your project's Web forms, navigation, Java source files, and other resources, including the jar files your project depends on. The Portfolio Navigator can be viewed in either a logical or file system-based perspective.

Editor Pane: This is the tabbed pane in the center of Figure 1. When you first launch Java Studio Creator, you are presented with the Welcome window, which has a list of all your current projects as well as a button for creating a new project. Once you select a project, the Editor Pane will change to a tabbed pane where you can edit either visually or using text, depending on the tab chosen. Figure 2 shows the visual editor pane for a JSP for one of the sample applications, and Figure 3 shows Query Editor for a RowSet from the same application. I have yet to find a query editor, including this one, that was worth the effort. Either a query is trivial enough that you can just type it straight out faster than you can bring in all the tables in the query editor or it is complicated enough that it has a subquery, union, or outer join, in which case the query editor is of no use.

Build Output Window: This window is created when you first compile a project. It contains typical compiler output, such as number of files compiled, targets for your jar files, as well as any compilation errors that are encountered.

http://www.mcpressonline.com/articles/images/2002/JavaJournal-RaveV4-02230401.jpg

Figure 2: This is the visual editor pane for a JSP for one of the sample applications.

http://www.mcpressonline.com/articles/images/2002/JavaJournal-RaveV4-02230402.jpg

Figure 3: This is the Query Editor for a RowSet from the same application.

So You Want to Try It Out

If you are interested in getting access to the Technology Preview release of Java Studio Creator, you can sign up for it at Sun's Web site. Sun has closed off access for the current release, but your best chance of being included in the next one is to sign up as soon as possible.

Cost

So what will it cost? Well the Technology Preview editions are free of course, but then again, you probably wouldn't want to use them for anything other than prototyping anyway. All that Sun has committed to so far is that the cost will be competitive.

System Requirements

Windows system requirements are P4 1 Ghz, 512MB RAM, Win 2000 (Service Pack 4) or XP Pro or Home (Service Pack 1a), 375MB disk space, Java Web Services Developer Pack 1.2, and Database PointBase 4.6 Restricted Edition. Note that Java Web Services Developer Pack 1.2 and PointBase 4.6 Restricted Edition are bundled with Java Studio Creator.

Roadmap

So when will it be ready? Well, here are the official release roadmap and code names as stated in the Sun Java Studio Creator FAQ:

  • Hammerhead, the first release, will be based on the initial Project Rave technology demo shown at JavaOne 2003. The plan is to release a Hammerhead product sometime in mid to late 2004.
  • Mako will focus on other client targets, like rich clients, portals, and mobile devices, along with a higher level two-way visual design and modeling center for the application components and their interactions.
  • Great White will follow Mako. It will focus on separating the business logic from the presentation layer and will support more robust n-tier application architectures.

Overall Impression

Considering that the product is a prerelease, I must say that I was impressed. It lives up to what is trying to do and doesn't lose sight of what the goals are. Java Studio Creator is not an IDE for enterprise development, but rather for corporate developers who have a little more flexibility. I ran through every tutorial on the Web site and even slapped together a few samples of my own without any problems. I have had worse first experiences with IDEs that I paid for. Even though there is a lot going on, the user interface is nicely organized. The synchronization between the visual editor and text editor was flawless. I can't begin to stress how important this is. Anyone out there who has ever had the unfortunate experience of having to do development in Oracle Forms--where sometimes it is easier to throw away an entire form and start over again than to make a programmatic change to the generated code--will confirm the importance of this feature. It is also important when teams will be collaborating on a project. Some people simply are more efficient at programming visually, and some are more efficient at slinging code. If your tool forces you down one path over the other, somebody on your team will not be working in the most efficient manner, and thus, one of the primary goals of the tool will not be met. All this said, there are definitely areas Sun needs to work on to bring Java Studio Creator up to the standards of other IDEs. Advanced editing features and integration with JUnit and UML modeling are now expected to be included in all commercial-grade IDEs. Whether these features make it into the final release version or not, Sun has certainly made a more approachable development environment, and ultimately it will be up to some 7 million potential Java developers to determine if Sun succeeded. Also, it should be noted that Sun is practicing what it preaches: Java Studio Creator is written in 100% Java.

Michael J. Floyd is the Software Engineering Manager for DivXNetworks. He is also a consultant for San Diego State University and can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it..

Michael Floyd

Michael J. Floyd is the Vice President of Engineering for DivX, Inc.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: