- Introduction to JSR 168—The Java Portlet Specification (pdf)
- Understanding the Java Portlet Specification
- I18n in portlets
Wednesday, December 23, 2009
Some useful JSR-168 resources
Thursday, December 17, 2009
Using Spring in server side of GWT
autowireBeanProperties
instead of autowireBean
(otherwise my services didn't get populated).
Saturday, November 7, 2009
Relational storage using JAXB, JPA and HyperJAXB
Few variants are possible. You can start with DDL, generate JPA-annotated beans using Hibernate Tools for example, and then annotate it with some JAXB stuff (or use something not requiring annotations at all, like XStream). You will be able to get an XSD using some JavaBeans-to-XSD tool (like you have in IBM Rational tools when generating WSDLs for given beans), or just generate a bunch of sample XML files by marshaling some test data and use any modern XML editor to generate XSD by example. But I must warn you that the XSD will be rather ugly, because usually you don't have too much control over the whole process, that's why the proper tooling is vital for success. Nevertheless, this approach is quite common and supported by many powerful tools, such as my favorite IBM Rational Software Architect 7.5.
From the other hand, you can start with some UML and generate Java Beans, then put all the necessary annotations (both JAXB and JPA) inside. But you will have to do a double amount of work fixing the beans structure and hardcoding annotations for both technologies. Once again, you will need to fix the resulting XSD manually, that's for sure.
What I prefer to do is design the data layer entirely in XSD (which maps to Java classes in a more natural way than DDL), then generate Java beans using JAXB or something similar, enrich it with JPA annotations and generate DDL as the result. Sounds pretty nice, but there are some problems, particularly at the JPA annotations stage. The major one is that you lose flexibility in XSD changing, because after each change your beans will be generated again and you will lose all your precious annotations (yes, you can keep JPA configuration in XML, but this approach has its own drawbacks, and it's beyond the scope of this post anyway).
Fortunately there exists a tool which reduces (and in some cases can even eliminate it at all) the amount of the manual work at the JPA stage. It is implemented by Aleksei Valikov and called HyperJAXB 3 (version 1 is outdated and version 2 supports Hibernate instead of pure JPA). It is more-or-less a plugin set for XJC, adding JPA annotations to JAXB-generated beans. It is distributed as an easy to use bundle containing everything (including build.xml) to start converting your XSDs to JAXB + JPA enabled Java Beans.
Here comes the concepts of relationships and keys. The problem is, when not specified explicitly, HyperJAXB creates an autogenerated integer ID for every entity, which is not always what you really want to get. Let me explain. I want to automate not only the data schema creation, but also the API to access data. For example, when there comes an XML from the client, I don't want to check if the same piece of data is already present in my DB (in fact it can be a hell lot of work to do, especially when some complex, deeply nested XML structures are considered). I want the intelligent middleware to merge it automatically with the existing data. But it won't happen by default, because of the autogenerated IDs, which are always issued new. So, if you will try to persist the same XML twice, it will put two copies in your DB, which is probably not what you expect to see.
To fix this behavior, you need to explicitly specify the meaningful IDs for your entities. With HyperJAXB you can specify it directly in your XSD by marking some of the entity fields with the special XSD annotation in the same way you document your schemas (For details please consult HyperJAXB documentation. Yes, you still can't use the XSD uniqueness constraints support because it's a bit too hard to parse by XJC-like tool). Same is true for the relationship options – for example, you can define one-to-many with all the possible JPA attributes, so it's quite flexible in case you need it.
So far, so good. Things start being complicated when you have compound IDs (and I think it happens really soon in the real life applications). Fortunately HyperJAXB gained support for IdClass few weeks ago. But here comes another problem of “cascading” IDs – when you have a complex primary key (in entity A) used as a foreign key in another entity (B), which at the same time is a part of its (B's) primary key. We had a brief discussion on this topic with Aleksei (BTW, I want to say THANKS! for his great instant support for HyperJAXB and related stuff), and it seems to be too hard to implement in the foreseeable future due to some limitations of XJC extension mechanisms. So, the only way out is to tweak generated beans manually. Well, I think it is something like 20% of the job, and another 80% is done automatically.
So, in the end the results are pretty sweet. You design your data structure as XML Schema (which itself can be generated based on XML samples). Then you put some metadata (mostly ID information) inside to make sure it is complete. Now you run HyperJAXB against your XSDs and fix the generated Java Beans in case you need to handle some “complex” situations. Then, using one of the tools (either Hibernate Tools or OpenJPA Mapping Tool) you get DDL in a matter of seconds. After that you are able to (un)marshal your entities in a single line of code using JAXB, and load / merge them from / to any RDBMS in a single LOC using JPA. That totally eliminates all the serialization and storage-related code, reducing complexity, improving reliability, bla-bla-bla :)
P. S.: I must warn you that there are some issues when using this approach with different JPA providers. I've tried both Hibernate and OpenJPA and they seem to be not really compatible with each other for anything but the most trivial models. It worth a separate post and I'm not going to explain it here, just to make it short: I prefer OpenJPA over Hibernate nowadays, because I find it less restricting in defining relationships and complex IDs. Also, from the tooling point of view, those are pretty close.
P. P. S.: HyperJAXB functionality is growing rapidly, so I won't be surprised to see the majority of the issues mentioned in this post addressed in the upcoming releases. I wish this project good luck and can't wait to see it gaining popularity in the JEE development community.
Friday, August 28, 2009
Monday, August 17, 2009
Very Simple RESTful Web Services in Python
Python has a CGI-like standard called WSGI, which makes Web Services implementation much easier. But still not that easy, as I want it. So, spent a day writing my own "library", which you can find here, hosted on Google Code. Now you can write RESTful Web Services like this:
@url_pattern("/users/${username}/plans/${year}", ['GET', 'PUT'])I'm gonna use it to implement a very first version of Pomodoro Server. Some brief impressions:
def get_plans (username, year, request):
return "Inside get_plans('%s', '%s')" % (username, year)
- Python is very easy to learn and has a lot of great metaprogramming capabilities, very similar to Ruby. Great language, it's a pleasure to code it!
- Python's documentation is just awesome!
- Some Web Frameworks provide the similar functionality, but it's painful to install and comes with a lot of other heavyweight features, such as MVC and ORM.
- Google Code is a nice place to host your projects, though there are some limitations (for example, wiki is very basic and not compatible with anything else).
@Path("/users/{username}")Update2: found a very similar solution for Python called Bottle. Sample code:
public class UserResource {
@GET
@Produces("text/xml")
public String getUser(@PathParam("username") String userName) {
}
}
@route('/hello/:name')
def hello_name(name):
return 'Hello %s!' % name
run(host='localhost', port=8080)
Wednesday, August 5, 2009
DSL Killer Application
The whole process somehow resembles XDoclet and XSLT a bit, but it's much more reliable, because of the advanced IDEA editor, which takes into account all the necessary constraints, disallowing to misprint something. Still (due to verbose syntax) logical errors at source generation stage are highly possible. Good news is that you can use the whole power of modularity in this process to reduce such risks. Maybe the most striking thing about it is that its own language to define grammar and generate artifacts is also a DSL implemented in the same environment!
You can download JetBrains MPS here for free and try a tutorial. It will take some time to get used to the tool's UI. Its strangeness is in fact that there's a pretty complex tree representation behind a text you see on the screen, and it contains a lot of meta-information displayed as special markup signs, different colors, etc. So you shouldn't think of it as of a plain old source code anymore (to see what I'm talking about, just look at XML files inside a simple test project).
There are some alternatives to this environment, namely Microsoft Visual Studio Domain-Specific Language Tools and MetaEdit+, though I haven't tried any.
P.S.: Thanks to Martin Fowler's bliki for the link - it's a really visionary source of information! Here you can also watch his video on this topic.
Tuesday, July 14, 2009
Code City
Some of the ideas are debatable, for example on page 46 they say:
...you cannot understand the beauty of a painting by measuring its frame or understand the depth of a poem by counting the lines...But at the same time it's obvious that you won't see the beauty of the poem looking on it's grammar, syntax or verse structure (these are more-or-less analogues for software design metrics), without actually reading and understanding the sense. That's why my conclusion is that for creating a harmonious software design it's necessary (but not sufficient) for the metrics to be harmonious, too.
...metrics can help to evaluate and improve designs, but those have to be meaningful metrics that are put in a context of design harmony...
What I liked most of all was the concept of visualizing software projects as cities. The metaphor includes classes as buildings and packages as districts. It is implemented in a tool called CodeCity. Some results of its work can be seen on Richard Wettel's page, who actually wrote it. Here is just one of them:
Though, there are few things which I think can make it even better:
- It would be great to see a color scheme based on the developers responsible for changes, for example, using svn blame (it can be useful for both "normal" and "timeline" views).
- Building base should be Sqrt(NOA), not just NOA - it will look more realistic. It also should have an option to scale building height to Log(NOM).
- Color scheme should be configurable - for example, it's hard to see some "outdated" buildings on the dark backgrounds.
Monday, July 13, 2009
A way to stress-test GUI
Virtualization is what you can use in this case. There's an example of working stress testing system consisting of Citrix XenApp terminal server running 10 Lotus Notes instances (eating 50 Mb of RAM each), and a load generator running IBM Rational Performance Tester (which is just a very advanced point-and-click thing), which can safely simulate 20 - 40 concurrent users.
Major bottlenecks of this setup are:
- RAM on Terminal Server (it's better to use 64 bit solution)
- Network bandwidth (at least 1 Gbit Ethernet)
- It takes much longer (up to 4 times) to implement and debug such test cases, compared to usual web testing scenarios
XML Appliances
Sunday, June 7, 2009
Things we should add to our build process
- Use Sonar for tracking various metrics (it uses all well-known Open Source tools like PMD, Checkstyle, etc. and compatible with Hudson, which we already use in our projects);
- Use Cirr to document public API changes (to know when something really important has changed);
- Use Macker (btw, its' FAQ is really informative, thanks!) to keep dependencies between different modules under control. It first requires some modeling, after which it can break builds in case someone breaks convention;
The idea was inspired by one of the reports on Software Engineering Forum 2009 (link in Russian).
TeamCity by JetBrains: yet another great CI solution
So, TeamCity is an all-included solution supporting tons of really advanced features, among which there are:
- Remote Run and Pre-tested commit
- Build Grid (just awesome!)
- Code Coverage, Inspections and Duplicates Search
- Build Progress and Estimation
- Notifications (of all kinds)
Friday, June 5, 2009
Nice short article about IBM Rational Team Concert
- Support for Agile methodology out of the box
- Original approach to SCM, based on the concept of "streams" (which are essentially branches)
- Advanced build system, automatically collecting all supporting artifacts, such as change sets, fixed defects, etc.
- A lot of great documentation (like Getting Started with Jazz Source Control)
Client JavaScript data storage
Sunday, May 31, 2009
Ultimate Pomodoro?
So, you need to synchronize it somehow. Setting a single timer per team is a bad idea, for the obvious reasons. What I suggest to do is to invent some kind of a Pomodoro Server and track your current status there (team-wise or project-wise). Of course, the policy should be invented for all team members to check this status before interrupting another person.
Sample feature list:
- Notification when required person's pomodoro has finished
- Integration with your
corporatefavourite IM client as a plugin - Integration with popular issue tracking systems via plugins
- Speach recognition to simplify items entry
- Flexible hotkeys for all frequent actions to make things even easier
- Statistics gathering to analyze and boost personal productivity
Tuesday, May 12, 2009
About coding
First is handwriting code from scratch, which is a good old not-reusable-bad-to-support approach. It gives me a great pleasure, because I know what to expect and when I solve a Task, it's clear what I've done to complete it. I mean, it's all so clear and predictable, that nothing can spoil your pleasure of getting things done. I used to code this way somewhere about seven years ago writting C++ utils in MS Visual Studio 7.
Nowadays, things are different. I'm developing Important Enterprise Java Applications, and the
- Find an appropriate Library or Framework.
- Choose the one which either the trendiest one (in this case all your further actions will be more painful), or the wider used one (of course, in this case everyone will think that you're starting to lose your grip on modern hi-tech).
- Try it on some sample application (though, this stage will not give you any useful information at all).
- Try to plug it to your existing application, consisting of Frameworks, Libraries and running on Servers. Configure it (that's where you start hating both XML and lazy developers who suddenly appear not being able to write any meaningful documentation at all). That's where the vast majority of time gets spent.
- Fix all bugs and side effects brought by that all-new yet-another Framework. You won't be able to spot all of them fast enough of course, so this stage virtually never ends.
So, in this world the pleasure of getting things done is usually comes at step 4, when you finally manage to squeeze your brand new part into the puzzle. But that's not it - it has nothing in common with the first Predictable Big Pleasure, and this makes a huge problem for me. Somehow, programming (which is such an interesting and exciting thing in fact!) doesn't make me happy anymore - it became just a job.
And exactly that's why I'm really looking forward to start coding in Ruby, to see if it's that good, as they say.
Tuesday, April 7, 2009
web.xml security limitations
- This will not work at all (several wildcards):
<url-pattern>/stations/*/departure/*</url-pattern>
- This will not work as expected, because only one security constraint will be checked (both constraints work separately):
<security-constraint>
<display-name>Station 14 constraint</display-name>
<web-resource-collection>
<web-resource-name>All station 14'th resources</web-resource-name>
<url-pattern>/stations/14/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>STATION_14</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<display-name>View arrival constraint</display-name>
<web-resource-collection>
<web-resource-name>View arrival page</web-resource-name>
<url-pattern>/stations/14/arrival/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>VIEW_ARRIVAL</role-name>
</auth-constraint>
</security-constraint>
Friday, March 20, 2009
Mercurial vs Subversion
- Mercurial is distributed, i. e. each Mercurial client has his own complete copy of repository, including whole history. That's the main difference to Subversion, which is client-server, so other differences can be considered as side-effects of this.
- Merge is much better in Mercurial, which makes it easier to use branches (always a big pain with Subversion). This is really required, because it's the main mechanism of sharing code between developers.
- Performance - Mercurial is in general somewhat faster.
- Space - Mercurial is more efficient when consuming disk space.
- 3rd-party integration - Subversion has more integration means, at least now.
- Locks - Subversion provides locking mechanism, which is suitable for working with large binary files. Mercurial is not that efficient in this respect, also due to its distributed nature.
- Import/Export - Mercurial is able to import and export data from Subversion, CVS, git and others. It makes it easier to migrate to.
Also, Bazaar should be considered as an alternative (here is a good article comparing and explaining those). Yes, Mercurial appears to be much simpler in install and more than 2 times faster than Bazaar for nearly all operations.
Complete stack of Redmine
Monday, March 2, 2009
Trac + Subversion installation on Windows
I assume the following directory structure (my project is called "rw"):
D:\projects
D:\projects\trac
D:\projects\trac\rw
D:\projects\repos
D:\projects\repos\rw
D:\projects\tools
D:\projects\tools\Python25
D:\projects\tools\svn-win32-1.5.5
Well, let's get started!
1. Subversion server setup
There are two ways to install SVN server. I tried both of them and both work fine, so it's up to you which one to choose.
1.1.1. Download VisualSVN server
1.1.2. Download SVN binaries (also see complete downloads list)
1.1.3. Download Python bindings for Subversion (at the same place)
1.1.4. Install VisualSVN to any location, set repositories location to
d:\projects\repos
(you can accept defaults for all other options)1.1.5. Create a repository (you can use management console for this) named "rw" and check a special checkbox to create a standard folder structure (trunk, tags, etc)
1.1.5. Create a new user for accessing repository. Now you can browse it using this URL and newly created login: https://localhost:8443/svn/rw/
OR
1.2.1. Download SVN server from tigris.org (also see complete downloads list)
1.2.2. Download Python bindings for Subversion (at the same place)
1.2.3. Unzip SVN server to
d:\projects\tools
, optionally add its bin folder to PATH1.2.4. Create a repository named "rw" (
svnadmin create d:\projects\repos\rw
) and create a standard folder structure (trunk, tags, etc) manually1.2.5. Create a new user for accessing repository (modify
D:\projects\repos\rw\conf\passwd
and uncomment a line in D:\projects\repos\rw\conf\svnserve.conf
). Now you can browse it using this URL and newly created login: svn://localhost/rw/1.2.6. You can start the server like this:
svnserve.exe -r d:\projects\repos -d
TODO: See how it can be tunelled through HTTPS, also see how it can be run as a service.
2. Trac setup
2.1. Download Trac for windows installer (see complete downloads section)
2.2. Download Python 2.5 installer (details here, if needed)
2.3. Download genshi installer for Python 2.5
2.4. Download setuptools (instructions available here)
2.5. Install Python, for example to
d:\Python25
2.6. (Optionally) add
d:\Python25
to PATH system environment variable2.7. Install setuptools, genshi and Trac to default locations
3. Integration with Subversion (this solution is kinda ugly hack. I assume it could be achieved much easier, though I was unable to find how exactly):
3.1. Unzip
svn-win32-1.5.5_py.zip
to d:\Python25\Lib\site-packages
3.2. Unzip
svn-win32-1.5.5.zip\svn-win32-1.5.5\bin
to d:\Python25\Lib\site-packages\libsvn
3.3.
copy d:\Python25\Lib\site-packages\libsvn\*.dll d:\Python25\Lib\site-packages\libsvn\*.pyd
3.4.
mkdir d:\projects\trac\rw
3.5. Execute this:
trac-admin d:\projects\trac\rw initenv
, enter the project name and d:\projects\repos\rw
when asked for Subversion repository location. Leave all other values default.3.7. To test installation just execute this:
tracd --port 8000 d:\projects\trac\rw
4. Setup authentication (see instructions)
4.1. Create a new file named
trac-digest.py
and fill it with code from this page4.2. Create an administrator user (user "adm" with password "adm"):
python trac-digest.py -u adm -p adm >> d:\projects\trac\rw\digest.txt
4.3. Give that user all permissions:
trac-admin d:\projects\trac\rw permission add adm TRAC_ADMIN
4.4. Run this to test everything:
tracd -p 80 --auth=rw,trac\rw\digest.txt,trac trac\rw
Now you should be able to see the Admin tab if you log in with "adm" / "adm" (see http://localhost/rw)
4.5. Adjust attachment limit in
trac.ini
:[attachment]
max_size = 262144000
(it's 250 Mb)
5. Enable automatic ticket control via Subversion comments. See instuctions:
Download
trac-post-commit-hook
and trac-post-commit-hook.cmd
from here and follow instructions in trac-post-commit-hook.cmd
.Place it to
d:\projects\repos\rw\hooks
and modify .cmd file like that:SET TRAC_ENV=D:\projects\trac\rw
6. Update. Use Subversion authentication in Trac.
Using AccountManagerPlugin we can work with Trac users fast and easy. I'll describe the simplest and unsecure way of setting it up.
6.1.
easy_install http://trac-hacks.org/svn/accountmanagerplugin/trunk
6.2. Go to Trac Admin tab and enable Account Manager Plugin and the following modules:
- AccountManagerAdminPage
- AccountManager
- AbstractPasswordFileStore
- HttpAuthStore
- AccountChangeListener
- AccountChangeNotificationAdminPanel
- SvnServePasswordStore
- AccountModule
- LoginModule
- RegistrationModule
6.3. Now you'll need to add the following line to [components] section of trac.ini (it will disable HTTP authentication):
trac.web.auth.LoginModule = disabled
6.4. Go to Accounts / Configuration (see left menu in Admin mode) and enter your passwd filename into SvnServePasswordStore box (i. e.
D:\projects\repos\rw\conf\passwd
)6.5. Now you can login as adm (don't forget to add this user to your Subversion's passwd file) and add / remove Trac users via new menu items in Admin tab. The best thing about it is that now all your changes will be reflected in Subversion configuration, so this could be considered as the common place of manipulating users for your development environment.
6.6. IMPORTANT. Now you can't use --auth when starting tracd. So, my command line is simply
tools\Python25\Scripts\tracd.exe -p 80 trac\rw
Now you can customize all the necessary settings, first of all authorization. Also there available a lot of useful plugins for Trac, see Trac hacks site. What I'm going to do next is install Maven proxy and Hudson continuous integration solution.
P.S. The best thing about this installation is that it can be done once and then packed into a handy (in my case 80 Mb) redistributable ZIP file and use it everywhere. The only issue in this case is that you will need to install Python anyway (because of some shared DLLs), but during installation you can choose the existing
D:\projects\tools\Python25
directory and it won't override your changes.
Saturday, February 28, 2009
The Pomodoro Technique
The sole idea of this technique is to split the work into fixed short time frames separated by breaks, plan it and protect it against interruptions. A set of simple yet efficient rules promises to make it work.
I was completely carried away by this paragraph, because it seems to be the thing I'm lacking most of all in my everyday work:
We can stimulate this ability to feel time in a different way by means of a series of exercises which serve to enhance consciousness of passing time among Pomodoro users. This different awareness of the passage of time seems to lead Pomodoro users to a higher level of concentration in performing the activity at hand.BTW, the concept is thoroughly developed and there exist various tools dedicated to help using it, so it should be a fun thing to advance this technique, but I'm going to use it's simplest, hardware form. Yes, gonna try this on Monday! :)
Friday, February 27, 2009
Scrum and XP from the Trenches
Short extract follows:
Wednesday, February 25, 2009
XQuery for mashups?
for $statement in document(https://www.sample.com/sample.xml)//post
let $comment := $statement/comment
where $statement/postedby = 'userBob'
return <quotebob>{$comment}</quotebob>
Nice, isn't it?
False language
99 9[1-$][\$@$@$@$@\/*=[1-$$[%\1-$@]?0=[\$.' ,\]?]?]#It's a program which prints all primes up to 100. It's so impressively smart, that inspired creation of K, F and Y programming languages, which in turn are... somewhat similar to J and Q.
Tuesday, February 24, 2009
Nice diagrams
Wednesday, February 18, 2009
Grid Computing made easy with GridGain
It seems that GridGain is not very popular (yet), at least I was unable to find a wiki article about it :) though I really sympathize its simplicity and wish them good luck.
Monday, February 16, 2009
Sun Web 2.0 tech is easy
- Developing MySQL-Backed Applications with Netbeans, JRuby-on-Rails & Glassfish (needs registration)
- GlassFish Clustering In Under 10 Minutes (also high-resolution version is available - the link is right after the movie window)
Friday, February 13, 2009
Pushing data to browser
With AJAX such things became simpler, because no IFrames nor page reloads nor applets of any kind are necessary anymore. Instead nowadays we have Comet, which is an umbrella term for all such technologies, for example:
- Bayeux protocol providing publish/subscribe model
- BOSH for establishing bi-directional connections between client and server
The shortest way to read a text file
Thanks to CT Arrington's Weblog and Core Java Technologies Tech Tips magazine.new java.util.Scanner(url.openConnection().getInputStream()).useDelimiter("\\Z").next();
Update: one more short way, using Apache Commons IO:
FileUtils.readFileToString(file);
Some open-source Java tech for scalability
- JXTA is a P2P framework for Java (here is a very nice 171 page guide about it)
- Scale-up vs scale-out study by IBM (PDF): horizontal scaling wins
- Compass - ORM-like Lucene wrapper. Seems it's extremely scalable
Thursday, February 12, 2009
Software transactional memory
Though, it can't replace locking completely, well... because in fact it provides no locking :) So, some inconsistent states are still possible, therefore transaction locking should be used, which returns us back to Earth.
Wednesday, February 11, 2009
Tools for XSD-LDM-DDL roundrip development
Ok, maybe my schema is all wrong (maybe because it was not created by Business Modeler), still it's very simple and I see no reason why it shouldn't work. Also, it doesn't permit to transform LDM to Physical Data Model, so no DDL generation too... Ok, I guess it should work, but only after reading some Redbook about it.
I decided to give a short try to other ER modeling tools. PowerDesigner allowed me to easily create an LDM (it's called "Conceptual Data Model" there) and transform it to Physical Data Model AKA DDL in few clicks. Altova XML Spy was able to move between XML Schema and DDL seamlessly...
Both tools also provide a lot of useful additional functionality, which I'm going to explore and describe a bit later.
Friday, February 6, 2009
Trends
- grid computing, soa, cloud computing
- mainframe
- java, c#
- c++, c#, java
- j2ee, microsoft .net
- ruby, groovy
- ruby on rails, grails
- amazon
- netbook, notebook
- yahoo
- scala, groovy
- neural networks, artificial intelligence
- wiki, blog
- crisis, sex
- hardware, software
- netweaver, websphere
- abap, sap
- abap, netweaver
- websphere, weblogic
- ibm, oracle, microsoft
- open source
IBM Rational products I didn't know about
- Rational Host Integration Solution. It looks like an advanced screen-scrambler for existing [ugly] mainframe user interfaces, powered by Rational Host Access Transformation Services. They say it's done "
without changing the existing applications". Kinda telnet2ws. - Rational Software Analyzer. This static software analyzer looks promising, it supports C++, Java and something else. What I'm interested in is 500+ code review rules for Java. I tried to run it against one of our projects, and it produces some quite impressive results. I mean, something I wouldn't notice in an everyday life. The major drawback is that the installation is >600 Mb, which is just too much for such a simple thing (I would prefer to have it just as a downloadable plugin for my RSA). Furthermore, Rational Software Architect which I use as a main tool already have limited support for such analysis (providing just 200+ rules).
- Rational Business Developer. After reading this: "EGL (Enterprise Generation Language) compliments the breadth and depth of Java and COBOL technology with a simplified, more abstract development paradigm"
, I imagined an EGL editor with a radiobutton allowing to choose one of these: "Generate COBOL code", "Generate Java code". No COBOL please. Also they compare it with .NET for a task of retreiving data from IBM mainframe (!). In the end they claim something like "yep, we knew it would happen. Dotnet sucks, it doesn't work with mainframes". In fact, that PDF is the most exciting thing about RBD, and reading it somehow resembles watching Belarussian political news on government TV channel (that's exaclty the situation when one look is worth a hundered words).
JSF in RAD links
Thursday, February 5, 2009
Habits and motivation
Also I've looked through a Paul Gram's blog, which I frankly speaking dislike because of it's well, straightforwardness. He's an over-positive, super-optimistic, completely American businessman saying some quite obvious things trying to find some deep sense inside. Anyway, I found an interesting idea there too. Let me quote it:
I think that's a fresh idea and it's not too late to start something like that in mid-February :)If you start a new year off with massive success in the first month, it’s amazing how fast it can snowball and help propel you to your best year EVER.
Wednesday, February 4, 2009
Tricky
UPD: Finally found an easy tutorial on it. They could have told "it's a megasophisticated way of using pluging" instead of "framework" :)
Tuesday, February 3, 2009
Simplifying JDBC in DSL fashion
- JaQu, though I can't figure out if it could be downloaded without H2
- LIQUidFORM, which does its best to look like LINQ
- And some other LINQ-inspired implementations for Java
And yes, I wish you good luck, because I'm afraid, some cool features (closures, etc) which can improve DSL implementation in Java won't be included in JSE 7. That's why I'm looking at Groovy with increasing interest and can't wait to see good IDE support for it.Product p = new Product();
ListsoldOutProducts =
db.from(p).where(p.unitsInStock).is(0).select();
Update: they actually will include closures in JSE 7! Not looking at Groovy anymore :)
Monday, February 2, 2009
Functional Programming in Architecture
BDD is too repetitive?
UPD: Thinking of our poor testers who were unable to document their functional tests, start suspecting that this is what they might have needed instead of using IBM Rational Functional Tester...
Thursday, January 29, 2009
Cool Groovy feature 2
Briefly, it uses closures, and functionality provided by use keyword. I guess it could be improved to make the whole thing less verbose, but right now I have no time to think about it. Tried to do something similar in Java using AspectJ, but stuck due to Java syntax limitations due to absence of closures. Using anonymous classes here and there looks ugly and is not less verbose nor easier to understand than straightforward approach.
I wonder if some kind of closures can be implemented in Java using aspects. Haven't found the solution yet.
Tuesday, January 27, 2009
Some business rules resources
Why haven't we used some off-the-shelf product instead? Well, mostly because we lacked information, were limited in time and virtually all other resources. So now when I have time to investigate (the project is over), I found some neat stuff about it:
- Rule Based Systems: Why use a rules engine
- Drools features and screenshots (damn, I love these screenshots!)
- Complete site about Business Rules (still under construction I guess)
Friday, January 23, 2009
Cool Groovy feature
Thursday, January 22, 2009
HTTPUnit in DB2 stored procedure
And guess what? It works! More or less... Xerces still unable to find something important inside HttpUnit, but at least no crashes. I guess it's because Xerces uses something internal as a classloader, that's why they have so many problems with shared libraries, etc. So, I've just put that nasty JARs here and there and everywhere (yes, that's not any kind of production system, just a learning application) and now it seems working fine. Well, I'm not sure yet, because it's quite a long-running procedure, but I will know for sure in about ten minutes.
Keeping my fingers crossed + +
UPD: Yes, it works finally. Also, I've found a nice article about HtmlUnit vs HttpUnit. Damn.
Wednesday, January 21, 2009
Artima Developer Spotlight Forum - Java Properties without Getters and Setters
My first entry AKA disclaimer
Firstly, it was surprisingly easy to create that blog, thanks to blogger.com! I'm not a native English speaker (actually, I've born in ex-USSR country), so don't get confused with it please.
I think this will be mostly IT-related blog, where I'm going to collect my favorite links, articles, etc.