Style Update
I'm still playing with this blog's style , so this is work in progress.
I'm still playing with this blog's style , so this is work in progress.
It might be an old trick, but, it is nice to know that I can change the background image without the need to use javascaript.
Here's how
It seems that the idea I had is more of a silly thought.
It's not the nature of the idea, or how to apply it. It's because of cultural limitations and its inherited problems.
It was simply a solution to provide a repository for info related to any business environment and it's its effect on a certain business. It would have been based on extensive reporting and analysis tools. Think of it as a Business Activity Monitoring solution but with a focus on the outside world (not the enterprise internal one). In that sense it might have been called Environment Activity Monitor (but probably it's not the suitable time of naming).
The repository would have provided means to input data related to many parties (regulatory bodies, government, competitors, persons) and their interconnecting activities that sooner or later would impact the business activities of X company.
Some outputs might have including Time lines, Network diagrams (with nodes representing parties and lines representing activities), etc…..
If you know of any similar solution please drop me a line
Anyway, after a short talk with one of my friends, I discovered that the decision makers (and analysts if ANY) in the business arena in X country are not ready for such tools (Limited appreciation of technology, lack of essential skills, and most important some “cultural” limitations).
I won't abandon the idea (at least for now) until I have a quick look at Lucene. It might provide a way to automate data entry by sifting through data (especially syndicated one).
This would ease up the part of commitment from decision makers (no required skilled force to enter data), and I might end up with a different business model.
Did I just say that??? Technology formulating Business Models? Boy! I'm becoming sophisticated :-).
Wish me luck ![]()
As a start of my blog's CSS revamping - I found this gem. A Color Scheme generator (Javascript based) with lots of cool features (It suggests a plethory of schemes just by dragging the dot on the color wheel). I especially liked their variations of (Pastel, Dark Pastel, …)
The website also has a lot of CSS tips which I might use in the coming work.
After having GMail, Google Suggests, Google Maps, Yahoo! mail contact list, it seems like XmlHttpRequest is really kicking in.
Althought the idea have been around for a while yet, it looks like Google Maps smooth zooming and panning have hit people on the heads (I love it).
I'm reading about Ajax, DWR,
SWF and it seems that the craze is starting again, which one to pick, which one to invest in.
I was requested (in alignment with my hazy career plan in the company) to do a review of our corporate strategy and to present my report to a line of the T.M. (WOW! sound like this guy is climbing somewhere…. but, he's really and truly not:-) ).
While reading a financial newspaper a couple of days ago I was hit by an idea, a new application idea.
The closest categorization I could think of was something in the vicinity of a “Business Intelligence” app.
A search in sourceforge made me think that it's either a damn unique and original thought, or a genuine clumsy and silly one.
I'm trying to formalize my thoughts thru a simple class diagram, before talking to a friend president of one of the manufacturing companies.
I really didn't mean to sound so obscure, but, it's probably the idea that's hogging my brain.
I might be telling the readers some of my thoughts (as I'm dying for an input).
Check back soon
A neat tool for log [files] processing is Chainsaw.
It enables processing log files from various sources and in various formats.
I had to download log4j-1.3alpha for some of its jars (UGLI) in order to start Chainsaw.
I'm still trying to configure it to read some log output (stdout) from my application during development.
Middlegen is a timesave.
Although it's not the perfect solution to generate Hibernate mapping files and hence POJOs, yet, it saved me a lot of time.
I was about to quit playing with it as it wouldn't read foreign key names with the exception:
java.lang.IllegalArgumentException: There is no column named
<columnname> in the table named <tablename>
It seemed that Middlegen was reading the DB2 AS/400-assigned Foreign Key short
table names (<table>_00001) and not the long names (<long_table_name>).
I doubt the reason is because of discrepancies in DB2/400 (again:I hate DB2/400).
Anyway, after the folks here decided to go with short table names (because of other reasons) everything went fine.
For those of you who want to generate Hibernate mapping files and POJOs from an existing database, here's a SIMPLE middlegen build file (other than the long build sample file supplied with middlegen solution):(Running first middlegen, then hbm2java)
<?xml version="1.0"?>
<project name=”my project” basedir=”.” default=”middlegen”>
<property name=”middlegen.dir” value=”path/to/middlegen/directory”/>
<property name=”hib.ext.dir” value=”path/to/hibernate/tools/directory”/>
<property name=”app.name” value=”application name”/>
<property name=”gen-src.dir” value=”${basedir}/JavaSource”/>
<property name=”lib.dir” value=”${basedir}/WebContent/WEB-INF/lib”/>
<property name=”src.dir” value=”${basedir}/JavaSource”/>
<property name=”domain.package.name” value=”com.package.name”/>
<property name=”database.url” value=”jdbc:as400://hostname”/>
<property name=”database.driver.file” value=”databasedriver.jar” />
<property name=”database.driver.classpath” value=”${database.driver.file};${basedir}”/>
<property name=”database.driver” value=”com.ibm.as400.access.AS400JDBCDriver” />
<property name=”database.userid” value=”username”/>
<property name=”database.password” value=”password”/>
<property name=”database.schema” value=”library_name”/>
<property name=”database.catalog” value=”catalog_name”/>
<!– =================================================================== –>
<!– library –>
<!– =================================================================== –>
<path id=”lib.class.path”>
<pathelement path=”${basedir}”/>
<pathelement path=”${database.driver.classpath}”/>
<pathelement path=”${lib.dir}”/>
<fileset dir=”${lib.dir}”>
<include name=”**/*.jar”/>
</fileset>
<fileset dir=”${hib.ext.dir}”>
<include name=”**/*.jar”/>
</fileset>
<fileset dir=”${middlegen.dir}”>
<include name=”*.jar”/>
</fileset>
</path>
<!– =================================================================== –>
<!– Run Middlegen –>
<!– =================================================================== –>
<target
name=”middlegen”
description=”Run Middlegen”
>
<taskdef
name=”middlegen”
classname=”middlegen.MiddlegenTask”
classpathref=”lib.class.path”
/>
<middlegen
appname=”${app.name}”
prefsdir=”${src.dir}”
gui=”false”
includeViews=”false”
databaseurl=”${database.url}”
driver=”${database.driver}”
username=”${database.userid}”
password=”${database.password}”
schema=”${database.schema}”
catalog=”${database.catalog}”
>
<!– Table names are optional –>
<!–
<TABLE name=”tablename”/>
–>
<hibernate
destination=”${gen-src.dir}”
standardGeneratorScheme=”assigned”
package=”${domain.package.name}”
genXDocletTags=”true”
javaTypeMapper=”middlegen.plugins.hibernate.HibernateJavaTypeMapper”
/>
</middlegen>
</target>
<!– =================================================================== –>
<!– Run hbm2java –>
<!– =================================================================== –>
<target name=”hbm2java” description=”Generate .java from .hbm files.”>
<taskdef
name=”hbm2java”
classname=”net.sf.hibernate.tool.hbm2java.Hbm2JavaTask”
classpathref=”lib.class.path”
/>
<hbm2java output=”${gen-src.dir}”>
<fileset dir=”${gen-src.dir}/com/ansdk/cmms/domain”>
<include name=”**/*.hbm.xml”/>
</fileset>
<fileset dir=”${basedir}/hibernate.more.hbm”>
<include name=”**/*.hbm.xml”/>
</fileset>
</hbm2java>
</target>
</project>
Now, I'd love to see the following improvements on middlegen;
I've been through Spring forums for quite a while now trying to figure out how to SIMPLY forward a request to a controller from another controller
(keywords: forward, forwarding, controller chaining, …). It seems that this basic function has no easy implementation.
The problem started when I wanted to forward the request to a controller that is dynamically determined (hence the BeanFactory wouldn't help).
First: I simply tried to call the required controller as a view (return new ModelAndView(viewName)) and yes, I agree it is not a view. My intelligent FreemarkerViewResolver (perhaps too intelligent) kept appending the “.ftl” to that imaginary view.
Second: I tried (as recommended by some) to upgrade to Spring 1.1.3 where a forward can be used (similarly as “redirect:”) using a UrlBasedViewResolver- from release notes
(UrlBasedViewResolver supports a “forward:” prefix too, for forwards to other controllers through special view names
I used a UrlBasedViewResolver chained to the FreeMarkerViewResolver that I have (chaining multiple view resolvers through their “order” property).
That didn't work either! using the <property name="order"><value>1</value></property> gave me some weird exception that the view resolvers didn't have a property setter for property “order” !!!). (didn't have time to look at this).
Third: I used a RedirectView and placed those attributes I wanted to place on the request as session ones (not very sexy approach, but, it worked anyway).
Fourth: I went back to the basics, and used the getRequestDispatcher() to get the request dispatcher and called the wonderful forward() on it (returning a null from my handleRequest). This also worked, but it seems like a departure from Spring recommendations of NOT returning a null value.
Sixth: I thought of returning a secondController.handleRequest(...) from within my firstController's handleRequest(..) but this wouldn't have helped either, as the secondController is runtime determined.
As I became more and more aware that this wasn't a straight method call; a reply from kdonald (Spring Team) was posted on one of the discussions
“forwarding to a controller without RedirectView“. It seems that spring indeed doesn't have this “forward” action, and that Spring's web flow will solve this issue and provide enhanced chaining functions (expected release 1.2). Can't wait to try it.
The plug was pulled on the project I was working on - adapting an opensource workflow engine (jBPM in my case) for use in an existing application.
Although it did hurt a bit (since I've done an extensive job understanding the target application), yet, the amount of time I spent on Spring (the framework of choice) were really thrilling.
Some of Spring ideas that kept a smile on my face were:
- The dependency injection (ease of understanding and adoption).
- Its Web MVC covering some of the drawbacks of Struts.
- Its integration with Hibernate and other O/R mapping.
- Its coverage for the different application layers (UI, Web MVC, O/R, Utilities).
- The ease of pluggability of various components and tools into the framework.
- The enthusiasm with which people are adopting and hence the growing community support.
- The continuous work and bug fixes on the project.
- Interceptors and AOP and their very good potential (still with many blurry issues for me).
- Web flow (which hasn't been released yet).
Although Spring documentation are not targeted for newbies (or even half-seasoned developers), yet, one can get some guidance from them (Looking forward to buying one of the 4 Spring books out there - still waiting for an offer from the American University in Cairo library). Besides, what is the best way to learn than to do?
I'm leaning to believe in Spring as the Framework of Frameworks and I'll definitely explore it further.