Sunday, March 15, 2009

SharePoint Web Parts

Does anyone have any good recommendations on polished, high value, web part providers for SharePoint/MOSS?

I have taken a look at Dundas and Bamboo Solutions.
Has anyone used either of these and like to share their experiences?

What are others that are out there particularly with charting or BI web parts?

 

Technorati Tags: , , , , ,

Sunday, September 7, 2008

Hibernate Stumbling Block

This is just a quick note to others out there doing a quick mock with hibernate involving an existing database.   I found myself spending an unreasonably long time this weekend troubleshooting something that was supposed to just take a moment.  I was trying to leverage hibernate to do a quick java mapping of objects from a pre-existing database in mysql.  The database contains around 60 tables so I was using the eclipse generation plugins to generate all my classes and mapping files.  It appeared to do a very nice job and I tweaked several of the configuration settings including a reverse engineering config file.   I could not get around a pesky error that seemed to be very difficult to read meaning into. The session factory bean creation repeated to fail due to a ClassCastException for the hibernate StringType!  Ok, this seems basic so what could be wrong here?!?

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: org.hibernate.type.StringType

After making every logical tweak to the configuration properties of the generation tool and some other vain attempts at a quick fix I faced the reality that this "quick" prototype attempt would not be all that quick.  I linked the source and got friendly with the debugger to find out what simple thing I was missing here.

After tracking the issue down to the end of the line, I found something that I would assume someone experienced with hibernate would have spotted right away in the initial stack trace.   I have really only used hibernate briefly in about half a dozen prototypes or so and most of my projects involved my creating the mapping files and in most cases the data classes as well.   The following line from the stack trace turned out to be very telling in hindsight.

Caused by: java.lang.ClassCastException: org.hibernate.type.StringType

 at org.hibernate.tuple.PropertyFactory.buildVersionProperty(PropertyFactory.java:84)

A version property is a special properly hibernate uses to track the version of the data in order to be more creative with record locking.  Why would a pre-existing database, not built with hibernate in mind have version properties you might ask?  It wouldn't!   Ah ha.

Digging into the generated mapping files I quickly found a handful of tables where the generator had decided a field looked like and must be a version property.   Most times these were timestamp type fields, but in one case, it was a string field named 'version' which was the one responsible for blowing up my build at the present.

<version name="version" type="string">
  <column name="VERSION" length="20" />
</version>

After some search and replace work on the generated mapping files I had what appeared to be a workable solution.

<property name="version" type="string">
  <column name="VERSION" length="20" />
</property>

Excellent!

Hopefully this little nugget will help some other generated hibernate novice users over a potentially painful hump that can ruin your plans for a quick solution.

As for me, I'm on to the next stack trace.

-mw


Thursday, May 8, 2008

Day 1 Session 4: Real World, Real Time, Instant Results

Presenter: Jeff Henry, Director of Software Standards at IBM

The session was very high level and revolved around the importance of standards and the use of them to enable and leverage the business goals of today.  The concept is that "Real World" processing leverages the innovation and agility of three key trends.  Event Processing, Real Time Information, and Web 2.0.   The concept of Business Event Processing (BEP) was presented as bridging the gap between Business and IT.  It encompass the ability to extract events from multiple sources, derive new events through aggregation and information enrichment, and detecting "business situations" based on event patterns.  The sweet spot of the presentation was where SOA meets BEP.  BEP extends SOA to achieve this. 

The focus then changed to the importance of standards and openness.  Standards enable interoperability like never before.  They also reduce complexity and help teams work well together.   Standards come in three flavors, the core technology standards like IP and XML, Horizontal Industry standards like HR and Accounting, and the emerging Industry-Specific standards like Healthcare and Banking.  As standards emerge, they go through a path that starts with a need, followed by an initiator, which is then adopted by a group, and finally embraced by a standards body.

More information can be found on IBM Information Management Software at ibm.com/software/data

-mw


Day 1 Session 3: Visualizing and Managing JVM Clusters

Presenter: Ari Zilka: Terracotta

This presentation set out to teach about JVM-level clustering by demo by showing a visualization of a clustered application.  It was a very interactive session with a lot of collaboration with the audience that allowed for suggestions on different ways to solve clustering issues. In situations where there were trade offs such as scalability vs. availability it followed a choose-your-own-ending style.  Terracotta was introduced and brought to bear on the situation allowing us great visibility into the clustering to allow for intelligent decisions to be made about where to choose what trade offs.

Terracotta helps with many of these aspects.  Briefly, Terracotta enables JVM-level clustering by stripping away the Business Logic aspect of a POJO (the code in the methods) from the state of the POJO (the properties and footprint).  It does this by taking over the heap which is where all the important state data is stored.  It takes control of the heap and clusters it within Terracotta.  What this looks like when an object is instantiated on a JVM it checks for the existence of that object on the graph.  Since it is the first time, it isn't found so normal instantiation ensues.  The second time that object is instantiated however, the check is made and the object is found on the graph.  Terracotta intervenes here and hands the constructor the previously constructed object's 'pointer.'  The initial object becomes what they refer to as the super static root object and all subsequent objects become nodes on that tree.  This super static root is a 'singleton' across the JVM cluster.  The Terracotta implementation is capable of outperforming other API systems 10X over in some cases. 

Terracotta uses the standard XML configuration file to make it aware of all the roots and constructs something called Distributed Shared Objects (DSOs).  It offers rich Eclipse plugins for doing these things.  The administration console utilizes JMX and gives incredible visibility into every aspect of the clustered solution during runtime.  It is good to note that you must treat your POJO like any other shared or multi-threaded object and use locks if you care anything at all about consistency. 

While it looks like an implementation using Terracotta would take a fair amount of planning, strategy and design with Terracotta in mind as well as making sure your objects are structured to take the best advantage of the Terracotta strengths, it appears that this would be well worth while to accomplish scalability goals on any enterprise deployment. 

-mw


Day 1 Session 2: Project Aura

Presenters: Stephen Green, Sun; Paul Lamere, Sun

The first half of this presentation focused on explaining the Long Tail of marketing and specifically the music industry.  A lot of examples were shared about recommendation systems and solutions that fall short in some areas, sometimes.   All in all, Stephen and Paul were big fans of the Amazon recommendation system, but because it is the most visible system it is easy to pick on and point out faults when they occur.  The most humorous of which was a Pat Robertson book which suggested that people interested in it would also be interested in a book on unlocking the secrets of the gay sex life.   How could something like this happen?  Amazon formerly weighted suggestions based on recent trends of user interests (think of the end of the tail). A coordinated group of users would be able to significantly influence the recommendation engine and thus, cause something like this.  Amazon has since changed this algorithm, but the illustration was useful. 

The latter half of the session went into more detail on how Project Aura is able to achieve really good recommendation results for the average implementer with very little effort.  Leveraging OpenID and Attention Profile Markup Language(APML), the data is open and accessible encouraging consumer ownership.   There was a BIG gotcha at the end of the presentation that caused the level of enthusiasm in the room to burst and leak out the doors rapidly. Project Aura is a hosted web service model.  The preference data gathered is all shared with the community. Donation required for use of the services is the data.  This will make this solution a no-go for a lot of organizations but would still be a viable option for consumer based startups that are looking for a quick recommendation engine.  It is based on Project Caroline for scalability.   There are some significant limitations about customization but for a quick startup it is still a great project.

The project is not available as of yet, September is the current target but taste.sourceforge.net is a good one to check out for something today.

You can read more information about the project on Paul's Blog - http://blogs.sun.com/plamere/entry/recommendation_for_the_rest_of

-mw


Wednesday, May 7, 2008

Day 1 Session 1: Fortress

Presenter: Christine Flood

Fortress is a next generation language that targets high-performance computing. It adds some very interesting features on top of an interesting mesh of Fortran and Java.

The presentation was structured in a Top 10 list style to help illustrate all the wonders of this new language.

Top 10 reasons to use Fortress

10. Contracts

  • Requires
  • Ensures
  • Invariants

9. Dimensions and Units

8. Traits and Objects

  • Multiple Inheritance!

7. Functional Methods

6. Parametric Polymorphism

5. Generators and reducers

4. Mathematical Syntax

3. Transactional Memory

2. Implicit Parallelism

1. Growable

While there were some interesting things in the presentation like Multiple Inheritance and Transactional Memory as well as native Mathematical Function representation, this was a glimpse of an evolving language idea that has quite a few merits for Fortran folks as well as mathematicians, but not a lot of practical use for a modern day java developer at this stage. This one is worth keeping an eye on for the future as it develops and matures. As interpretation becomes compilation and performance tweaks are made along the way, this one can go from cool to WOW! in short order.

Read lots more about Fortress as well as download an interpreter at http://research.sun.com/projects/plrg/

-mw


Tuesday, May 6, 2008

JavaOne Keynote

The keynotes for events like JavaOne are usually big on pageantry, big on hype, big on announcements, and big on attendance.  JavaOne 2008's keynote did not disappoint.  Complete with choreographed dance teams, interpretive pantomime, and even break dancing, the pre show entertainment was high on glitz and enticements.  Things really got underway when John Gage, Chris Melissinos, and James Gosling took the stage with the infamous t-shirt launching sling-shot and began to hurl collector edition t-shirts to the crowd.

Higher Purpose Java
James and John introduced us to several initiates ongoing at "Pervasive" JavaOne this year around green processes and tracking resource uses. Sensors are in place all over the Moscone center to track the power usage in every room, the CO2 footprint of the rooms, and the bio-temperature of the room. In addition, the RFID tags in all of the attendee badges are tracking movement in and out of all rooms. All of these sensors are tied into a dashboard of reporting metrics about the conference. The goals are straightforward. Apply technology in new ways to improve humanity in some way. The challenge was delivered to seek out ways to improve our world, our footprint, our companies footprint. Wherever you can make a difference. Contribute!

Demonstration Time
Rich Green, Executive Vice President, Software, soon entered the stage and shared more of the vision for the show this year and also kicked off with many vendor guests as well as several announcements.  Ian Freed with Kindle, Rikko Sakaguchi with Sony Ericsson, and lots on the Glassfish, JavaFX, NetBeans, MySQL, and Project Hydrazine.  Several demos by each speaker and several went awry.  One of the more interesting ones was a Facebook application called LiveConnect that links together all of your friends and chats from the various platforms (Flickr, Flockr).  It was also a dragable and mobile app(FX Mobile) which was interesting.

Keep on Rockin' in the Free World
Jonathan Schwartz, CEO and President, came out and talked more about the vision and eventually introduced an "impartial" third party to help validate that Java is changing the world.  Neil Young was on hand to show us all his life-long anthology project and how Java technology on Blu-ray disc has now made presenting his life story possible.  In addition (and to tie things together) he is also partnering with an auto tracking device to enable tracking his location, energy consumption, emissions, etc, live from his website.

All in all it was quite a rousing Keynote.  Let the 75 hours of JavaOne begin!

Watch the highlights from the keynote presentation here:
http://java.sun.com/javaone/sf/sessions/general/index.jsp

-mw