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

Eclipse Tips: More refactorings (and a bit of common sense).

In this next video in my series of using Eclipse effectively, I show how how to use Eclipse’s quick-fix refactoring (and a little common sense) to restructure some hairy code into something rather more palatable.

Welcoming Maurizio Taverna as a new committer to Apache Isis

I’m delighted to announce that Maurizio Taverna has been voted in as a committer on Apache Isis.

Maurizio came across Isis at the beginning of the year, and since then has been working rapidly and enthusiastically to develop a new viewer using DHTMLX. Although (because of licensing restrictions) this codebase cannot be donated to Isis, it’s a substantial and impressive piece of work. If you’ve not seen it yet, there’s an online demo here and the code is on github.

Maurizio has also demonstrated the viewer as an app running on Google App Engine (the demo above is running on GAE). To do this he has identified and addressed several improvements; these have been fed back to a few changes to the JDO objectstore component, as well as new documentation on our website.

Maurizio has also had several ideas to help publicise and promote Isis, including a series of animated interviews (a draft of the first of which can be seen here).

I’d personally like to thank Maurizio for all his hard work so far, and to say that I’m very much looking forward to working with him and gaining from his experience in the future.

Updating a NuGet package across all projects in Visual Studio

A little while back I did a couple of posts how to force a reinstall of all references in a Visual Studio from the NuGet packages.config.

A similar requirement is to update a package to its latest version, across all projects. Here’s how:

Read the rest of this entry

The DSL of the DHTMLX viewer for Isis

In my last post and previously to that I’ve publicised the work that Mylaensys (Madytyoo and chums) have been building a new viewer for Isis based on the DHTMLX javascript library. One of the most noteworthy things about this viewer is its support for a domain-specific language to describe the layout of the widgets in the UI.

Mylaensys have now blogged about the internal design of this DSL (exploiting Madytyoo’s experience early in his career building compilers). It makes for interesting reading.

Or, if you want to just play with the DSL yourself, go to the sample application running on Google App Engine. The link to change the DSL (and update the layout dynamically) is top right of the screen.

Go play with the DHTMLX viewer for Apache Isis

Mylaensys (Madytyoo and chums) have just blogged about their viewer for Apache Isis based on the DHTMLX Javascript widget library.

The post provides a bunch of tech details along points to a simple example you can play with running on Google App Engine. Here’s a quick screenshot:

isis-dhtmlx-viewer-screenshot-01

Apart from looking rather pleasant, what’s notable about this viewer is the fact that it supports a DSL allowing the UI to be easily customized. Thanks must go to Marcius Brandão and colleagues for their prior work on a Naked Objects view language (and as implemented in their NO framework, Entities) for originall developing this idea.

Anyway, do check this new viewer out; I’ll pass on any feedback I get to Mylaensys.

Eclipse Tips: using the Source menu

Everyone knows – or at least suspects – that most of the Eclipse goodies live under the Refactoring menu. However, there’s also a lot of goodness under the Source menu too.

In this quick tip, I’m using another example from my little Java TDD course, demonstrating how to quickly write an immutable value type using a bunch of those Source menu items.

Eclipse Tips: Quick Fix to generate code

Here’s another in my nascent series of quick tips for Eclipse. This one shows how you can use Eclipse’s quick fix feature (ctrl+1) to quickly generate code.

To demonstrate it, I’ve actually used one of the exercises from my little Java TDD course, so if you watch it you’ll learn a little about Hamcrest matchers, too :-)

Eclipse Tips: Extract Local Variable

When I teach my little Java TDD course, I quite often do live coding demos …especially if we’re running behind schedule and I want to catch up; I’ll skip an exercise and work through the solution. And one of the remarks I often get at the end is “thanks for the course, but what I also found useful was learning about how to use Eclipse effectively”.

Well, I guess I have used Eclipse for over 10 years now, so I suppose I am reasonably familiar with it. So I thought I’d show some of these tips by way of a series of screencasts.

The first one in the series is nice and simple: the “Extract Local Variable” refactoring, and its corollary, “Inline Variable”; something I use an awful lot when working on Apache Isis codebase. You’ll find it just below…

Marrying DHTMLX with Apache Isis

Mylaensys have just publicised on their blog the fact that they are working on an integration between DHTMLX and Apache Isis.

They previously have integrated DHTMLX and Spring Framework (DHTMLX Spring Link), so they have a proven track record… and I’ve been impressed how quickly they’ve produced some early prototypes.

So if the idea of rapidly building domain-driven apps with a customizable UI appeals, then keep an eye on their progress. The Isis mailing lists would be a good place to subscribe :-)

Articles on SD Journal

I’ve just written a couple of articles on Apache Isis, published by the Software Developers Journal. You can download the journal for free here.

The first article is a general introduction to Apache Isis, while the second looks in detail at Isis’ RESTful APIs.

To download the journal, you do need to register, but it won’t cost you anything other than your email address.

Apache Isis Core 1.1.0, Isis Shiro Security 1.1.0, Isis Wicket Viewer 1.1.0

A few days ago we (that is to say, the Apache Isis team) pushed out a new point release of Apache Isis Core (v1.1.0), along with two of its components Isis Shiro Security (v1.1.0) and the Isis Wicket Viewer (v1.1.0). The Quickstart Archetype that combines Wicket, Shiro, Restful and JDO also got an update (v1.0.2).

New and notable features in this release are: Read the rest of this entry

Using Google Guava’s Ordering API

We’ve been playing a bit more with Google’s Guava library – what a great library! The most recent thing we used it for was to sort out the comparators for our domain objects. Here’s how. Read the rest of this entry

Apache Isis now has Shiro integration for security

Hot on the heels of Isis’ first release as an Apache top-level project, we’ve now released a new security component that integrates with Apache Shiro.

At the same time, we’ve updated our Maven archetype (that combines Wicket, Restful and JDO) to incorporate this new Shiro security component. Read the rest of this entry

Apache Isis release v1.0.0

Following on from recent graduation as an Apache top level project and the work we’ve done since (new website, moving to git, semantic versioning), I’m proud to announce that Isis 1.0.0 has been released.

In fact, the news is a little old by now; we got the release out just in time for Xmas 2012, Read the rest of this entry

Apache Isis codebase refactored, adopting semantic versioning

Following on from Isis’ recent graduation as an Apache top-level project, I also blogged about how we have a new CMS-based site and also how we’ve moved our code from Subversion and into Git. This is also part of a general theme to make Isis as easy as possible to contribute back to; all about growing the community.

Another change that we’ve made is that we’ve refactored the codebase into separately releasable components. Isis has Read the rest of this entry

Apache Isis source moves to Git

Following on from Isis’ recent graduation as an Apache top-level project, the Isis community also voted to move our codebase over from Subversion and into Git. That’s not to say that Subversion is a bad SCM – far from it – but Git has a number of advantages over it, not least the fact that Git makes it easier for users to contribute back patches. This is helped in no small part by the fact that ASF mirrors the code into github; you can find Isis’ codebase at http://github.com/apache/isis.

You can find details on how to get started with Isis and git at our website; you’ll even find a nice page (with pictures!) that describes the process, and a crib sheet for all the useful git commands to use to contribute back changes. Check it out!

Apache Isis graduates as a top-level Apache project, gets a new website

Somewhat delayed news, but just to say that a couple of months ago (Oct 17 2012, to be precise), the Apache board approved the resolution to establish Isis as a top-level project.

This is a big deal. The Apache Software Foundation is all about establishing viable open source communities with software developed “out in the open”, and with squeaky clean intellectual property. The reason Apache has an incubator is to ensure that these principles are followed.

So, after a couple of years in the incubator Read the rest of this entry

A domain service for mail merging Word (OpenXML .docx) files … with repeating data

One requirement that most business apps have is to be able to dynamically generate Word documents. For scalar non-repeating data this is not too difficult in .docx; indeed the file format has built-in support for data binding using Custom XML Parts. However, there is no support for repeating data, at least, not prior to Word 2013. Which is where a little domain service that I’ve been working on comes into play Read the rest of this entry

Follow

Get every new post delivered to your Inbox.

Join 260 other followers