Tuesday, October 24, 2006
Monday, October 23, 2006
For example, here http://java.sun.com/webservices/docs/1.4/tutorial/doc/JAXBUsing2.html#wp87865 it gives not correct commands for compiling and running the primer.
The correct commands (provided that you've installed JWSDP in C:\Sun\jwsdp-2.0) are the following (you should be able to easily rewrite them with using environment variables instead of absolute paths):
Note the differences from tutorials' commands:
a) putting double quotes around %JAVA_HOME%\bin\javac because JDK is by default gets installed to c:\\Program Files\Java... which has white space in it
b) providing the classpath to the JAXB libraries (I don't know yet which ones of them are truly needed for this exactly exercise, I will learn it later)
c) in compiling I removed the primer\po\impl path - I don't know why it's there now (maybe for other examples?)
d) I copied the Main.java to the root forlder for this example from src folder
The output of this exercise is what was expected:
Very good! This exercise created Java classes from po.xsd and then it read the po.xml to these classes.
So far so good. Let's see what's next in JAXB goodies chest.
Thursday, May 18, 2006
Boring! Last year it was quite more interesting. Maybe because then I had a specific task to evaluate as many profiling tools as possible and I was set on a target. Today is just a pointless browsing.
Main impression that this exhibition leaves - there is no such thing as Open Source. All the booths are occupied by commercial products that help you develop your stuff faster. Ironically, most of them are still have open source products as their foundation. You can see plenty of products that promise you that you'll be more efficient in developing with Spring, Tomcat, jBoss. And interestingly all these people are quite excited about their products. It seems very strange because living here in Silicon Valley and having so many friends developing in J2EE I don't know anyone who would use these third party solutions. All people use plain vanilla approaches. I even know a guy who is still writing his Java programs in Emacs! But this is a clinical case :))
I've seen an interesting product though. Since currently I am quite interested in UML and how to conveniently integrate it in our designing and development process I stopped at this booth: www.magicdraw.com . The product itself is quite interesting but nothing exciting though. I got a trial version from them and going to spend some time evaluating it. The guy who was telling me about this product is Lithuanian (and their all development is outsourced to Lithuania) - quite young but speaking a very good Russian.
Now I see a booth with bit "Google" on it and I am going to visit it. I wander if they give cool give aways :)
Thursday, March 30, 2006
TodayI attended BEA Dev2Dev seminar dedicated mostly to their new product BEA Workshop Studio 3.0 (which in fact an acquisition of NitroX). I feel obliged to present here the notes that I took at this seminar because they may have some influence on your future technological decisions. The notes will be quite short though. Also I am not going to give much of comments – just notes. They will be presented in chronological order as they were taken during the seminar.
And so, bear with me: it will be long but, I hope, edifying.
- Only one person (out of approximately a hundred) raised his hand on question “Who is using AOP?”
- There was a question from the audience “What is POJO?”
- BEA is stating that their approach mostly lies in “Blend of proprietary and Open Source solutions”
- From the beginning of the seminar there is an accent on POJO and Dependency Injection as opposed to EJB and heavy-weight hard-core J2EE.
- Spring is seemingly a new favorite in BEA
- Majority in the audience use Eclipse
- There are currently two products with the name Workshop:
- The one that we saw last year is in fact is not dropped – it is called WebLogic Workshop. In the end of this summer they expect to release the new Eclipse based version 9.2 of it – it will be based on Apache Beehive and use the same concept of “Controls”. It is supposed to be the main instrument for building portals and inter-enterprise integration. It is NOT positioned as an IDE for Java development.
- Workshop Studio 3.0 (I guess their marketing team lacks some imagination in naming new products) is formerly known as NitroX. It’s a cross-container IDE for Web development. It was the main topic of today’s seminar.
- Many hands were raised on a question “How many people use WL Portal?” WL Workshop is still the only tool for building portals.
- MVC topic. Results of poll:
- How many people use Weblogic JPF (Java Page Flow, a proprietary concept of WL Workshop)? – a couple of hands raised.
- How many people use JSF (Java Server Faces)? – 1 hand
- How many people are not using Struts? 3-4 hands
- How many people use JSP? Almost everyone ([MG] It figures J )
- How many people use Apache Beehive? 3-4 hands (reminder: Apache Beehive is where WL Workshop ideas (JPF, controls) became non-proprietary open source solution)
- Struts Tiles are inherently supported by WS Studio. The presentation was using Struts+Tiles
- Reminder: WebLogic Workshop and BEA Workshop Studio are two different beasts. The latter is going to be referred as Workshop Studio in this report.
- Workshop Studio allows creating Struts Validation rules visually. This process is very intuitive and worked nicely (the error message was shown next to the text field on the page)
- In Workshop Studio project consistency validation is done at every step of development (by the means of so called App Xray background Eclipse process) at each layer (dao, IC container, Struts+Tiles, resource file, etc.)
- Struts is used in its pure form – everything is done in the “execute” method – no deviations from the standard, no “template patterns”, no proprietary to Workshop Studio overridings.
- The mismatch of the Struts Form bean having to be copied over to the POJO and back is still present (well, this is an inherent Struts problem and the Workshop Studio is just a means to use Struts)
- Created (and used in the presentation) Struts Action class is looking very much like ours, including:
- return mapping.findForward(…)
- It means the refactoring should be minimal
- No harm to repeat: everything is going on in Eclipse
- JSP editor is not full WYSIWYG – which is very good: no crap in the JSP code (as oppose to SiteMap); visual editing produces very clean code with nice indentation
- Although BEA acquired KODO the ORM for the presentation was Hibernate
- On my question “What are the proprietary artifacts that are created during development process and would prevent from moving out from Workshop Studio?” the answer was “None”
- It improves user experience ([MG] well, duh!)
AJAXdevelopment example was nice but there are still no special tools in Workshop Studio for building apps – we still have to make do on our own. AJAX integration should be done at the business service layer ([MG] SOA rulezzz), never at the view layer. Web services are considered the most appropriate and robust vehicle for enterprise integration. Enterprise
- Application developed with Workshop Studio can be deployed on Tomcat, JBoss, WebSphere, Caucho Resin, Jetty
- A new product called WebLogic Console Tomcat Server Management – is going to be announced soon. It does management Tomcat from the WL console (funny though technologically exciting, huh!). It allows managing multiple WL servers and multiple Tomcat servers from single console simultaneously.
- The underlying technology for this console is JMX
- WL (the one that we are currently using) is built using the Portal technology (not Tiles) – all these parts on the WL console are portlets
- Developed with Workshop Studio demo app was deployed into Tomcat server using WL console seemingly seamlessly. After that the same app was deployed into WL from the same console.
- The blog of the presenter is dev2dev.bea.com/blog/gary_mcbride
- As I mentioned earlier BEA is in love with Spring and sees it as a viable alternative to EJBs in non-distributed environment.
- In fact, I had an impression that this part of the presentation was a definite advertisement for Spring.
- Beehive, though could be considered as an alternative to Spring, is in fact an additional abstraction layer which allows wrapping Spring beans as well as EJBs as well as web services as “controls” so that the client becomes agnostic of business service implementation
- Spring allows easy unit-testing
- Quote. “BEA is blessing Spring. We are fully supporting Spring issues via BEA tech. support.” Unquote.
- Maintaining the plethora of Spring Beans is greatly augmented by Spring IDE (an open source product integrated into Workshop Studio) – you can see all the Spring context in a visual representation
- Web services can be pretty easily created from Spring beans
- Internal BEA rumor: WebLogic web services implementation as it is known now (WL Workshop services and plain vanilla WL web services) might be converted in the future to Axis implementation.
- The presentation of building web services from Spring beans was a bit hasty and cramped but it shows that this is quite possible
- Generation of persistent classes and mapping files from the db is pretty easy with Workshop Studio, although there was no mentioning of Java 5.0 annotations for Hibernate
- Class diagram of persistent classes (a.k.a. entities) is nicely visualized
- “How many people are using JDO?” – Just a couple of hands rose.
- “What about Hibernate?” – Plenty of hands rose.
- Quote. “You cant’ maintain the plethora of mapping files by hand.” Unquote. That was about using EJB3.0 technology without a proper EJB3.0 visual tool. [MG] I believe it applies greatly to Hibernate.
- Workshop Studio allows employing different ORM strategies: JDO, Hibernate, EJB3.0. Most funny – it can be done at the same time.
P.S. I promised it would be long. Thanks much to those who could read it through; I hope it was something useful.
P.P.S. The bottom line: if we are to accept the following configuration Spring+Hibernate+Struts we are going to be well off for the foreseeable future.
Monday, March 27, 2006
It looks like the purchase of NitroX was one of the smartest things BEA did in the recent past. Today I spent some time on evaluating its Workshop Studio and I am glad to say that all these problems that were (fortunately) preventing us from moving to the previous version of Workshop are now seemingly in the past.
To start, it’s no longer a black box environment that is doing something for you, doing it great but you have almost no access to what gets generated and you are simply a hostage of this product.
Now everything is based on widely known Open Sores (oops! Slip of the tongue, Open Source) projects: Spring, Hibernate, Struts and seem to head in the same direction as we are moving to. All generated files are the same as we have now, it only augments the process, speeds it up and does lots of consistency verification. And all this without the danger of vendor lock!
These are two very simple short videos that nicely depict how Workshop can speed up the process of creating the domain object layer http://dev2dev.bea.com/downloads/HibernateDemo/HibernateDemo.html and process of Struts/JSP development http://dev2dev.bea.com/downloads/StrutsDemo/StrutsDemo.html .
Speaking of the latter I was amazed how much time could be saved on the process of working with application resource files. Now each change is the resource file requires restarting the server, re-login and re-navigation to the page under development. The Workshop IDE allows visualization of this change in Eclipse environment with no such hassle.
Hibernate mapping is also amazing – we have hundreds of tables that need to be “Hibernated” and without a visual tool it becomes so tedious that almost even defeats the purpose of having Hibernate as a development process performance booster.
Oh, and it was awarded as the Best commercial Eclipse based developer tool at the EclipseCon 2006: http://www.eclipse.org/org/foundation/eclipseawards/winners.php
Seems to me like a good choice.
Wednesday, January 25, 2006
Here is a good Eclipse plug-in for building equals, hashCode, compareTo and toString methods: http://commonclipse.sourceforge.net/download.html