JEval
Update 2/25/07: The project link for JEval is now working.
I have just released my third open source project, JEval. This is a product I sold a few years ago under the name JTKEvaluator. I had planned to release this software under open source a couple of years ago, but never got around to it. In the last couple of weeks I finally quit procrastinating and got things done.
The link to the JEval project will not work for a few days, because the shell service at SourceForge for uploading Web content is currently down. In the meantime this link will get you to the project within SourceForge’s Web site. Because of this, I haven’t started the usual marketing procedure that I normally use when promoting a new project. However, I decided to go ahead and announce the project on this blog for the benefit to loyal readers of Evolutionary Goo. I know you are excited.
You can download the project at this location.
About the project… JEval is a library for adding mathematical, string, Boolean and functional expression parsing and evaluation to your Java applications.
JEval Features:
- Parses and evaluates dynamic and static expressions at run time.
- A great solution for filtering data at runtime.
- Supports mathematical, Boolean, String and functional expressions.
- Supports all major mathematical and Boolean operators.
- Supports custom functions.
- 39 Math and String functions built in and ready to use.
- Supports variables.
- No reparsing of expressions when variables change.
- No dependencies to other non-standard Java libraries.
- JUnit tests.
- Compatible with J2SE 1.2 and above.
For more detailed information on how to use JEval:
- See the Javadoc for the Evaluator class provided in the download.
- Try out the samples provided in the samples directory of the download.
- Review the JUnit tests provided in the test directory of the download.
Any feedback is greatly appreciated. Enjoy.
Google Lays Down The Gauntlet
Today, Google has announced that it will begin selling its productivity applications to companies at a price of $50 per user. For that price you get phone support and 10 gigabytes of online storage.
The reason I think this is such a big deal is that it comes as Microsoft is launching Vista and Office 2007. Microsoft is also moving into the online application business, but I don’t think anyone commands as much mind share and respect in the online world as Google. And Google moves fast. Today their application suite contains email, docs and spreadsheets. It will be interesting to see what applications they throw in by this time next year.
Converting PowerBuilder to Java
OK, so not so many people are doing PowerBuilder these days. However, PowerBuilder was a great technology for its time and it helped me pay the bills for a while. Looking back at it, PowerBuilder was actually a very interesting language and a great tool. It was touted as a tool for rapid application development and shipped with what at the time many considered to be the best visual data component available, the DataWindow. The SQL painter in PowerBuilder was so nice that I knew of developers that continued to use is simply as a database tool long after they quit using it for development. The PowerBuilder language was also object-oriented as it supported inheritance, polymorphism and encapsulation. Because of this, making the transition from PowerBuilder to Java wasn’t a difficult one.
For the record, PowerBuilder is still available and supported by Sybase, Inc. Today’s version is 10.5. The version I last used was 6.5
Back in November, 2000, I wrote an article an article for Sys-Con Publications titled, “Converting PowerBuilder to Java” that was published in The PowerBuilder Developer’s Journal. My article described component mappings from PowerBuilder to Java Swing as well as ways for migrating a PowerBuilder application to Java.
I don’t know if there is an equivalent to PowerBuilder in today’s Web development world. With all of the talk going on about Flex these days, I would like to get a closer look at it and its surrounding tools. However, Flex isn’t open source, which costs it points. In the mean time I’ll continue to use Eclipse and its assortment of plugins along with my favorite Java (and Ruby) Web frameworks.
Plot For New Movie
I have a great plot for a new action movie…
- A cyberespionage group attacks several US government, military and commercial interests
- Employee at one of the attacked organizations takes it upon himself to save the US from this attack
- This heroic person uses his own super hacking abilities to fight the cyberespionage group
- Our hero then teams up with the FBI and other US agencies to bring down the evil group
- However, our hero gets terminated by his company for inappropriate use of confidential information
- To reverse this injustice, our hero sues his employer for wrongful termination
- A jury rewards our hero 4.3 million dollars and justice is served
- Our hero lives happily ever after
OK, I didn’t actually come up with this script myself. You can read the news story here.
Web Power Tool #2 - Web Developer (Firefox Add-on)
For Firefox users only. This Firefox add-on adds a toolbar to your browser that is packed with tools that make your life easier when working with HTML, CSS, JavaScript, Images and more.
My favorite two features are the resize tool that lets you easily resize your browser to a size of your choice and the HTML editor that lets you modify your HTML on the fly.
Web Conversations in Java
Sometimes in a Java Web application you may want to pass data from one screen to the next. A shopping cart is a good example of this. Another is a “wizard”, which leads the user through multiple steps when entering data. You can pass the data from one to screen to next in a stateless or stateful way depending on how you want to design your application.
With shopping carts, if you were to open two of them for the same Web site at the same time, the data entered into one would probably step on the data in the other. I think to most users this is understood and I believe most of us know that opening a shopping cart more than once is a bad thing. However, in a business application, it may actually be desirable for a user to open a wizard more than once at the same time. If this is the case, then multiple instances should not step on each other.
There are many factors to consider when deciding to make a Java Web application stateless or stateful, but I won’t go into those issues here. Its a very complex decision and there are many chapters in many books dedicated to the subject. Let’s assume we want a stateful application. For our wizard screens, using the HTTP session object simply will not do the trick for us. The HTTP session object is generally shared by each instance (window or tab) of a type of browser (Firefox, IE, …). If you have multiple Firefox browser windows open, they will still still share the same HTTP session. Its not entirely consistent on how this works, but to describe this behavior would take too long here and is the subject for another day. What we need is memory that is not shared by each of the wizards. We need data that is scoped to a series of user interactions in the wizards. What I have found is that this concept is starting to be referred to as a “conversation”.
A “conversation” can be thought of as a series of interactions between the user and the Web application. In this discussion our user interaction is taking place in the wizard pages, where the user inputs data and moves from one screen to another in order to complete their data entry. In order for conversations to be properly supported, multiple conversations need to be able to take place at the same time. This would allow us to have multiple wizards open at the same time. I think of conversation scope as being in between session scope and request scope.
There is a Java Web framework that is formally supporting conversations, Seam. In Seam, you actually specify in your Web pages when you want the conversation to begin and end. Seam takes care of the programming on the server side to make it all work. It would be nice if more frameworks would support conversations in this way. I haven’t used Seam yet, but this feature may be a good reason to give it a closer look.
Spring Web Flow is another framework supporting conversations. It is a layer that sits behind a Web framework such as Struts or Spring MVC. Spring Web Flow appears to be very in depth in its support of conversations. Given the popularity of the Spring Framework these days, I would recommend giving Spring Web Flow a close look.
New iPod Shuffle
![]()
I have the original 1G iPod shuffle and really enjoy it. Its a great device to use when running or working out. My wife now has the new shuffle. I really like the new design. It is smaller and comes with a clip, so you no longer have to hang it around your neck. You can get arm bands for the original shuffle, but I’m not a fan of arm bands. My shuffle works great, so I really don’t have a reason to throw down another $80 down for a new one. Too bad for me.
Web Power Tool #1 - Mouseover DOM
This is the beginning article in a new blog series I am writing titled, “Web Power Tools”. This series is going to feature very cool and useful tools for building Web applications. Feel free to leave comments and let me know about cool tools you are using as well.
The first tool I am featuring in this series is Mouseover DOM. This tool is simply a bookmark to a JavaScript library back at http://slayeroffice.com that you add to your browser. Firefox and IE6+ are both supported in addition to other browsers. To use the tool, simply click on the bookmark and the Mouseover DOM window will pop up. You must allow popup windows for this to work. The window will then display the current DOM element along with its properties and values. You then move your mouse over each element on your page you want to see the properties for.
This tool has saved me a lot of time working with JavaScript and CSS. Give it a try and let me know what you think.