Adventures in Apache Isis...
I successfully delivered my first "real" Apache Isis application today -- YAY!! -- and would like to share my experience. My background: I am a reasonably experienced developer proficient in custom application development in C#, Java, Javascript, Python etc. but never touched Apache Isis nor Apache Wicket nor DataNucleus before, my Java chops are a bit rusty and I am a complete Maven noob. I have been following NakedObjects since the early 2000's and am quite intrigued by its philosophy and promises but never mad the "plunge" to actually implement a project for a client with it. I checked out Apache Isis on and off (hey, I even bought and enjoyed Dan's book in 2009 or so) but - without wanting to sound blasé - the UI was never quite up to my taste (the .NET-Version was even worse). But the recent changes to the look and feel of the Bootstrap Wicket interface made me confident to finally be able to "sell" it to clients. The target application is - in a nutshell - an internal web-application for a government department to define and configure traffic webcams (~1000), locate them interactively on a map, display their latest images, link them to their road network data etc. Nothing too complex but the right size to try something new, I guess. The great: I implemented a working prototype of the application in under a week(!), which already looked very polished and had lots of "bells and whistles", like a Google Maps interface, display of live images, Excel-export, auditing-service, REST-interface etc.. The client was positively surprised by the polished looks and richness of features and went for it. So, within two weeks after that I was able to implement the complete application, reusing most of the work implemented in the prototype. I had to implement two Isis wicket components: - Display of a map (Locatable) based on OpenStreetMap: I had trouble getting the Google map interface to work in the client's environment. It kept complaining about application keys etc. and wasn't usable at all. Thanks to the "wicket stuff" implementation of openlayers3 and a shameless "raid" of Dan's gmap3-isis-component I was able to build an openlayers3-isis-component myself, despite my utter isis/wicket noob-ness. - Display of static image resources: The "standard" Blob-interface didn't cut it for me because it only displays a thumbnail image (which was even of a bigger byte size and lower resolution than the original) of an image resource from memory/db. I was able to build an Isis ExternalImageUrl-component by copying much of the Blob/Clob-component but using static URLs, which works flawlessly for displaying the original images based on an "ExternalImageUrl"-Property of the entity. (Once the dust has settled I want to contribute the openlayers3- and static image components. Maybe one of you guys can provide me with a little guidance how to set that up...) I had some minor questions that got answered instantly by Dan and Co on the mailing list. Thanks again! The ability to define aspects of the interface in the XML-layout files is great (despite some minor quirks with the translation)! Studying the TodoApp helps a lot in this regard. The not-so-great: I think the code base is still quite dynamic, which is good in a way because it gets actively developed (does Dan ever sleep? ;)) but it's also difficult for a noob to jump in. I happened to work with the sources right before the 1.12.2 release which had some annoying "surface" bugs and in 1.13-SNAPSHOT some subtleties of the Isis-components implementation already changed. I18ln: There are lots of labels hard-coded in English (I'm looking at you: bookmarks-display, list pager, signin fields, excel download etc.) which can be a real show stopper for certain clients in certain locales (France, Germany, ...). Plus, if you want to fix these kinds of errors you need to understand the Wicket-way of doing this plus the way Isis goes about it as well. And then do it for the contribs also. Surprisingly complex for a beginner even if they are by themselves all just small trivial fixes. Documentation: All in all the documentation is great and better than much of the other stuff out there, but a lot of details are missing to really understand the concepts behind value objects, enum types, facets, objects not originating from a database and the like. Furthermore, there is not a lot of info or "hand holding" about how to take an application from prototyping to production. I had to spend a lot of time figuring out how to get a jetty runner working with an "uberjar" in headless mode as a service with "external" configuration (the internal Isis Server didn't work for me at all, but that might also just due to my inexperience). Wish list: - Better out-of-the-box handling of the display of external/static resources (Images, IFrames(!) etc.) - A component for pageable display of entity collections in a grid - A tree component All in all I definitely see Apache Isis as a great and clean
Re: i18n question
Thanks a lot for the explanation and links, Dan. I think I understand this a bit better now (missed the fact that there needs to be an additional properties-file for the component-html file etc. -- complete wicket "noob" here). As soon as I am "geared up" for github-pull requests I hope I can contribute to fixing minor quirks like hardcoded strings and the like... Cheers, Deacon On Tue, May 24, 2016 at 9:21 AM, Dan Haywood <d...@haywood-associates.co.uk> wrote: > Hmm, it would seem to be hard-coded [1]. > > Elsewhere in the Wicket UI we allow i18n, eg of the "OK" and "Cancel" > buttons [2], through a custom implementation of Wicket's Localizer SPI > [3]. So it ought to be possible to i18n the "Show All" similarly. > > If you want to tackle this and raise a PR, that'd be great. Otherwise I'll > see if I can implement it in the next couple of days. > > Thx > Dan > > > > [1] > > https://github.com/apache/isis/blob/rel/isis-1.12.1/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/IsisAjaxNavigationToolbar.html#L23 > [2] > > https://github.com/apache/isis/blob/rel/isis-1.12.1/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java#L144 > [3] > > https://github.com/apache/isis/blob/rel/isis-1.12.1/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/LocalizerForIsis.java#L52 > [4] > > https://github.com/apache/isis/blob/rel/isis-1.12.1/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/IsisAjaxNavigationToolbar.java#L44 > > > On 23 May 2016 at 14:41, Deacon Frost <dfrost...@gmail.com> wrote: > > > Hi, > > > > I'm trying to wrap my head around the translation feature and I'd like to > > translate the "SHOW ALL"-label for the table paginator (ISIS-690). I > can't > > figure out the pot-address-string/msgid to translate this. Any hint how > to > > go about this? > > Thanks a lot! > > > > Cheers, > > > > D. > > >
i18n question
Hi, I'm trying to wrap my head around the translation feature and I'd like to translate the "SHOW ALL"-label for the table paginator (ISIS-690). I can't figure out the pot-address-string/msgid to translate this. Any hint how to go about this? Thanks a lot! Cheers, D.
Re: Refresh of referenced objects titles with custom layout
Hello Dan, thanks a lot for the quick reply! I'll try out 1.13.0-SNAPSHOT and see how that goes... Cheers, Deacon On Wed, May 11, 2016 at 11:17 PM, Dan Haywood <d...@haywood-associates.co.uk> wrote: > Hi Deacon, > > Thanks for the thanks! > > With respect to that problem, I believe this is ISIS-1396 [1]. Yes, it is > a Wicket viewer bug, which has always been there I think, but only now > showing up with the new layout.xml. Anyway, it is fixed in > 1.13.0-SNAPSHOT; perhaps you could build from source [2] and see if it > addresses the issue. > > With respect to your query about updating(), what do you mean exactly by > the "value of the changed object". I suppose if the object has changed > because of a property edit, then you might mean the old/new values of that > property? But the object might be changed because of an action invocation, > in which case many of its property values will have changed. > > Perhaps what might help is to use > @DomainObject(updatingLifecycleEvent=...). This is just a lightweight > layer on top of the JDO lifecycle events, but to save you having to dig > down to the JDO PersistenceManager. Maybe that would do the job for you? > > Alternatively, if you do need fine-grained visibility of changes in state, > then there's the AuditingService3 API that you could implement. > > HTH > Dan > > > > [1] https://issues.apache.org/jira/browse/ISIS-1396 > [2] http://isis.apache.org/guides/dg.html#_dg_building-isis > > > > On 11 May 2016 at 11:59, Deacon Frost <dfrost...@gmail.com> wrote: > > > Hi, > > > > first of all thanks for the latest release and also the latest > screencasts > > -- Apache Isis keeps getting better and better!! :) > > > > I am using the wicket viewer with v 1.12.1. I use a custom > > .layout.xml file copied verbatim from SimpleObject with tabGroups > > displaying properties on different tabs. If I create a new object or > update > > value properties of an existing one, the titles of referenced objects get > > reset to "undefined ...". If I just click on the tab-title, the screen > gets > > updated immediately to the correct values. (The behavior is correct as > > expected when I remove the layout.xml-file.) Am I missing something or > > might this be a wicket viewer bug? > > > > Also, is there any chance to get the value of the changed object in an > > "updating()"-event? or do I have to resort to a custom publishing-module > or > > hook into jdoPreStore? > > > > Cheers, > > > > Deacon > > >
Refresh of referenced objects titles with custom layout
Hi, first of all thanks for the latest release and also the latest screencasts -- Apache Isis keeps getting better and better!! :) I am using the wicket viewer with v 1.12.1. I use a custom .layout.xml file copied verbatim from SimpleObject with tabGroups displaying properties on different tabs. If I create a new object or update value properties of an existing one, the titles of referenced objects get reset to "undefined ...". If I just click on the tab-title, the screen gets updated immediately to the correct values. (The behavior is correct as expected when I remove the layout.xml-file.) Am I missing something or might this be a wicket viewer bug? Also, is there any chance to get the value of the changed object in an "updating()"-event? or do I have to resort to a custom publishing-module or hook into jdoPreStore? Cheers, Deacon