Supermind Search Consulting Blog 
Solr - Elasticsearch - Big Data

Posts about work

Patterns in interaction design

Posted by Kelvin on 07 Jan 2005 | Tagged as: work

http://www.welie.com is a truly helpful resource for interaction design patterns.

http://time-tripper.com/uipatterns/index.php, http://www.pliant.org/personal/Tom_Erickson/InteractionPatterns.html, http://www.sapdesignguild.org are interesting as well.

And http://37signals.com/papers/introtopatterns/ I found genuinely informative.

Diagram layouts

Posted by Kelvin on 06 Jan 2005 | Tagged as: work

http://www.oreas.com/layouts_en.php has some pretty diagrams on possible layout configurations.

openCRX: open-source CRM

Posted by Kelvin on 06 Jan 2005 | Tagged as: work

Just found http://www.opencrx.org/, a BSD-licensed CRM app. Looks interesting…

Integrating Java open-source projects

Posted by Kelvin on 23 Dec 2004 | Tagged as: work

Open-source Java projects have considerable momentum now, and I think projects will benefit in a big way if there is "one ring that will bind them all". I think projects like WebWork (MVC), Hibernate (persistence), Spring (IOC) and Gridsphere (portal) can play an important role in laying the groundwork for a common platform for open-source projects to be built on.

I guess I'm working on doing something like that now, consolidating and integrating these projects into a common application infrastructure on which to develop and deploy web applications.

Web application infrastructure

Posted by Kelvin on 22 Dec 2004 | Tagged as: work

Latest revision:

Services framework: Spring framework (I'm only using the BeanFactory and ApplicationContext bits)
Portal: Gridsphere Portal
ORM: Hibernate

The result of the last week's coding has yielded:
Party management – CRUD parties, Contact information
Authentication – user accounts for logging in, proxied log-in mechanis,
Authorization – role-based access control
Persistence – stolen from Hibernate's CaveatEmptor project

Pretty much every service is managed by Spring, persistence by Hibernate.

The next step is to integrate what I've done with Gridsphere, in terms of user management. Also need to investigate Spring's portlet support.

The more I think about it, the more I'm convinced that portlets are the way to go in terms of developing web applications. Web applications need to stop thinking that they are alone in the world. They need to stop reinventing their own authentication and authorization mechanism.

So, develop your application in terms of JSR-168 compliant portlets and Spring services. Everything web-related goes to the portlet, everything else is either Pojos/DAOs or business objects.

ofBiz: Take 2

Posted by Kelvin on 09 Dec 2004 | Tagged as: work, programming

I'm quite disillusioned by the ofBiz community, here's why:

1. Low emphasis on documentation. Or should I say, freely available documentation. The code is poorly documented, tutorials and Javadocs hardly exist, and when newbie questions are asked, the most frequently heard answers on the mailing list are: purchase the training videos, and purchase a subscription to the upcoming documentation site.

2. Little emphasis on coherent releases, no clear roadmap.

3. There is abit of an elitist attitude in the community, that goes along the lines of: ofBiz will make your life x times easier, and its incredibly powerful, and because its way of doing things is so different, it'll take you about 6 months to get productive in it. Excuse me, 6 months?

Having said that, however, I'm very impressed with the flexibility of the data model, and there are some very good ideas to be found in it. So, I had the idea of doing something like an ofBiz-for-sane-people project. 🙂 No, I'm just kidding.

What I'll probably do is revert to my old plan of building a Hibernate/Spring/Webwork2/Freemarker framework for developing web apps. Yes, you heard me right, Freemarker, not Velocity. I'm a recent convert to the power of taglibs, and would be pretty sweet to have access to them from the template. I will also use a portal framework for handling the integration between different web apps.

The to-do list, in chronological order:
1. Party manager, as per ofBiz
2. Classification manager, for managing topic maps
3. Document manager, the doc management system

Spring, Hibernate and Velocity

Posted by Kelvin on 21 Nov 2004 | Tagged as: work, programming

I've been busy getting Spring, Hibernate and Velocity working, so some rants about it..

When I started using Torque as an OR tool, I really liked the its query-by-criteria system, but disliked the fact that code generation had to be done, and that every domain object effectively became five objects (Person, PersonPeer, BasePerson and BasePersonPeer and PersonMap). Also irritating was the compulsory inheritance from a persistence-based superclass, which seemed to be an abuse of inheritance, and takes away your only chance of inheritance in Java. I also didn't like the fact that all domain objects were placed into an om package. After a while, it just gets really unmanageable.

So, I was really thrilled when I discovered Hibernate. No more code generation, no more persistence-class inheritance and my objects could live anywhere they wanted.

Spring recommends a differentiation between POJOs, DAO classes (like Torque Peers), service objects (where business logic and transactions resides) and the web layer. As you'll see from the jPetstore demo, the objects are also placed into these packages accordingly.

One huge difficulty I ran with Spring and Hibernate was lazy instantiation of collections. Hibernate's sessionfactory is managed by Spring, so unless an object is created by Spring, there's no easy way of getting hold of a Hibernate session. Technically, POJOs aren't supposed to even know about sessions. HOWEVER, with a lazily instantiated collection, the same session that opened the proxy must be still open when getCollection() is called on the collection, and that's a big problem. when the poor POJO has no reference or knowledge about the session.

This is well documented at these links, with some workarounds suggested
http://thread.gmane.org/gmane.comp.java.springframework.user/3513
http://thread.gmane.org/gmane.comp.java.springframework.user/3402
http://forum.springframework.org/viewtopic.php?t=1640&highlight=hibernate+dao&sid=828d4100ba2f6f8dffc7f06bc7054857
http://forum.springframework.org/viewtopic.php?t=1805&highlight=hibernate+dao&sid=828d4100ba2f6f8dffc7f06bc7054857
http://forum.springframework.org/viewtopic.php?t=301&postdays=0&postorder=asc&highlight=hibernate+dao&start=0

So, I've had to compromise and remove the lazy instantiation and perform it via the DAO instead. Yucky, but lazy instantiation's really important for that object, and I really like Spring's wrapper around Hibernate.

Something else I worked on was porting Velocity Tool's VelocityLayoutServlet to Spring, so template layouts are possible once again, plus use of tools in templates.

Open-source Java infrastructure

Posted by Kelvin on 19 Nov 2004 | Tagged as: work, programming

I'm gonna start a new project in Java soon. Seeing that I've left http://www.relevanz.com, pretty much whatever infrastructure I had built over the past years is gone, and I'll have to start from scratch, and that's probably a Good Thing.

So here's some items on my list (LGPL- or APL-compatible only):

Templating – Velocity, and Velocity tools
Scheduling – Quartz Scheduler
Cache – OSCache
User management – Oness
Security – http://acegisecurity.sourceforge.net/
Modules – ?
App Framework – Spring
Persistence – Hibernate
Search Engine – Lucene
Portlet – ?
Document Management – Daisy

Firefox Highlighting

Posted by Kelvin on 15 Nov 2004 | Tagged as: work, programming

I've started work on a highlighting extension in Firefox which allows one to save the highlighted text. Running into a wall with highlighting across elements. Highlighting within the same element is already functional, but it seems no one has actually gotten cross-element highlighting right. And the funny thing is, it all seems so trivial from the user's point of view…

Anyway, the links that have proved useful in learning about the DOM Range api and Mozilla's nsISelection:
http://www.xulplanet.com/references/xpcomref/
Everything can be a link…
http://www.mail-archive.com/mozilla-editor@mozilla.org/msg01437.html
http://www.webmasterworld.com/forum91/1170.htm
http://markpasc.org/weblog/2002/07/15/mozilla_editor_links_for_my_reference
and various extensions which perform highlighting from a cursor selection.

Firefox customizations

Posted by Kelvin on 14 Nov 2004 | Tagged as: work

To change the colour of the selected tab so it stands out more:
Edit userChrome.css. Use the ColorPicker extension to pick out the RGB values you want. The one provided here is Firefox-orange.


/* Change color of active tab */
tab{
-moz-appearance: none !important;
}
tab[selected="true"] {
background-color: rgb(242, 162, 4)!important;
color: black !important;
}

« Previous PageNext Page »