Category Archives: Uncategorized

[ANN] Apache Isis version 1.5.0 and related components Released

The Isis team is pleased to announce the release of:
- Apache Isis Core version 1.5.0
- Wicket Viewer 1.5.0
- Restful Objects Viewer 2.3.0
- JDO Object Store 1.5.0
- Shiro Security 1.5.0
- Simple Archetype 1.5.0
- Quickstart Archetype 1.5.0

New features and improvements in this release include:
- Additional EventBus service events, ability to programmatically trigger events, vetoing subscribers (ISIS-550, ISIS-786)
- Integration testing improvements, most notably the new FixtureScript API and auto-injection of services into integration tests (ISIS-776, ISIS-782, ISIS-783)
- Better handling of multiple realms in Shiro security (ISIS-746)
- Better default column sizes for applib services (command, auditing, pubsub) (ISIS-744, ISIS-750)
- Precommit phase to flush pending updates for applib services (ISIS-769)
- Preparatory work for move to Java 7 (ISIS-569, ISIS-770, ISIS-772)
- Improved support for JRebel in Maven and various IDEs (ISIS-756)

Notable bug fixes include:
- Fixed blob/clob mapping in JDO Objectstore (ISIS-714)
- Fixed handling of mandatory boolean parameters in Wicket viewer (ISIS-431)
- RO not threadsafe when buiding metamodel (ISIS-777)

Full release notes are available at [1,2,3,4,5,6,7] on the Isis website (links below).

You can access this release directly from the Maven central repo [8],
or download the release and build it from source [9].

Enjoy!

-The Isis team

[1] http://isis.apache.org/core/release-notes/isis-1.5.0.html
[2] http://isis.apache.org/components/viewers/wicket/release-notes/isis-viewer-wicket-1.5.0.html
[3] http://isis.apache.org/components/viewers/restfulobjects/release-notes/isis-viewer-restfulobjects-2.3.0.html
[4] http://isis.apache.org/components/objectstores/jdo/release-notes/isis-objectstore-jdo-1.5.0.html
[5] http://isis.apache.org/components/security/shiro/release-notes/isis-security-shiro-1.5.0.html
[6] http://isis.apache.org/getting-started/release-notes/quickstart_wrj-archetype-1.5.0.html
[7] http://isis.apache.org/getting-started/release-notes/simple_wrj-archetype-1.5.0.html
[8] http://search.maven.org
[9] http://isis.apache.org/download.html

Deleting git tags on a remote

For some reason our git repo for Apache Isis (mirrored on github) acquired a bunch of tags in the form:

  • upstream/isis-1.4.0
  • upstream/upstream/isis-1.4.0
  • upstream/upstream/upstream/isis-1.4.0
  • upstream/upstream/upstream/upstream/isis-1.4.0

Clearly something or someone has been accidentally pushing bad tags.

To remove these tags locally, I used:

for a in `git tag -l upstream*`; do echo $a; git tag -d $a ; done

To remove these tags from origin, I chose to do it in two steps. First locate the tags to be deleted:

git ls-remote –tags origin | awk ‘{print $2}’ | \
grep ^refs/tags/ | cut -c11- | \
grep upstream | grep -v "\^{}" \
> /tmp/y

then delete ‘em:

for a in `cat /tmp/y`; do echo $a; git push –delete origin $a ; done

Observable and Iterator design pattern are the same thing – who knew?

I’ve just watched this excellent talk on Reactive Extensions – how they do Async Javascript at NetFlix.  A genuinely new idea for me (though I feel a bit dumb for only learning about RX now). Worth spending the 30 mins to watch.

Also really cool that there are versions of RX not only for Javascript but also .NET and Java.

 

Still a place for books…

Like everyone else, if I need to know how use some little API, I google for the answer and then follow the links to stackoverflow.  Yesterday my searches that took me there included an error regarding a missing Windows Identity Foundation DLL, how to do try/catch/finally in Powershell (just as you would’ve thought, by the way), and how to change the name of a Windows service (somewhat more obscure).  In fact my google history for yesterday shows I visited SO 15 times that day with different queries.

Even so, there’s still a time for books.  I’m going to be starting on the next-gen viewer for Apache Isis soon, and because it’s going to be written in AngularJS, I really think there’s no substitute for immersing oneself in a book to really get into the “mindset” of that technology.

The publishers that first cornered the market in technology-specific books (at least so far as my reading was concerned) was OReilly, and then a little later I became aware of Manning.  Most recently though I’ve got into reading Packt Publishing, also doing an excellent job of delivering quality titles on specific technologies.  When it comes to AngularJS, for example, I see that they have 4 books currently; enough to be getting on with!   That compares to just one book on the topic from either O’Reilly or Manning.

Now I must admit that Packt do seem pretty strong on marketing, which leaves me torn.  If I were being cynical, I tend to worry that strong marketing might cover up for a weakness in material.  But as an author myself, I think I’d be appreciative that my publishing company was working hard to flog my wares!  Whatever; Packt’s own surveys show almost 90% of readers are “very satisfied” with their books; that’s a pretty impressive statistic.

So why this puff piece about Packt?  Well, they’ve just released their 2,000 book, and they’ve currently got a discount code which is basically a buy-one-get-one-free offer.  So if you were after a book on technology X, definitely worth checking out.

Full disclosure: Oh, and yeah, I told you about their marketing department? So, apparently this post earns me an ebook or two for myself.  Well, there’s a couple more of those AngularJS books I need to read, so if they help me write Isis’ next-gen viewer, then it’s for the greater good!

Isis 1.4.0 released

After 4 months development, we (that is, the Apache Isis team) have just released Isis 1.4.0, and supporting components.
 
This is a pretty cool release, because it’s the one that Estatio (the first major application to run on Isis) has been deployed against.
 
Some of the features in this release include:
  •  further support in layout.json files for additional facets/UI hints
  • better reporting of metamodel validation errors (including a new page in Wicket viewer)
  • improved support for bulk update
  • @javax.enterprise.context.RequestScoped for request-scoped services
  • QueryResultsCache request-scoped domain service (for performance tuning)
  • new MementoService to support view models
  • new request-scoped @Bulk.InteractionontextService for standardized co-ordination between bulk action invocations
  • Scratchpad request-scoped domain service (for adhoc coordination between actions, eg bulk action invocations)
  • Command, CommandContext, BackgroundCommandService, for profiling and background task support
  • improvements to JDO implementations of auditing and publishing services, to integrate closely with the new Command/backgroundCommand services
  • improved support for running arbitrary Isis jobs via a scheduler
  • supporting methods (disableXxx, validateXxx) for contributed actions/associations now supported
  • services autowired prior to @PostConstruct, and Isis session present for service initialization
  • JRebel support (JRebel plugni itself is third-party, see Isis website for details)

In the Wicket viewer, major changes/improvements include:

  • show action dialogs in a modal dialog, rather than new page
  • limit number of bookmarks, make less easier to accidentally trip, show/hide with keyboard shortcut
  • improved IE9 support, bundle CSS files
  • simplify URLs in Wicket viewer
  • actions returning URL open new browser window
  • UI sorting/ordering hints, pop-up to copy to clipboard
  • breadcrumb drop-down to easily revisit previous page
  • upper/lower case now switchable
  • standalone tables now rendered according to runtime type, not compile-time type
  • better tooltips over icon/titles
Full release notes are available at [1,2,3,4,5,6,7,8,9,10,11] on the Isis website.
  

Isis integration with JRebel

You probably know about JRebel already – it’s a commercial product that dynamically reloads Java classes without having to redeploy your webapp. Not necessarily the cheapest of products, but if you’re a full-time dev working on the JVM, then it can easily pay for itself. Oh, and it’s free for use on any hobby/open source projects.

JRebel itself is pluggable, and so for a while now I’ve been meaning to work on an integration with Apache Isis. Actually, invalidating Isis’ metadata caches is pretty easy, the difficulty really arises in Isis’ JDO/DataNucleus objectstore.

But, with a bit of experimentation, I’ve got what I think is a workable integration going, full details up on github.

And if you just want to see what this means, take a look at this screencast (also available on the the Isis website):

Instant Mockito – a review

Instant Mockito is just a little book covering https://code.google.com/p/mockito/, but that’s not a bad objective in itself. Mockito, after all, is one of the most commonly used Java mocking libraries. (I happen to prefer other mocking libraries better, but that’s another story).

The book organized around a single coherent example which – if contrived – is easy enough to grok and helps unify the content. Through that example this book does a pretty reasonable job of explaining how to use Mockito’s capabilities.

As with many technical books, the layout/indentation of the code examples left something to be desired; I don’t think the author was done any favours by his editor. And I did struggle a bit with little with the omission of import statements in the examples; it wasn’t clear which class the static mock() method had been imported from, for example. The first mention of Matchers was also confusing; both Mockito and the widely used Hamcrest library define a class of this name.

I did also find myself wondering why Mockito’s @Mock annotation hadn’t been used; only later was that explained. I would rather the author had shown the use of @Mock first, and then only later (as a mechanism that involves much more boilerplate), covered the use of mock().

Overall, this book doesn’t cover very much more than what’s covered in Mockito’s own Javadoc API. So is it worth buying? Well, yes, probably… the content is solid enough, you’ll read it quickly, and will end up with a pretty understanding of what Mockito is and how to use it. Which I am sure is what the author set out to do.

Disclaimer: I was asked to review this book – and provided a free eBook for my trouble – by Packt Publishing.

Oredev 2013 – RRRADDD!

In my last post I talked a little bit about attending Oredev 2013, and promised I’d talk a bit about my own talk.

The session title was called RRRADDD! – ridiculously rapid application development with Apache Isis – so I decided that I would do exactly that, and build up a three domain class in a session lasting just 50 minutes. What started off as a bunch of notes and code fragments in notepad eventually morphed into a github project with a README, and (count them!) 22 tags acting as checkpoints as the app is built up piece by piece.

I have to say having done the talk I’m not that sure how well it worked from the point of view of the attendee; perhaps too repetitive and not enough jokes.  In other sessions I attended at Oredev the live coding portion only did a very small amount of stuff (too little, I thought); but maybe I should have followed suit.   Anyway, you can judge for yourself… the talk has been uploaded to Vimeo.

Whatever, plus side is that the github project is now a useful additional asset for those coming to Isis and who want to experiment a bit; I’ve linked to it from the Isis website.

Post script:
Every Oredev session is voted by attendees as they leave.  How well this one went over I’ll never know… the Oredev conference organizers got in touch and said that unfortunately due to a glitch they lost the votes for my session.  Maybe I hit it out of the park.  Then again, maybe not.

Oredev 2013

Last week I attended Oredev conference for the first time. First time in Malmo, first time in Sweden in fact.

Have to say I really enjoyed the venue, a good size. the catering also good, not to mention the free beer at the end of the day. Indeed, I was going to get some Swedish Krona from the cash machine when I was there, but completed the whole trip without any need to; just a couple of train tickets to/from Copenhagen airport, paid for on Visa. Criticisms: perhaps a bit short on power supplies for laptop, and the wifi (as is always the case at tech conferences) was a bit hit-and-miss.

Hotel too was good – and literally next door to the conference venue. Most of the speakers were staying there, so possible to have a conversation in the lounge area after the conference venue closed up at 10:30pm. And the conference organisers were very helpful, both before the event (eg providing clear instructions on logistics) and at it.

There were some good keynotes too (and some less good ones). Everyone, I think, enjoyed Randall Monroe’s xkcd talk, some great anecodotes, as was the talk on the “World of Minecraft”; now I understand what the game is about, I can see how people get immersed in it. Great examples of what could be done, some very funny stuff also. Back home we enjoyed watching up some of those same examples on youtube. Matthew McCullough’s talk was also good value; he always does a good and professional job. (The less said about the opening keynote on Wed am, though, the better).

As to the sessions, each were 50 minutes, and over a good variety of topics. I liked there was some techie stuff (Java, .NET, HTML5/JS) and some agile/process-y stuff, probably a 60:40 split. There were over 6 concurrent tracks, but each also was recorded and have already been uploaded to Vimeo. As for my own session, I’ll blog about that separately.

To sum up, overall, if you are thinking of attending Oredev – either as an attendee or as a speaker – then I can definitely recommend it.

Isis 1.3.0 – crammed full of goodies!

Over on Apache Isis, we’ve just released a new version, 1.3.0, of the framework (core plus supporting components).

There are some major new features in this release; indeed this is probably the most significant release of Isis as a TLP.  Just to highlight some of the main features…

In core, the new features include:

  • contributed collections and properties
  • view model support (across both Wicket and RO viewers)
  • UI layouts defined in JSON files
  • better integration and BDD testing support, including Cucumber-JVM integration
  • domain services for handling application and user settings service
  • domain service providing various developer utilities (eg downloading metamodel)
  • domain service incorporating Guava’s EventBus service);
  • context-specific autoComplete
  • conditional choices
  • new annotations: @SortedBy; @CssClass; @PostsPropertyChangedEvent
  • helpers for writing contract unit tests and for writing comparable entities
  • optimistic locking improvements

In the Wicket viewer, new features include:

  • default dashboard
  • more sophisticated layouts, with multiple columns
  • dynamic reloading of layouts
  • sortable table columns
  • BlobPanel displaying images
  • bookmarkable actions
  • upgrade to wicket 6.11.0

In JDO objectstore, new features include:

  • better integration/validation between Isis and JDO metamodels
  • upgrade to DataNucleus 3.2.7
  • better Google App Engine compatibility
  • expose JDO PersistenceManager via domain service for more sophisticated use cases

The Restful Objects viewer also had several bug fixes vis-a-vis the RO spec v1.0 (thanks to our GSOC students for highlighting these).

In addition to all that, there is a new “simple” archetype, making it easier to get started.

The full release notes etc are available at [1,2,3,4,5,6,7] on the Isis website.

You can access this release directly from the Maven central repo [8], or download the release and build it from source [9].

As ever, feedback welcome

 

Google Summer of Code Veteran Orgs: Apache Software Foundation

The Google open source blog has just posted the write-up that ASF provided on some of its students for GSOC 2013. I contributed a couple of paragraphs on how Apache Isis‘ two students, Dimuthu Upeksha and Bhargav Golla, got on.

Here’s what I said:

Read the rest of this entry

Getting Started with Google Guava – review

Getting Started with Google Guava” isn’t a bad book to get you started with Google Guava – indeed, it’d probably be quite hard to write a bad book on Guava given just how good a library Guava is.

And the author, Bill Bejeck, has, on balance, done a pretty good job of covering the all the most important classes provided by the library, without getting too bogged down in any of them. That’s to his credit; I could easily imagine an author spending too much time on a particular personal favourite of the library.

Still, you’ll need to be a reasonably competent developer to get the most out of this book. This isn’t a book that provides lengthy tutorials on functional programming for example. But the examples that the author provides generally make sense (even if they are often rather shallow). As a reasonably competent developer myself, I did enjoy learning about some of the nooks and crannies of Guava that I might not have discovered quite so easily. I didn’t know that Guava had a Table collection class for example, and I think that the FluentIterable class might simplify some code I’ve written recently.

On the other hand, I don’t write that much multi-threaded code (thankfully!), and so the Concurrency chapter didn’t really help me understand when I might want to use a FutureCallback vs a ListenableFuture. And when reading the coverage of Sinks and Sources in the Files chapter, the examples didn’t explain well enough why these abstractions are useful.

There were also quite a few typos in the book, including in class names. In a similar vein, quite a lot of the indentation of code samples was also inconsistent. The book said it’d use JUnit tests throughout to illustrate the usage; but I can tell you it didn’t. And the grammar in some of the sentences was somewhat sloppy and could have benefitted from a bit more copy-editing. The feeling was of a book written a little too quickly.

But overall, I’d give this book 7 out of 10. If by reading it you end up using Guava a bit more in your day-to-day programming – and I think that you will – then it’s done its job.

Disclaimer: I was asked to review this ebook (and received a free copy) off the back of a blog post a while back I did on Guava myself.

A tech conference … in an Italian castle … by the Med.

The first week in October I’ll be trogging off to do a talk at a new tech conference with a little bit of a difference… it’s in a castle, by the Med. The conference is the MedIT Symposium, to be held at the Castle of Milazzo, in Sicily.

The schedule is heavy on open source technologies, with an emphasis on the leading edge. Mobile and cloud get substantial coverage, so too do DSLs as do RAD frameworks such as Apache Isis and OpenXava.

For myself, I’m interested in learning a bit more about OpenXava, and I’m also interested in the XText … we’ve been thinking about writing a DSL for Apache Isis, and we reckon XText would be a good fit.

But – as you’ll see from a peruse of the schedule – other technologies being covered include Apache Cordova, Gaelyk, Apache Cassandra, Sencha Touch, JOOQ, Mixare, Appcelerator, ownCloud … something for most everyone!

Anyway, check it out as something a little different to round off your summer.

Welcoming Oscar Bou as a new committer to Apache Isis

I’m delighted to announce that Oscar Bou has been voted in as a committer on Apache Isis, and also to as a member of the Isis PMC. The first gives Oscar the right to commit changes directly to Isis’ codebase, the second gives him the right to be involved in future votes.

If you’ve been following the Isis users and dev lists over the last few months, you can’t fail to have seen Oscar’s energetic involvement. Oscar came across Isis while building a similar framework in-house, and has since worked with his team to port much of their application – still in development – over to Isis. In so doing, Oscar has provided invaluable early testing and feedback for new features being implemented.

Oscar has ticked the boxes in terms of being a committer: using the mailing lists appropriately, raising JIRA tickets, provided patches to address specific issues, providing help to others in the community. But he’s gone beyond that in raising a number of insightful – sometimes challenging – questions regarding Isis’ design/responsibilities as a framework, and shown that he’s keen to address these issues and thus improve Isis as a product.

I’m looking forward to working with Oscar in the future; another great addition to Isis’ committers.


As a bit of tidying up, we have also voted for Jeroen van der Wal, and Maurizio Taverna, to be members of the Isis PMC. In fact, in many/most Apache projects, all committers are also PMC members, so it was something of an anomaly that we originally voted Jeroen and Maurizio as just committers.

Using buildreactor to monitor CI jobs

Following on from yesterday’s post (using travis-ci for github projects), I thought I’d use a Chrome plugin to monitor their status. The one I chose was buildreactor (itself hosted on github).

Like Travis-CI, buildreactor is also ridiculously easy to configure. Let me show you in pictures:

buildreactor-010

buildreactor-020

Once configured, the status is easily viewed (and buildreactor will also notify if a build fails): Read the rest of this entry

Enabling CI for github projects

I’ve noticed a couple of times on visiting miscellaneous github projects that there’s been a little logo indicating the state of the CI build. Hmm, thought I… I guess there’s some service out there that can be configured. Probably a bit of a pain to get going. Maybe one day, but not today, I thought.

But today I took a deeper look, and had a go at configuring CI using travis-ci.org. And it turns out I was wrong… it’s trivially easy to get going (for my Maven-based Java projects, at any rate).

Step 1: register at travis-ci.org, with your github credentials. Travis needs them to find your repositories and to install its git commit hooks.

Step 2: per this doc, create a .travis.yml file, with the content:

language: java

Step 3: Read the rest of this entry

Deploying artifacts to Maven central repo

I have a bunch of open source github repos, mostly related to Apache Isis, and have been exploring how to deploy these artifacts up to Maven central repo. It’s a mostly straightforward process, but I hit a few bumps along the way so thought I’d capture them here.

First, my dev setup is a bit unusual: I run Windows 7 in a Parallels VM on top of an old MacBook Pro. The MBP has an SSD and 8Gb RAM, so the performance is good enough for me, and – even though I really dislike the MacOS UI, it is comforting to know that I have native Unix environment to jump back to.

In my Win7 VM, I use github’s fork of msysgit as my shell; in other words, Unix on top of Windows on top of Unix. Yeah, a bit weird, it works for me.

Anyway, back to the point. To deploy these repositories into Maven, Read the rest of this entry

Cucumber editors in Eclipse

Just been experimenting with Cucumber JVM, with a view to adding some new BDD tests into a project I’m working on. And so the obvious next step was to see if there are an integrations with Eclipse, my preferred IDE.

Turns out there are, helpfully summarised by some kind soul in this public spreadsheet. I tried out all the plugins listed there; for my money Roberto Lo Giacco‘s plugin is the current winner. There’s a handy page of screenshots, for example:

Screenshot of Natural plugin

What’s also interesting is that this plugin is implemented in XText. In Apache Isis we have thought about implementing a DSL encoding Isis’ programming conventions, and XText looks like a good candidate.

I’m scheduled to present (on Isis, of course) at the inaugural Medit-Symposium conference in Sicily in October, and one of the other sessions there is on XText. Given at what Roberto has made XText do for Cucumber, I’m looking forward to learning more there!

Restore NuGet packages from packages.config

Another in my occasional series of wrangling with NuGet within Visual Studio.

This one is to restore all packages from a packages.config file:

function Restore-Packages() {
  $proj = get-project
  get-package -project $proj.name | % {
    Write-Host $_.id;
    uninstall-package -projectname $proj.name -id $_.id -version $_.version -RemoveDependencies -force ;
    install-package -projectname $proj.name -id $_.id -version $_.version
  }
}

To use, first edit the packages.config as you require. Then, in the Package Manager Console in VS (in the ‘default project’ dropdown set correctly), just type:

Restore-Packages

Enjoy.

Remapping right-alt key in Parallels when running Windows

I bought a MacBook Pro a few years back. I didn’t really like it… I miss keyboard accelerators (not shortcuts) that the Unix and Windows UI have. Also, I do a lot of work with clients that use Windows, so I kinda need access to it. So my Mac went into the cupboard, unloved.

Then the Windows laptop I was using died… its SSD blew up and seemingly took the motherboard with it. Whatever, it didn’t work and I wasn’t going to fix it.

So I got that MacBook back out of the cupboard, installed an SSD and some more RAM, and set about running Windows in a VM instead Read the rest of this entry

Follow

Get every new post delivered to your Inbox.

Join 248 other followers